Skip to content

FE-870: Renderer golden coverage and agent-context tools#228

Merged
lunelson merged 2 commits into
nextfrom
ln/fe-870-renderer-ii
Jun 17, 2026
Merged

FE-870: Renderer golden coverage and agent-context tools#228
lunelson merged 2 commits into
nextfrom
ln/fe-870-renderer-ii

Conversation

@lunelson

@lunelson lunelson commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Lock the FE-870 renderer/context branch: graph slice and node-neighborhood renderers now have updated golden coverage around grouped graph output, compact summaries, and bounded neighborhoods.
  • Keep the renderer/context ledgers and canonical planning docs aligned with the shipped renderer migration state.
  • Re-retire the stale renderer-golden-coverage--graph-render-migration.md card that was resurrected by the squash merge.

Verification

  • npm run check

lunelson added 2 commits June 17, 2026 18:24
…uash merge

   The FE-870 squash merge (#217, e4a63fd) reintroduced the exhausted
   renderer-golden-coverage--graph-render-migration.md scope card in its
stale
   pre-build form (Cards 0-3 shown blocked/not-done), though Cards 0-3
shipped
   and PLAN records the scope card as retired. Re-delete it so HEAD
matches
   bkp/ln/fe-870-renderer-golden-context-tools and PLAN's "scope card
retired"
   state. No other canonical-doc drift from the restack.

lunelson commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@lunelson lunelson marked this pull request as ready for review June 17, 2026 17:44
Copilot AI review requested due to automatic review settings June 17, 2026 17:44
@cursor

cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Readiness-band changes in NODE_KIND_METADATA affect filters, prompts, and capability-readiness projections across the product; graph render output changes are broad but golden-locked and mostly LLM-facing context.

Overview
This PR lands the graph-render house-style migration for agent-facing graph context: formatGraphOverview now emits G-D (legend, plane·band node markdown tables, impact-normalized edge table); formatNeighborhood emits G-C prose (anchor, upstream/downstream/lateral, compact density). Dead formatGraphSlice variants and their goldens are removed; neighborhood/overview preview files are re-locked to the new shapes. Tier-2 origination assertions expect markdown tables in the seed provider context instead of bracket/pseudo-edge lines.

Taxonomy drift is closed in code: NODE_KIND_METADATA in src/graph/schema/nodes.ts is updated (notably term grounding-only, requirement/criterion commitment bands, several oracle/plan kinds moved to elicitation), with a full equality pin in queries.test.ts. SPEC, PLAN, and GRAPH_MODEL gain superseded-doc banners and examples now use codes like #REQ3 / AC4; a parallel graph-model-doc-retirement frontier and graph--edge-impact-remodel card are added for follow-up.

Process fix: memory/cards/renderer-golden-coverage--graph-render-migration.md is removed again so HEAD matches “Cards 0–3 done, scope card retired” after the FE-870 squash reintroduced a stale blocked card.

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

@lunelson lunelson changed the title update agent system prompt paths FE-870: Renderer golden coverage and agent-context tools Jun 17, 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

This PR updates the graph/context rendering surfaces to the newer “house style” (markdown tables + prose projection), embeds a full graph overview inside <specification> context output, and reconciles plan/doc state by re-retiring the previously resurrected graph-render-migration scope card.

Changes:

  • Reworks graph rendering: formatGraphOverview now emits legend + plane·band node tables + impact-normalized edge table; neighborhood rendering becomes prose-grouped with optional compaction.
  • Embeds the shared graph overview into read_specification_context output (order: Overview → Graph → Gaps → Sessions) and updates golden previews/tests accordingly.
  • Updates node-kind metadata readiness-band mapping (now pinned by tests) and refreshes SPEC/PLAN/docs to reflect the new canonical sources and retired card state.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/session/tests/context-seed.test.ts Updates seed assertions to match graph overview markdown tables.
src/renderers/specification/specification-context.ts Embeds a Graph section using the shared graph overview renderer and reorders blocks.
src/renderers/specification/tests/specification-context.test.ts Updates invariants for new Graph block placement/content and removes old graph bullet expectations.
src/renderers/specification/previews/specification-context.md Golden preview updated to include Graph overview tables before gaps/sessions.
src/renderers/README.md Ledger text updated to reflect new graph overview/neighborhood contracts and remaining gaps (e.g., related mode leakage).
src/renderers/graph/node-neighborhood.ts Replaces bracket/bullet dialect with prose sections and adds per-section compaction via maxExpandedEdges.
src/renderers/graph/graph-slice.ts Replaces prior graph-slice variants with the new uncapped G-D overview: legend + node tables + edge table.
src/renderers/graph/tests/node-neighborhood.test.ts Updates option naming/behavior and snapshot expectations for the new neighborhood format.
src/renderers/graph/tests/graph-slice.test.ts Replaces old formatGraphSlice snapshot coverage with formatGraphOverview expectations + new fixture golden.
src/renderers/graph/previews/neighborhood-hub-REQ1.md Updates neighborhood golden to the new prose-grouped format.
src/renderers/graph/previews/neighborhood-hub-REQ1-hops2.md Updates hops=2 neighborhood golden, including ambient-relations footer.
src/renderers/graph/previews/neighborhood-hub-REQ1-compact.md Adds new compacted-section neighborhood golden.
src/renderers/graph/previews/neighborhood-hub-REQ1-bounded.md Removes old “maxEdges omission” golden (no longer applicable).
src/renderers/graph/previews/neighborhood-code-health-REQ1.md Updates neighborhood golden for a real-port fixture to the new format.
src/renderers/graph/previews/neighborhood-brunch-self-REQ1.md Updates brunch-self neighborhood golden to the new format.
src/renderers/graph/previews/neighborhood-brunch-self-MOD1-hops2.md Updates brunch-self hops=2 golden and ambient codes line.
src/renderers/graph/previews/graph-slice-code-health-grouped-list.md Deletes old formatGraphSlice grouped-list golden.
src/renderers/graph/previews/graph-slice-code-health-compact-summary.md Deletes old formatGraphSlice compact-summary golden.
src/renderers/graph/previews/graph-slice-category-directions-full-debug.md Deletes old formatGraphSlice debug golden.
src/renderers/graph/previews/graph-slice-brunch-self-grouped-list.md Deletes old formatGraphSlice brunch-self golden.
src/renderers/graph/previews/graph-slice-alpha-grounding-compact-summary.md Deletes old formatGraphSlice alpha golden.
src/renderers/graph/previews/graph-overview-kind-band-spread.md Adds new golden for the uncapped, sectioned graph overview output.
src/graph/schema/nodes.ts Updates NODE_KIND_METADATA readiness-band assignments (now the pinned source of truth).
src/graph/tests/queries.test.ts Pins NODE_KIND_METADATA mapping to prevent future drift.
src/dev/tests/tier-2-harness.test.ts Updates harness assertions to match the new graph overview output in provider contexts.
memory/SPEC.md Updates spec text/examples to align with REQ* codes and new metadata source-of-truth notes.
memory/PLAN.md Records renderer-golden coverage progress, retires the resurrected scope card, and adds graph-model-doc-retirement.
memory/cards/renderer-golden-coverage--graph-render-migration.md Deletes the resurrected scope card (re-retired).
memory/cards/graph--edge-impact-remodel.md Adds a new proposed card describing the edge-impact metadata remodel plan.
docs/design/GRAPH_MODEL.md Adds “superseded snapshot” banners/notes pointing canonical tables to code/SPEC pending retirement.

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

Comment on lines +34 to 35
const header = `${heading} (LSN ${overview.lsn}): ${overview.nodes.length} nodes, ${overview.edges.length} edges`;
const nodesById = new Map(overview.nodes.map((node) => [node.id, node]));
Comment on lines 58 to +61
for (const node of nodes) {
const key = `${node.plane}/${node.kind}`;
counts.set(key, (counts.get(key) ?? 0) + 1);
const band = primaryBand(node.kind);
const key = `${node.plane}\u0000${band}`;
nodeGroups.set(key, [...(nodeGroups.get(key) ?? []), node]);
Comment on lines +59 to +61
const band = primaryBand(node.kind);
const key = `${node.plane}\u0000${band}`;
nodeGroups.set(key, [...(nodeGroups.get(key) ?? []), node]);
@lunelson lunelson merged commit 2c5fabc into next Jun 17, 2026
9 of 10 checks passed
@lunelson lunelson deleted the ln/fe-870-renderer-ii branch June 17, 2026 20:20
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