@principal-ai/subsystems-react 0.42.0 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stories/Subsystem/C4Graph/c4Fixture.js +1 -1
- package/dist/stories/Subsystem/C4Graph/c4Fixture.js.map +1 -1
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts +6 -9
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +1 -1
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js +15 -50
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +1 -1
- package/dist/subsystem/C4Graph.d.ts +2 -3
- package/dist/subsystem/C4Graph.d.ts.map +1 -1
- package/dist/subsystem/C4Graph.js +2 -3
- package/dist/subsystem/C4Graph.js.map +1 -1
- package/dist/subsystem/IssueList.d.ts +5 -5
- package/dist/subsystem/IssueList.d.ts.map +1 -1
- package/dist/subsystem/IssueList.js +9 -18
- package/dist/subsystem/IssueList.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts +16 -12
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +99 -113
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/SubsystemFileTree.d.ts +5 -5
- package/dist/subsystem/SubsystemFileTree.d.ts.map +1 -1
- package/dist/subsystem/SubsystemFileTree.js +13 -49
- package/dist/subsystem/SubsystemFileTree.js.map +1 -1
- package/dist/subsystem/model.d.ts +67 -53
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +305 -55
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/nodes.d.ts.map +1 -1
- package/dist/subsystem/nodes.js +11 -4
- package/dist/subsystem/nodes.js.map +1 -1
- package/dist/subsystem/toC4.d.ts +4 -4
- package/dist/subsystem/toC4.d.ts.map +1 -1
- package/dist/subsystem/toC4.js +3 -7
- package/dist/subsystem/toC4.js.map +1 -1
- package/dist/utils/elkLayout.d.ts.map +1 -1
- package/dist/utils/elkLayout.js +7 -0
- package/dist/utils/elkLayout.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +0 -4
- package/src/stories/Subsystem/AgentsPanel.stories.tsx +3 -5
- package/src/stories/Subsystem/C4Graph/C4Container.stories.tsx +1 -4
- package/src/stories/Subsystem/C4Graph/c4Fixture.ts +1 -1
- package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +2 -4
- package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +8 -8
- package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +19 -19
- package/src/stories/Subsystem/ComponentGraph/Constructs.stories.tsx +0 -1
- package/src/stories/Subsystem/ComponentGraph/CustomEntities.stories.tsx +3 -3
- package/src/stories/Subsystem/ComponentGraph/DetailPanel.stories.tsx +0 -2
- package/src/stories/Subsystem/ComponentGraph/Diagnostics.stories.tsx +2 -6
- package/src/stories/Subsystem/ComponentGraph/EdgeViews.stories.tsx +21 -21
- package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +0 -3
- package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +30 -32
- package/src/stories/Subsystem/ComponentGraph/GraphTitle.stories.tsx +4 -4
- package/src/stories/Subsystem/ComponentGraph/IssueOverlay.stories.tsx +1 -26
- package/src/stories/Subsystem/ComponentGraph/Issues.stories.tsx +3 -25
- package/src/stories/Subsystem/ComponentGraph/ModuleBadges.stories.tsx +7 -8
- package/src/stories/Subsystem/ComponentGraph/ModulePathNesting.stories.tsx +116 -0
- package/src/stories/Subsystem/ComponentGraph/Modules.stories.tsx +9 -11
- package/src/stories/Subsystem/ComponentGraph/Packages.stories.tsx +3 -6
- package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +3 -3
- package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +8 -6
- package/src/stories/Subsystem/ComponentGraph/ProposedWalkthroughs.stories.tsx +0 -1
- package/src/stories/Subsystem/ComponentGraph/Reorder.stories.tsx +0 -1
- package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +26 -28
- package/src/stories/Subsystem/ComponentGraph/WalkthroughAutoplay.stories.tsx +0 -1
- package/src/stories/Subsystem/ComponentGraph/WorkspacePackageFrames.stories.tsx +2 -3
- package/src/stories/Subsystem/ComponentGraph/fixtures.ts +18 -58
- package/src/stories/Subsystem/EgoGraph/EgoGraph.stories.tsx +0 -2
- package/src/subsystem/C4Graph.tsx +2 -3
- package/src/subsystem/IssueList.tsx +12 -22
- package/src/subsystem/SubsystemComponentGraph.tsx +117 -135
- package/src/subsystem/SubsystemFileTree.tsx +17 -50
- package/src/subsystem/model.test.ts +155 -24
- package/src/subsystem/model.ts +352 -108
- package/src/subsystem/nodes.tsx +13 -3
- package/src/subsystem/toC4.test.ts +5 -12
- package/src/subsystem/toC4.ts +5 -9
- package/src/utils/elkLayout.ts +10 -0
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import type { SubsystemModelDocument } from "../../../subsystem/model";
|
|
3
3
|
|
|
4
4
|
export const c4FixtureModel: SubsystemModelDocument = JSON.parse(
|
|
5
|
-
"{\"title\":\"Subsystem Modeling (composite)\",\"components\":[{\"name\":\"GitHub Gists API\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:api.github.com/gists\",\"purpose\":\"Create or update a public gist that holds the portable JSON.\",\"process\":\"external/github\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"read\",\"value\":\"GET /gists/{id}\"},{\"key\":\"create\",\"value\":\"POST /gists\"},{\"key\":\"update\",\"value\":\"PATCH /gists/{id}\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"github-gists-api\"},{\"name\":\"SubsystemComponentGraph\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"symbol\":\"SubsystemComponentGraph\",\"purpose\":\"Shared graph viewer for site gist pages and Studio model tabs.\",\"process\":\"subsystems-react/ui\",\"capture\":\"analyzed\",\"alias\":\"react-graph\",\"role\":\"entry\",\"module\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"framework\":\"react\",\"stereotype\":\"component\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"props\",\"type\":\"SubsystemComponentGraphProps\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"createSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"createSubsystemModel\",\"purpose\":\"Mint sg- id and write the hydrated record into the disk store.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"studio-create\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"doc\",\"type\":\"SubsystemModelDocument & { title: string; description?: string; walkthroughs?: SubsystemWalkthrough[] }\"}],\"returnType\":\"Promise<StoredSubsystemModel>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"updateSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"updateSubsystemModel\",\"purpose\":\"Patch a local record in place — used to stamp or refresh the host gist ref.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"studio-update\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"name\":\"getSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"getSubsystemModel\",\"purpose\":\"Read one hydrated record from the disk store by sg- id.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"studio-get\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"id\",\"type\":\"string\"}],\"returnType\":\"Promise<StoredSubsystemModel | null>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"SubsystemModelsView\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"SubsystemModelsView\",\"purpose\":\"Studio list of local models — one place a Share as gist action can live.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"alias\":\"studio-list\",\"module\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"framework\":\"react\",\"stereotype\":\"component\",\"declaration\":{\"kind\":\"function\",\"parameters\":[],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"SubsystemModelView\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"symbol\":\"SubsystemModelView\",\"purpose\":\"Open model tab chrome — alternate home for a per-model Gist button.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"alias\":\"studio-model-view\",\"module\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"framework\":\"react\",\"stereotype\":\"component\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"tabId\",\"type\":\"string\"},{\"name\":\"graphId\",\"type\":\"string\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"openSubsystemModelTab\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"openSubsystemModelTab\",\"purpose\":\"Focus or create a subsystem-model tab for a stored sg- id.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"open-tab\"},{\"name\":\"handleSubsystemModelRequest\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"handleSubsystemModelRequest\",\"purpose\":\"Accepts PUT /api/subsystem-model/:id and patches the stored graph.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"http-put\",\"module\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"req\",\"type\":\"Request\"},{\"name\":\"url\",\"type\":\"URL\"}],\"returnType\":\"Promise<Response | null>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"emitSubsystemModelChange\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"emitSubsystemModelChange\",\"purpose\":\"Fan a graphId change into the registered host listener.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"emit\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"name\":\"Inner\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"symbol\":\"Inner\",\"purpose\":\"Owns two-pass ELK layout and layoutReady.\\nLanded: after Pass 1, kick Pass 2 from built — do not wait on remount.\",\"process\":\"subsystems-react\",\"capture\":\"analyzed\",\"alias\":\"graph-inner\"},{\"name\":\"buildSubsystemGraph\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\",\"symbol\":\"buildSubsystemGraph\",\"purpose\":\"Run ELK for Pass 1 (estimate) and Pass 2 (measured sizes).\",\"process\":\"subsystems-react\",\"capture\":\"analyzed\",\"alias\":\"build-graph\",\"module\":\"packages/subsystems-react/src/subsystem/model.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"doc\",\"type\":\"SubsystemModelDocument\"},{\"name\":\"opts\",\"type\":\"object\"}],\"returnType\":\"Promise<{ nodes; edges; regions }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"triggerPass2\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"symbol\":\"triggerPass2\",\"purpose\":\"Sets layoutReady true after measured ELK.\\nLanded: also invoked from a built effect after Pass 1, not only dimensions.\",\"process\":\"subsystems-react\",\"capture\":\"analyzed\",\"alias\":\"trigger-pass2\"},{\"name\":\"AgentSessionsOverviewView\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"symbol\":\"AgentSessionsOverviewView\",\"purpose\":\"Load historical agent sessions and kick off concept analysis for OpenCode rows.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"active\",\"type\":\"boolean\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"agent-sessions-overview\",\"framework\":\"react\",\"stereotype\":\"component\"},{\"name\":\"processSessionEvents\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/session-pipeline.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/session-pipeline.ts\",\"symbol\":\"processSessionEvents\",\"purpose\":\"Load one session's opencode sqlite rows, convert to universal events, normalize, and accumulate.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"sessionId\",\"type\":\"string\"},{\"name\":\"opts\",\"type\":\"{ includeRaw?: boolean; useCache?: boolean }\"}],\"returnType\":\"Promise<BuiltSessionEvents>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"process-session-events\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"name\":\"auditSubsystemModel\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"purpose\":\"Runs the dry-run deterministic audit across every component.\",\"symbol\":\"auditSubsystemModel\",\"alias\":\"audit-model\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"}],\"returnType\":\"Promise<{ ok: true; report: SubsystemModelAuditReport; fingerprint: string } | { ok: false; error: string }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"name\":\"verifyModelFiles\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purpose\":\"Checks files exist and symbols are declared for all components.\",\"symbol\":\"verifyModelFiles\",\"alias\":\"verify-files\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"doc\",\"type\":\"SubsystemModelDocument & { walkthroughs?: SubsystemWalkthrough[] }\"}],\"returnType\":\"Promise<SubsystemModelVerification>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"name\":\"verifySubsystemComponent\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"purpose\":\"Verifies one component against disk plus the graphify anchor.\",\"symbol\":\"verifySubsystemComponent\",\"alias\":\"verify-component\",\"module\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"},{\"capture\":\"analyzed\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"name\":\"touchSubsystemModelOpened\",\"process\":\"subsystems-studio/host\",\"purpose\":\"Stamps lastOpenedAt with rewrite suppress window.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"touchSubsystemModelOpened\",\"alias\":\"open-stamp\"},{\"capture\":\"analyzed\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/utils/elkLayout.ts\",\"name\":\"computeElkLayout\",\"process\":\"subsystems-studio/renderer\",\"purpose\":\"Computes orthogonal ELK layout on the main thread.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/utils/elkLayout.ts\",\"symbol\":\"computeElkLayout\",\"alias\":\"elk\",\"module\":\"packages/subsystems-react/src/utils/elkLayout.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"nodes\",\"type\":\"Node[]\"},{\"name\":\"edges\",\"type\":\"Edge[]\"},{\"name\":\"options\",\"type\":\"ElkLayoutOptions\"}],\"returnType\":\"Promise<ElkLayoutResult>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"App\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\",\"symbol\":\"App\",\"purpose\":\"Switches active tab on tabsChanged without waiting on host.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"alias\":\"app-shell\",\"module\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"framework\":\"react\",\"stereotype\":\"component\"},{\"name\":\"MaintainModelPickerModal\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"symbol\":\"MaintainModelPickerModal\",\"purpose\":\"Lets the user pick a free OpenCode model and start a Maintain run over Electrobun RPC.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"mode\",\"type\":\"\\\"issues\\\" | \\\"gaps\\\"\"},{\"name\":\"onStarted\",\"type\":\"(info) => void\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-picker\",\"module\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"framework\":\"react\",\"stereotype\":\"component\"},{\"name\":\"maintainSubsystemModelInBackground\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"maintainSubsystemModelInBackground\",\"purpose\":\"Returns immediately from RPC, tracks in-flight graphs, and broadcasts Maintain lifecycle to the renderer.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"opts\",\"type\":\"{ model?: string }\"}],\"returnType\":\"void\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-background\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\"},{\"name\":\"maintainSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"maintainSubsystemModel\",\"purpose\":\"Ensures OpenCode V2 runtime and Maintain agents, audits the model, routes by verdict, builds the brief, then runs the chosen agent.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"opts\",\"type\":\"{ model?: string }\"}],\"returnType\":\"Promise<MaintainModelResult>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-orchestrator\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"name\":\"runMaintainAgent\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"runMaintainAgent\",\"purpose\":\"After Studio has ensured the V2 runtime, create/prompt a session and subscribe to SSE. Today this still spawns opencode run.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"agent\",\"type\":\"MaintainAgentId\"},{\"name\":\"task\",\"type\":\"string\"},{\"name\":\"model\",\"type\":\"string\"}],\"returnType\":\"Promise<{ ok: boolean; summary?: string; error?: string }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"run-maintain-agent\",\"module\":\"packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"name\":\"OpenCodeV2Service\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:opencode/v2-service\",\"purpose\":\"Shared OpenCode 2 background server. Studio starts it via Service.ensure after the opencode2 binary is present and up to date.\",\"process\":\"opencode/v2\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"package\",\"value\":\"@opencode/client@beta\"},{\"key\":\"ensure\",\"value\":\"Service.ensure()\"},{\"key\":\"events\",\"value\":\"GET /api/event (SSE)\"},{\"key\":\"prompt\",\"value\":\"session.create + session.prompt\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode-v2-service\"},{\"name\":\"MaintainAgent\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:opencode/maintain-agent\",\"purpose\":\"issue-fixer or gap-filler agent that investigates audit findings and POSTs correction proposals to Studio HTTP.\",\"process\":\"opencode/v2\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"agents\",\"value\":\"issue-fixer | gap-filler\"},{\"key\":\"edit\",\"value\":\"deny\"},{\"key\":\"proposeVia\",\"value\":\"curl Studio :3045\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-agent\"},{\"name\":\"createSubsystemModelProposal\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\",\"symbol\":\"createSubsystemModelProposal\",\"purpose\":\"Persists a pending human-confirmable proposal with rationale, changes, and preview.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"input\",\"type\":\"{ graphId; rationale; changes; author? }\"}],\"returnType\":\"Promise<{ ok: true; proposal } | { ok: false; error }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"create-proposal\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/proposal-store.ts\"},{\"name\":\"OpenCodeV2Lifecycle\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:studio/opencode-v2-lifecycle\",\"purpose\":\"Studio-managed OpenCode V2 lifecycle. First slice: debug tab detect/install/update via getOpencodeV2Status + installOpencodeV2; Service.ensure comes next.\",\"process\":\"subsystems-studio/host\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"detect\",\"value\":\"which opencode2 / OPENCODE2_BIN / version\"},{\"key\":\"install\",\"value\":\"npm i -g @opencode-ai/cli@beta or v2 install script\"},{\"key\":\"update\",\"value\":\"compare installed vs npm beta; upgrade when behind\"},{\"key\":\"ensure\",\"value\":\"Service.ensure({ command: [bin, 'serve', '--service'] })\"},{\"key\":\"pattern\",\"value\":\"mirrors studio-version.ts detect + update\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode-v2-lifecycle\"},{\"name\":\"OpenCodeCliNpm\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:npm/@opencode-ai/cli@beta\",\"purpose\":\"npm beta distribution of opencode2 that Studio installs or updates when the binary is missing or behind.\",\"process\":\"opencode/v2\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"package\",\"value\":\"@opencode-ai/cli@beta\"},{\"key\":\"bin\",\"value\":\"opencode2\"},{\"key\":\"alt\",\"value\":\"curl -fsSL https://opencode.ai/v2/install | bash\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode-cli-npm\"},{\"name\":\"listMaintainSessions\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"symbol\":\"listMaintainSessions\",\"purpose\":\"Discover Maintain runs from session_v2 (and legacy session) by agent or Maintain title.\",\"process\":\"subsystems-studio/host\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"opts\",\"type\":\"{ days?: number; limit?: number }\"}],\"returnType\":\"Promise<{ sessions: SessionSummary[]; hasMore: boolean }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"list-maintain-sessions\",\"module\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\"},{\"name\":\"runOpencodeV2AgentSession\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"symbol\":\"runOpencodeV2AgentSession\",\"purpose\":\"Create and prompt a Maintain session on the running opencode2 HTTP service.\",\"process\":\"subsystems-studio/host\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"opts\",\"type\":\"RunOpencodeV2AgentSessionOpts\"}],\"returnType\":\"Promise<{ ok: boolean; sessionId?: string }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"run-opencode-v2-session\",\"module\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"name\":\"opencode2 serve\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:opencode2\",\"purpose\":\"Running OpenCode V2 HTTP service that owns session create/prompt and SQLite writes.\",\"process\":\"opencode2/service\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"url\",\"value\":\"service.json → localhost\"},{\"key\":\"db\",\"value\":\"~/.local/share/opencode/opencode.db\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode2-service\"},{\"name\":\"session_v2 (opencode.db)\",\"construct\":\"external\",\"file\":\"\",\"purl\":\"external:opencode.db/session-v2\",\"purpose\":\"OpenCode V2 session metadata table — accessed by listMaintainSessions and kind resolution.\",\"process\":\"opencode/sqlite\",\"role\":\"service\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"db\",\"value\":\"~/.local/share/opencode/opencode.db\"},{\"key\":\"table\",\"value\":\"session-v2\"},{\"key\":\"access\",\"value\":\"sqlite read from Studio host\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"store-session-v2\"},{\"name\":\"SubsystemConstructDeclaration\",\"construct\":\"type_alias\",\"file\":\"packages/subsystems-core/src/types/subsystem-model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-core/src/types/subsystem-model.ts\",\"symbol\":\"SubsystemConstructDeclaration\",\"purpose\":\"Discriminated declaration union (params, members, type buckets) that agents and the CLI are told to author.\",\"process\":\"subsystems-core\",\"declaration\":{\"kind\":\"type\",\"unionOf\":[\"SubsystemClassDeclaration\",\"SubsystemFunctionDeclaration\",\"SubsystemMethodDeclaration\",\"SubsystemTypeDeclaration\",\"SubsystemModuleDeclaration\",\"SubsystemExternalDeclaration\",\"SubsystemStoreDeclaration\",\"SubsystemCustomEntityDeclaration\"],\"properties\":[],\"usedBy\":[],\"implementors\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"core-declaration\",\"declarationRef\":{\"file\":\"packages/subsystems-core/src/types/subsystem-model.ts\",\"startLine\":264,\"lineHash\":\"ffe942627983745a8ae31e55497cf40f\",\"capturedAt\":\"2026-09-21T02:54:18.342Z\",\"graphifyNodeId\":\"packages_subsystems_core_src_types_subsystem_model_subsystemconstructdeclaration\",\"revision\":{\"headSha\":\"e05e6571c633d53e8fa02ded3b5c26fcf23d7050\",\"dirtyHash\":\"96973df283dabd40\"}}},{\"name\":\"SubsystemComponent\",\"construct\":\"interface\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\",\"symbol\":\"SubsystemComponent\",\"purpose\":\"Mirror the node in the react package, still carrying the vestigial detail drill-down fields the renderer consumes.\",\"process\":\"subsystems-react\",\"declaration\":{\"kind\":\"type\",\"properties\":[{\"name\":\"detail\",\"type\":\"GraphifyComponentDetail?\"},{\"name\":\"detailProvenance\",\"type\":\"'verified' | 'authored'?\"},{\"name\":\"tokens\",\"type\":\"SubsystemDeclToken[]?\"},{\"name\":\"declarationRef\",\"type\":\"SubsystemDeclarationRef?\"}],\"usedBy\":[],\"implementors\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"react-component\",\"declarationRef\":{\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"startLine\":129,\"lineHash\":\"89717fb6c214f8a650fdfa3fe89d617d\",\"capturedAt\":\"2026-09-21T02:54:31.099Z\",\"graphifyNodeId\":\"packages_subsystems_react_src_subsystem_model_subsystemcomponent\",\"revision\":{\"headSha\":\"e05e6571c633d53e8fa02ded3b5c26fcf23d7050\",\"dirtyHash\":\"96973df283dabd40\"}}},{\"name\":\"generateDeclarationString\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"symbol\":\"generateDeclarationString\",\"purpose\":\"Turn the click-panel source string from component.detail only — missing detail yields construct defaults like type X = unknown.\",\"process\":\"subsystems-react\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"component\",\"type\":\"SubsystemComponent\"}],\"returnType\":\"string\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"generate-decl-string\",\"declarationRef\":{\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"startLine\":20,\"lineHash\":\"ecad06378cd3ce0c922aa385c4b69313\",\"capturedAt\":\"2026-09-21T02:56:13.463Z\",\"graphifyNodeId\":\"packages_subsystems_react_src_subsystem_formatdeclaration_generatedeclarationstring\",\"revision\":{\"headSha\":\"e05e6571c633d53e8fa02ded3b5c26fcf23d7050\",\"dirtyHash\":\"96973df283dabd40\"}}},{\"name\":\"getSubsystemModuleRegions\",\"construct\":\"function\",\"symbol\":\"getSubsystemModuleRegions\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"module\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react\",\"purpose\":\"Collects multi-member module boundary regions.\",\"alias\":\"module-regions\"},{\"name\":\"buildBoundaryLayoutGroups\",\"construct\":\"function\",\"symbol\":\"buildBoundaryLayoutGroups\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"module\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react\",\"purpose\":\"Builds process→module→leaf group defs with parentId nesting.\",\"alias\":\"layout-groups\"},{\"name\":\"resolveRepoRootForComponent\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"resolveRepoRootForComponent\",\"purpose\":\"Deterministic — purl to local repo root; a null root is reported unresolved.\",\"process\":\"subsystems-studio/host\",\"alias\":\"resolve-root\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"purl\",\"type\":\"string | undefined\"}],\"returnType\":\"string | undefined\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"closeTabById\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"closeTabById\",\"purpose\":\"Host choke point every close path funnels through: refuses permanent tabs, deletes the tab record, re-picks a fallback suggestion, and re-broadcasts the strip.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"id\",\"type\":\"string\"}],\"returnType\":\"{ ok: boolean; error?: string }\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"close-tab\"},{\"name\":\"broadcastTabsChanged\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"broadcastTabsChanged\",\"purpose\":\"Sends the tabsChanged notification (with an optional focus hint) to the renderer over RPC.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"focusTabId\",\"type\":\"string\"}],\"returnType\":\"void\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"broadcast-tabs\"},{\"name\":\"electrobun\",\"construct\":\"store\",\"file\":\"packages/subsystems-studio/src/mainview/rpc.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/rpc.ts\",\"symbol\":\"electrobun\",\"purpose\":\"Renderer-side RPC bridge singleton; sends host requests (listTabs, closeTab, setActiveTab) and receives tabsChanged.\",\"process\":\"subsystems-studio/renderer\",\"module\":\"packages/subsystems-studio/src/mainview/rpc.ts\",\"alias\":\"rpc-bridge\"},{\"name\":\"listSubsystemModels\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"listSubsystemModels\",\"purpose\":\"Returns the lightweight index entry for every stored model.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[],\"returnType\":\"Promise<SubsystemModelIndexEntry[]>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"store-list\"},{\"name\":\"mergeSubsystemModels\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"symbol\":\"mergeSubsystemModels\",\"purpose\":\"Composes every model touching one repo-key into a single graph. Code + proposed-with-intent join on (purlRepoKey, file, symbol-or-None); external/custom_entity join on exact (purl, normalized name) with purl != 'external' (bare externals stay model-scoped); alias-text/name-only matching is rejected (false friends in the data). Each model's edges resolve in its own alias-space; unified nodes carry the union of aliases. Attribute divergences (purpose variants, process vocabulary drift, construct disagreements) are grouped as conflicts, never normalized — an agent pass fixes source models consistent via proposals. Keys must be consistent and unique, not perfect.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"alias\":\"merge-models\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"models\",\"type\":\"MergeInputModel[]\"}],\"returnType\":\"MergeResult\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\",\"name\":\"listSubsystemModels RPC handler\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"purpose\":\"Enriches index entries into list summaries with repos, graphify and audit.\",\"alias\":\"list-rpc\",\"role\":\"entry\"},{\"construct\":\"interface\",\"file\":\"packages/subsystems-studio/src/shared/contract.ts\",\"module\":\"packages/subsystems-studio/src/shared/contract.ts\",\"name\":\"SubsystemModelSummary\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/shared/contract.ts\",\"purpose\":\"Lists counts, repos and audit state without component files.\",\"symbol\":\"SubsystemModelSummary\",\"alias\":\"summary\",\"process\":\"subsystems-studio/host\",\"declaration\":{\"kind\":\"type\",\"properties\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"walkthroughs\",\"type\":\"SummaryWalkthrough[] | undefined\"}],\"usedBy\":[],\"implementors\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/paths.ts\",\"module\":\"packages/subsystems-react/src/subsystem/paths.ts\",\"name\":\"buildRepoGroups\",\"process\":\"subsystems-studio/renderer\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/paths.ts\",\"purpose\":\"Groups component file and purl pairs by repo for per-repo trees.\",\"symbol\":\"buildRepoGroups\",\"alias\":\"repo-groups\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"framework\":\"react\",\"module\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"name\":\"SubsystemFilePanel\",\"process\":\"subsystems-studio/renderer\",\"proposed\":true,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"purpose\":\"Shows file trees for the selected subsystem on the left of the list.\\nAlternative without per-selection fetch: add files to SubsystemModelSummary.\",\"stereotype\":\"component\",\"alias\":\"file-panel\"},{\"alias\":\"composed-pane\",\"name\":\"ComposedGraphPane\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"symbol\":\"ComposedGraphPane\",\"process\":\"principal-studio/renderer\",\"purpose\":\"Fetches the host-merged document for one repo, rolls it to frames, and renders the aggregate graph.\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"repoKey\",\"type\":\"string\"},{\"name\":\"graphs\",\"type\":\"SubsystemModelSummary[]\"},{\"name\":\"modelIds\",\"type\":\"string[] | undefined\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"alias\":\"jev-gate\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/jev-maintenance.ts\",\"module\":\"packages/subsystems-studio/src/bun/jev-maintenance.ts\",\"name\":\"autoAcceptProposalIfConfident\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/jev-maintenance.ts\",\"purpose\":\"Score a proposal with Jev and auto-accept only when confidence clears the threshold.\",\"symbol\":\"autoAcceptProposalIfConfident\",\"declaration\":{\"callers\":[],\"callees\":[],\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"proposal\",\"type\":\"SubsystemModelProposal\"},{\"name\":\"opts\",\"type\":\"{ enabled: boolean; threshold: number; apiKey?: string; sourceContext?: string }\"}],\"returnType\":\"Promise<{ accepted: boolean; proposal: SubsystemModelProposal; error?: string }>\"},\"declarationProvenance\":\"authored\"},{\"alias\":\"model-record\",\"construct\":\"interface\",\"file\":\"packages/subsystems-studio/src/shared/contract.ts\",\"name\":\"StoredSubsystemModel\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/shared/contract.ts\",\"purpose\":\"Hold updatedAt edit stamp plus host-local lastOpenedAt open stamp.\",\"symbol\":\"StoredSubsystemModel\"},{\"alias\":\"viewed-check\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"name\":\"isModelViewed\",\"proposed\":true,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"purpose\":\"Derive viewed as lastOpenedAt at or after updatedAt.\",\"symbol\":\"isModelViewed\"},{\"alias\":\"opencode-v2-server__sg-1789951509967-ppkvezdy0\",\"name\":\"OpenCode V2 service\",\"construct\":\"external\",\"role\":\"service\",\"process\":\"external/opencode2\",\"file\":\"\",\"purl\":\"external:opencode2-service\",\"purpose\":\"The opencode2 daemon owning /api/session and /api/event; executes the agent session.\"},{\"alias\":\"walkthroughs-panel\",\"name\":\"WalkthroughsPanel\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"symbol\":\"WalkthroughsPanel\",\"purpose\":\"Extracted flows panel: renders the ordered walkthrough rows, forwards focus/hover events, and owns the inline drag-to-reorder controller.\",\"process\":\"subsystems-studio/renderer\",\"module\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\"},{\"alias\":\"sidebar-reorder\",\"name\":\"reorder controller\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"purpose\":\"Inline drag controller in WalkthroughsPanel: tracks the dragged row and insertion boundary, draws the landing line, and suppresses stale hover after a drop.\",\"process\":\"subsystems-studio/renderer\",\"module\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\"},{\"alias\":\"runs-store\",\"name\":\"SubsystemModelRunStore\",\"construct\":\"store\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-runs.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-runs.ts\",\"symbol\":\"noteSubsystemModelRunStart\",\"purpose\":\"Persists runs keyed by graphId (~/.principal/subsystem-model-runs/<graphId>.json). Records sessionId <-> graphId pairing and pendingCount snapshot. Stamping seam C: add runId field here and backfill proposalIds on finish.\",\"process\":\"packages/subsystems-studio/run\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-runs.ts\"},{\"alias\":\"propose\",\"name\":\"proposeSubsystemModelCorrection\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"proposeSubsystemModelCorrection\",\"purpose\":\"RPC handler the agent hits to submit a proposed correction. Seam B caller: forward runId from the HTTP body -> RPC -> store.\",\"process\":\"packages/subsystems-studio/run\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\"},{\"alias\":\"http-propose\",\"name\":\"Propose HTTP route\",\"construct\":\"custom_entity\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"POST /api/subsystem-model/:id/proposals\",\"purpose\":\"HTTP endpoint (line ~399) that parses the propose curl body then calls proposeSubsystemModelCorrection. Seam B entry: parse an optional runId field off the body.\",\"process\":\"packages/subsystems-studio/run\",\"module\":\"packages/subsystems-studio/src/bun/http-server.ts\"},{\"alias\":\"agent\",\"name\":\"Maintenance agent (OpenCode) session\",\"construct\":\"custom_entity\",\"file\":\"\",\"purl\":\"external\",\"symbol\":\"maintain-agent\",\"purpose\":\"External OpenCode agent session launched per brief; posts proposals via the propose curl. Does NOT exist in this repo (process is opencode).\",\"process\":\"external\",\"module\":\"\"},{\"alias\":\"agent__sg-1790108945330-xnzp05iqt\",\"name\":\"Maintenance agent (OpenCode) session\",\"construct\":\"custom_entity\",\"file\":\"\",\"purl\":\"external\",\"symbol\":\"maintain-agent\",\"purpose\":\"External OpenCode agent session launched per brief; posts proposals via the propose curl. Does NOT exist in this repo (process is opencode).\",\"process\":\"external\",\"module\":\"\"}],\"relations\":[{\"id\":\"process-misses-session-message\",\"from\":\"process-session-events\",\"to\":\"run-opencode-v2-session\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/session-pipeline.ts\"]},{\"id\":\"declaration-not-read\",\"from\":\"generate-decl-string\",\"to\":\"core-declaration\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\"]},{\"id\":\"proposed-replaces-generate\",\"from\":\"generate-decl-string\",\"to\":\"generate-decl-string\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\"]},{\"id\":\"layout-uses-module\",\"from\":\"layout-groups\",\"to\":\"module-regions\",\"relationType\":\"references\"},{\"id\":\"merge-reads-store\",\"from\":\"merge-models\",\"to\":\"studio-get\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\"]},{\"from\":\"react-graph\",\"id\":\"detail-uses-repos\",\"relationType\":\"references\",\"to\":\"repo-groups\"},{\"from\":\"file-panel\",\"id\":\"panel-mounts-in-list\",\"relationType\":\"references\",\"to\":\"studio-list\"},{\"from\":\"file-panel\",\"id\":\"panel-uses-repos\",\"relationType\":\"references\",\"to\":\"repo-groups\"},{\"from\":\"list-rpc\",\"id\":\"rpc-reads-index\",\"relationType\":\"references\",\"to\":\"store-list\"},{\"from\":\"studio-list\",\"id\":\"view-renders-summary\",\"relationType\":\"references\",\"to\":\"summary\"},{\"id\":\"view-references-pane\",\"from\":\"studio-list\",\"to\":\"composed-pane\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"]},{\"from\":\"maintain-orchestrator\",\"id\":\"orch-to-audit\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"],\"relationType\":\"references\",\"to\":\"audit-model\"},{\"from\":\"maintain-orchestrator\",\"id\":\"orch-to-propose\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"],\"relationType\":\"references\",\"to\":\"create-proposal\"},{\"from\":\"create-proposal\",\"id\":\"propose-to-gate\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"],\"relationType\":\"references\",\"to\":\"jev-gate\"},{\"from\":\"studio-update\",\"id\":\"update-to-record\",\"relationType\":\"references\",\"to\":\"model-record\"},{\"from\":\"open-stamp\",\"id\":\"touch-to-record\",\"relationType\":\"references\",\"to\":\"model-record\"},{\"from\":\"open-tab\",\"id\":\"tabs-to-touch\",\"relationType\":\"references\",\"to\":\"open-stamp\"},{\"from\":\"studio-list\",\"id\":\"view-to-summary\",\"relationType\":\"references\",\"to\":\"summary\"},{\"from\":\"viewed-check\",\"id\":\"check-to-record\",\"relationType\":\"references\",\"to\":\"model-record\"},{\"from\":\"studio-list\",\"id\":\"view-to-bridge\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"],\"relationType\":\"references\",\"to\":\"rpc-bridge\"},{\"from\":\"rpc-bridge\",\"id\":\"bridge-to-store\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"],\"relationType\":\"references\",\"to\":\"store-list\"},{\"from\":\"store-list\",\"id\":\"store-to-reader\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"],\"relationType\":\"references\",\"to\":\"studio-get\"},{\"from\":\"studio-list\",\"id\":\"view-to-resolver\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"],\"relationType\":\"references\",\"to\":\"resolve-root\"},{\"from\":\"studio-get\",\"id\":\"lookup-to-resolver\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"],\"relationType\":\"references\",\"to\":\"resolve-root\"},{\"id\":\"r-picker-refs-rpc\",\"from\":\"maintain-picker\",\"to\":\"list-rpc\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"]},{\"id\":\"graph-renders-panel\",\"from\":\"react-graph\",\"to\":\"walkthroughs-panel\",\"relationType\":\"references\"},{\"id\":\"view-requests-update\",\"from\":\"studio-model-view\",\"to\":\"list-rpc\",\"relationType\":\"references\"},{\"id\":\"rpc-delegates-store\",\"from\":\"list-rpc\",\"to\":\"studio-update\",\"relationType\":\"references\"},{\"id\":\"store-emits-change\",\"from\":\"studio-update\",\"to\":\"emit\",\"relationType\":\"references\"},{\"id\":\"list-subscribes-change\",\"from\":\"studio-list\",\"to\":\"emit\",\"relationType\":\"references\"},{\"id\":\"view-references-summary\",\"from\":\"studio-list\",\"to\":\"summary\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"]},{\"id\":\"r-maintain-runs\",\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-runs.ts\"]},{\"id\":\"r-agent-propose\",\"from\":\"agent\",\"to\":\"propose\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"]},{\"id\":\"r-http-propose\",\"from\":\"http-propose\",\"to\":\"propose\",\"relationType\":\"method\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"]},{\"id\":\"r-maintain-runs__dup1\",\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-runs.ts\"]},{\"id\":\"r-agent-propose__dup1\",\"from\":\"agent__sg-1790108945330-xnzp05iqt\",\"to\":\"propose\",\"relationType\":\"references\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"]},{\"id\":\"r-http-propose__dup1\",\"from\":\"http-propose\",\"to\":\"propose\",\"relationType\":\"method\",\"refs\":[\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"]}],\"walkthroughs\":[{\"id\":\"tl-first-open-ok\",\"title\":\"First open — cover lifts\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"graph-inner\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":258,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Mount SubsystemComponentGraph for a freshly loaded graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"graph-inner\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":407,\"symbol\":\"Inner\",\"annotation\":\"Pass 1: buildSubsystemGraph without measured sizes.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"graph-inner\",\"to\":\"trigger-pass2\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":762,\"symbol\":\"Inner\",\"annotation\":\"queueMicrotask triggers Pass 2 from onNodesChange.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"trigger-pass2\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":454,\"symbol\":\"triggerPass2\",\"annotation\":\"Pass 2 re-runs buildSubsystemGraph with measured widths.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"}]},{\"id\":\"tl-update-stuck\",\"title\":\"Bug (before fix) — update stuck on cover\",\"steps\":[{\"from\":\"http-put\",\"to\":\"studio-update\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":324,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Agent PUT patches the open graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"studio-update\",\"to\":\"emit\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":995,\"symbol\":\"updateSubsystemModel\",\"annotation\":\"Persist then emit reason updated.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"studio-model-view\",\"to\":\"graph-inner\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":258,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Same Inner instance gets new components/edges props.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"graph-inner\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":407,\"symbol\":\"Inner\",\"annotation\":\"Pass 1 rebuilds then setLayoutReady(false) drops the cover.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"graph-inner\",\"to\":\"trigger-pass2\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":762,\"symbol\":\"Inner\",\"annotation\":\"Before: only dimensions path — no events → stuck forever.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"}]},{\"id\":\"tl-proposed-fix\",\"title\":\"Fix — reuse dims + kick Pass 2\",\"steps\":[{\"from\":\"http-put\",\"to\":\"studio-update\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":324,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Same live PUT into an open tab.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"graph-inner\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":407,\"symbol\":\"Inner\",\"annotation\":\"Pass 1 still estimates; cover drops via setLayoutReady(false).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"graph-inner\",\"to\":\"trigger-pass2\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":477,\"symbol\":\"Inner\",\"annotation\":\"built effect queueMicrotasks triggerPass2 after Pass 1.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"trigger-pass2\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":454,\"symbol\":\"triggerPass2\",\"annotation\":\"Measured ELK; .catch reveals on error.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"}]},{\"id\":\"tl-run-audit\",\"title\":\"Run a dry-run audit from the Audit button\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":443,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Invoke the host dry-run audit once caches are ready.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"tl-host-checks\",\"title\":\"Deterministic checks inside the host audit\",\"steps\":[{\"from\":\"audit-model\",\"to\":\"verify-files\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"line\":598,\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Check every file exists and every claimed symbol is declared.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"},{\"from\":\"audit-model\",\"to\":\"verify-component\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"line\":667,\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Verify each source component dry-run against the graphify cache.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"}]},{\"id\":\"tl-click-load\",\"title\":\"Click subsystem, tab already open (fast path)\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"open-tab\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":981,\"symbol\":\"onOpen\",\"annotation\":\"Row click fires openSubsystemModel RPC; host takes the zero-IO focus path.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"open-tab\",\"to\":\"studio-model-view\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1018,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Host broadcasts focus before any disk IO so the tab switches instantly.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"open-tab\",\"to\":\"open-stamp\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1019,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Background fire-and-forget: stamp lastOpenedAt after broadcast.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"open-stamp\",\"to\":\"studio-get\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":829,\"symbol\":\"touchSubsystemModelOpened\",\"annotation\":\"Stamp path re-reads the graph file, then writes record plus index.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"studio-model-view\",\"to\":\"studio-get\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":79,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Remount fetches the full graph over the bridge.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Detail mounts the React Flow graph with full components and edges.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"react-graph\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":537,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Graph runs pass 1 ELK layout with estimated node sizes.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"build-graph\",\"to\":\"elk\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1408,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"Builder runs orthogonal ELK on the main thread.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"}]},{\"id\":\"tl-optimistic-open\",\"title\":\"First open with empty state (implemented)\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"open-tab\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":981,\"symbol\":\"onOpen\",\"annotation\":\"Row click fires RPC; host resolves title from the small index file.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"open-tab\",\"to\":\"app-shell\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1054,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Host broadcasts focus immediately; stamp moves to background.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"app-shell\",\"to\":\"studio-model-view\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"line\":303,\"symbol\":\"App\",\"annotation\":\"Renderer switches tab and mounts detail view without waiting.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\"},{\"from\":\"studio-model-view\",\"to\":\"studio-get\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":79,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Detail fetches full graph in background and fills in on arrival.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"open-tab\",\"to\":\"open-stamp\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1057,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Background fire-and-forget: stamp lastOpenedAt after broadcast.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Once loaded, detail mounts graph canvas; tab already visible.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"tl-ensure-opencode-v2\",\"title\":\"Studio ensures OpenCode V2 runtime\",\"steps\":[{\"from\":\"maintain-orchestrator\",\"to\":\"opencode-v2-lifecycle\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":734,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Maintain entry calls Studio's OpenCode V2 lifecycle ensure (parallel to ensureMaintainAgentsInstalled).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-cli-npm\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2.ts\",\"line\":24,\"symbol\":\"resolveOpencode2Bin\",\"annotation\":\"If missing or behind, Studio installs/updates @opencode-ai/cli@beta (mirrors studio-version detect+update).\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/opencode-v2.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":650,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Service.ensure([opencode2, serve, --service]) starts or reuses the shared V2 background server.\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"tl-start-maintain-via-v2\",\"title\":\"Start Maintain via OpenCode V2\",\"steps\":[{\"from\":\"maintain-picker\",\"to\":\"maintain-background\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"line\":89,\"symbol\":\"MaintainModelPickerModal\",\"annotation\":\"RPC maintainSubsystemModel kicks the host; UI returns as soon as the run is accepted.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\"},{\"from\":\"maintain-background\",\"to\":\"maintain-orchestrator\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2328,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Background task calls the Maintain orchestrator after broadcasting status running.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"opencode-v2-lifecycle\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":730,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Before audit/run, Studio ensures OpenCode V2 is detected, installed/updated, and the service is up.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-cli-npm\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2.ts\",\"line\":24,\"symbol\":\"resolveOpencode2Bin\",\"annotation\":\"If missing or behind beta, Studio installs/updates @opencode-ai/cli@beta (same idea as studio-version update).\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/opencode-v2.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":650,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Service.ensure([opencode2, serve, --service]) starts or reuses the shared V2 background server.\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"run-maintain-agent\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":769,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"After runtime is ready, hand off the brief to the agent runner seam.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"run-maintain-agent\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":651,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Create session + prompt on the ensured V2 service (replaces Bun.spawn opencode run).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-service\",\"to\":\"maintain-agent\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":650,\"symbol\":\"runMaintainAgent\",\"annotation\":\"V2 server loads issue-fixer or gap-filler and runs the brief as a session prompt.\",\"purl\":\"external:opencode/v2-service#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"tl-live-progress-sse\",\"title\":\"Live progress over V2 SSE\",\"steps\":[{\"from\":\"run-maintain-agent\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":651,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Same seam also opens client.event.subscribe() scoped to the Maintain session.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-service\",\"to\":\"maintain-background\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2319,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Proposed: forward message/part/tool events into Maintain broadcasts instead of waiting for process exit.\",\"purl\":\"external:opencode/v2-service#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"tl-agent-proposes\",\"title\":\"Agent proposes via Studio HTTP\",\"steps\":[{\"from\":\"maintain-agent\",\"to\":\"http-put\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":354,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Agent curls POST /api/subsystem-model/:id/proposals using Access commands from the brief.\",\"purl\":\"external:opencode/maintain-agent#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"http-put\",\"to\":\"create-proposal\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":354,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"HTTP handler validates body and creates a pending proposal in the proposal store.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"}]},{\"id\":\"tl-list-maintain\",\"title\":\"List Maintenance Sessions\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":360,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Renderer RPC listMaintainSessions for the day window.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"},{\"from\":\"list-maintain-sessions\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"line\":161,\"symbol\":\"listMaintainSessions\",\"annotation\":\"Read session_v2 rows where agent is issue-fixer/gap-filler or title starts with Maintain.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-sessions.ts\"}]},{\"id\":\"tl-load-timeline-gap\",\"title\":\"Load timeline (empty for V2 Maintain)\",\"steps\":[{\"from\":\"process-session-events\",\"to\":\"process-session-events\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/session-pipeline.ts\",\"line\":1292,\"symbol\":\"processSessionEvents\",\"annotation\":\"SELECT FROM event — V2 Maintain sessions have 0 rows here; transcripts are in session_message instead.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/session-pipeline.ts\"}]},{\"id\":\"tl-create-maintain\",\"title\":\"Create a Maintain run\",\"steps\":[{\"from\":\"run-opencode-v2-session\",\"to\":\"opencode2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":291,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Create+prompt against the running opencode2 HTTP service.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"run-opencode-v2-session\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":291,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Service persists session_v2 metadata (title Maintain — …, agent) that the tab lists.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"run-opencode-v2-session\",\"to\":\"run-opencode-v2-session\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":291,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Turns land in session_message — not the event table processSessionEvents reads.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"}]},{\"id\":\"tl-maintain-list\",\"title\":\"List Maintenance Sessions\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":360,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"scope=maintain calls listMaintainSessions for the day window.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"},{\"from\":\"list-maintain-sessions\",\"to\":\"store-session-v2\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"line\":161,\"symbol\":\"listMaintainSessions\",\"annotation\":\"SELECT from session_v2 where agent is issue-fixer/gap-filler or title is Maintain — …\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-sessions.ts\"}]},{\"id\":\"tl-v1-timeline\",\"title\":\"V1 timeline (event table)\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"process-session-events\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":411,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Overview loads processed timelines via getAgentSessionsOverview → processSessionEvents.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"}]},{\"id\":\"tl-v2-timeline\",\"title\":\"V2 timeline (session_message)\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"process-session-events\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":411,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Same overview load path; kind routing chooses the V2 reader.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"}]},{\"id\":\"tl-authored-renders-unknown\",\"title\":\"Authored declaration → panel shows = unknown\",\"steps\":[{\"from\":\"generate-decl-string\",\"to\":\"react-component\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"line\":20,\"symbol\":\"generateDeclarationString\",\"annotation\":\"Reads component.detail only — authored schema declaration is invisible.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\"}]},{\"id\":\"tl-verified-detail-works\",\"title\":\"Verified graphify capture → detail → panel\",\"steps\":[{\"from\":\"generate-decl-string\",\"to\":\"react-component\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"line\":20,\"symbol\":\"generateDeclarationString\",\"annotation\":\"Same renderer path — now detail is populated so the signature shows.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\"}]},{\"id\":\"tl-proposed-single-source\",\"title\":\"Proposed: panel reads schema declaration\",\"steps\":[{\"from\":\"generate-decl-string\",\"to\":\"core-declaration\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-core/src/types/subsystem-model.ts\",\"line\":224,\"symbol\":\"SubsystemConstructDeclaration\",\"annotation\":\"Repoint generateDeclarationString at this union (and migrate capture into it).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-core/src/types/subsystem-model.ts\"}]},{\"id\":\"wt-frame-today\",\"title\":\"Frame a document (today)\",\"steps\":[{\"from\":\"react-graph\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":424,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Document change triggers buildSubsystemGraph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"build-graph\",\"to\":\"module-regions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":943,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"Collect module regions — flat list merged with process regions.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"},{\"from\":\"build-graph\",\"to\":\"elk\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1009,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"computeElkLayout gets a flat groups[] — one parent level only.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"}]},{\"id\":\"wt-nesting-gap\",\"title\":\"Where nesting would land\",\"steps\":[{\"from\":\"elk\",\"to\":\"elk\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-react/src/utils/elkLayout.ts\",\"line\":550,\"symbol\":\"computeElkLayout\",\"annotation\":\"INCLUDE_CHILDREN already on — ELK can nest; our groupDefs builder cannot yet.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/utils/elkLayout.ts\"}]},{\"id\":\"wt-nest\",\"title\":\"Nest process → module → export\",\"steps\":[{\"from\":\"react-graph\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":424,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Document change triggers buildSubsystemGraph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"build-graph\",\"to\":\"layout-groups\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1005,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"buildBoundaryLayoutGroups nests module groups under shared process.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"},{\"from\":\"layout-groups\",\"to\":\"module-regions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":533,\"symbol\":\"buildBoundaryLayoutGroups\",\"annotation\":\"Multi-member modules become frames; parentId set when process is unanimous.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"},{\"from\":\"build-graph\",\"to\":\"elk\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1081,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"computeElkLayout gets nested groups[] with parentId.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"}]},{\"id\":\"wt-paint\",\"title\":\"Paint the diagnostics\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Pass issues, diagnostic status, and (planned) verification into the graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"wt-write\",\"title\":\"Write-time verification (create/update)\",\"steps\":[{\"from\":\"studio-create\",\"to\":\"verify-files\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":991,\"symbol\":\"verifyModelFiles\",\"annotation\":\"Create runs the write-time pass and stores the result on the record.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"verify-files\",\"to\":\"resolve-root\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":670,\"symbol\":\"resolveRepoRootForComponent\",\"annotation\":\"Each component's file is resolved against its local repo root and checked on disk.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"}]},{\"id\":\"wt-audit\",\"title\":\"Audit (dry-run, graphify-backed)\",\"steps\":[{\"from\":\"audit-model\",\"to\":\"verify-component\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"line\":950,\"symbol\":\"verifySubsystemComponent\",\"annotation\":\"Per component, run the graphify-backed verification in dry-run mode.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"}]},{\"id\":\"wt-open-file\",\"title\":\"Open a file in the graph\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Host injects the path-keyed file viewer and readFile closure into the graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"wt-close-cmd-w\",\"title\":\"Close the active tab with Cmd+W\",\"steps\":[{\"from\":\"close-tab\",\"to\":\"broadcast-tabs\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3692,\"symbol\":\"closeTabById\",\"annotation\":\"Re-broadcast so every renderer view refreshes its tab list and picks a fallback.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"app-shell\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"line\":381,\"symbol\":\"refresh\",\"annotation\":\"The shell asks the host for the current tab list.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\"}]},{\"id\":\"wt-close-strip-x\",\"title\":\"Close a tab from the strip X button\",\"steps\":[{\"from\":\"app-shell\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"line\":472,\"symbol\":\"onClose\",\"annotation\":\"onClose drops the tab from local tabs and history and falls back the active tab first, then persists with closeTab; the next listTabs reconciles.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\"},{\"from\":\"rpc-bridge\",\"to\":\"close-tab\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1704,\"symbol\":\"closeTab\",\"annotation\":\"The host closeTab handler funnels into the same closeTabById choke point Cmd+W uses.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"close-tab\",\"to\":\"broadcast-tabs\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3692,\"symbol\":\"closeTabById\",\"annotation\":\"Re-broadcast so every renderer view refreshes; the optimistic shell state is reconciled here.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-create\",\"title\":\"Create or update a model\",\"steps\":[{\"from\":\"http-put\",\"to\":\"studio-create\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":334,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Persist the validated document.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"studio-create\",\"to\":\"verify-files\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":762,\"symbol\":\"createSubsystemModel\",\"annotation\":\"Stamp verification before the record hits disk.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"verify-files\",\"to\":\"resolve-root\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":459,\"symbol\":\"verifyModelFiles\",\"annotation\":\"Resolve each component's checkout from its purl.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"}]},{\"id\":\"wt-list\",\"title\":\"List models as repo cards\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":645,\"symbol\":\"refresh\",\"annotation\":\"Renderer asks the host for the model list over RPC.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"store-list\",\"to\":\"studio-get\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1953,\"symbol\":\"listSubsystemModels\",\"annotation\":\"The host handler reads each record to build a summary.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-propose\",\"title\":\"Propose and accept a correction bound to a component id\",\"steps\":[{\"from\":\"audit-model\",\"to\":\"create-proposal\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"line\":522,\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Audit findings drive an agent-proposed correction; the change list targets component ids (and topology endpoints).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"}]},{\"id\":\"wt-merge\",\"title\":\"Compose a repo's models into one graph (proposed)\",\"steps\":[{\"from\":\"studio-get\",\"to\":\"merge-models\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"line\":1,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Reads every model touching a repo-key (proposed — this is the compose flow this model is the brief for).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\"},{\"from\":\"merge-models\",\"to\":\"studio-get\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"line\":1,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Same code identity unifies to one node keyed consistently and uniquely; each model's edges resolve in its own alias-space (proposed; an agent pass aligns the composed nodes later).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\"}]},{\"id\":\"wt-list-today\",\"steps\":[{\"annotation\":\"Polls listSubsystemModels every 10s. Summaries carry counts and repos, never files.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":701,\"mechanism\":\"calls\",\"symbol\":\"refresh\",\"to\":\"list-rpc\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"annotation\":\"Reads the lightweight index with counts and timestamps only.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"list-rpc\",\"line\":1950,\"mechanism\":\"calls\",\"symbol\":\"listSubsystemModels\",\"to\":\"store-list\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"annotation\":\"Loads each full model to derive repos, graphify and audit, then drops component files before replying.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"list-rpc\",\"line\":1953,\"mechanism\":\"calls\",\"symbol\":\"listSubsystemModels\",\"to\":\"studio-get\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}],\"title\":\"List subsystems today — files stop at the host\"},{\"id\":\"wt-file-panel\",\"steps\":[{\"annotation\":\"Loads the full model once per selected id and caches it, invalidating on subsystemModelChanged.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"file-panel\",\"line\":958,\"mechanism\":\"calls\",\"symbol\":\"onShowAuditReport\",\"to\":\"studio-get\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"annotation\":\"Groups the selected components file and purl pairs by repo.\",\"file\":\"packages/subsystems-react/src/subsystem/paths.ts\",\"from\":\"file-panel\",\"line\":93,\"mechanism\":\"calls\",\"symbol\":\"buildRepoGroups\",\"to\":\"repo-groups\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/paths.ts\"}],\"title\":\"Proposed — file trees for the selected subsystem\"},{\"id\":\"wt-permanent-unscoped\",\"title\":\"Combined graph — permanent tab (whole repo)\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"composed-pane\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1732,\"symbol\":\"ComposedGraphPane\",\"annotation\":\"Renders ComposedGraphPane for the drilled-in repo; on the permanent tab scopeOrder is null, so no modelIds prop.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"composed-pane\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"line\":74,\"symbol\":\"getComposedSubsystemModel\",\"annotation\":\"RPC getComposedSubsystemModel({ repoKey, modelIds }) — modelIds is undefined here.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\"},{\"from\":\"store-list\",\"to\":\"merge-models\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2170,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"With no scope, every stored model touching the repo key reaches the merge.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"merge-models\",\"to\":\"composed-pane\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2173,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Merged document, sidecar and the contributing model ids return to the pane.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-showcase-scoped\",\"title\":\"Scoped combine — showcase tab\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"composed-pane\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1740,\"symbol\":\"ComposedGraphPane\",\"annotation\":\"Passes modelIds={scopeOrder} — the showcase's ordered id set — into the pane.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"composed-pane\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"line\":74,\"symbol\":\"getComposedSubsystemModel\",\"annotation\":\"The RPC request now carries modelIds.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\"},{\"from\":\"store-list\",\"to\":\"merge-models\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2162,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Handler builds a Set from modelIds and skips ids outside it, then merges the survivors that touch the repo.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"merge-models\",\"to\":\"composed-pane\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2173,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Only scoped models come back; the composite count and frames match the showcase.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-jev-display\",\"title\":\"Phase 1 display second opinion\",\"steps\":[{\"from\":\"create-proposal\",\"to\":\"jev-gate\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"line\":554,\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Persist pending then score async without blocking propose.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"}]},{\"id\":\"wt-jev-auto-accept\",\"steps\":[{\"annotation\":\"Run deterministic audit before any proposal work.\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"from\":\"maintain-orchestrator\",\"line\":790,\"mechanism\":\"calls\",\"symbol\":\"auditSubsystemModel\",\"to\":\"audit-model\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"annotation\":\"Persist the agent correction as pending.\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"from\":\"create-proposal\",\"line\":554,\"mechanism\":\"writes\",\"symbol\":\"createSubsystemModelProposal\",\"to\":\"jev-gate\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"}],\"title\":\"Phase 2 high confidence auto-accept\"},{\"id\":\"wt-jev-escalate\",\"steps\":[{\"annotation\":\"Run deterministic audit before any proposal work.\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"from\":\"maintain-orchestrator\",\"line\":790,\"mechanism\":\"calls\",\"symbol\":\"auditSubsystemModel\",\"to\":\"audit-model\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"annotation\":\"Persist the agent correction as pending.\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"from\":\"create-proposal\",\"line\":554,\"mechanism\":\"writes\",\"symbol\":\"createSubsystemModelProposal\",\"to\":\"jev-gate\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"},{\"annotation\":\"Low confidence leaves the proposal pending for human or agent review.\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"from\":\"jev-gate\",\"line\":820,\"mechanism\":\"feeds\",\"symbol\":\"pendingProposalCount\",\"to\":\"maintain-orchestrator\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"}],\"title\":\"Phase 2 low confidence escalate\"},{\"id\":\"wt-open-marks-viewed\",\"steps\":[{\"annotation\":\"Row double-click opens the model tab via RPC.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":1152,\"mechanism\":\"calls\",\"symbol\":\"openSubsystemModel\",\"to\":\"open-tab\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"annotation\":\"Single choke point stamps the open without gating tab visibility.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"open-tab\",\"line\":1049,\"mechanism\":\"calls\",\"symbol\":\"openSubsystemModelTab\",\"to\":\"open-stamp\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"annotation\":\"Stamp lastOpenedAt without bumping updatedAt or re-verifying.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"open-stamp\",\"line\":832,\"mechanism\":\"writes\",\"symbol\":\"touchSubsystemModelOpened\",\"to\":\"model-record\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"}],\"title\":\"Open marks viewed\"},{\"id\":\"wt-edit-clears-viewed\",\"steps\":[{\"annotation\":\"Bump updatedAt leaving lastOpenedAt behind so viewed flips to false.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"studio-update\",\"line\":788,\"mechanism\":\"writes\",\"symbol\":\"updateSubsystemModel\",\"to\":\"model-record\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"annotation\":\"Viewed reads both stamps from the stored record.\",\"file\":\"packages/subsystems-studio/src/shared/contract.ts\",\"from\":\"model-record\",\"line\":297,\"mechanism\":\"reads\",\"symbol\":\"StoredSubsystemModel\",\"to\":\"viewed-check\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/shared/contract.ts\"},{\"annotation\":\"Derive viewed per row as lastOpenedAt at or after updatedAt.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":266,\"mechanism\":\"calls\",\"symbol\":\"subsystemModelSortTime\",\"to\":\"viewed-check\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"}],\"title\":\"Edit clears viewed\"},{\"id\":\"wt-identify-unviewed\",\"steps\":[{\"annotation\":\"Mirror the fresh lastOpenedAt into the list index entry.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"open-stamp\",\"line\":838,\"mechanism\":\"writes\",\"symbol\":\"touchSubsystemModelOpened\",\"to\":\"summary\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"annotation\":\"Carry the open stamp to the renderer list row.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"summary\",\"line\":2239,\"mechanism\":\"feeds\",\"symbol\":\"openSubsystemModelTab\",\"to\":\"studio-list\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}],\"title\":\"Identify unviewed in list\"},{\"id\":\"wt-list-load\",\"title\":\"Happy path list load\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1047,\"annotation\":\"Poll asks the host for the graph list via listSubsystemModels.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"refresh\"},{\"from\":\"rpc-bridge\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":763,\"annotation\":\"Host handler (bun/index.ts:2217) fans out over every index entry.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"listSubsystemModels\"},{\"from\":\"store-list\",\"to\":\"studio-get\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":768,\"annotation\":\"Each entry loads its full graph file (bun/index.ts:2221).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"getSubsystemModel\"}]},{\"id\":\"wt-timeout\",\"title\":\"Timeout under host contention\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1047,\"annotation\":\"Ten-second poll fires while the host is busy and waits up to 30s (maxRequestTime in rpc.ts:106).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"refresh\"}]},{\"id\":\"wt-purl-preview\",\"steps\":[{\"annotation\":\"Preview calls readSubsystemFile with purl plus file; host resolves root straight from purl (bun/index.ts:1705) with no component lookup.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":1266,\"mechanism\":\"calls\",\"to\":\"resolve-root\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"readPreviewFile\"}],\"title\":\"Preview via purl, no component check\"},{\"id\":\"wt-bare-path\",\"steps\":[{\"annotation\":\"Host loads the graph and finds the component with c.file equal to path (bun/index.ts:1723-1728); no match yields graph has no local root for this file, a match resolves the root from the component purl.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"studio-get\",\"line\":768,\"mechanism\":\"reads\",\"to\":\"resolve-root\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"getSubsystemModel\"}],\"title\":\"Walkthrough code via bare path, component check\"},{\"id\":\"wt-start-maintain\",\"title\":\"Start a maintenance run\",\"steps\":[{\"from\":\"maintain-picker\",\"to\":\"list-rpc\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"line\":116,\"symbol\":\"MaintainModelPickerModal\",\"annotation\":\"Fire the maintainSubsystemModel RPC with the selected model.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\"},{\"from\":\"list-rpc\",\"to\":\"maintain-background\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2522,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"RPC returns started:true immediately and hands off to the guarded runner.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"maintain-background\",\"to\":\"maintain-orchestrator\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3160,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Run the full install → audit → route-by-verdict → brief pipeline.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"run-maintain-agent\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":854,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Resolve the model then launch the agent run, retrying once on the credentialed fallback if unusable.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"run-maintain-agent\",\"to\":\"run-opencode-v2-session\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":742,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Hand the brief, agent, and directory to the V2 session runner.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"wt-wait-finish-event\",\"title\":\"Wait for the finish event\",\"steps\":[{\"from\":\"run-opencode-v2-session\",\"to\":\"opencode-v2-server__sg-1789951509967-ppkvezdy0\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":384,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"POST /api/session creates the session with a 15s HTTP timeout.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"run-opencode-v2-session\",\"to\":\"opencode-v2-server__sg-1789951509967-ppkvezdy0\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":428,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"POST /api/session/{id}/prompt feeds the maintain brief with a 15s HTTP timeout.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"maintain-background\",\"to\":\"maintain-picker\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3187,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Broadcast done/error so the Maintain row flips off Running.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-extract-panel\",\"title\":\"Extract the flows panel into its own component\",\"steps\":[{\"from\":\"react-graph\",\"to\":\"walkthroughs-panel\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":1695,\"symbol\":\"SubsystemComponentGraph\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"annotation\":\"Replace the inline walkthroughs.map list with <WalkthroughsPanel/>, passing order, expansion, and focus props.\"},{\"from\":\"walkthroughs-panel\",\"to\":\"sidebar-reorder\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":1695,\"symbol\":\"SubsystemComponentGraph\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"annotation\":\"Panel hosts the reorder controller directly beside the list it reorders.\"}]},{\"id\":\"wt-drag-reorder\",\"title\":\"Drag a walkthrough row to reorder\",\"steps\":[{\"from\":\"sidebar-reorder\",\"to\":\"studio-model-view\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":1695,\"symbol\":\"WalkthroughsPanel\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"annotation\":\"Invoke the new onReorderWalkthroughs callback so the host owns the array.\"}]},{\"id\":\"wt-persist-order\",\"title\":\"Persist the new order\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"list-rpc\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":58,\"symbol\":\"SubsystemModelView\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"annotation\":\"The reorder handler sets local state first, then sends the walkthroughs patch.\"},{\"from\":\"list-rpc\",\"to\":\"studio-update\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":44,\"symbol\":\"updateSubsystemModel\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"annotation\":\"A new request handler delegates the patch to the imported store function, which merges it verbatim.\"}]},{\"id\":\"wt-broadcast-order\",\"title\":\"Broadcast the new order to every surface\",\"steps\":[{\"from\":\"studio-update\",\"to\":\"emit\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":833,\"symbol\":\"emitSubsystemModelChange\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"annotation\":\"After the JSON write, the store emits subsystemModelChanged.\"},{\"from\":\"emit\",\"to\":\"studio-model-view\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":78,\"symbol\":\"emitSubsystemModelChange\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"annotation\":\"The push reaches the open tab, which reloads the model and re-renders the flows panel in the new order.\"},{\"from\":\"emit\",\"to\":\"studio-list\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":78,\"symbol\":\"emitSubsystemModelChange\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"annotation\":\"The list view reloads on the same push so its walkthrough rows re-order too.\"}]},{\"id\":\"wt-run-maintenance\",\"title\":\"Run maintenance for one model\",\"steps\":[{\"from\":\"maintain-picker\",\"to\":\"maintain-orchestrator\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"line\":147,\"symbol\":\"MaintainModelPickerModal\",\"annotation\":\"RPC start — the host routes by the audit verdict.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\"},{\"from\":\"maintain-orchestrator\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":820,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Deterministic audit picks issue-fixer vs gap-filler vs topology agent.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"run-maintain-agent\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":854,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Builds the brief and hands it to the agent.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"run-maintain-agent\",\"to\":\"run-opencode-v2-session\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":742,\"symbol\":\"runMaintainAgent\",\"annotation\":\"OpenCode V2 session is created and prompted.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"wt-live-feed\",\"title\":\"Carry the model id through the live feed\",\"steps\":[{\"from\":\"run-opencode-v2-session\",\"to\":\"run-maintain-agent\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":535,\"symbol\":\"runOpencodeV2AgentSession\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"annotation\":\"The create response yields the session id to the host; the graphId it was called with is already in hand.\"}]},{\"id\":\"wt-history-model-blind\",\"title\":\"Find past Maintain runs (today, model-blind)\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":661,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Maintenance Sessions tab lists runs by title and agent only.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"}]},{\"id\":\"wt-run__dup1\",\"title\":\"Run a maintenance session\",\"steps\":[{\"from\":\"maintain-orchestrator\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":824,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Deterministic audit decides whether the agent should run. A runId is minted here and threaded through the whole session.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":892,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunStart\",\"annotation\":\"Session start logged: sessionId <-> graphId paired, pendingCount snapshot. The run record is where runId lives.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"agent\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":875,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"runMaintainAgent\",\"annotation\":\"Brief handed to the headless OpenCode session (opencode run in a temp dir).\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":908,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunFinish\",\"annotation\":\"Seam C: session close-out backfills the run with the proposalIds created during the session.\"}]},{\"id\":\"wt-propose__dup1\",\"title\":\"A correction proposal lands\",\"steps\":[{\"from\":\"agent\",\"to\":\"http-propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":399,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"POST /api/subsystem-model/:id/proposals\",\"annotation\":\"Agent POSTs the propose curl body. Today the body carries graphId + finding, no runId. Seam B: parse optional runId.\"},{\"from\":\"http-propose\",\"to\":\"propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":404,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"proposeSubsystemModelCorrection\",\"annotation\":\"RPC handler forwards body; runId must be forwarded explicitly (RPC currently drops it).\"},{\"from\":\"propose\",\"to\":\"create-proposal\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2493,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Seam B: stamp runId onto the stored proposal so it can be matched back to its run.\"}]},{\"id\":\"wt-run__dup2\",\"title\":\"Run a maintenance session\",\"steps\":[{\"from\":\"maintain-orchestrator\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":824,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Deterministic audit decides whether the agent should run. A runId is minted here and threaded through the whole session.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":892,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunStart\",\"annotation\":\"Session start logged: sessionId <-> graphId paired, pendingCount snapshot. The run record is where runId lives.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"agent__sg-1790108945330-xnzp05iqt\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":875,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"runMaintainAgent\",\"annotation\":\"Brief handed to the headless OpenCode session (opencode run in a temp dir).\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":908,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunFinish\",\"annotation\":\"Seam C: session close-out backfills the run with the proposalIds created during the session.\"}]},{\"id\":\"wt-propose__dup2\",\"title\":\"A correction proposal lands\",\"steps\":[{\"from\":\"agent__sg-1790108945330-xnzp05iqt\",\"to\":\"http-propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":399,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"POST /api/subsystem-model/:id/proposals\",\"annotation\":\"Agent POSTs the propose curl body. Today the body carries graphId + finding, no runId. Seam B: parse optional runId.\"},{\"from\":\"http-propose\",\"to\":\"propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":404,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"proposeSubsystemModelCorrection\",\"annotation\":\"RPC handler forwards body; runId must be forwarded explicitly (RPC currently drops it).\"},{\"from\":\"propose\",\"to\":\"create-proposal\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2493,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Seam B: stamp runId onto the stored proposal so it can be matched back to its run.\"}]}]}",
|
|
5
|
+
"{\"title\":\"Subsystem Modeling (composite)\",\"components\":[{\"name\":\"GitHub Gists API\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:api.github.com/gists\",\"purpose\":\"Create or update a public gist that holds the portable JSON.\",\"process\":\"external/github\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"read\",\"value\":\"GET /gists/{id}\"},{\"key\":\"create\",\"value\":\"POST /gists\"},{\"key\":\"update\",\"value\":\"PATCH /gists/{id}\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"github-gists-api\"},{\"name\":\"SubsystemComponentGraph\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"symbol\":\"SubsystemComponentGraph\",\"purpose\":\"Shared graph viewer for site gist pages and Studio model tabs.\",\"process\":\"subsystems-react/ui\",\"capture\":\"analyzed\",\"alias\":\"react-graph\",\"role\":\"entry\",\"module\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"framework\":\"react\",\"stereotype\":\"component\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"props\",\"type\":\"SubsystemComponentGraphProps\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"createSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"createSubsystemModel\",\"purpose\":\"Mint sg- id and write the hydrated record into the disk store.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"studio-create\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"doc\",\"type\":\"SubsystemModelDocument & { title: string; description?: string; walkthroughs?: SubsystemWalkthrough[] }\"}],\"returnType\":\"Promise<StoredSubsystemModel>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"updateSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"updateSubsystemModel\",\"purpose\":\"Patch a local record in place — used to stamp or refresh the host gist ref.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"studio-update\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"name\":\"getSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"getSubsystemModel\",\"purpose\":\"Read one hydrated record from the disk store by sg- id.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"studio-get\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"id\",\"type\":\"string\"}],\"returnType\":\"Promise<StoredSubsystemModel | null>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"SubsystemModelsView\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"SubsystemModelsView\",\"purpose\":\"Studio list of local models — one place a Share as gist action can live.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"alias\":\"studio-list\",\"module\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"framework\":\"react\",\"stereotype\":\"component\",\"declaration\":{\"kind\":\"function\",\"parameters\":[],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"SubsystemModelView\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"symbol\":\"SubsystemModelView\",\"purpose\":\"Open model tab chrome — alternate home for a per-model Gist button.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"alias\":\"studio-model-view\",\"module\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"framework\":\"react\",\"stereotype\":\"component\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"tabId\",\"type\":\"string\"},{\"name\":\"graphId\",\"type\":\"string\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"openSubsystemModelTab\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"openSubsystemModelTab\",\"purpose\":\"Focus or create a subsystem-model tab for a stored sg- id.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"open-tab\"},{\"name\":\"handleSubsystemModelRequest\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"handleSubsystemModelRequest\",\"purpose\":\"Accepts PUT /api/subsystem-model/:id and patches the stored graph.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"http-put\",\"module\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"req\",\"type\":\"Request\"},{\"name\":\"url\",\"type\":\"URL\"}],\"returnType\":\"Promise<Response | null>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"emitSubsystemModelChange\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"emitSubsystemModelChange\",\"purpose\":\"Fan a graphId change into the registered host listener.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"alias\":\"emit\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"name\":\"Inner\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"symbol\":\"Inner\",\"purpose\":\"Owns two-pass ELK layout and layoutReady.\\nLanded: after Pass 1, kick Pass 2 from built — do not wait on remount.\",\"process\":\"subsystems-react\",\"capture\":\"analyzed\",\"alias\":\"graph-inner\"},{\"name\":\"buildSubsystemGraph\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\",\"symbol\":\"buildSubsystemGraph\",\"purpose\":\"Run ELK for Pass 1 (estimate) and Pass 2 (measured sizes).\",\"process\":\"subsystems-react\",\"capture\":\"analyzed\",\"alias\":\"build-graph\",\"module\":\"packages/subsystems-react/src/subsystem/model.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"doc\",\"type\":\"SubsystemModelDocument\"},{\"name\":\"opts\",\"type\":\"object\"}],\"returnType\":\"Promise<{ nodes; edges; regions }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"triggerPass2\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"symbol\":\"triggerPass2\",\"purpose\":\"Sets layoutReady true after measured ELK.\\nLanded: also invoked from a built effect after Pass 1, not only dimensions.\",\"process\":\"subsystems-react\",\"capture\":\"analyzed\",\"alias\":\"trigger-pass2\"},{\"name\":\"AgentSessionsOverviewView\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"symbol\":\"AgentSessionsOverviewView\",\"purpose\":\"Load historical agent sessions and kick off concept analysis for OpenCode rows.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"active\",\"type\":\"boolean\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"agent-sessions-overview\",\"framework\":\"react\",\"stereotype\":\"component\"},{\"name\":\"processSessionEvents\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/session-pipeline.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/session-pipeline.ts\",\"symbol\":\"processSessionEvents\",\"purpose\":\"Load one session's opencode sqlite rows, convert to universal events, normalize, and accumulate.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"sessionId\",\"type\":\"string\"},{\"name\":\"opts\",\"type\":\"{ includeRaw?: boolean; useCache?: boolean }\"}],\"returnType\":\"Promise<BuiltSessionEvents>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"process-session-events\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"name\":\"auditSubsystemModel\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"purpose\":\"Runs the dry-run deterministic audit across every component.\",\"symbol\":\"auditSubsystemModel\",\"alias\":\"audit-model\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"}],\"returnType\":\"Promise<{ ok: true; report: SubsystemModelAuditReport; fingerprint: string } | { ok: false; error: string }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"name\":\"verifyModelFiles\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purpose\":\"Checks files exist and symbols are declared for all components.\",\"symbol\":\"verifyModelFiles\",\"alias\":\"verify-files\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"doc\",\"type\":\"SubsystemModelDocument & { walkthroughs?: SubsystemWalkthrough[] }\"}],\"returnType\":\"Promise<SubsystemModelVerification>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"name\":\"verifySubsystemComponent\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"purpose\":\"Verifies one component against disk plus the graphify anchor.\",\"symbol\":\"verifySubsystemComponent\",\"alias\":\"verify-component\",\"module\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"},{\"capture\":\"analyzed\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"name\":\"touchSubsystemModelOpened\",\"process\":\"subsystems-studio/host\",\"purpose\":\"Stamps lastOpenedAt with rewrite suppress window.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"touchSubsystemModelOpened\",\"alias\":\"open-stamp\"},{\"capture\":\"analyzed\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/utils/elkLayout.ts\",\"name\":\"computeElkLayout\",\"process\":\"subsystems-studio/renderer\",\"purpose\":\"Computes orthogonal ELK layout on the main thread.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/utils/elkLayout.ts\",\"symbol\":\"computeElkLayout\",\"alias\":\"elk\",\"module\":\"packages/subsystems-react/src/utils/elkLayout.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"nodes\",\"type\":\"Node[]\"},{\"name\":\"edges\",\"type\":\"Edge[]\"},{\"name\":\"options\",\"type\":\"ElkLayoutOptions\"}],\"returnType\":\"Promise<ElkLayoutResult>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"App\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\",\"symbol\":\"App\",\"purpose\":\"Switches active tab on tabsChanged without waiting on host.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"alias\":\"app-shell\",\"module\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"framework\":\"react\",\"stereotype\":\"component\"},{\"name\":\"MaintainModelPickerModal\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"symbol\":\"MaintainModelPickerModal\",\"purpose\":\"Lets the user pick a free OpenCode model and start a Maintain run over Electrobun RPC.\",\"process\":\"subsystems-studio/renderer\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"mode\",\"type\":\"\\\"issues\\\" | \\\"gaps\\\"\"},{\"name\":\"onStarted\",\"type\":\"(info) => void\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-picker\",\"module\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"framework\":\"react\",\"stereotype\":\"component\"},{\"name\":\"maintainSubsystemModelInBackground\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"maintainSubsystemModelInBackground\",\"purpose\":\"Returns immediately from RPC, tracks in-flight graphs, and broadcasts Maintain lifecycle to the renderer.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"opts\",\"type\":\"{ model?: string }\"}],\"returnType\":\"void\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-background\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\"},{\"name\":\"maintainSubsystemModel\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"maintainSubsystemModel\",\"purpose\":\"Ensures OpenCode V2 runtime and Maintain agents, audits the model, routes by verdict, builds the brief, then runs the chosen agent.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"opts\",\"type\":\"{ model?: string }\"}],\"returnType\":\"Promise<MaintainModelResult>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-orchestrator\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"name\":\"runMaintainAgent\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"runMaintainAgent\",\"purpose\":\"After Studio has ensured the V2 runtime, create/prompt a session and subscribe to SSE. Today this still spawns opencode run.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"agent\",\"type\":\"MaintainAgentId\"},{\"name\":\"task\",\"type\":\"string\"},{\"name\":\"model\",\"type\":\"string\"}],\"returnType\":\"Promise<{ ok: boolean; summary?: string; error?: string }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"run-maintain-agent\",\"module\":\"packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"name\":\"OpenCodeV2Service\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:opencode/v2-service\",\"purpose\":\"Shared OpenCode 2 background server. Studio starts it via Service.ensure after the opencode2 binary is present and up to date.\",\"process\":\"opencode/v2\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"package\",\"value\":\"@opencode/client@beta\"},{\"key\":\"ensure\",\"value\":\"Service.ensure()\"},{\"key\":\"events\",\"value\":\"GET /api/event (SSE)\"},{\"key\":\"prompt\",\"value\":\"session.create + session.prompt\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode-v2-service\"},{\"name\":\"MaintainAgent\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:opencode/maintain-agent\",\"purpose\":\"issue-fixer or gap-filler agent that investigates audit findings and POSTs correction proposals to Studio HTTP.\",\"process\":\"opencode/v2\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"agents\",\"value\":\"issue-fixer | gap-filler\"},{\"key\":\"edit\",\"value\":\"deny\"},{\"key\":\"proposeVia\",\"value\":\"curl Studio :3045\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"maintain-agent\"},{\"name\":\"createSubsystemModelProposal\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\",\"symbol\":\"createSubsystemModelProposal\",\"purpose\":\"Persists a pending human-confirmable proposal with rationale, changes, and preview.\",\"process\":\"subsystems-studio/host\",\"capture\":\"analyzed\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"input\",\"type\":\"{ graphId; rationale; changes; author? }\"}],\"returnType\":\"Promise<{ ok: true; proposal } | { ok: false; error }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"create-proposal\",\"role\":\"entry\",\"module\":\"packages/subsystems-studio/src/bun/proposal-store.ts\"},{\"name\":\"OpenCodeV2Lifecycle\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:studio/opencode-v2-lifecycle\",\"purpose\":\"Studio-managed OpenCode V2 lifecycle. First slice: debug tab detect/install/update via getOpencodeV2Status + installOpencodeV2; Service.ensure comes next.\",\"process\":\"subsystems-studio/host\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"detect\",\"value\":\"which opencode2 / OPENCODE2_BIN / version\"},{\"key\":\"install\",\"value\":\"npm i -g @opencode-ai/cli@beta or v2 install script\"},{\"key\":\"update\",\"value\":\"compare installed vs npm beta; upgrade when behind\"},{\"key\":\"ensure\",\"value\":\"Service.ensure({ command: [bin, 'serve', '--service'] })\"},{\"key\":\"pattern\",\"value\":\"mirrors studio-version.ts detect + update\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode-v2-lifecycle\"},{\"name\":\"OpenCodeCliNpm\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:npm/@opencode-ai/cli@beta\",\"purpose\":\"npm beta distribution of opencode2 that Studio installs or updates when the binary is missing or behind.\",\"process\":\"opencode/v2\",\"capture\":\"referenced\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"package\",\"value\":\"@opencode-ai/cli@beta\"},{\"key\":\"bin\",\"value\":\"opencode2\"},{\"key\":\"alt\",\"value\":\"curl -fsSL https://opencode.ai/v2/install | bash\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode-cli-npm\"},{\"name\":\"listMaintainSessions\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"symbol\":\"listMaintainSessions\",\"purpose\":\"Discover Maintain runs from session_v2 (and legacy session) by agent or Maintain title.\",\"process\":\"subsystems-studio/host\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"opts\",\"type\":\"{ days?: number; limit?: number }\"}],\"returnType\":\"Promise<{ sessions: SessionSummary[]; hasMore: boolean }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"list-maintain-sessions\",\"module\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\"},{\"name\":\"runOpencodeV2AgentSession\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"symbol\":\"runOpencodeV2AgentSession\",\"purpose\":\"Create and prompt a Maintain session on the running opencode2 HTTP service.\",\"process\":\"subsystems-studio/host\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"opts\",\"type\":\"RunOpencodeV2AgentSessionOpts\"}],\"returnType\":\"Promise<{ ok: boolean; sessionId?: string }>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"run-opencode-v2-session\",\"module\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"name\":\"opencode2 serve\",\"construct\":\"external\",\"role\":\"service\",\"file\":\"\",\"purl\":\"external:opencode2\",\"purpose\":\"Running OpenCode V2 HTTP service that owns session create/prompt and SQLite writes.\",\"process\":\"opencode2/service\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"url\",\"value\":\"service.json → localhost\"},{\"key\":\"db\",\"value\":\"~/.local/share/opencode/opencode.db\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"opencode2-service\"},{\"name\":\"session_v2 (opencode.db)\",\"construct\":\"external\",\"file\":\"\",\"purl\":\"external:opencode.db/session-v2\",\"purpose\":\"OpenCode V2 session metadata table — accessed by listMaintainSessions and kind resolution.\",\"process\":\"opencode/sqlite\",\"role\":\"service\",\"declaration\":{\"kind\":\"external\",\"attributes\":[{\"key\":\"db\",\"value\":\"~/.local/share/opencode/opencode.db\"},{\"key\":\"table\",\"value\":\"session-v2\"},{\"key\":\"access\",\"value\":\"sqlite read from Studio host\"}]},\"declarationProvenance\":\"authored\",\"alias\":\"store-session-v2\"},{\"name\":\"SubsystemConstructDeclaration\",\"construct\":\"type_alias\",\"file\":\"packages/subsystems-core/src/types/subsystem-model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-core/src/types/subsystem-model.ts\",\"symbol\":\"SubsystemConstructDeclaration\",\"purpose\":\"Discriminated declaration union (params, members, type buckets) that agents and the CLI are told to author.\",\"process\":\"subsystems-core\",\"declaration\":{\"kind\":\"type\",\"unionOf\":[\"SubsystemClassDeclaration\",\"SubsystemFunctionDeclaration\",\"SubsystemMethodDeclaration\",\"SubsystemTypeDeclaration\",\"SubsystemModuleDeclaration\",\"SubsystemExternalDeclaration\",\"SubsystemStoreDeclaration\",\"SubsystemCustomEntityDeclaration\"],\"properties\":[],\"usedBy\":[],\"implementors\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"core-declaration\",\"declarationRef\":{\"file\":\"packages/subsystems-core/src/types/subsystem-model.ts\",\"startLine\":264,\"lineHash\":\"ffe942627983745a8ae31e55497cf40f\",\"capturedAt\":\"2026-09-21T02:54:18.342Z\",\"graphifyNodeId\":\"packages_subsystems_core_src_types_subsystem_model_subsystemconstructdeclaration\",\"revision\":{\"headSha\":\"e05e6571c633d53e8fa02ded3b5c26fcf23d7050\",\"dirtyHash\":\"96973df283dabd40\"}}},{\"name\":\"SubsystemComponent\",\"construct\":\"interface\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\",\"symbol\":\"SubsystemComponent\",\"purpose\":\"Mirror the node in the react package, still carrying the vestigial detail drill-down fields the renderer consumes.\",\"process\":\"subsystems-react\",\"declaration\":{\"kind\":\"type\",\"properties\":[{\"name\":\"detail\",\"type\":\"GraphifyComponentDetail?\"},{\"name\":\"detailProvenance\",\"type\":\"'verified' | 'authored'?\"},{\"name\":\"tokens\",\"type\":\"SubsystemDeclToken[]?\"},{\"name\":\"declarationRef\",\"type\":\"SubsystemDeclarationRef?\"}],\"usedBy\":[],\"implementors\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"react-component\",\"declarationRef\":{\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"startLine\":129,\"lineHash\":\"89717fb6c214f8a650fdfa3fe89d617d\",\"capturedAt\":\"2026-09-21T02:54:31.099Z\",\"graphifyNodeId\":\"packages_subsystems_react_src_subsystem_model_subsystemcomponent\",\"revision\":{\"headSha\":\"e05e6571c633d53e8fa02ded3b5c26fcf23d7050\",\"dirtyHash\":\"96973df283dabd40\"}}},{\"name\":\"generateDeclarationString\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"symbol\":\"generateDeclarationString\",\"purpose\":\"Turn the click-panel source string from component.detail only — missing detail yields construct defaults like type X = unknown.\",\"process\":\"subsystems-react\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"component\",\"type\":\"SubsystemComponent\"}],\"returnType\":\"string\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"generate-decl-string\",\"declarationRef\":{\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"startLine\":20,\"lineHash\":\"ecad06378cd3ce0c922aa385c4b69313\",\"capturedAt\":\"2026-09-21T02:56:13.463Z\",\"graphifyNodeId\":\"packages_subsystems_react_src_subsystem_formatdeclaration_generatedeclarationstring\",\"revision\":{\"headSha\":\"e05e6571c633d53e8fa02ded3b5c26fcf23d7050\",\"dirtyHash\":\"96973df283dabd40\"}}},{\"name\":\"getSubsystemModuleRegions\",\"construct\":\"function\",\"symbol\":\"getSubsystemModuleRegions\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"module\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react\",\"purpose\":\"Collects multi-member module boundary regions.\",\"alias\":\"module-regions\"},{\"name\":\"buildBoundaryLayoutGroups\",\"construct\":\"function\",\"symbol\":\"buildBoundaryLayoutGroups\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"module\":\"packages/subsystems-react/src/subsystem/model.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react\",\"purpose\":\"Builds process→module→leaf group defs with parentId nesting.\",\"alias\":\"layout-groups\"},{\"name\":\"resolveRepoRootForComponent\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"resolveRepoRootForComponent\",\"purpose\":\"Deterministic — purl to local repo root; a null root is reported unresolved.\",\"process\":\"subsystems-studio/host\",\"alias\":\"resolve-root\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"purl\",\"type\":\"string | undefined\"}],\"returnType\":\"string | undefined\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"name\":\"closeTabById\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"closeTabById\",\"purpose\":\"Host choke point every close path funnels through: refuses permanent tabs, deletes the tab record, re-picks a fallback suggestion, and re-broadcasts the strip.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"id\",\"type\":\"string\"}],\"returnType\":\"{ ok: boolean; error?: string }\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"close-tab\"},{\"name\":\"broadcastTabsChanged\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"broadcastTabsChanged\",\"purpose\":\"Sends the tabsChanged notification (with an optional focus hint) to the renderer over RPC.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"focusTabId\",\"type\":\"string\"}],\"returnType\":\"void\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"broadcast-tabs\"},{\"name\":\"electrobun\",\"construct\":\"store\",\"file\":\"packages/subsystems-studio/src/mainview/rpc.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/rpc.ts\",\"symbol\":\"electrobun\",\"purpose\":\"Renderer-side RPC bridge singleton; sends host requests (listTabs, closeTab, setActiveTab) and receives tabsChanged.\",\"process\":\"subsystems-studio/renderer\",\"module\":\"packages/subsystems-studio/src/mainview/rpc.ts\",\"alias\":\"rpc-bridge\"},{\"name\":\"listSubsystemModels\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"listSubsystemModels\",\"purpose\":\"Returns the lightweight index entry for every stored model.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"declaration\":{\"kind\":\"function\",\"parameters\":[],\"returnType\":\"Promise<SubsystemModelIndexEntry[]>\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\",\"alias\":\"store-list\"},{\"name\":\"mergeSubsystemModels\",\"construct\":\"function\",\"role\":\"entry\",\"file\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"symbol\":\"mergeSubsystemModels\",\"purpose\":\"Composes every model touching one repo-key into a single graph. Code + proposed-with-intent join on (purlRepoKey, file, symbol-or-None); external/custom_entity join on exact (purl, normalized name) with purl != 'external' (bare externals stay model-scoped); alias-text/name-only matching is rejected (false friends in the data). Each model's edges resolve in its own alias-space; unified nodes carry the union of aliases. Attribute divergences (purpose variants, process vocabulary drift, construct disagreements) are grouped as conflicts, never normalized — an agent pass fixes source models consistent via proposals. Keys must be consistent and unique, not perfect.\",\"process\":\"subsystems-studio/host\",\"module\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"alias\":\"merge-models\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"models\",\"type\":\"MergeInputModel[]\"}],\"returnType\":\"MergeResult\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\",\"name\":\"listSubsystemModels RPC handler\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"purpose\":\"Enriches index entries into list summaries with repos, graphify and audit.\",\"alias\":\"list-rpc\",\"role\":\"entry\"},{\"construct\":\"interface\",\"file\":\"packages/subsystems-studio/src/shared/contract.ts\",\"module\":\"packages/subsystems-studio/src/shared/contract.ts\",\"name\":\"SubsystemModelSummary\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/shared/contract.ts\",\"purpose\":\"Lists counts, repos and audit state without component files.\",\"symbol\":\"SubsystemModelSummary\",\"alias\":\"summary\",\"process\":\"subsystems-studio/host\",\"declaration\":{\"kind\":\"type\",\"properties\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"walkthroughs\",\"type\":\"SummaryWalkthrough[] | undefined\"}],\"usedBy\":[],\"implementors\":[]},\"declarationProvenance\":\"authored\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/paths.ts\",\"module\":\"packages/subsystems-react/src/subsystem/paths.ts\",\"name\":\"buildRepoGroups\",\"process\":\"subsystems-studio/renderer\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/paths.ts\",\"purpose\":\"Groups component file and purl pairs by repo for per-repo trees.\",\"symbol\":\"buildRepoGroups\",\"alias\":\"repo-groups\"},{\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"framework\":\"react\",\"module\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"name\":\"SubsystemFilePanel\",\"process\":\"subsystems-studio/renderer\",\"proposed\":true,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"purpose\":\"Shows file trees for the selected subsystem on the left of the list.\\nAlternative without per-selection fetch: add files to SubsystemModelSummary.\",\"stereotype\":\"component\",\"alias\":\"file-panel\"},{\"alias\":\"composed-pane\",\"name\":\"ComposedGraphPane\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"symbol\":\"ComposedGraphPane\",\"process\":\"principal-studio/renderer\",\"purpose\":\"Fetches the host-merged document for one repo, rolls it to frames, and renders the aggregate graph.\",\"declaration\":{\"kind\":\"function\",\"parameters\":[{\"name\":\"repoKey\",\"type\":\"string\"},{\"name\":\"graphs\",\"type\":\"SubsystemModelSummary[]\"},{\"name\":\"modelIds\",\"type\":\"string[] | undefined\"}],\"returnType\":\"JSX.Element\",\"callers\":[],\"callees\":[]},\"declarationProvenance\":\"authored\"},{\"alias\":\"jev-gate\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/jev-maintenance.ts\",\"module\":\"packages/subsystems-studio/src/bun/jev-maintenance.ts\",\"name\":\"autoAcceptProposalIfConfident\",\"process\":\"subsystems-studio/host\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/jev-maintenance.ts\",\"purpose\":\"Score a proposal with Jev and auto-accept only when confidence clears the threshold.\",\"symbol\":\"autoAcceptProposalIfConfident\",\"declaration\":{\"callers\":[],\"callees\":[],\"kind\":\"function\",\"parameters\":[{\"name\":\"graphId\",\"type\":\"string\"},{\"name\":\"proposal\",\"type\":\"SubsystemModelProposal\"},{\"name\":\"opts\",\"type\":\"{ enabled: boolean; threshold: number; apiKey?: string; sourceContext?: string }\"}],\"returnType\":\"Promise<{ accepted: boolean; proposal: SubsystemModelProposal; error?: string }>\"},\"declarationProvenance\":\"authored\"},{\"alias\":\"model-record\",\"construct\":\"interface\",\"file\":\"packages/subsystems-studio/src/shared/contract.ts\",\"name\":\"StoredSubsystemModel\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/shared/contract.ts\",\"purpose\":\"Hold updatedAt edit stamp plus host-local lastOpenedAt open stamp.\",\"symbol\":\"StoredSubsystemModel\"},{\"alias\":\"viewed-check\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"name\":\"isModelViewed\",\"proposed\":true,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"purpose\":\"Derive viewed as lastOpenedAt at or after updatedAt.\",\"symbol\":\"isModelViewed\"},{\"alias\":\"opencode-v2-server__sg-1789951509967-ppkvezdy0\",\"name\":\"OpenCode V2 service\",\"construct\":\"external\",\"role\":\"service\",\"process\":\"external/opencode2\",\"file\":\"\",\"purl\":\"external:opencode2-service\",\"purpose\":\"The opencode2 daemon owning /api/session and /api/event; executes the agent session.\"},{\"alias\":\"walkthroughs-panel\",\"name\":\"WalkthroughsPanel\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"symbol\":\"WalkthroughsPanel\",\"purpose\":\"Extracted flows panel: renders the ordered walkthrough rows, forwards focus/hover events, and owns the inline drag-to-reorder controller.\",\"process\":\"subsystems-studio/renderer\",\"module\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\"},{\"alias\":\"sidebar-reorder\",\"name\":\"reorder controller\",\"construct\":\"function\",\"file\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\",\"purpose\":\"Inline drag controller in WalkthroughsPanel: tracks the dragged row and insertion boundary, draws the landing line, and suppresses stale hover after a drop.\",\"process\":\"subsystems-studio/renderer\",\"module\":\"packages/subsystems-react/src/subsystem/WalkthroughsPanel.tsx\"},{\"alias\":\"runs-store\",\"name\":\"SubsystemModelRunStore\",\"construct\":\"store\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-runs.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-runs.ts\",\"symbol\":\"noteSubsystemModelRunStart\",\"purpose\":\"Persists runs keyed by graphId (~/.principal/subsystem-model-runs/<graphId>.json). Records sessionId <-> graphId pairing and pendingCount snapshot. Stamping seam C: add runId field here and backfill proposalIds on finish.\",\"process\":\"packages/subsystems-studio/run\",\"module\":\"packages/subsystems-studio/src/bun/subsystem-model-runs.ts\"},{\"alias\":\"propose\",\"name\":\"proposeSubsystemModelCorrection\",\"construct\":\"function\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"proposeSubsystemModelCorrection\",\"purpose\":\"RPC handler the agent hits to submit a proposed correction. Seam B caller: forward runId from the HTTP body -> RPC -> store.\",\"process\":\"packages/subsystems-studio/run\",\"module\":\"packages/subsystems-studio/src/bun/index.ts\"},{\"alias\":\"http-propose\",\"name\":\"Propose HTTP route\",\"construct\":\"custom_entity\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"POST /api/subsystem-model/:id/proposals\",\"purpose\":\"HTTP endpoint (line ~399) that parses the propose curl body then calls proposeSubsystemModelCorrection. Seam B entry: parse an optional runId field off the body.\",\"process\":\"packages/subsystems-studio/run\",\"module\":\"packages/subsystems-studio/src/bun/http-server.ts\"},{\"alias\":\"agent\",\"name\":\"Maintenance agent (OpenCode) session\",\"construct\":\"custom_entity\",\"file\":\"\",\"purl\":\"external\",\"symbol\":\"maintain-agent\",\"purpose\":\"External OpenCode agent session launched per brief; posts proposals via the propose curl. Does NOT exist in this repo (process is opencode).\",\"process\":\"external\",\"module\":\"\"},{\"alias\":\"agent__sg-1790108945330-xnzp05iqt\",\"name\":\"Maintenance agent (OpenCode) session\",\"construct\":\"custom_entity\",\"file\":\"\",\"purl\":\"external\",\"symbol\":\"maintain-agent\",\"purpose\":\"External OpenCode agent session launched per brief; posts proposals via the propose curl. Does NOT exist in this repo (process is opencode).\",\"process\":\"external\",\"module\":\"\"}],\"walkthroughs\":[{\"id\":\"tl-first-open-ok\",\"title\":\"First open — cover lifts\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"graph-inner\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":258,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Mount SubsystemComponentGraph for a freshly loaded graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"graph-inner\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":407,\"symbol\":\"Inner\",\"annotation\":\"Pass 1: buildSubsystemGraph without measured sizes.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"graph-inner\",\"to\":\"trigger-pass2\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":762,\"symbol\":\"Inner\",\"annotation\":\"queueMicrotask triggers Pass 2 from onNodesChange.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"trigger-pass2\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":454,\"symbol\":\"triggerPass2\",\"annotation\":\"Pass 2 re-runs buildSubsystemGraph with measured widths.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"}]},{\"id\":\"tl-update-stuck\",\"title\":\"Bug (before fix) — update stuck on cover\",\"steps\":[{\"from\":\"http-put\",\"to\":\"studio-update\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":324,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Agent PUT patches the open graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"studio-update\",\"to\":\"emit\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":995,\"symbol\":\"updateSubsystemModel\",\"annotation\":\"Persist then emit reason updated.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"studio-model-view\",\"to\":\"graph-inner\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":258,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Same Inner instance gets new components/edges props.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"graph-inner\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":407,\"symbol\":\"Inner\",\"annotation\":\"Pass 1 rebuilds then setLayoutReady(false) drops the cover.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"graph-inner\",\"to\":\"trigger-pass2\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":762,\"symbol\":\"Inner\",\"annotation\":\"Before: only dimensions path — no events → stuck forever.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"}]},{\"id\":\"tl-proposed-fix\",\"title\":\"Fix — reuse dims + kick Pass 2\",\"steps\":[{\"from\":\"http-put\",\"to\":\"studio-update\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":324,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Same live PUT into an open tab.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"graph-inner\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":407,\"symbol\":\"Inner\",\"annotation\":\"Pass 1 still estimates; cover drops via setLayoutReady(false).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"graph-inner\",\"to\":\"trigger-pass2\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":477,\"symbol\":\"Inner\",\"annotation\":\"built effect queueMicrotasks triggerPass2 after Pass 1.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"trigger-pass2\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":454,\"symbol\":\"triggerPass2\",\"annotation\":\"Measured ELK; .catch reveals on error.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"}]},{\"id\":\"tl-run-audit\",\"title\":\"Run a dry-run audit from the Audit button\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":443,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Invoke the host dry-run audit once caches are ready.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"tl-host-checks\",\"title\":\"Deterministic checks inside the host audit\",\"steps\":[{\"from\":\"audit-model\",\"to\":\"verify-files\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"line\":598,\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Check every file exists and every claimed symbol is declared.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"},{\"from\":\"audit-model\",\"to\":\"verify-component\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"line\":667,\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Verify each source component dry-run against the graphify cache.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"}]},{\"id\":\"tl-click-load\",\"title\":\"Click subsystem, tab already open (fast path)\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"open-tab\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":981,\"symbol\":\"onOpen\",\"annotation\":\"Row click fires openSubsystemModel RPC; host takes the zero-IO focus path.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"open-tab\",\"to\":\"studio-model-view\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1018,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Host broadcasts focus before any disk IO so the tab switches instantly.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"open-tab\",\"to\":\"open-stamp\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1019,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Background fire-and-forget: stamp lastOpenedAt after broadcast.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"open-stamp\",\"to\":\"studio-get\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":829,\"symbol\":\"touchSubsystemModelOpened\",\"annotation\":\"Stamp path re-reads the graph file, then writes record plus index.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"studio-model-view\",\"to\":\"studio-get\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":79,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Remount fetches the full graph over the bridge.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Detail mounts the React Flow graph with full components and edges.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"react-graph\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":537,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Graph runs pass 1 ELK layout with estimated node sizes.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"build-graph\",\"to\":\"elk\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1408,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"Builder runs orthogonal ELK on the main thread.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"}]},{\"id\":\"tl-optimistic-open\",\"title\":\"First open with empty state (implemented)\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"open-tab\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":981,\"symbol\":\"onOpen\",\"annotation\":\"Row click fires RPC; host resolves title from the small index file.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"open-tab\",\"to\":\"app-shell\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1054,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Host broadcasts focus immediately; stamp moves to background.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"app-shell\",\"to\":\"studio-model-view\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"line\":303,\"symbol\":\"App\",\"annotation\":\"Renderer switches tab and mounts detail view without waiting.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\"},{\"from\":\"studio-model-view\",\"to\":\"studio-get\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":79,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Detail fetches full graph in background and fills in on arrival.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"},{\"from\":\"open-tab\",\"to\":\"open-stamp\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1057,\"symbol\":\"openSubsystemModelTab\",\"annotation\":\"Background fire-and-forget: stamp lastOpenedAt after broadcast.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Once loaded, detail mounts graph canvas; tab already visible.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"tl-ensure-opencode-v2\",\"title\":\"Studio ensures OpenCode V2 runtime\",\"steps\":[{\"from\":\"maintain-orchestrator\",\"to\":\"opencode-v2-lifecycle\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":734,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Maintain entry calls Studio's OpenCode V2 lifecycle ensure (parallel to ensureMaintainAgentsInstalled).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-cli-npm\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2.ts\",\"line\":24,\"symbol\":\"resolveOpencode2Bin\",\"annotation\":\"If missing or behind, Studio installs/updates @opencode-ai/cli@beta (mirrors studio-version detect+update).\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/opencode-v2.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":650,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Service.ensure([opencode2, serve, --service]) starts or reuses the shared V2 background server.\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"tl-start-maintain-via-v2\",\"title\":\"Start Maintain via OpenCode V2\",\"steps\":[{\"from\":\"maintain-picker\",\"to\":\"maintain-background\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"line\":89,\"symbol\":\"MaintainModelPickerModal\",\"annotation\":\"RPC maintainSubsystemModel kicks the host; UI returns as soon as the run is accepted.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\"},{\"from\":\"maintain-background\",\"to\":\"maintain-orchestrator\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2328,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Background task calls the Maintain orchestrator after broadcasting status running.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"opencode-v2-lifecycle\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":730,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Before audit/run, Studio ensures OpenCode V2 is detected, installed/updated, and the service is up.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-cli-npm\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2.ts\",\"line\":24,\"symbol\":\"resolveOpencode2Bin\",\"annotation\":\"If missing or behind beta, Studio installs/updates @opencode-ai/cli@beta (same idea as studio-version update).\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/opencode-v2.ts\"},{\"from\":\"opencode-v2-lifecycle\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":650,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Service.ensure([opencode2, serve, --service]) starts or reuses the shared V2 background server.\",\"purl\":\"external:studio/opencode-v2-lifecycle#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"run-maintain-agent\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":769,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"After runtime is ready, hand off the brief to the agent runner seam.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"run-maintain-agent\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":651,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Create session + prompt on the ensured V2 service (replaces Bun.spawn opencode run).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-service\",\"to\":\"maintain-agent\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":650,\"symbol\":\"runMaintainAgent\",\"annotation\":\"V2 server loads issue-fixer or gap-filler and runs the brief as a session prompt.\",\"purl\":\"external:opencode/v2-service#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"tl-live-progress-sse\",\"title\":\"Live progress over V2 SSE\",\"steps\":[{\"from\":\"run-maintain-agent\",\"to\":\"opencode-v2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":651,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Same seam also opens client.event.subscribe() scoped to the Maintain session.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"opencode-v2-service\",\"to\":\"maintain-background\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2319,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Proposed: forward message/part/tool events into Maintain broadcasts instead of waiting for process exit.\",\"purl\":\"external:opencode/v2-service#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"tl-agent-proposes\",\"title\":\"Agent proposes via Studio HTTP\",\"steps\":[{\"from\":\"maintain-agent\",\"to\":\"http-put\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":354,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Agent curls POST /api/subsystem-model/:id/proposals using Access commands from the brief.\",\"purl\":\"external:opencode/maintain-agent#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"http-put\",\"to\":\"create-proposal\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":354,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"HTTP handler validates body and creates a pending proposal in the proposal store.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"}]},{\"id\":\"tl-list-maintain\",\"title\":\"List Maintenance Sessions\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":360,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Renderer RPC listMaintainSessions for the day window.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"},{\"from\":\"list-maintain-sessions\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"line\":161,\"symbol\":\"listMaintainSessions\",\"annotation\":\"Read session_v2 rows where agent is issue-fixer/gap-filler or title starts with Maintain.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-sessions.ts\"}]},{\"id\":\"tl-load-timeline-gap\",\"title\":\"Load timeline (empty for V2 Maintain)\",\"steps\":[{\"from\":\"process-session-events\",\"to\":\"process-session-events\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/session-pipeline.ts\",\"line\":1292,\"symbol\":\"processSessionEvents\",\"annotation\":\"SELECT FROM event — V2 Maintain sessions have 0 rows here; transcripts are in session_message instead.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/session-pipeline.ts\"}]},{\"id\":\"tl-create-maintain\",\"title\":\"Create a Maintain run\",\"steps\":[{\"from\":\"run-opencode-v2-session\",\"to\":\"opencode2-service\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":291,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Create+prompt against the running opencode2 HTTP service.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"run-opencode-v2-session\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":291,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Service persists session_v2 metadata (title Maintain — …, agent) that the tab lists.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"run-opencode-v2-session\",\"to\":\"run-opencode-v2-session\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":291,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Turns land in session_message — not the event table processSessionEvents reads.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"}]},{\"id\":\"tl-maintain-list\",\"title\":\"List Maintenance Sessions\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":360,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"scope=maintain calls listMaintainSessions for the day window.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"},{\"from\":\"list-maintain-sessions\",\"to\":\"store-session-v2\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/maintain-sessions.ts\",\"line\":161,\"symbol\":\"listMaintainSessions\",\"annotation\":\"SELECT from session_v2 where agent is issue-fixer/gap-filler or title is Maintain — …\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-sessions.ts\"}]},{\"id\":\"tl-v1-timeline\",\"title\":\"V1 timeline (event table)\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"process-session-events\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":411,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Overview loads processed timelines via getAgentSessionsOverview → processSessionEvents.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"}]},{\"id\":\"tl-v2-timeline\",\"title\":\"V2 timeline (session_message)\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"process-session-events\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":411,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Same overview load path; kind routing chooses the V2 reader.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"}]},{\"id\":\"tl-authored-renders-unknown\",\"title\":\"Authored declaration → panel shows = unknown\",\"steps\":[{\"from\":\"generate-decl-string\",\"to\":\"react-component\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"line\":20,\"symbol\":\"generateDeclarationString\",\"annotation\":\"Reads component.detail only — authored schema declaration is invisible.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\"}]},{\"id\":\"tl-verified-detail-works\",\"title\":\"Verified graphify capture → detail → panel\",\"steps\":[{\"from\":\"generate-decl-string\",\"to\":\"react-component\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-react/src/subsystem/formatDeclaration.ts\",\"line\":20,\"symbol\":\"generateDeclarationString\",\"annotation\":\"Same renderer path — now detail is populated so the signature shows.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/formatDeclaration.ts\"}]},{\"id\":\"tl-proposed-single-source\",\"title\":\"Proposed: panel reads schema declaration\",\"steps\":[{\"from\":\"generate-decl-string\",\"to\":\"core-declaration\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-core/src/types/subsystem-model.ts\",\"line\":224,\"symbol\":\"SubsystemConstructDeclaration\",\"annotation\":\"Repoint generateDeclarationString at this union (and migrate capture into it).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-core/src/types/subsystem-model.ts\"}]},{\"id\":\"wt-frame-today\",\"title\":\"Frame a document (today)\",\"steps\":[{\"from\":\"react-graph\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":424,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Document change triggers buildSubsystemGraph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"build-graph\",\"to\":\"module-regions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":943,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"Collect module regions — flat list merged with process regions.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"},{\"from\":\"build-graph\",\"to\":\"elk\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1009,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"computeElkLayout gets a flat groups[] — one parent level only.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"}]},{\"id\":\"wt-nesting-gap\",\"title\":\"Where nesting would land\",\"steps\":[{\"from\":\"elk\",\"to\":\"elk\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-react/src/utils/elkLayout.ts\",\"line\":550,\"symbol\":\"computeElkLayout\",\"annotation\":\"INCLUDE_CHILDREN already on — ELK can nest; our groupDefs builder cannot yet.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/utils/elkLayout.ts\"}]},{\"id\":\"wt-nest\",\"title\":\"Nest process → module → export\",\"steps\":[{\"from\":\"react-graph\",\"to\":\"build-graph\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":424,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Document change triggers buildSubsystemGraph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\"},{\"from\":\"build-graph\",\"to\":\"layout-groups\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1005,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"buildBoundaryLayoutGroups nests module groups under shared process.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"},{\"from\":\"layout-groups\",\"to\":\"module-regions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":533,\"symbol\":\"buildBoundaryLayoutGroups\",\"annotation\":\"Multi-member modules become frames; parentId set when process is unanimous.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"},{\"from\":\"build-graph\",\"to\":\"elk\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/model.ts\",\"line\":1081,\"symbol\":\"buildSubsystemGraph\",\"annotation\":\"computeElkLayout gets nested groups[] with parentId.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/model.ts\"}]},{\"id\":\"wt-paint\",\"title\":\"Paint the diagnostics\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemComponentGraph\",\"annotation\":\"Pass issues, diagnostic status, and (planned) verification into the graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"wt-write\",\"title\":\"Write-time verification (create/update)\",\"steps\":[{\"from\":\"studio-create\",\"to\":\"verify-files\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":991,\"symbol\":\"verifyModelFiles\",\"annotation\":\"Create runs the write-time pass and stores the result on the record.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"verify-files\",\"to\":\"resolve-root\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":670,\"symbol\":\"resolveRepoRootForComponent\",\"annotation\":\"Each component's file is resolved against its local repo root and checked on disk.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"}]},{\"id\":\"wt-audit\",\"title\":\"Audit (dry-run, graphify-backed)\",\"steps\":[{\"from\":\"audit-model\",\"to\":\"verify-component\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/verify-subsystem-component.ts\",\"line\":950,\"symbol\":\"verifySubsystemComponent\",\"annotation\":\"Per component, run the graphify-backed verification in dry-run mode.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts\"}]},{\"id\":\"wt-open-file\",\"title\":\"Open a file in the graph\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"react-graph\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":377,\"symbol\":\"SubsystemModelView\",\"annotation\":\"Host injects the path-keyed file viewer and readFile closure into the graph.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\"}]},{\"id\":\"wt-close-cmd-w\",\"title\":\"Close the active tab with Cmd+W\",\"steps\":[{\"from\":\"close-tab\",\"to\":\"broadcast-tabs\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3692,\"symbol\":\"closeTabById\",\"annotation\":\"Re-broadcast so every renderer view refreshes its tab list and picks a fallback.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"app-shell\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"line\":381,\"symbol\":\"refresh\",\"annotation\":\"The shell asks the host for the current tab list.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\"}]},{\"id\":\"wt-close-strip-x\",\"title\":\"Close a tab from the strip X button\",\"steps\":[{\"from\":\"app-shell\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/App.tsx\",\"line\":472,\"symbol\":\"onClose\",\"annotation\":\"onClose drops the tab from local tabs and history and falls back the active tab first, then persists with closeTab; the next listTabs reconciles.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/App.tsx\"},{\"from\":\"rpc-bridge\",\"to\":\"close-tab\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1704,\"symbol\":\"closeTab\",\"annotation\":\"The host closeTab handler funnels into the same closeTabById choke point Cmd+W uses.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"close-tab\",\"to\":\"broadcast-tabs\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3692,\"symbol\":\"closeTabById\",\"annotation\":\"Re-broadcast so every renderer view refreshes; the optimistic shell state is reconciled here.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-create\",\"title\":\"Create or update a model\",\"steps\":[{\"from\":\"http-put\",\"to\":\"studio-create\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":334,\"symbol\":\"handleSubsystemModelRequest\",\"annotation\":\"Persist the validated document.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\"},{\"from\":\"studio-create\",\"to\":\"verify-files\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":762,\"symbol\":\"createSubsystemModel\",\"annotation\":\"Stamp verification before the record hits disk.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"from\":\"verify-files\",\"to\":\"resolve-root\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":459,\"symbol\":\"verifyModelFiles\",\"annotation\":\"Resolve each component's checkout from its purl.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"}]},{\"id\":\"wt-list\",\"title\":\"List models as repo cards\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":645,\"symbol\":\"refresh\",\"annotation\":\"Renderer asks the host for the model list over RPC.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"store-list\",\"to\":\"studio-get\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":1953,\"symbol\":\"listSubsystemModels\",\"annotation\":\"The host handler reads each record to build a summary.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-propose\",\"title\":\"Propose and accept a correction bound to a component id\",\"steps\":[{\"from\":\"audit-model\",\"to\":\"create-proposal\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"line\":522,\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Audit findings drive an agent-proposed correction; the change list targets component ids (and topology endpoints).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"}]},{\"id\":\"wt-merge\",\"title\":\"Compose a repo's models into one graph (proposed)\",\"steps\":[{\"from\":\"studio-get\",\"to\":\"merge-models\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"line\":1,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Reads every model touching a repo-key (proposed — this is the compose flow this model is the brief for).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\"},{\"from\":\"merge-models\",\"to\":\"studio-get\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/merge-submodel-models.ts\",\"line\":1,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Same code identity unifies to one node keyed consistently and uniquely; each model's edges resolve in its own alias-space (proposed; an agent pass aligns the composed nodes later).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/merge-submodel-models.ts\"}]},{\"id\":\"wt-list-today\",\"steps\":[{\"annotation\":\"Polls listSubsystemModels every 10s. Summaries carry counts and repos, never files.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":701,\"mechanism\":\"calls\",\"symbol\":\"refresh\",\"to\":\"list-rpc\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"annotation\":\"Reads the lightweight index with counts and timestamps only.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"list-rpc\",\"line\":1950,\"mechanism\":\"calls\",\"symbol\":\"listSubsystemModels\",\"to\":\"store-list\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"annotation\":\"Loads each full model to derive repos, graphify and audit, then drops component files before replying.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"list-rpc\",\"line\":1953,\"mechanism\":\"calls\",\"symbol\":\"listSubsystemModels\",\"to\":\"studio-get\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}],\"title\":\"List subsystems today — files stop at the host\"},{\"id\":\"wt-file-panel\",\"steps\":[{\"annotation\":\"Loads the full model once per selected id and caches it, invalidating on subsystemModelChanged.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"file-panel\",\"line\":958,\"mechanism\":\"calls\",\"symbol\":\"onShowAuditReport\",\"to\":\"studio-get\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"annotation\":\"Groups the selected components file and purl pairs by repo.\",\"file\":\"packages/subsystems-react/src/subsystem/paths.ts\",\"from\":\"file-panel\",\"line\":93,\"mechanism\":\"calls\",\"symbol\":\"buildRepoGroups\",\"to\":\"repo-groups\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/paths.ts\"}],\"title\":\"Proposed — file trees for the selected subsystem\"},{\"id\":\"wt-permanent-unscoped\",\"title\":\"Combined graph — permanent tab (whole repo)\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"composed-pane\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1732,\"symbol\":\"ComposedGraphPane\",\"annotation\":\"Renders ComposedGraphPane for the drilled-in repo; on the permanent tab scopeOrder is null, so no modelIds prop.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"composed-pane\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"line\":74,\"symbol\":\"getComposedSubsystemModel\",\"annotation\":\"RPC getComposedSubsystemModel({ repoKey, modelIds }) — modelIds is undefined here.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\"},{\"from\":\"store-list\",\"to\":\"merge-models\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2170,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"With no scope, every stored model touching the repo key reaches the merge.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"merge-models\",\"to\":\"composed-pane\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2173,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Merged document, sidecar and the contributing model ids return to the pane.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-showcase-scoped\",\"title\":\"Scoped combine — showcase tab\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"composed-pane\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1740,\"symbol\":\"ComposedGraphPane\",\"annotation\":\"Passes modelIds={scopeOrder} — the showcase's ordered id set — into the pane.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"from\":\"composed-pane\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\",\"line\":74,\"symbol\":\"getComposedSubsystemModel\",\"annotation\":\"The RPC request now carries modelIds.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/ComposedGraphPane.tsx\"},{\"from\":\"store-list\",\"to\":\"merge-models\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2162,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Handler builds a Set from modelIds and skips ids outside it, then merges the survivors that touch the repo.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"merge-models\",\"to\":\"composed-pane\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2173,\"symbol\":\"mergeSubsystemModels\",\"annotation\":\"Only scoped models come back; the composite count and frames match the showcase.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-jev-display\",\"title\":\"Phase 1 display second opinion\",\"steps\":[{\"from\":\"create-proposal\",\"to\":\"jev-gate\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"line\":554,\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Persist pending then score async without blocking propose.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"}]},{\"id\":\"wt-jev-auto-accept\",\"steps\":[{\"annotation\":\"Run deterministic audit before any proposal work.\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"from\":\"maintain-orchestrator\",\"line\":790,\"mechanism\":\"calls\",\"symbol\":\"auditSubsystemModel\",\"to\":\"audit-model\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"annotation\":\"Persist the agent correction as pending.\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"from\":\"create-proposal\",\"line\":554,\"mechanism\":\"writes\",\"symbol\":\"createSubsystemModelProposal\",\"to\":\"jev-gate\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"}],\"title\":\"Phase 2 high confidence auto-accept\"},{\"id\":\"wt-jev-escalate\",\"steps\":[{\"annotation\":\"Run deterministic audit before any proposal work.\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"from\":\"maintain-orchestrator\",\"line\":790,\"mechanism\":\"calls\",\"symbol\":\"auditSubsystemModel\",\"to\":\"audit-model\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"annotation\":\"Persist the agent correction as pending.\",\"file\":\"packages/subsystems-studio/src/bun/proposal-store.ts\",\"from\":\"create-proposal\",\"line\":554,\"mechanism\":\"writes\",\"symbol\":\"createSubsystemModelProposal\",\"to\":\"jev-gate\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/proposal-store.ts\"},{\"annotation\":\"Low confidence leaves the proposal pending for human or agent review.\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"from\":\"jev-gate\",\"line\":820,\"mechanism\":\"feeds\",\"symbol\":\"pendingProposalCount\",\"to\":\"maintain-orchestrator\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"}],\"title\":\"Phase 2 low confidence escalate\"},{\"id\":\"wt-open-marks-viewed\",\"steps\":[{\"annotation\":\"Row double-click opens the model tab via RPC.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":1152,\"mechanism\":\"calls\",\"symbol\":\"openSubsystemModel\",\"to\":\"open-tab\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"},{\"annotation\":\"Single choke point stamps the open without gating tab visibility.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"open-tab\",\"line\":1049,\"mechanism\":\"calls\",\"symbol\":\"openSubsystemModelTab\",\"to\":\"open-stamp\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"annotation\":\"Stamp lastOpenedAt without bumping updatedAt or re-verifying.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"open-stamp\",\"line\":832,\"mechanism\":\"writes\",\"symbol\":\"touchSubsystemModelOpened\",\"to\":\"model-record\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"}],\"title\":\"Open marks viewed\"},{\"id\":\"wt-edit-clears-viewed\",\"steps\":[{\"annotation\":\"Bump updatedAt leaving lastOpenedAt behind so viewed flips to false.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"studio-update\",\"line\":788,\"mechanism\":\"writes\",\"symbol\":\"updateSubsystemModel\",\"to\":\"model-record\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"annotation\":\"Viewed reads both stamps from the stored record.\",\"file\":\"packages/subsystems-studio/src/shared/contract.ts\",\"from\":\"model-record\",\"line\":297,\"mechanism\":\"reads\",\"symbol\":\"StoredSubsystemModel\",\"to\":\"viewed-check\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/shared/contract.ts\"},{\"annotation\":\"Derive viewed per row as lastOpenedAt at or after updatedAt.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":266,\"mechanism\":\"calls\",\"symbol\":\"subsystemModelSortTime\",\"to\":\"viewed-check\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\"}],\"title\":\"Edit clears viewed\"},{\"id\":\"wt-identify-unviewed\",\"steps\":[{\"annotation\":\"Mirror the fresh lastOpenedAt into the list index entry.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"open-stamp\",\"line\":838,\"mechanism\":\"writes\",\"symbol\":\"touchSubsystemModelOpened\",\"to\":\"summary\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\"},{\"annotation\":\"Carry the open stamp to the renderer list row.\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"from\":\"summary\",\"line\":2239,\"mechanism\":\"feeds\",\"symbol\":\"openSubsystemModelTab\",\"to\":\"studio-list\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}],\"title\":\"Identify unviewed in list\"},{\"id\":\"wt-list-load\",\"title\":\"Happy path list load\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1047,\"annotation\":\"Poll asks the host for the graph list via listSubsystemModels.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"refresh\"},{\"from\":\"rpc-bridge\",\"to\":\"store-list\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":763,\"annotation\":\"Host handler (bun/index.ts:2217) fans out over every index entry.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"listSubsystemModels\"},{\"from\":\"store-list\",\"to\":\"studio-get\",\"mechanism\":\"reads\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":768,\"annotation\":\"Each entry loads its full graph file (bun/index.ts:2221).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"getSubsystemModel\"}]},{\"id\":\"wt-timeout\",\"title\":\"Timeout under host contention\",\"steps\":[{\"from\":\"studio-list\",\"to\":\"rpc-bridge\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"line\":1047,\"annotation\":\"Ten-second poll fires while the host is busy and waits up to 30s (maxRequestTime in rpc.ts:106).\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"refresh\"}]},{\"id\":\"wt-purl-preview\",\"steps\":[{\"annotation\":\"Preview calls readSubsystemFile with purl plus file; host resolves root straight from purl (bun/index.ts:1705) with no component lookup.\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"from\":\"studio-list\",\"line\":1266,\"mechanism\":\"calls\",\"to\":\"resolve-root\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelsView.tsx\",\"symbol\":\"readPreviewFile\"}],\"title\":\"Preview via purl, no component check\"},{\"id\":\"wt-bare-path\",\"steps\":[{\"annotation\":\"Host loads the graph and finds the component with c.file equal to path (bun/index.ts:1723-1728); no match yields graph has no local root for this file, a match resolves the root from the component purl.\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"from\":\"studio-get\",\"line\":768,\"mechanism\":\"reads\",\"to\":\"resolve-root\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"symbol\":\"getSubsystemModel\"}],\"title\":\"Walkthrough code via bare path, component check\"},{\"id\":\"wt-start-maintain\",\"title\":\"Start a maintenance run\",\"steps\":[{\"from\":\"maintain-picker\",\"to\":\"list-rpc\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"line\":116,\"symbol\":\"MaintainModelPickerModal\",\"annotation\":\"Fire the maintainSubsystemModel RPC with the selected model.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\"},{\"from\":\"list-rpc\",\"to\":\"maintain-background\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2522,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"RPC returns started:true immediately and hands off to the guarded runner.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"maintain-background\",\"to\":\"maintain-orchestrator\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3160,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Run the full install → audit → route-by-verdict → brief pipeline.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"run-maintain-agent\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":854,\"symbol\":\"runMaintainAgent\",\"annotation\":\"Resolve the model then launch the agent run, retrying once on the credentialed fallback if unusable.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"run-maintain-agent\",\"to\":\"run-opencode-v2-session\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":742,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"Hand the brief, agent, and directory to the V2 session runner.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"wt-wait-finish-event\",\"title\":\"Wait for the finish event\",\"steps\":[{\"from\":\"run-opencode-v2-session\",\"to\":\"opencode-v2-server__sg-1789951509967-ppkvezdy0\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":384,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"POST /api/session creates the session with a 15s HTTP timeout.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"run-opencode-v2-session\",\"to\":\"opencode-v2-server__sg-1789951509967-ppkvezdy0\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":428,\"symbol\":\"runOpencodeV2AgentSession\",\"annotation\":\"POST /api/session/{id}/prompt feeds the maintain brief with a 15s HTTP timeout.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\"},{\"from\":\"maintain-background\",\"to\":\"maintain-picker\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":3187,\"symbol\":\"maintainSubsystemModelInBackground\",\"annotation\":\"Broadcast done/error so the Maintain row flips off Running.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\"}]},{\"id\":\"wt-extract-panel\",\"title\":\"Extract the flows panel into its own component\",\"steps\":[{\"from\":\"react-graph\",\"to\":\"walkthroughs-panel\",\"mechanism\":\"uses\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":1695,\"symbol\":\"SubsystemComponentGraph\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"annotation\":\"Replace the inline walkthroughs.map list with <WalkthroughsPanel/>, passing order, expansion, and focus props.\"},{\"from\":\"walkthroughs-panel\",\"to\":\"sidebar-reorder\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":1695,\"symbol\":\"SubsystemComponentGraph\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"annotation\":\"Panel hosts the reorder controller directly beside the list it reorders.\"}]},{\"id\":\"wt-drag-reorder\",\"title\":\"Drag a walkthrough row to reorder\",\"steps\":[{\"from\":\"sidebar-reorder\",\"to\":\"studio-model-view\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"line\":1695,\"symbol\":\"WalkthroughsPanel\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-react/src/subsystem/SubsystemComponentGraph.tsx\",\"annotation\":\"Invoke the new onReorderWalkthroughs callback so the host owns the array.\"}]},{\"id\":\"wt-persist-order\",\"title\":\"Persist the new order\",\"steps\":[{\"from\":\"studio-model-view\",\"to\":\"list-rpc\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"line\":58,\"symbol\":\"SubsystemModelView\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx\",\"annotation\":\"The reorder handler sets local state first, then sends the walkthroughs patch.\"},{\"from\":\"list-rpc\",\"to\":\"studio-update\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":44,\"symbol\":\"updateSubsystemModel\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"annotation\":\"A new request handler delegates the patch to the imported store function, which merges it verbatim.\"}]},{\"id\":\"wt-broadcast-order\",\"title\":\"Broadcast the new order to every surface\",\"steps\":[{\"from\":\"studio-update\",\"to\":\"emit\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":833,\"symbol\":\"emitSubsystemModelChange\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"annotation\":\"After the JSON write, the store emits subsystemModelChanged.\"},{\"from\":\"emit\",\"to\":\"studio-model-view\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":78,\"symbol\":\"emitSubsystemModelChange\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"annotation\":\"The push reaches the open tab, which reloads the model and re-renders the flows panel in the new order.\"},{\"from\":\"emit\",\"to\":\"studio-list\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"line\":78,\"symbol\":\"emitSubsystemModelChange\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts\",\"annotation\":\"The list view reloads on the same push so its walkthrough rows re-order too.\"}]},{\"id\":\"wt-run-maintenance\",\"title\":\"Run maintenance for one model\",\"steps\":[{\"from\":\"maintain-picker\",\"to\":\"maintain-orchestrator\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\",\"line\":147,\"symbol\":\"MaintainModelPickerModal\",\"annotation\":\"RPC start — the host routes by the audit verdict.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/components/MaintainModelPickerModal.tsx\"},{\"from\":\"maintain-orchestrator\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":820,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Deterministic audit picks issue-fixer vs gap-filler vs topology agent.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"maintain-orchestrator\",\"to\":\"run-maintain-agent\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":854,\"symbol\":\"maintainSubsystemModel\",\"annotation\":\"Builds the brief and hands it to the agent.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"},{\"from\":\"run-maintain-agent\",\"to\":\"run-opencode-v2-session\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":742,\"symbol\":\"runMaintainAgent\",\"annotation\":\"OpenCode V2 session is created and prompted.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\"}]},{\"id\":\"wt-live-feed\",\"title\":\"Carry the model id through the live feed\",\"steps\":[{\"from\":\"run-opencode-v2-session\",\"to\":\"run-maintain-agent\",\"mechanism\":\"produces\",\"file\":\"packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"line\":535,\"symbol\":\"runOpencodeV2AgentSession\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/opencode-v2-live.ts\",\"annotation\":\"The create response yields the session id to the host; the graphId it was called with is already in hand.\"}]},{\"id\":\"wt-history-model-blind\",\"title\":\"Find past Maintain runs (today, model-blind)\",\"steps\":[{\"from\":\"agent-sessions-overview\",\"to\":\"list-maintain-sessions\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\",\"line\":661,\"symbol\":\"AgentSessionsOverviewView\",\"annotation\":\"Maintenance Sessions tab lists runs by title and agent only.\",\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/AgentSessions.tsx\"}]},{\"id\":\"wt-run__dup1\",\"title\":\"Run a maintenance session\",\"steps\":[{\"from\":\"maintain-orchestrator\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":824,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Deterministic audit decides whether the agent should run. A runId is minted here and threaded through the whole session.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":892,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunStart\",\"annotation\":\"Session start logged: sessionId <-> graphId paired, pendingCount snapshot. The run record is where runId lives.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"agent\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":875,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"runMaintainAgent\",\"annotation\":\"Brief handed to the headless OpenCode session (opencode run in a temp dir).\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":908,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunFinish\",\"annotation\":\"Seam C: session close-out backfills the run with the proposalIds created during the session.\"}]},{\"id\":\"wt-propose__dup1\",\"title\":\"A correction proposal lands\",\"steps\":[{\"from\":\"agent\",\"to\":\"http-propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":399,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"POST /api/subsystem-model/:id/proposals\",\"annotation\":\"Agent POSTs the propose curl body. Today the body carries graphId + finding, no runId. Seam B: parse optional runId.\"},{\"from\":\"http-propose\",\"to\":\"propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":404,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"proposeSubsystemModelCorrection\",\"annotation\":\"RPC handler forwards body; runId must be forwarded explicitly (RPC currently drops it).\"},{\"from\":\"propose\",\"to\":\"create-proposal\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2493,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Seam B: stamp runId onto the stored proposal so it can be matched back to its run.\"}]},{\"id\":\"wt-run__dup2\",\"title\":\"Run a maintenance session\",\"steps\":[{\"from\":\"maintain-orchestrator\",\"to\":\"audit-model\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":824,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"auditSubsystemModel\",\"annotation\":\"Deterministic audit decides whether the agent should run. A runId is minted here and threaded through the whole session.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":892,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunStart\",\"annotation\":\"Session start logged: sessionId <-> graphId paired, pendingCount snapshot. The run record is where runId lives.\"},{\"from\":\"maintain-orchestrator\",\"to\":\"agent__sg-1790108945330-xnzp05iqt\",\"mechanism\":\"feeds\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":875,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"runMaintainAgent\",\"annotation\":\"Brief handed to the headless OpenCode session (opencode run in a temp dir).\"},{\"from\":\"maintain-orchestrator\",\"to\":\"runs-store\",\"mechanism\":\"writes\",\"file\":\"packages/subsystems-studio/src/bun/maintain-model.ts\",\"line\":908,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/maintain-model.ts\",\"symbol\":\"noteSubsystemModelRunFinish\",\"annotation\":\"Seam C: session close-out backfills the run with the proposalIds created during the session.\"}]},{\"id\":\"wt-propose__dup2\",\"title\":\"A correction proposal lands\",\"steps\":[{\"from\":\"agent__sg-1790108945330-xnzp05iqt\",\"to\":\"http-propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":399,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"POST /api/subsystem-model/:id/proposals\",\"annotation\":\"Agent POSTs the propose curl body. Today the body carries graphId + finding, no runId. Seam B: parse optional runId.\"},{\"from\":\"http-propose\",\"to\":\"propose\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/http-server.ts\",\"line\":404,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/http-server.ts\",\"symbol\":\"proposeSubsystemModelCorrection\",\"annotation\":\"RPC handler forwards body; runId must be forwarded explicitly (RPC currently drops it).\"},{\"from\":\"propose\",\"to\":\"create-proposal\",\"mechanism\":\"calls\",\"file\":\"packages/subsystems-studio/src/bun/index.ts\",\"line\":2493,\"purl\":\"pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts\",\"symbol\":\"createSubsystemModelProposal\",\"annotation\":\"Seam B: stamp runId onto the stored proposal so it can be matched back to its run.\"}]}]}"
|
|
6
6
|
);
|