FE-823: Elicitation backlog substrate and agenda read-back#178
FE-823: Elicitation backlog substrate and agenda read-back#178lunelson wants to merge 18 commits into
Conversation
Induces a fault-type lens from PR review-bot comments (or supplied observations), gates token-vs-symptom via a three-part promotion test, audits both family and ownership axes, and proposes graduating recurring lenses into ln-review's contract catalog. Wire into ln-consult routing and the ln-skills praxis reference; back-reference from ln-review. Amp-Thread-ID: https://ampcode.com/threads/T-019ea618-c2ac-721d-809a-a72bfd9ce453 Co-authored-by: Amp <amp@ampcode.com>
Anchor every prompt-resource family to an authoritative source (goals/methods have no README; goals->D59-L, methods->D58-L, strategies/lenses->README+SPEC), add a per-family facet checklist, make verification self-checkable via a required structural test, and add concurrency guardrails scoping edits to .pi/skills/**/*.md. Amp-Thread-ID: https://ampcode.com/threads/T-019ea2fc-9f12-767d-bd7a-08497f7307fd Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ea2ec-7506-74ed-a4e0-99b8d800442f Co-authored-by: Amp <amp@ampcode.com>
…authority-shell Prepares three mutually write-disjoint streams to launch from a clean base: - graph-observed-shapes--coverage-ledger: ratify the consumer-specific read-shape inventory (tool=6, RPC/web=2 is intentional) + coverage-guard test - minimal-authority-shell--audit-and-guard: pre-audit found most criteria already met (discriminants exist, needs_human unused, elicit blocks bash/edit/write, D34-L command policy present), so an audit + guard slice Records the parallel-stream plan and the src/.pi/agents/state.ts single-writer invariant in PLAN.md, plus Current execution pointers on both frontiers. Amp-Thread-ID: https://ampcode.com/threads/T-019ea2fc-9f12-767d-bd7a-08497f7307fd Co-authored-by: Amp <amp@ampcode.com>
Stream A (resource-body-depth) landed in 1ca02e3. Mark both Seam 3a/3b content-depth rows built in CROSS_CUT_PLAN.md, record the completion in PLAN.md (Recently Completed + parallel-stream note: A done, B and C remain), and delete the now-exhausted scope card. All cross-cut row-sized work is complete; only the unscoped live 'what to ask next' driver remains. Amp-Thread-ID: https://ampcode.com/threads/T-019ea2fc-9f12-767d-bd7a-08497f7307fd Co-authored-by: Amp <amp@ampcode.com>
Add 'rename blast-radius includes the data plane' cue to ln-review Contract integrity (and mirror into ln-judo-review): a reviewer-bot comment on renamed data samples one token of a wider syndrome; regenerate committed artifacts wholesale rather than field-patching, and check legacy-input policy against posture. Add memory/REFACTOR.md scoping the PR 177 (FE-811) reconciliation: regenerate two stale reference runs, add a residue guard, fix the edge-direction label. Output of an ln-induct run on PR 177 comments. Amp-Thread-ID: https://ampcode.com/threads/T-019ea618-c2ac-721d-809a-a72bfd9ce453 Co-authored-by: Amp <amp@ampcode.com>
Resolve the competing-thesis framing into engine (induction) + governor (triage gate). Name canonical clusters: ladder of abstraction (step 2), Parnas/blast radius (ownership axis). Merge the posture-check insight into the find/fix principle (a true diagnosis can carry a wrong prescription). Fold the gitignored-data-plane search craft into one clause. Keep 'defects cluster' as a convergent phrase without attribution (the principle's density is convergent, not Beizer-rooted). Gate, stopping rule, output template, routing, and reconciliation tail unchanged. Amp-Thread-ID: https://ampcode.com/threads/T-019ea618-c2ac-721d-809a-a72bfd9ce453 Co-authored-by: Amp <amp@ampcode.com>
Both graph-observed-shapes (85e73ba) and minimal-authority-shell (68474e3) landed in parallel; each reconciled its own slice but could not see the other's completion. Fix the residual drift: mark graph-observed-shapes done in the dependency node, update the context paragraph and parallel-stream note to reflect all three streams landed with no collisions, and delete the exhausted graph-observed-shapes card (B left it as a done tombstone; ln-scope deletes exhausted cards, matching C's cleanup). Amp-Thread-ID: https://ampcode.com/threads/T-019ea2fc-9f12-767d-bd7a-08497f7307fd Co-authored-by: Amp <amp@ampcode.com>
Correct the premature 'cross-cut exhausted' claim: the Seam 3a 'what to ask next' driver row is still partial, so the seam stays open. Dispose it as the promoted elicitation-driver frontier (buildable now). De-fog the remaining coverage frontiers rather than parking them: - runtime-affordances-and-legality reclassified buildable-now; scoped as a coverage ledger card with only review-set/turn-mode rows tripwired. - exchanges-and-generalized-capture is evidence-gated; named forcing function is a capture-quality fitness spike card (A22-L). Amp-Thread-ID: https://ampcode.com/threads/T-019ea2fc-9f12-767d-bd7a-08497f7307fd Co-authored-by: Amp <amp@ampcode.com>
- runtime-affordances card: widen the core derivation to affordances(resolvedState, readinessGrade); legality is not derivable from ResolvedBrunchAgentState alone (grade is a separate input per BrunchPostureToolPolicyInput / isGradeLegal). - Reorder Next: elicitation-driver precedes runtime-affordances so the last open cross-cut row closes before any fresh coverage frontier; runtime-affordances is parallel-eligible but must not preempt it. - Clarify the generalized-capture cross-cut row: 'built' = POC bar only; richer capture is owned by exchanges-and-generalized-capture, gated on capture-quality-spike, not unfinished in this row. Amp-Thread-ID: https://ampcode.com/threads/T-019ea2fc-9f12-767d-bd7a-08497f7307fd Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ea2ec-7506-74ed-a4e0-99b8d800442f Co-authored-by: Amp <amp@ampcode.com>
…strate-and-agenda-read-back # Conflicts: # memory/PLAN.md
Reconcile runtime-affordances-and-legality to done (0010510), add its Recently Completed entry, archive the 06-05/06-06 completion bursts to PLAN_HISTORY, update the cross-cut capture-quality note, and add D40-L to the session topology README header for the new affordance ledger. Amp-Thread-ID: https://ampcode.com/threads/T-019ea6aa-0ce3-766e-8458-36e6a4450587 Co-authored-by: Amp <amp@ampcode.com>
PR SummaryMedium Risk Overview Product/runtime: Shared Process/docs: Adds Reviewed by Cursor Bugbot for commit 1447843. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1447843. Configure here.
| recommendation: 'keep_parked', | ||
| summary: | ||
| 'Do not graduate generalized capture until the extraction prompt/model can keep undecided implications out of high-confidence graph truth.', | ||
| }; |
There was a problem hiding this comment.
False-commit verdict mislabels confidence
Medium Severity
When falseCommitCount is positive, verdictFor reports a negative shift about committing a low-confidence implication, but falseCommitCount only counts high-confidence extractions that would wrongly enter graph truth. The gate still recommends keep_parked, yet the stated failure mode can misread probe output during graduation decisions.
Reviewed by Cursor Bugbot for commit 1447843. Configure here.
| "runId": "2026-06-08-capture-quality-sample", | ||
| "generatedAt": "2026-06-08T09:44:38.831Z", | ||
| "cwd": "/Users/lunelson/Code/hashintel/brunch-next-chi", | ||
| "extractorName": "sample-llm-output", |
There was a problem hiding this comment.
Committed probe report leaks cwd
Low Severity
The checked-in capture-quality sample report.json records a developer-machine absolute cwd, while the new probe writer normalizes ephemeral temp workspaces via portableCwd for committed artifacts. The sample run was persisted before that contract, so reference data carries a non-portable path the project treats as rename/residue drift.
Reviewed by Cursor Bugbot for commit 1447843. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR materializes the FE-823 elicitation backlog substrate (a spec-scoped prospective register) and, in the same branch, lands several coverage/frontier hardening slices (graph observed-shape ledger + drift guards, runtime affordance legality derivation + ledger, and a deterministic capture-quality probe), plus planning/doc sync updates.
Changes:
- Adds a new
elicitation_backlogSQLite table + Drizzle migration, seeds grounding questions atcreateSpec, and routes create/close operations throughCommandExecutorwith spec-local{specId, lsn}+change_log. - Establishes “closed ledgers + drift guards” for graph observed read shapes and runtime affordances, and introduces a deterministic capture-quality measurement loop with fixture artifacts.
- Updates prompt-resource markdown bodies and planning/skill protocol docs to reflect new coverage-frontier guidance and the new
ln-inductskill.
Reviewed changes
Copilot reviewed 63 out of 63 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/web/README.md | Documents web client constraints and current graph read subset; updates target topology sketch. |
| src/session/runtime-affordances-coverage.test.ts | Adds a runtime-affordances coverage ledger + drift guard test. |
| src/session/README.md | Documents runtime affordance ledger and ownership/deferred rationale. |
| src/rpc/README.md | Documents deliberate graph RPC read subset and observed-shape ownership. |
| src/projections/session/runtime-policy.ts | Centralizes readiness-grade legality tables + axis option/default helpers. |
| src/projections/session/affordances.ts | Adds pure affordance derivation over resolved runtime state + readiness grade. |
| src/projections/session/affordances.test.ts | Tests affordance legality/default behavior and AUTO exclusions. |
| src/probes/capture-quality-loop.ts | Adds capture-quality probe runner, summarizer, artifact writer, CLI entry. |
| src/probes/capture-quality-loop.test.ts | Tests capture-quality summarization and artifact writing. |
| src/graph/schema/elicitation-backlog.ts | Adds domain types for elicitation backlog entries. |
| src/graph/README.md | Documents elicitation backlog ownership and observed read-shape ledger + guard. |
| src/graph/queries.ts | Adds getOpenElicitationBacklogEntries query + row mapping. |
| src/graph/queries.test.ts | Tests open elicitation backlog read-back and spec scoping. |
| src/graph/observed-shapes-coverage.test.ts | Adds drift guard tying tool/RPC/web surfaces to the observed-shape ledger. |
| src/graph/index.ts | Re-exports elicitation backlog types and query function. |
| src/graph/command-executor.ts | Seeds backlog at spec creation; adds create/close backlog entry commands. |
| src/graph/command-executor.test.ts | Tests backlog seeding, create/close commands, and invariants. |
| src/db/schema.ts | Adds enum arrays and elicitation_backlog table definition. |
| src/db/row-schemas.ts | Adds drizzle-typebox row schemas for elicitation_backlog. |
| src/db/README.md | Documents elicitation_backlog as graph-adjacent, spec-scoped substrate. |
| src/.pi/skills/strategies/step-wise-disambiguate.md | Deepens strategy guidance content. |
| src/.pi/skills/strategies/step-wise-decision-tree.md | Deepens strategy guidance content. |
| src/.pi/skills/strategies/propose-graph.md | Deepens strategy guidance content. |
| src/.pi/skills/strategies/project-graph.md | Deepens strategy guidance content. |
| src/.pi/skills/strategies/freestyle.md | Deepens strategy guidance content and constraints. |
| src/.pi/skills/methods/review-for-gaps.md | Deepens method guidance content. |
| src/.pi/skills/methods/read-context.md | Deepens method guidance content. |
| src/.pi/skills/methods/commit-graph.md | Deepens method guidance content. |
| src/.pi/skills/lenses/oracle.md | Deepens lens guidance content. |
| src/.pi/skills/lenses/intent.md | Deepens lens guidance content. |
| src/.pi/skills/lenses/design.md | Deepens lens guidance content. |
| src/.pi/skills/goals/grounding-advance.md | Deepens goal guidance content. |
| src/.pi/skills/goals/elicit-expand.md | Deepens goal guidance content. |
| src/.pi/skills/goals/commit-converge.md | Deepens goal guidance content. |
| src/.pi/skills/goals/capture-posture.md | Deepens goal guidance content. |
| src/.pi/extensions/runtime/authority-matrix.test.ts | Adds minimal authority-matrix guard test for tool blocking + result discriminants. |
| src/.pi/agents/state.ts | Refactors to reuse shared legality tables from runtime-policy. |
| src/.pi/agents/compose.test.ts | Adds manifest-wide prompt-resource depth/readability test. |
| memory/SPEC.md | Updates assumptions/decisions/invariants to reflect landed work. |
| memory/REFACTOR.md | Adds refactor note derived from ln-induct output (data-plane rename residue). |
| memory/PLAN.md | Syncs plan to reflect completed frontiers and promoted follow-ons. |
| memory/CROSS_CUT_PLAN.md | Syncs cross-cut ledger status and promotions. |
| memory/cards/elicitation-backlog--substrate.md | Deletes retired execution card. |
| memory/cards/crosscut-know--resource-body-depth.md | Deletes retired execution card. |
| drizzle/meta/0003_snapshot.json | Adds drizzle snapshot metadata for the new migration. |
| drizzle/meta/_journal.json | Records new migration in drizzle journal. |
| drizzle/0003_outstanding_black_bird.sql | Adds migration creating elicitation_backlog table. |
| docs/praxis/ln-skills.md | Documents coverage-frontier protocol maturity + adds ln-induct. |
| docs/archive/PLAN_HISTORY.md | Archives older plan history during sync. |
| .fixtures/runs/capture-quality/sample-llm-extractions.json | Adds sample extraction fixture for capture-quality probe. |
| .fixtures/runs/capture-quality/2026-06-08-capture-quality-sample/verdict.md | Adds sample run verdict artifact. |
| .fixtures/runs/capture-quality/2026-06-08-capture-quality-sample/scenarios.json | Adds sample run scenarios artifact. |
| .fixtures/runs/capture-quality/2026-06-08-capture-quality-sample/report.json | Adds sample run report artifact. |
| .fixtures/runs/capture-quality/2026-06-08-capture-quality-sample/extractions.json | Adds sample run extractions artifact. |
| .agents/skills/ln-sync/SKILL.md | Expands ln-sync checks for coverage protocol drift. |
| .agents/skills/ln-scope/SKILL.md | Adds coverage preflight guidance and explicit owner/oracle requirements. |
| .agents/skills/ln-review/SKILL.md | Adds contract-integrity lens about data-plane rename residue. |
| .agents/skills/ln-plan/SKILL.md | Adds coverage reference + sequencing precedence rule. |
| .agents/skills/ln-plan/references/coverage.md | Adds canonical coverage-frontier reference doc. |
| .agents/skills/ln-judo-review/SKILL.md | Expands ambient-contract cues to include data-plane rename residue. |
| .agents/skills/ln-induct/SKILL.md | Adds new ln-induct skill definition. |
| .agents/skills/ln-consult/SKILL.md | Routes systemic-review-bot findings to ln-induct and tightens coverage admission guidance. |
| .agents/skills/ln-build/SKILL.md | Tightens coverage-row execution discipline and stop conditions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const derivedRows = Object.entries(derived).flatMap(([axis, axisAffordance]) => | ||
| Object.keys(axisAffordance).map((field) => | ||
| field === 'legalOptions' ? `${axis}.options` : `${axis}.default_on_switch`, | ||
| ), | ||
| ); |
| let report = summarizeCaptureQualityRun({ | ||
| runId: options.runId ?? defaultRunId(), | ||
| generatedAt: new Date().toISOString(), | ||
| cwd: options.cwd ?? process.cwd(), | ||
| extractorName: options.extractorName ?? 'sample-llm-output', | ||
| scenarios: CAPTURE_QUALITY_SCENARIOS, | ||
| extractions, | ||
| }); |
| /** Create an elicitation-backlog entry through the command boundary. */ | ||
| createElicitationBacklogEntry( | ||
| input: CreateElicitationBacklogEntryInput, | ||
| ): CreateElicitationBacklogEntryResult { | ||
| const diagnostics = validateCreateElicitationBacklogEntry(input); |
Merge activity
|



Materializes the D65-L prospective elicitation backlog and, alongside it, lands several coverage frontiers and cross-cut completion work that matured on this branch.
Core — elicitation backlog substrate (FE-823)
elicitation_backlogtable + generated migration (D65-L / A24-L); grounding agenda seeded atcreateSpec.CommandExecutoron the shared{specId, lsn}/change_logboundary; graph-owned per-spec open-entry read-back.Coverage frontiers landed alongside
src/graph/README.md+ drift guard (observed-shapes-coverage.test.ts); no transport shape shipped.CommandResultdiscriminants, structuredneeds_human, andelicittool authority derived from the shared projected runtime policy.(resolvedState, readinessGrade)affordance derivation (projections/session/affordances.ts); shared grade/AUTO legality lifted toruntime-policy.ts; coverage ledger + guard, withactive-review-set/turn-modetripwired.exchanges-and-generalized-capturenarrowly with an explicit false-commit guard.Cross-cut completion
.pi/skills/{goals,strategies,lenses,methods}plus a manifest-wide depth test. Closes the cross-cut body-depth row; the Seam 3a "what to ask next" driver is promoted to theelicitation-driverfrontier.Tooling / process
ln-inductskill (generative diagnostic lens from review-bot comments) and coverage-frontier protocol hardening across theln-*skills.Housekeeping
brunch-next-chi; canonical-memory sync (PLAN / SPEC / CROSS_CUT_PLAN / PLAN_HISTORY / topology READMEs).Note: this branch carries more than the FE-823 frontier — the coverage frontiers above matured here rather than on separate branches. The FE-811 ship-gate rename-residue + mention-autocomplete follow-ups are stacked separately on
ln/fe-811-ship-gate-residue-and-mentions.Verification
npm run verify(fix → test → build) green; 68 test files / 568 tests at merge.