Skip to content

FE-852: Prompt composition golden coverage and elicitation driver#207

Merged
lunelson merged 2 commits into
nextfrom
ln/fe-852-prompting-and-elicitation
Jun 11, 2026
Merged

FE-852: Prompt composition golden coverage and elicitation driver#207
lunelson merged 2 commits into
nextfrom
ln/fe-852-prompting-and-elicitation

Conversation

@lunelson

@lunelson lunelson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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.

This was referenced Jun 11, 2026
@lunelson lunelson marked this pull request as ready for review June 11, 2026 14:31
Copilot AI review requested due to automatic review settings June 11, 2026 14:31

lunelson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cursor

cursor Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are additive test coverage and pure read-only gap selection in prompt composition; no new mutation paths or security-sensitive behavior in this PR.

Overview
COMPOSE-stage golden coverage lands for elicitor prompts: previews.test.ts locks four approved snapshots under src/.pi/agents/__previews__/, with test:prompts* scripts and README ledgers recording which cases are locked vs tripwired (reviewer foreground, full-stack real renderer output).

Read-only “what to ask next” adds selectElicitationGap in src/graph/elicitation-driver.ts (deterministic rank over open gaps: band, importance, coverage, lens affinity, stable tiebreak) and surfaces the winner in composed prompts as [Brunch elicitation recommendation] before pushed context. Capture-reflection writeback is not in this diff—planning docs mark that as the remaining elicitation-driver residue.

Planning/spec updates (memory/PLAN.md, CROSS_CUT_PLAN.md, memory/SPEC.md) reclassify prompt-composition-golden-coverage as done, FE-847 turn-boundary work as complete, and narrow the open coverage spine to renderer-golden-coverage next.

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

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

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 eligible ElicitationGaps.
  • 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.

Comment on lines +55 to +61
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>/');
}
@lunelson lunelson force-pushed the ln/fe-852-prompting-and-elicitation branch from efc86bd to f17b930 Compare June 11, 2026 14:36
@lunelson lunelson force-pushed the ln/fe-xxx-projection-coverage branch 2 times, most recently from 0442270 to 05f84da Compare June 11, 2026 14:38
@lunelson lunelson force-pushed the ln/fe-852-prompting-and-elicitation branch 2 times, most recently from 261e2be to 72fb99a Compare June 11, 2026 14:40
@lunelson lunelson force-pushed the ln/fe-xxx-projection-coverage branch from 05f84da to f1a4bfb Compare June 11, 2026 14:40
@lunelson lunelson force-pushed the ln/fe-852-prompting-and-elicitation branch from 72fb99a to d3cf9ba Compare June 11, 2026 14:42
@lunelson lunelson force-pushed the ln/fe-xxx-projection-coverage branch from f1a4bfb to 9b81016 Compare June 11, 2026 14:42
@lunelson lunelson changed the title Stage handoff for COMPOSE/driver scoping thread FE-852: Prompt composition golden coverage and elicitation driver Jun 11, 2026
@lunelson lunelson force-pushed the ln/fe-852-prompting-and-elicitation branch from d3cf9ba to ae16466 Compare June 11, 2026 14:51
@lunelson lunelson force-pushed the ln/fe-xxx-projection-coverage branch 2 times, most recently from 47c4941 to 894a11c Compare June 11, 2026 14:55
@lunelson lunelson force-pushed the ln/fe-852-prompting-and-elicitation branch from ae16466 to 2cd6f79 Compare June 11, 2026 14:55
Base automatically changed from ln/fe-xxx-projection-coverage to next June 11, 2026 14:56
lunelson and others added 2 commits June 11, 2026 16:57
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lunelson lunelson force-pushed the ln/fe-852-prompting-and-elicitation branch from 2cd6f79 to 01999c7 Compare June 11, 2026 14:57
@lunelson lunelson merged commit 3851ea0 into next Jun 11, 2026
5 of 6 checks passed
@lunelson lunelson deleted the ln/fe-852-prompting-and-elicitation branch June 11, 2026 14:58

@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 1 potential issue.

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 01999c7. Configure here.


function isEligibleGap(gap: ElicitationGap): boolean {
return !gap.answered && (gap.disposition === 'open' || gap.disposition === 'reopened');
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 01999c7. Configure here.

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