Skip to content

FE-823: Elicitation backlog substrate and agenda read-back#178

Open
lunelson wants to merge 17 commits into
nextfrom
ln/fe-823-elicitation-backlog-substrate-and-agenda-read-back
Open

FE-823: Elicitation backlog substrate and agenda read-back#178
lunelson wants to merge 17 commits into
nextfrom
ln/fe-823-elicitation-backlog-substrate-and-agenda-read-back

Conversation

@lunelson

@lunelson lunelson commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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)

  • Flat spec-scoped elicitation_backlog table + generated migration (D65-L / A24-L); grounding agenda seeded at createSpec.
  • Create/close mutations route through CommandExecutor on the shared {specId, lsn} / change_log boundary; graph-owned per-spec open-entry read-back.

Coverage frontiers landed alongside

  • graph-observed-shapes — closed consumer-specific observed-shape ledger in src/graph/README.md + drift guard (observed-shapes-coverage.test.ts); no transport shape shipped.
  • minimal-authority-shell (FE-810) — authority-matrix guard over the current POC seam: CommandResult discriminants, structured needs_human, and elicit tool authority derived from the shared projected runtime policy.
  • runtime-affordances-and-legality — pure (resolvedState, readinessGrade) affordance derivation (projections/session/affordances.ts); shared grade/AUTO legality lifted to runtime-policy.ts; coverage ledger + guard, with active-review-set / turn-mode tripwired.
  • capture-quality-spike — deterministic capture-fitness probe (A22-L) that graduated exchanges-and-generalized-capture narrowly with an explicit false-commit guard.

Cross-cut completion

  • Prompt-resource body-depth pass across .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 the elicitation-driver frontier.

Tooling / process

  • New ln-induct skill (generative diagnostic lens from review-bot comments) and coverage-frontier protocol hardening across the ln-* skills.

Housekeeping

  • Merged 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.

@lunelson lunelson changed the title Add ln-induct skill: generative diagnostic lens from review-bot comments FE-823: Elicitation backlog substrate and agenda read-back Jun 8, 2026
@lunelson lunelson marked this pull request as ready for review June 8, 2026 10:16
Copilot AI review requested due to automatic review settings June 8, 2026 10:16
@cursor

cursor Bot commented Jun 8, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches persistence (elicitation_backlog), CommandExecutor mutation/audit boundaries, and agent runtime policy; scope is broad beyond FE-823 though verification is described as green.

Overview
Adds the D65-L elicitation backlog substrate: spec-scoped elicitation_backlog (migration 0003), create/close via CommandExecutor on the shared {specId, lsn} / change_log seam, grounding agenda seed at createSpec, and graph-owned open-entry read-back.

Lands several coverage frontiers on the same branch (reflected in memory/PLAN.md / cross-cut docs): consumer observed-shape ledger + drift test, minimal authority guard tests for elicit / CommandResult, shared runtime affordances derivation (affordances.ts + lifted runtime-policy), and a capture-quality probe with committed sample run artifacts that graduates narrow exchanges-and-generalized-capture.

Cross-cut elicitor work: deepens .pi/skills goal/strategy/lens/method bodies with a manifest depth test; promotes the remaining Seam 3a “what to ask next” row to the elicitation-driver frontier.

Process/tooling: new ln-induct skill and first-class ln-plan/references/coverage.md with stricter coverage execution in ln-build / ln-scope / ln-sync; extends ln-review contract cues for rename residue in committed fixtures. Adds memory/REFACTOR.md (FE-811 rename-residue plan, stacked separately per PR note). Canonical memory sync (PLAN, CROSS_CUT_PLAN, PLAN_HISTORY, praxis docs).

Reviewed by Cursor Bugbot for commit 68273e3. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

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

Comment thread src/probes/capture-quality-loop.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_backlog SQLite table + Drizzle migration, seeds grounding questions at createSpec, and routes create/close operations through CommandExecutor with 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-induct skill.

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.

Comment on lines +126 to +130
const derivedRows = Object.entries(derived).flatMap(([axis, axisAffordance]) =>
Object.keys(axisAffordance).map((field) =>
field === 'legalOptions' ? `${axis}.options` : `${axis}.default_on_switch`,
),
);
Comment on lines +204 to +211
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,
});
Comment on lines +643 to +647
/** Create an elicitation-backlog entry through the command boundary. */
createElicitationBacklogEntry(
input: CreateElicitationBacklogEntryInput,
): CreateElicitationBacklogEntryResult {
const diagnostics = validateCreateElicitationBacklogEntry(input);
@graphite-app graphite-app Bot changed the base branch from ln/fe-811-poc-live-ship-blockers to graphite-base/178 June 8, 2026 11:26
@graphite-app

graphite-app Bot commented Jun 8, 2026

Copy link
Copy Markdown

Merge activity

  • Jun 8, 11:34 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Jun 8, 11:34 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

lunelson and others added 6 commits June 8, 2026 21:55
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>
…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>
lunelson and others added 11 commits June 8, 2026 21:55
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>
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>
@lunelson lunelson force-pushed the graphite-base/178 branch from f9274fc to e577d0a Compare June 8, 2026 20:09
@lunelson lunelson force-pushed the ln/fe-823-elicitation-backlog-substrate-and-agenda-read-back branch from 1447843 to 68273e3 Compare June 8, 2026 20:09
@lunelson lunelson changed the base branch from graphite-base/178 to next June 8, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants