FE-1576: Ground Brunch interviews in the current Petrinaut net - #9523
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview The agent mounts a new browser-executed
Reviewed by Cursor Bugbot for commit f4476e6. Bugbot is set up for automated code reviews on this repo. Configure here. |

🌟 What is the purpose of this PR?
Let Brunch inspect the Petri net already visible in Petrinaut before answering or beginning an interview about the current model. Today typed and completed Voice input share one chat path, but the current Brunch agent does not expose Petrinaut's existing live-net client tool, so it asks users to upload or describe context the browser already has.
This is a read-only current-stack fix. The net snapshot returns as correlated machine evidence, never user speech, and Voice remains on the shared mounted chat submission path. It does not add canvas writes or establish the future FE-1574 transport topology.
🔗 Related links
🚫 Blocked by
🔍 What does this change?
getLatestNetDefinitionbrowser client tool and mounts it on the current Brunch agent.{ title, definition, extensions }returns through the existingclient-tool-resultmachine continuation./api/chatintegration with the exact “Interview this Petri net. What does it do?” opening, fixture-grounded continuation, and retry/idempotency assertions.🏗️ Agent notes
Imperative: Let Brunch inspect the live Petrinaut net before answering or beginning an interview about the current model.
Throughline: typed message or completed Voice transcript → shared
useChatprojection → Brunch requestsgetLatestNetDefinition→ Petrinaut returns{ title, definition, extensions }→ correlatedclient-tool-resultresumes the same conversation.Proof: The production-path integration emits one browser-executed live-net call without
providerExecuted, returns fixture state as machine evidence, emits fixture-specific text before the firstbrunch_ask, and retains one visible user admission under retries.Constraints: Read only on net-referential turns; no snapshot cache; no Voice, OpenAI Realtime, TTS, or transport-metadata context path; no user-evidence fabrication; no canvas writes.
Fog-line: Prompt-guided on-demand reads are proven for the opening turn. A changed second snapshot and hard-reload behavior belong to the #9468-based browser Flue transport proof in FE-1574.
Stop or reorient: Do not port the app-local
ChatAgent, Brunch/api/chat, direct Voice sends, orbrunch_askinto FE-1574. Port only the canonical client-tool contract, SDCPN policy, and behavior tests.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
/api/chatroute. FE-1574 must reimplement only the portable client-tool behavior on its FE-1563: Establish Brunch elicitation skill boundaries #9468-based conversation route.🐾 Next steps
plugin-sdcpnduring FE-1574.ChatTransportclient-tool continuation with stable idempotency keys and canonical history hydration.🛡 What tests cover this?
yarn workspace @apps/brunch-agent test:unit— 43 testsyarn workspace @apps/petrinaut-website test:unit src/main/app/voice-interview— 150 testsyarn workspace @apps/brunch-agent lint:tscyarn workspace @apps/brunch-agent lint:eslint— 0 errors; 8 pre-existing warningsoxfmt, editor diagnostics, andgit diff --check❓ How to test this?
Interview this Petri net. What does it do?in the Brunch-backed assistant panel.📹 Demo
https://www.loom.com/share/2748986e56f44a3d9fa54c7c72cd7fd9