Skip to content

FE-1091: Renderer golden coverage and prompt assembly lock, Part 1#267

Merged
lunelson merged 29 commits into
nextfrom
ln/fe-1091-renderer-golden-coverage-a
Jun 29, 2026
Merged

FE-1091: Renderer golden coverage and prompt assembly lock, Part 1#267
lunelson merged 29 commits into
nextfrom
ln/fe-1091-renderer-golden-coverage-a

Conversation

@lunelson

@lunelson lunelson commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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.

lunelson commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@lunelson lunelson changed the title Plan renderer golden prompt assembly frontier FE-1091: Renderer golden coverage and prompt assembly lock Jun 26, 2026
@lunelson lunelson marked this pull request as ready for review June 26, 2026 15:54
Copilot AI review requested due to automatic review settings June 26, 2026 15:54
@cursor

cursor Bot commented Jun 26, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly documentation, packaging script, and test/snapshot updates; no runtime logic changes appear in this diff chunk, so agent behavior risk is low unless other stack commits carry the implementation.

Overview
This slice closes planning and spec narrative for FE-1091: the context-pipeline arc and renderer-golden-coverage are marked done, with foreground bodies at src/agents/prompts/{elicitor,executor}.md, background bodies at src/agents/subagents/*.md, and nested prompts/<agent>/SYSTEM.md retired. SPEC/PLAN are reconciled to that topology (D44/D58/D85/D90/D98), including execute-mode executor (not orchestrator), runtime ids still elicit/execute vs target SPEC/CODE labels, and graph-derived spec/plan document outputs under D83-L.

Build and verification change build:pi-assets to rm/rebuild dist/agents/prompts and dist/agents/subagents and copy only the flat markdown homes (no nested prompt dirs). Tests and snapshots follow: foreground role executor, runtime header lines prompt strategy/lens resource, a subagent explorer prompt snapshot, and architecture.test.ts drops broad legacy path/registry greps in favor of a named D39/D60 sentinel (Pi adapters must not own provider text).

Process docs: ln-review and contract-lenses add a topology/prose sentinel lens (prefer consumer-level or cited boundary tests over hardcoded path/README locks). HANDOFF.md captures branch tie-off state; orchestrator-tool-port scope now targets executor.md and cook_plan_check on the agent-runtime extension path.

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

@lunelson lunelson changed the title FE-1091: Renderer golden coverage and prompt assembly lock FE-1091: Renderer golden coverage and prompt assembly lock, Part 1 Jun 26, 2026

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

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}.md and moved background agent bodies to src/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.

Comment on lines 31 to 34
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 },
Base automatically changed from ln/fe-1090-data-model-legibility to next June 29, 2026 08:36
@lunelson lunelson force-pushed the ln/fe-1091-renderer-golden-coverage-a branch from 6a8b01c to 6ea6a9d Compare June 29, 2026 08:38
@lunelson lunelson merged commit 40b02a7 into next Jun 29, 2026
5 checks passed
@lunelson lunelson deleted the ln/fe-1091-renderer-golden-coverage-a branch June 29, 2026 08:38
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