From 13ea680a9df3d149abd52fab150ffc1e6fcf7687 Mon Sep 17 00:00:00 2001 From: Milan Bhandari Date: Sun, 15 Nov 2026 21:34:36 -0800 Subject: [PATCH] Un-retire call_stack_diff with diagrams on A diagram with before and after scenarios does not replace it: a call stack marks each frame added, removed or modified from the diff, and a diagram's scenarios are authored. Agents can insert one again, and the authoring guide names it for the implementation section. Agent-Session: db53cef1-7052-40f4-80b7-97044c16c38b Agent-Session: cfa09165-90bc-452b-ae64-4d30f1b1b967 Agent-Session: e0ce88b4-2b12-4893-b928-d677481aceb0 Agent-Session: cbacb871-2558-4fe4-9272-77524bb21683 --- .../review/src/review-api/animation-authoring.test.ts | 8 ++------ packages/review/src/review-api/instructions.ts | 6 +----- packages/review/src/review-api/retired-blocks.ts | 1 - 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/review/src/review-api/animation-authoring.test.ts b/packages/review/src/review-api/animation-authoring.test.ts index 42845bc58..97a2e7329 100644 --- a/packages/review/src/review-api/animation-authoring.test.ts +++ b/packages/review/src/review-api/animation-authoring.test.ts @@ -343,17 +343,13 @@ it("gates diagrams with animations, and with them retires the kinds a diagram re ); await insert(sequence); - // On: diagrams, and no new sequence, flow or call stack from agents. + // On: diagrams, and no new sequence or flow from agents. enabled = true; const guide = await client.read("/instructions"); expect(guide).toContain("- diagram "); expect(guide).toContain('session_get_instructions({topic:\"diagram\"})'); - for (const retired of [ - "- sequence ", - "- flow_diagram ", - "- call_stack_diff ", - ]) + for (const retired of ["- sequence ", "- flow_diagram "]) expect(guide).not.toContain(retired); await insert(diagram); diff --git a/packages/review/src/review-api/instructions.ts b/packages/review/src/review-api/instructions.ts index f7366a897..d3fc16c09 100644 --- a/packages/review/src/review-api/instructions.ts +++ b/packages/review/src/review-api/instructions.ts @@ -64,8 +64,6 @@ const GUIDE: Record<"on" | "off", Record> = { " - `flow_diagram` if the interesting part is branches, retries or state transitions", " - `database_lens` if the interesting part is a schema change to the data stores, and/or who reads/writes it", ].join("\n"), - "implementation-diagram": - " - `call_stack_diff` for the old vs. new path through user flows. always root the flows in the user/agent entry point (eg a button click, CLI command, etc.), including unchanged nodes along the way.", visuals: "`code_peek`, `sequence`, `flow_diagram`, `call_stack_diff` or `database_lens`", }, @@ -75,9 +73,7 @@ const GUIDE: Record<"on" | "off", Record> = { " - a `diagram` of the parts and the wires between them, with steps that move a request along the wires if participants interact over time (who calls whom, async handoffs), and scenarios for branches, retries or other paths", " - `database_lens` if the interesting part is a schema change to the data stores, and/or who reads/writes it", ].join("\n"), - "implementation-diagram": - " - a `diagram` of the old vs. new path through user flows, as two scenarios (before, after) whose steps walk the calls. always root the flows in the user/agent entry point (eg a button click, CLI command, etc.), including unchanged nodes along the way. link every node and wire to its code.", - visuals: "`code_peek`, `diagram` or `database_lens`", + visuals: "`code_peek`, `diagram`, `call_stack_diff` or `database_lens`", }, }; diff --git a/packages/review/src/review-api/retired-blocks.ts b/packages/review/src/review-api/retired-blocks.ts index 46e8c478c..7d2fe816c 100644 --- a/packages/review/src/review-api/retired-blocks.ts +++ b/packages/review/src/review-api/retired-blocks.ts @@ -14,7 +14,6 @@ export const RETIRED_BLOCK_TYPES = [ "clip", "flow_diagram", "sequence", - "call_stack_diff", ] as const; const retired = new Set(RETIRED_BLOCK_TYPES);