T-S4K4-serve-the-module-graph-to-sdf-through-the-dashboard-api
State: planning/proposed · Impact: medium · Complexity: small
SDF reads corpus graphs through the dashboard API, not by spawning the CLI per view.
GET /api/capabilities/graph?project= is the precedent. The module graph needs the same route so
SDF gets it typed and project-scoped.
Proposed
Section titled “Proposed”GET /api/modules/graph?project= in lib/services/dashboard/server.ts returns the module graph
JSON, both layers, declared in contract.ts and exposed on the generated dashboard client. It
refuses a request with no project, as the capability route does.
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: The route returns the same body as
sdlc module graph --output jsonfor the named project. - AC-2: A request without
project=is refused with an error, not answered for the server’s own checkout. - AC-3: The dashboard client exposes a typed
getModuleGraph(projectId).
Out of scope
Section titled “Out of scope”- Any mutating route.
- The SDF page (T-9TBQ-sdf-draws-the-module-graph-control-units-collapsed-structure).
Dependencies
Section titled “Dependencies”Depends on
Section titled “Depends on”T-JJHY-sdlc-module-graph-emits-structure-and-control-units-as-json