FE-698: Prompt/context scenario substrate foundation#111
Conversation
3fef067 to
e431537
Compare
01453e6 to
b4fa6b9
Compare
b4fa6b9 to
ec24cc4
Compare
e431537 to
9400c1e
Compare
PR SummaryMedium Risk Overview Expands the scenario runner from Adds a probe-only execution path for Reviewed by Cursor Bugbot for commit 0fb5687. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: Establishes the FE-698 “prompt/context scenario substrate” foundation so prompt + context engineering becomes explicit, typed, and probeable before broader agent-heavy productization. Changes:
Technical Notes: Scenarios intentionally remain “probe/review artifacts” (proposal-only / not durable truth), while capability metadata and prompt asset provenance are captured to keep future agent surfaces consistent. 🤖 Was this summary useful? React with 👍 or 👎 |
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 2fd4282. Configure here.
bbb63ab to
27de9e2
Compare
99cc970 to
0fb5687
Compare
kostandinang
left a comment
There was a problem hiding this comment.
Check the failing test
| - [2026-05-07] FE-698 prompt/context foundation slices — Packaged markdown prompt registry + observer and web-research context-pack foundations + scenario runner capture skeleton/composition + agent mutation-surface audit + capability registry metadata. Server interviewer, observer, side-chat, and web-research role prompts now load from markdown assets through a typed prompt registry; observer capture and web-research probes render typed scenario-specific context packs; seeded prompt scenarios compose production prompts with typed context-pack output into deterministic no-provider probe artifacts; and scenario artifacts can declare validated Brunch capability contracts. Review fixes moved observer prompt composition into a pure module and made prompt scenario prompt sources explicit. The agent mutation-surface audit inventories current and projected agent-originated write paths as input to later handler slices. Verified: `npm run verify` for code slices; audit verified by code-search/document consistency. This is a completed foundation within FE-698, not retirement of the whole FE-698 frontier; the live continuation remains in `Next`. | ||
| - [2026-05-07] Side-chat V2 — Edit / Drill-down / Propose-edge plumbing (FE-673, PR #97) — added `edit`, `edge`, and `drill-down` patch kinds. Server `classifyEditImpact` returns `none | soft | hard`; soft applies directly with undo, hard returns `deferred: true` placeholder. Client: patch-list reducer + three applier factories with real undo handlers. Verified: `npm run verify` (935 tests, 19 new). Watch: `SideChatPopover` Edit button stays `disabled` and hard-impact deferred banner is live until V3.0 lands. | ||
| - [2026-05-06] Multi-chat substrate + reconciliation needs (FE-697) — `chat` table with one interview chat per spec, nullable `turn.chat_id`, `specification.primary_chat_id`, mirrored `chat.active_turn_id`, plus the `reconciliation_need` queue with directed source/target items, narrow `kind`/`status`, partial unique index on open rows, cascade FK. Spec creation inserts spec + interview chat in one transaction; `advanceHead` is transactional. No user-visible change. Verified: `npm run verify` (673 tests) plus manual fixture playback (39 specs / 81 turns / dual-pointer equivalence). A82 / A83 validated for Phase 1. | ||
| - [2026-05-01] Side-chat V1.1 — Explore vertical slice. End-to-end graph-launched chat interaction shipped: prompt builder, POST `/side-chat` SSE endpoint, popover host, graph-view wiring, SSE consumer, and active-button activation. Follow-up refactor collapsed pending assistant text into the message list and extracted `SideChatHost` so activation is a tree-mount fact. This is complete implementation history; future conceptual work is multi-chat / reconciliation, not Side-chat V2/V3. |
There was a problem hiding this comment.
Side-chat V1.1 appears twice like a duplicate paste; worth deleting one so history stays single-source.
| mkdirSync(sourceDir); | ||
| mkdirSync(destinationDir); | ||
|
|
||
| copyServerPromptAssets(sourceDir, destinationDir); |
There was a problem hiding this comment.
imports copyServerPromptAssets from ../../vite.config.js, but neither vite.config.ts nor
config/vite-server-runtime.ts exports such a symbol.
Seeing
TypeError: copyServerPromptAssets is not a function
❯ src/server/prompt-build-boundary.test.ts:20:5
18| mkdirSync(destinationDir);
19|
20| copyServerPromptAssets(sourceDir, destinationDir);
| ^
21| writeFileSync(join(destinationDir, '[stale-prompt.md](http://stale-prompt.md)'), 'removed');
22| writeFileSync(join(sourceDir, '[current-prompt.md](http://current-prompt.md)'), 'current'); 

Stack Context
This PR is the FE-698 prompt/context scenario substrate foundation. It makes prompt and context engineering explicit and testable before productizing more agent-heavy surfaces such as web research, candidate-spec assist, behavioral kernels, architect proposals, or post-spec decomposition probes.
What?
context-pack.tsinto a public mini-library backed by private scenario-specific modules.Why?
FE-698 is meant to prevent future agent features from each inventing their own prompt/context path. This PR establishes the shared substrate while keeping provider credential UX, production provider routing, UI, persistence, Pi integration, and durable Brunch mutations out of scope.
Candidate-spec and other generative scenario outputs are intentionally review/probe artifacts, not accepted graph truth. Future agent-originated writes should go through Brunch-owned mutation handlers / changeset surfaces rather than direct ORM or ad hoc tool calls.
Verification
npm run verify