feat(ai-autopilot): decisions ledger (#112)#117
Merged
Conversation
…tching rejected ideas Records a project's rejected ideas and settled choices so a run does not re-suggest what was already turned down. DecisionLedger answers consult()/ wasRejected() before proposing (deterministic token-overlap matching) and round-trips a human-editable DECISIONS.md via loadLedger/saveLedger over a storage-agnostic LedgerFs seam (subset of the runner's RunnerFs; nodeLedgerFs host adapter). decisionTools() exposes consult_decisions + record_decision to an agent; decisionBriefing() renders the rejected set into the system prompt. First child (#112) of the AI-framework epic (#110).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #112. First child of the AI-framework epic #110.
What
A durable memory layer so a run stops re-pitching ideas that were already turned down (the single most annoying AI-dev failure mode, and the epic's most defensible feature).
DecisionLedgerrecords rejected ideas / settled choices;consult(idea)andwasRejected(idea)check before the agent proposes. Matching is lexical token-overlap over title + tags: deterministic, cheap to run before every proposal, and a semantic upgrade can sit behind the same contract later.DECISIONS.md(loadLedger/saveLedger) so the user reads and edits the same file the agent consults. Storage-agnosticLedgerFsseam is a subset of the runner'sRunnerFs, so it persists inside a sandbox the same way as on the host;nodeLedgerFs()is the host adapter.decisionTools(ledger)exposesconsult_decisions+record_decisionto an agent;decisionBriefing(ledger)renders the rejected set into the system prompt.Design call
The issue left format open (structured store vs
DECISIONS.md). Went with markdown-as-canonical: it matches the "decisions are data, not code" ethos, it is git-diffable and human-editable, and it lines up with the CODE-OVERVIEW.md direction (#114). A structured index parses out of it.Leaves a clean seam for "the loop" (#113) to consult on major changes; not wired here.
Verification
DECISIONS.md, reload in a fresh session, a re-pitch is correctly flagged, briefing renders for prompt injection.