FE-1091: Renderer golden coverage and prompt assembly lock, Part 1#267
FE-1091: Renderer golden coverage and prompt assembly lock, Part 1#267lunelson wants to merge 29 commits into
Conversation
Signed-off-by: Lu Nelson <ln@hash.ai>
Signed-off-by: Lu Nelson <ln@hash.ai>
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview Topology contract changes in docs: foreground bodies at Build/packaging: Handoff and review: adds root Tests in this diff: expectations updated for Reviewed by Cursor Bugbot for commit 6a8b01c. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
Locks down agent-facing text and prompt topology so future changes to prompts, context renderers, and generated documents are intentional and reviewable (via snapshots and stricter registries), while retiring the old nested prompts/<id>/SYSTEM.md convention.
Changes:
- Flattened foreground prompt bodies to
src/agents/prompts/{elicitor,executor}.mdand moved background agent bodies tosrc/agents/subagents/*.md, updating registries/loaders/docs/tests and packaging. - Tightened prompt assembly: executor prompts omit elicitor-only sections; prompt-resource routing text clarified; added/updated golden snapshots.
- Expanded/locked model-facing render surfaces: new spec/plan markdown outputs, additional context references/slices, and renderer inventory tests.
Reviewed changes
Copilot reviewed 87 out of 94 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/treedocs.yaml | Updates documented agents subtree topology (flat prompts + subagents). |
| src/session/specification-overview-context.ts | Updates selected-spec context import path to new spec/ home. |
| src/session/schema/kinds.ts | Renames execute foreground role id to executor. |
| src/session/runtime-state.ts | Renames execute tool policy id to execute-executor. |
| src/agents/subagents/README.md | Introduces canonical topology README for background subagents. |
| src/agents/subagents/explorer.md | Adds explorer background agent body (frontmatter + instructions). |
| src/agents/subagents/projector.md | Adds projector background agent body (frontmatter + instructions). |
| src/agents/subagents/researcher.md | Adds researcher background agent body (frontmatter + instructions). |
| src/agents/subagents/reviewer.md | Adds reviewer background agent body (frontmatter + instructions). |
| src/agents/skills/README.md | Updates prompt-body path references to new flat prompt file names. |
| src/agents/skills/methods/read-referenced-documents/SKILL.md | Updates capture-sweep terminology and wording. |
| src/agents/skills/methods/read-context/SKILL.md | Adds edge-local neighborhood guidance and context-slice selection rules. |
| src/agents/skills/methods/ingest-paste/SKILL.md | Updates capture-sweep terminology and wording. |
| src/agents/skills/methods/generate-proposal/SKILL.md | Refines proposal method conduct to prefer neighborhoods + topical slices. |
| src/agents/skills/methods/generate-proposal/references/oracle.md | Aligns oracle wording to witness/rationale edge vocabulary. |
| src/agents/skills/methods/explore-and-characterize/SKILL.md | Updates capture-sweep terminology and wording. |
| src/agents/skills/methods/elicit-by-question/SKILL.md | Updates capture-sweep terminology and wording. |
| src/agents/skills/methods/capture/SKILL.md | Reframes capture as “banded capture-sweep passes” and expands routing guidance. |
| src/agents/skills/lenses/README.md | Updates oracle wording (examples/witness framing). |
| src/agents/skills/lenses/oracle/SKILL.md | Aligns oracle lens language to witness semantics and updated heuristics. |
| src/agents/skills/tests/prompt-resources.test.ts | Replaces needle-based checks with registry-driven existence/frontmatter/substance checks. |
| src/agents/runtime/policy.ts | Renames execute foreground agent to executor and updates tool policy id/text. |
| src/agents/runtime/compose.ts | Gates elicitor-only prompt sections; renames rendered strategy/lens labels. |
| src/agents/runtime/tests/state.test.ts | Updates execute-mode expectations for executor role. |
| src/agents/runtime/tests/compose.test.ts | Adds executor prompt golden and asserts elicitor-only sections are omitted. |
| src/agents/runtime/snapshots/executor--execute-default.md | Adds executor compose golden snapshot. |
| src/agents/runtime/snapshots/elicitor--pushed-context.md | Updates snapshot labels and routing text. |
| src/agents/runtime/snapshots/elicitor--pinned-strategy-lens.md | Updates snapshot labels and routing text. |
| src/agents/runtime/snapshots/elicitor--auto-high-coverage.md | Updates snapshot labels and routing text. |
| src/agents/runtime/snapshots/elicitor--auto-floor-gaps-open.md | Updates snapshot labels and routing text. |
| src/agents/registry.ts | Shrinks bundled foreground body registry to {elicitor, executor} and flattens paths. |
| src/agents/README.md | Updates agents topology rules and clarifies foreground vs background body homes. |
| src/agents/prompts/README.md | Documents new flat foreground prompt layout and separation from subagents. |
| src/agents/prompts/pi-coder/SYSTEM.md | Removes unwired/retired prompt body. |
| src/agents/prompts/orchestrator/SYSTEM.md | Removes retired orchestrator prompt body. |
| src/agents/prompts/executor.md | Adds new executor foreground prompt body. |
| src/agents/prompts/elicitor.md | Adds new elicitor foreground prompt body with objective postures. |
| src/agents/prompts/tests/prompt-bodies.test.ts | Updates prompt-body tests to validate registries and built asset topology. |
| src/agents/docs/context-reference-harvest.md | Rewrites harvest ledger into current-state notes + deferrals. |
| src/agents/contexts/spec/spec-output.ts | Adds thin markdown “spec output” renderer for non-plan nodes. |
| src/agents/contexts/spec/spec-context.ts | Adds selected-spec context renderer in new spec/ home. |
| src/agents/contexts/spec/README.md | Renames spec context subtree README to new path. |
| src/agents/contexts/spec/tests/spec-output.test.ts | Adds snapshot test for spec markdown output renderer. |
| src/agents/contexts/spec/tests/spec-context.test.ts | Updates spec context test to new module path/snapshot. |
| src/agents/contexts/spec/snapshots/spec-output.md | Adds spec markdown output golden snapshot. |
| src/agents/contexts/spec/snapshots/spec-context.md | Adds/updates spec context golden snapshot. |
| src/agents/contexts/session/runtime-frame.ts | Renames rendered strategy/lens labels in runtime frame output. |
| src/agents/contexts/session/tests/runtime-frame.test.ts | Updates expectations for renamed runtime-frame labels and negative matches. |
| src/agents/contexts/session/snapshots/runtime-frame-ready.md | Updates runtime frame golden snapshot. |
| src/agents/contexts/seeds/README.md | Clarifies seed wording is protected by semantic invariants (not full goldens). |
| src/agents/contexts/references/review-set-drafting-slice.md | Adds draft injectable slice for review-set drafting conduct. |
| src/agents/contexts/references/plan-sequencing-slice.md | Adds draft injectable slice for plan sequencing conduct. |
| src/agents/contexts/references/oracle-witness-slice.md | Adds draft injectable slice for oracle/witness conduct. |
| src/agents/contexts/references/neighborhood-consumption-slice.md | Adds draft injectable slice for neighborhood consumption conduct. |
| src/agents/contexts/references/intent-capture-slice.md | Adds draft injectable slice for intent capture routing. |
| src/agents/contexts/references/graph-authoring-heuristics.md | Expands shared authored judgment; aligns vocabulary to current planes/kinds/edges. |
| src/agents/contexts/references/design-projection-slice.md | Adds draft injectable slice for design projection conduct. |
| src/agents/contexts/references/context-slice-index.md | Adds selector/index for choosing minimal topical context slices. |
| src/agents/contexts/README.md | Updates contexts topology to new spec/ home; clarifies draft slice status. |
| src/agents/contexts/plan/README.md | Adds plan output renderer README. |
| src/agents/contexts/plan/plan-output.ts | Adds thin markdown “plan output” renderer for plan-plane nodes. |
| src/agents/contexts/plan/tests/plan-output.test.ts | Adds snapshot test for plan markdown output renderer. |
| src/agents/contexts/plan/snapshots/plan-output.md | Adds plan markdown output golden snapshot. |
| src/agents/contexts/exchanges/tests/exchange-renderer-inventory.test.ts | Adds renderer inventory coverage for exchange renderers. |
| src/agents/contexts/drafting/README.md | Adds scratch “drafting” area README (not wired). |
| src/agents/contexts/drafting/slice-promotion-capture.md | Adds scratch capture-routing slice draft (not wired). |
| src/agents/contexts/drafting/slice-plane-authoring.md | Adds scratch plane-authoring slice draft (not wired). |
| src/agents/contexts/drafting/slice-neighborhood-reading.md | Adds scratch neighborhood-reading slice draft (not wired). |
| src/agents/contexts/drafting/slice-kind-selection.md | Adds scratch kind-selection slice draft (not wired). |
| src/agents/contexts/drafting/slice-edge-authoring.md | Adds scratch edge-authoring slice draft (not wired). |
| src/agents/contexts/drafting/slice-detail-payloads.md | Adds scratch detail-payload slice draft (not wired). |
| src/agents/contexts/drafting/slice-band-walk.md | Adds scratch band-walk slice draft (not wired). |
| src/agents/contexts/drafting/skill-ingest.md | Adds scratch draft “ingest” method skill (explicitly not wired). |
| src/agents/contexts/tests/elicitation.test.ts | Adds semantic-invariant test for elicitation agenda/update rendering. |
| src/agents/tests/registry.test.ts | Updates registry tests for new foreground body registry + prompt resource location. |
| src/.pi/extensions/subagents/README.md | Updates subagent docs to point at new agents/subagents/*.md home. |
| src/.pi/extensions/subagents/agents.ts | Updates loader to read src/agents/subagents/<id>.md and new directory resolver. |
| src/.pi/extensions/brunch-data/graph/index.ts | Updates tool guidance strings to new edge/detail rules vocabulary. |
| src/.pi/extensions/brunch-data/context/get-specification.ts | Updates specification context import path to new spec/ home. |
| src/.pi/extensions/agent-runtime/orchestrator-stub/index.ts | Updates stub output text (now references executor in returned content). |
| src/.pi/extensions/tests/subagents.test.ts | Updates registry loading behavior and locks composed background prompt shape via snapshot. |
| src/.pi/extensions/tests/registry.test.ts | Updates extension registry test expectations for stub output text. |
| src/.pi/extensions/tests/agent-runtime-system-prompts.test.ts | Updates system prompt tests for renamed runtime-state labels. |
| src/.pi/extensions/tests/agent-runtime-runtime.test.ts | Updates execute-mode projection expectations for executor role and tool policy id. |
| src/.pi/extensions/snapshots/subagent-explorer-prompt.md | Adds background explorer prompt golden snapshot. |
| src/.pi/tests/architecture.test.ts | Simplifies/retunes architecture sentinel to focus on adapter ownership of provider text. |
| package.json | Updates build:pi-assets to rebuild flat prompt/subagent asset homes. |
| memory/PLAN.md | Marks context-pipeline as done; records renderer-golden-coverage completion and topology closure. |
| memory/cards/orchestrator-tool-port--plan-check-tool.md | Updates next frontier scope language to executor surface and new prompt file location. |
| HANDOFF.md | Adds volatile session handoff state for FE-1091 closure. |
| .agents/skills/ln-review/SKILL.md | Adds guidance on topology/prose sentinel test hygiene. |
| .agents/skills/ln-review/references/contract-lenses.md | Adds a contract lens for identifying non-consumer topology/prose sentinel tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async execute(_toolCallId, params, _signal, _onUpdate, _ctx) { | ||
| return { | ||
| content: [{ type: 'text' as const, text: `orchestrator stub ran: ${params.message}` }], | ||
| content: [{ type: 'text' as const, text: `executor stub ran: ${params.message}` }], | ||
| details: { message: params.message }, |

What this does
Locks down the text that Brunch gives to agents by adding reviewable snapshots and clearer ownership for prompts, context output, and generated documents.
Why it matters
Future changes to agent-facing text should be intentional and easy to review, instead of changing accidentally as code moves around.