A working checkpoint for organizational memory
Most company knowledge-base tools stop at search: they find an old document and hand it to you.
Decision Gate does something more useful.
It reads a new proposal, recalls the organization's documented past attempts at something similar, and checks — condition by condition — whether the specific reasons those attempts failed are still present in the new plan.
It never says approve or reject.
Instead, it gives the human decision-maker a precedent report containing the relevant historical evidence, the conditions that caused previous failures, and an assessment of whether those conditions still apply.
The idea is simple: Before an organization makes a new decision, let its own memory explain what happened the last time it tried something similar.
View the Decision Gate source code on GitHub
The Problem
Organizations accumulate years of project reports, retrospectives, postmortems, meeting notes, experiments, and decisions.
The information may exist, but that does not mean it is available when someone needs it.
Imagine a team proposes:
"Let's build an AI assistant for billing questions."
The proposal sounds reasonable.
But suppose the organization tried something similar before and abandoned it because complex billing cases could not be handled reliably.
If the new team never discovers that history, the organization can spend time and money rediscovering the same lesson.
Decision Gate treats those previous attempts as organizational experience rather than dead documents.
The Architecture
Decision Gate is designed as a closed loop rather than a one-way lookup system.
Past Projects
↓
Hindsight Retain
↓
New Proposal
↓
Hindsight Recall
↓
Precedent Analysis
(Hindsight + Gemini)
↓
Human Decision
↓
Real Outcome
↓
Memory Grows
↺
Past projects are converted into historical experiences and stored in Hindsight.
When a new proposal arrives, the system recalls relevant precedents and analyzes them against the proposal.
After the decision is made and the real outcome becomes known, that outcome is written back into memory.
The important part is the final step.
The system does not simply remember old documents. The result of each new decision becomes another experience that can be recalled later.
The Technology Stack
- React 19 + Vite
- Express + TypeScript
- PostgreSQL + Prisma
- Google Gemini
- Hindsight through
@vectorize-io/hindsight-client - Tailwind CSS
Turning Past Projects Into Organizational Memory
The first part of the system is a historical experience record.
A project can capture:
- The problem or goal
- What was attempted
- The approach used
- What happened
- What worked
- What failed
- Why it failed
- Root cause
- Constraints
- Lessons learned
- Conditions for future success
That information is stored in the application's database and then retained in Hindsight.
Here is the core retention flow:
const saved = await db.createHistoricalProjectAndExperience(
project,
experience
);
const retainResult =
await hindsightService.retainHistoricalExperience({
experienceId: saved.experience.id,
projectName: saved.project.name,
status: saved.project.status,
problemGoal: saved.experience.problemGoal,
whatWasAttempted: saved.experience.whatWasAttempted,
whatHappened: saved.experience.whatHappened,
whyItFailed: saved.experience.whyItFailed,
lessonsLearned: saved.experience.lessonsLearned,
});
The important detail is that the memory is not just a project title or a paragraph of text.
Decision Gate retains the experience around the project: what was tried, what happened, why it happened, and what the organization learned.
That makes the memory useful later.
Where Hindsight Fits
Decision Gate uses Hindsight as its persistent memory layer for organizational precedents.
The Hindsight service builds a structured narrative before retaining an experience. It includes the project, outcome, goal, approach, failure information, root cause, lessons, and future conditions.
The system also uses metadata such as the project status and a precedent tag so that relevant organizational experiences can be recalled later.
The Hindsight integration is implemented using @vectorize-io/hindsight-client.
Project Memory Flow
Historical Project
↓
Experience Record
↓
Hindsight Retain
↓
Persistent Organizational Memory
Screenshot — Decision Gate Dashboard
The dashboard represents the application's main decision-memory workflow: historical projects, proposals, system status, and organizational experience.
A New Proposal Triggers the Memory Search
The second half of the system begins when someone submits a new proposal.
The proposal is not represented only by its title.
Decision Gate builds a richer recall query from the proposal's:
- Problem
- Proposed solution
- Target users
- Technology
- Expected outcome
- Risks
- Dependencies
The analysis service constructs a query before calling Hindsight:
const recallQuery = [
proposal.title,
proposal.problemBeingSolved,
proposal.proposedSolution,
`Target users: ${proposal.targetUsers}`,
`Technology and approach: ${proposal.technologyApproach}`,
`Expected outcome: ${proposal.expectedOutcome}`,
proposal.knownRisks
? `Risks: ${proposal.knownRisks}`
: '',
proposal.dependencies
? `Dependencies: ${proposal.dependencies}`
: '',
]
.filter(Boolean)
.join('. ');
const recallRes =
await hindsightService.recallRelevantPrecedents(
recallQuery,
10
);
This is important because a new proposal may use completely different words from an old project.
The system therefore searches for relevant organizational experiences, rather than requiring two projects to have identical names.
The recalled memories are then normalized and deduplicated before entering the analysis pipeline.
The Interesting Part: Finding the Failure Condition
Finding a similar project is useful.
But it is not enough.
The real question is:
Did the old reason for failure actually survive into the new proposal?
For example:
Previous Project
- BillingBot
- Failed
- Complex billing cases were difficult to automate
- Customers needed human assistance
New Proposal
- AI billing assistant
- Similar customer problem
- But the new design includes human escalation for complex cases
The two projects are similar, but the new proposal has changed an important part of the design.
Decision Gate therefore asks Gemini to compare the current proposal against the recalled historical evidence.
The comparison considers:
- Problem similarity
- Solution similarity
- Target users
- Technology
- Operations
- Constraints
- Expected outcome
- Historical failure conditions
- Historical success conditions
- What has changed
- Unresolved questions
The system is explicitly instructed not to turn this analysis into an automatic approval or rejection.
Instead, it produces evidence for the person responsible for the decision.
Structured Failure-Condition Analysis
The Gemini response uses a structured schema for historical failure conditions:
failureConditionsAssessment: {
type: Type.ARRAY,
items: {
type: Type.OBJECT,
properties: {
condition: {
type: Type.STRING
},
evidence: {
type: Type.STRING
},
assessment: {
type: Type.STRING,
enum: [
'Present',
'Not Present',
'Unclear'
],
},
reason: {
type: Type.STRING
},
},
required: [
'condition',
'evidence',
'assessment',
'reason'
],
},
}
Each historical failure condition is therefore evaluated as:
- Present
- Not Present
- Unclear
This gives the decision-maker a much more useful result than a generic similarity score.
The Precedent Report
When relevant history is found, Decision Gate produces a Precedent Report.
A report can contain:
- Historical projects that were recalled
- Project status
- Original objective
- What was attempted
- What happened
- Why it failed or what worked
- Root cause
- Lessons learned
- Similarities to the new proposal
- Differences from the historical project
- Failure-condition assessments
- Evidence
- Unresolved questions
Screenshot — Precedent Report
This is the most important interface image because it shows how recalled organizational memory becomes actionable evidence for a new proposal.
The AI Does Not Make the Final Decision
One of the most important design choices in Decision Gate is keeping the final decision with a human.
The Gemini system instruction explicitly separates:
- Historical fact
- Current proposal information
- AI inference
- Missing information
- Human decision
The model is also instructed not to invent historical projects, decisions, failures, outcomes, or lessons.
A simplified version of the system boundary is:
Historical Experience
↓
Hindsight
↓
Relevant Precedents
↓
Comparative Analysis
↓
Precedent Report
↓
Human Decision
The AI supplies memory and analysis.
The human remains responsible for the actual decision.
What Happens When There Is No Precedent?
This case is just as important.
Decision Gate does not invent a historical project when nothing relevant is found.
The system has an explicit zero-precedent guard:
if (matchedEvidence.length === 0) {
const questionsForNewInitiative = [
'Has another team attempted an unrecorded pilot in this domain?',
'What technical assumptions have not yet been validated?',
'What is the minimum viable experiment to test this idea?',
'Who is accountable for the measurable outcome?',
];
return {
success: true,
precedentFound: false,
memoryStatus,
memoriesRecalledCount: 0,
unresolvedQuestions:
questionsForNewInitiative,
comparison: null,
recalledPrecedents: [],
};
}
When the memory bank has nothing relevant, the system says so and produces due-diligence questions instead.
That is an important guard against fabricated history.
Closing the Memory Loop
There is one more part of the system that makes the architecture interesting.
After a proposal has been decided and eventually produces a real outcome, Decision Gate can record what actually happened.
The outcome model captures information such as:
- Actual result
- What happened
- What worked
- What failed
- Actual root cause
- Final lesson
- Future advice
That new experience can then be retained in Hindsight.
The relevant server flow looks like this:
const newExperienceData = {
problemGoal: proposal.problemBeingSolved,
whatWasAttempted: proposal.proposedSolution,
whatHappened,
whatWorked,
whatFailed,
whyItFailed:
actualResult === 'Failed' ||
actualResult === 'Cancelled'
? whatFailed
: undefined,
rootCause: actualRootCause,
lessonsLearned: finalLesson,
futureConditions: futureAdvice,
source: `Outcome of Proposal "${proposal.title}"`,
};
const { project, experience } =
await db.createHistoricalProjectAndExperience(
newProjectData,
newExperienceData
);
await hindsightService.retainHistoricalExperience({
experienceId: experience.id,
projectName: project.name,
...newExperienceData,
});
The loop becomes:
PAST EXPERIENCE
↓
Hindsight Memory
↓
NEW PROPOSAL
↓
Precedent Analysis
↓
Human Decision
↓
REAL-WORLD OUTCOME
↓
New Historical Experience
↓
Hindsight Memory
↺
The organization is therefore not only searching its past.
It is continuously adding new experience to that memory.
What I Learned
1. Memory Needs Context
Saving only "Project X failed" is not very useful.
The useful information is the context around the failure: what the team was trying to solve, what it changed, what happened, why it happened, and what would need to be different next time.
2. Similarity Is Only the Beginning
Two projects can solve the same problem and still have very different outcomes.
The useful comparison is not simply:
"Have we done this before?"
It is:
"What happened when we did something similar, and are the conditions that caused that outcome present now?"
3. A Memory System Needs a Feedback Loop
A proposal becomes much more valuable as organizational knowledge after its real outcome is recorded.
The outcome is not the end of the workflow.
It becomes the next piece of memory.
4. No Precedent Is a Legitimate Result
If the system cannot find relevant historical evidence, it should say so.
Decision Gate treats missing precedent as uncertainty and gives the decision-maker questions to investigate rather than inventing history.
5. AI Should Support the Decision, Not Hide the Evidence
The most useful output is not simply a final label.
It is a traceable explanation of what was found, why it was considered relevant, what changed, and what still needs human verification.
The Stack
Decision Gate is implemented as a React frontend with an Express/TypeScript backend.
The project uses:
- React
- Vite
- TypeScript
- Express
- Prisma
- PostgreSQL
- Google Gemini
@vectorize-io/hindsight-client- Tailwind CSS
The backend provides workflows for historical projects, proposals, precedent analysis, decisions, outcomes, insights, audit information, and Hindsight synchronization.
Closing
The idea behind Decision Gate is simple:
Before an organization starts something new, ask its own memory what happened the last time it tried something similar.
The interesting part is not just retrieving an old document.
It is connecting past experience to a new proposal, identifying the conditions behind previous outcomes, showing what has changed, and feeding the eventual outcome back into organizational memory.
That is the direction I wanted to explore with Hindsight:
not an AI that merely remembers facts, but an AI system that can help an organization remember its own experience.



Top comments (0)