LangGraph · trace
SRS generator
Retrieve tickets, wiki pages, and indexed docs, then generate a structured software requirements spec. Features become tickets, gaps close the loop, traceability stays read-only.
SIX LAYERS FROM UI TO TRACEABILITY
01Six layers
The high-level companion doc was never in the public folder. This map is reconstructed from the LLD: UI surfaces, routers, the pipeline facade, and everything downstream of “Generate.”
Rendering diagram…
| Layer | Job |
|---|---|
| 1 · UI | Generate, chat refine, tickets, gap, trace views |
| 2 · API | Validation, G1 accept/reject gate, status, SSE logs |
| 3 · Generation | LangGraph retrieve + write SRS |
| 4 · Features | One SRS → structured ticket JSON/markdown |
| 5 · Gap | Features vs live tickets; create or regenerate |
| 6 · Trace | Existence checks only |
02Layer 3 in one picture
Rendering diagram…
03Why threads, not asyncio tasks
FastAPI stays async for status and log tailing. Graph invocation is blocking (LLM + MCP + Chroma). Each job type gets a daemon thread, a lock-guarded status cell, and a cancel Event. One shape for index, generate, gap-adjacent jobs, and feature generation.
04Trust
- Generate is gated: LLM must be configured; G1 must be accepted or rejected before a second generate.
- Chat refine runs a cheap classifier first. Only
needs_regenerationinvokes the graph. - Traceability never writes.
- Ticket create uses the user's REST credentials, not a shared god token, when opening work in the customer's Jira.