Skip to content

feat(ai-autopilot): decisions ledger (#112)#117

Merged
suleimansh merged 1 commit into
mainfrom
feat/decisions-ledger
Jul 2, 2026
Merged

feat(ai-autopilot): decisions ledger (#112)#117
suleimansh merged 1 commit into
mainfrom
feat/decisions-ledger

Conversation

@suleimansh

Copy link
Copy Markdown
Member

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).

  • DecisionLedger records rejected ideas / settled choices; consult(idea) and wasRejected(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.
  • Round-trips a human-editable DECISIONS.md (loadLedger / saveLedger) so the user reads and edits the same file the agent consults. Storage-agnostic LedgerFs seam is a subset of the runner's RunnerFs, so it persists inside a sandbox the same way as on the host; nodeLedgerFs() is the host adapter.
  • decisionTools(ledger) exposes consult_decisions + record_decision to 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

  • 99 tests pass (22 new: define/ledger/markdown/store/tools), typecheck + build clean.
  • Drove the real flow on disk: record a rejected idea to DECISIONS.md, reload in a fresh session, a re-pitch is correctly flagged, briefing renders for prompt injection.

…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).
@suleimansh suleimansh added the enhancement New feature or request label Jul 2, 2026
@suleimansh suleimansh self-assigned this Jul 2, 2026
@suleimansh suleimansh added the priority: medium Worth doing, not urgent label Jul 2, 2026
@suleimansh suleimansh merged commit c9b4d0d into main Jul 2, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/decisions-ledger branch July 2, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decisions bookkeeping — stop the AI re-pitching rejected ideas

1 participant