FE-852: Prompt composition golden coverage and elicitation driver#207
Conversation
a69482c to
efc86bd
Compare
405b892 to
408d000
Compare
PR SummaryLow Risk Overview Read-only “what to ask next” adds Planning/spec updates ( Reviewed by Cursor Bugbot for commit 01999c7. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
Stages the COMPOSE/driver scoping handoff by introducing a deterministic, read-only elicitation-gap rank/select driver and locking COMPOSE-stage prompt output via a golden preview harness, alongside README/plan/spec ledger updates documenting the new topology and verification posture.
Changes:
- Added
src/graph/elicitation-driver.ts(+ tests) to deterministically sort/select eligibleElicitationGaps. - Updated agent prompt composition to surface a “[Brunch elicitation recommendation]” block, and added COMPOSE prompt goldens via
src/.pi/agents/previews.test.ts+__previews__/. - Refreshed documentation and planning/spec ledgers to reflect the new driver + prompt-golden coverage posture.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/graph/README.md | Documents the new elicitation driver ownership and updates the observed read-shape ledger notes. |
| src/graph/elicitation-driver.ts | New pure rank/select policy for elicitation gaps (band/importance/coverage/affinity/stable tiebreak). |
| src/graph/elicitation-driver.test.ts | Verifies ordering, eligibility filtering, and sibling-spec isolation via real graph reads. |
| src/.pi/skills/README.md | Adds a prompt-resource “body lock ledger” clarifying source-of-truth locking strategy. |
| src/.pi/agents/README.md | Updates COMPOSE topology/ledger and records preview golden cases + dispositions. |
| src/.pi/agents/previews.test.ts | New COMPOSE prompt preview golden harness that normalizes repo paths and snapshots full prompts. |
| src/.pi/agents/compose.ts | Adds elicitation recommendation section to composed prompts using the new driver. |
| src/.pi/agents/compose.test.ts | Extends invariants to assert recommendation presence/absence based on open gaps. |
| src/.pi/agents/previews/elicitor--pushed-context.md | New golden prompt snapshot for pushed-context case. |
| src/.pi/agents/previews/elicitor--pinned-strategy-lens.md | New golden prompt snapshot for pinned strategy/lens case. |
| src/.pi/agents/previews/elicitor--auto-high-coverage.md | New golden prompt snapshot for “gaps answered” case. |
| src/.pi/agents/previews/elicitor--auto-floor-gaps-open.md | New golden prompt snapshot for “floor gaps open” case. |
| package.json | Adds test:prompts* scripts to run/update COMPOSE preview goldens. |
| memory/SPEC.md | Updates assumptions/invariants/decisions to record FE-852/FE-847 outcomes and driver proof. |
| memory/PLAN.md | Updates frontier status/ledger text to reflect prompt-golden completion and driver residue. |
| memory/CROSS_CUT_PLAN.md | Updates cross-cut ledger to reflect read-only driver landing and remaining writeback residue. |
| memory/cards/renderer-golden-coverage--render-stage-chain.md | Adjusts renderer-golden chain status/notes to align with current sequencing and tripwires. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const repoRoot = resolve(HERE, '../../..'); | ||
| const relativeAgentsDir = relative(repoRoot, HERE); | ||
| if (relativeAgentsDir !== 'src/.pi/agents') { | ||
| throw new Error(`Unexpected prompt preview test location: ${HERE}`); | ||
| } | ||
| return rendered.replaceAll(`${repoRoot}/`, '<repo>/'); | ||
| } |
efc86bd to
f17b930
Compare
0442270 to
05f84da
Compare
261e2be to
72fb99a
Compare
05f84da to
f1a4bfb
Compare
72fb99a to
d3cf9ba
Compare
f1a4bfb to
9b81016
Compare
d3cf9ba to
ae16466
Compare
47c4941 to
894a11c
Compare
ae16466 to
2cd6f79
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2cd6f79 to
01999c7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 01999c7. Configure here.
|
|
||
| function isEligibleGap(gap: ElicitationGap): boolean { | ||
| return !gap.answered && (gap.disposition === 'open' || gap.disposition === 'reopened'); | ||
| } |
There was a problem hiding this comment.
Reopened gaps skip recommendation
Medium Severity
isEligibleGap requires !gap.answered even when disposition is reopened. Live gap reads can still mark structurally satisfied gaps as answered while keeping reopened, so FE-852’s composed [Brunch elicitation recommendation] block omits gaps the model explicitly reopened for new ambiguity.
Reviewed by Cursor Bugbot for commit 01999c7. Configure here.



Stack Context
This top branch carries FE-852: prompt composition golden coverage plus the first read-only elicitation-driver slice.
What?
Adds deterministic COMPOSE previews and approved elicitor prompt goldens, records prompt-resource ledgers/scripts, and ranks open selected-spec gaps into composed prompts via a small elicitation driver.
Why?
The prompt surface needs inspectable regression coverage before the elicitor starts choosing what to ask next. Capture-reflection writeback remains explicitly tracked as the active residue.