Skip to content

FE-848: Prompt context refinement#204

Merged
lunelson merged 1 commit into
nextfrom
ln/fe-848-prompt-context-refine
Jun 11, 2026
Merged

FE-848: Prompt context refinement#204
lunelson merged 1 commit into
nextfrom
ln/fe-848-prompt-context-refine

Conversation

@lunelson

@lunelson lunelson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Stack Context

This PR refines FE-848 prompt context and fixture protocol behavior at the top of the current stack.

What?

  • Documents live graph observer and fixture workbench protocols.
  • Updates SPEC/PLAN around fixture capture and prompt context expectations.
  • Tightens seed fixture tests and Brunch app coverage for the refined protocol.

This was referenced Jun 11, 2026

lunelson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

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

@lunelson lunelson marked this pull request as ready for review June 11, 2026 10:13
Copilot AI review requested due to automatic review settings June 11, 2026 10:13
@lunelson lunelson changed the title spec and plan updates re fixture protocols FE-848: Prompt context refinement Jun 11, 2026
@cursor

cursor Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
DX and documentation hardening around dev seeding; graph writes still go through CommandExecutor with new validation tests—no product auth or runtime behavior changes beyond refusing the old default seed path.

Overview
Dev seeding is now explicit and workspace-scoped. npm run seed no longer loads every fixture into the shell cwd; it requires --workspace <dir> and --seed <set>/<slug>, validates flags (including rejecting unsafe paths and duplicates), writes only the target .brunch/data.db via seedFixture/CommandExecutor, and prints destination plus set/slug → specId. Missing args exit with usage instead of seeding.

Docs and architecture registers codify the seed-then-npm run dev -- --cwd workbench flow, clarify that dev launch never implies seeding, and add D79-L / I48-L (plus glossary updates) so seeds, workbenches, runs, and scratch stay distinct. The live-graph-observer workbench README switches to npm run seed + npm run dev -- --cwd and documents the TUI sidecar path instead of standalone --mode web.

Tests cover the seed CLI contract and a Brunch RPC tracer that seeds one workbench and proves workspace.selectionState comes from that cwd, not a sibling or shell cwd.

Reviewed by Cursor Bugbot for commit 3134c43. 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 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 2cb5b4f. Configure here.

Comment thread src/graph/seed-fixtures.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 refines the dev seed-fixture protocol to make seeding explicit and workspace-scoped (no ambient “seed everything into current cwd”), and updates tests/docs/spec/plan to reflect and validate that behavior.

Changes:

  • Replace the prior “seed all sets into cwd” flow with an explicit runSeedFixturesCli that requires --workspace + --seed <set>/<slug> and seeds exactly one fixture.
  • Add CLI contract tests for argument validation and workspace isolation; add an app-level RPC test proving --cwd inspects the targeted workspace DB.
  • Update SPEC/PLAN and .fixtures/ documentation to clarify the seeds/workbenches/runs/scratch separation and the explicit seeding workflow.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/graph/seed-fixtures.ts Introduces explicit seed CLI parsing and single-fixture seeding into a named workspace DB.
src/graph/seed-fixtures.test.ts Adds CLI-focused tests for safe arg parsing, workspace targeting, and single-fixture behavior.
src/app/brunch.test.ts Adds an integration-style check that RPC state reflects the targeted --cwd workspace (not shell cwd).
memory/SPEC.md Refines fixture/seed/workbench protocol and records the I48-L validation progress.
memory/PLAN.md Updates the dev-seed-fixtures frontier to reflect the folded-in FE-848 hardening slice and acceptance leaves.
.fixtures/workbenches/live-graph-observer/README.md Documents the new explicit “seed then launch with --cwd” workflow and removes unsupported launch modes.
.fixtures/README.md Adds canonical seed + workbench usage guidance and clarifies non-implicit seeding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +261 to +270
const destinationDb = join(parsed.workspace, '.brunch', 'data.db');
const fixture = await readSelectedSeed(parsed.seed.set, parsed.seed.slug);
const executor = await openWorkspaceCommandExecutor(parsed.workspace);
const result = seedFixture(executor, fixture);
stdout(
`seeded ${parsed.seed.ref} → spec ${result.specId} ` +
`(${result.nodeCount} nodes, ${result.edgeCount} edges)\n`,
);
stdout(`Destination: ${destinationDb}\n`);
return 0;
Comment thread src/app/brunch.test.ts
Comment on lines +301 to +305
await runSeedFixturesCli({
argv: ['--workspace', seededWorkspace, '--seed', 'workspace-spread/alpha-grounding'],
cwd: shellCwd,
stdout: () => {},
});
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from da0360b to b944790 Compare June 11, 2026 14:30
@lunelson lunelson force-pushed the ln/fe-848-prompt-context-refine branch from 2cb5b4f to 871b41d Compare June 11, 2026 14:30
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from b944790 to 61eaa48 Compare June 11, 2026 14:33
@lunelson lunelson force-pushed the ln/fe-848-prompt-context-refine branch from 871b41d to 6afeaa8 Compare June 11, 2026 14:33
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from 61eaa48 to a28d57f Compare June 11, 2026 14:36
@lunelson lunelson force-pushed the ln/fe-848-prompt-context-refine branch 2 times, most recently from 9496d36 to ed274da Compare June 11, 2026 14:38
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from a28d57f to bfa2b32 Compare June 11, 2026 14:38
@lunelson lunelson force-pushed the ln/fe-848-prompt-context-refine branch from ed274da to 8f5fa32 Compare June 11, 2026 14:40
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from bfa2b32 to 60451fb Compare June 11, 2026 14:40
Base automatically changed from ln/fe-845-brunch-chrome-pass-ii to next June 11, 2026 14:41
@lunelson lunelson force-pushed the ln/fe-848-prompt-context-refine branch from 8f5fa32 to 3134c43 Compare June 11, 2026 14:42
@lunelson lunelson merged commit 5685074 into next Jun 11, 2026
5 of 6 checks passed
@lunelson lunelson deleted the ln/fe-848-prompt-context-refine branch June 11, 2026 14:43
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