Skip to content

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.

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.

  • AC-1: The route returns the same body as sdlc module graph --output json for 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).

T-JJHY-sdlc-module-graph-emits-structure-and-control-units-as-json


← Back to Tasks