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.
GRAPH NODES, STATE, SEQUENCES, SERVICES
01Generation sequence (G1)
First generation for a group. G1 must be Accepted or Rejected before another Generate or a chat refine.
Rendering diagram…
02Feedback / chat refine
analyze-feedback is a three-gate classifier: intent, domain relevance, already addressed. Direct replies never start the graph.
Rendering diagram…
03Graph nodes
| Node | Reads | Writes | External |
|---|---|---|---|
query_gen_node | mappings, feedbacks, mode, rejected/validated context | gen_query_list, query_enhance_count | LLM missing-context or feedback-query chain |
jira_retrieval_node | last query, flag | validated_context, wiki query candidates | LLM query + judge (≤10 workers, fail-open); Jira MCP (≤5); summarizer |
confluence_retrieval_node | wiki candidates, flag | validated_context | REST CQL; LLM section judge (keyword heuristic on failure) |
batch_retrieval_node | last query | context bags; rejected_context = [[]] | Vector search, ≤8 workers, cosine distance 0.4 |
soft_gen_node | validated context, mode | final_doc | Features LLM then metadata LLM |
judge_node exists in code but is not wired. Retry (generation_checker_route) loops to query_gen_node if rejected_context has entries and enhance count < 3. Because batch retrieval currently writes rejected_context = [[]], that retry does not fire in production today — a known gap, not a secret.
04State and document
State is a TypedDict through every node. SoftwareRequirement is the structured document soft_gen_node builds in two calls, then renders to markdown.
Rendering diagram…
SRSFeatureBody is call 1. SRSMetadata is call 2. Inference flags are corrected deterministically after call 1.
05Threading and status
Rendering diagram…
Cooperative cancel via threading.Event. Status fields: gen, indexing, mapping, jira.
06Layer 4 — feature tickets
Takes one SRS markdown, strips relationship tables, splits ### features, runs one schema-validated LLM call per feature, writes JSON + markdown. Blocked until G1 is accepted or rejected.
07Layer 5 — gap closed loop
Compares Layer 4 features to live Story/Epic tickets for the same domain — not spec vs a local mapping file. Relevance judge runs only on the strict “Run gap analysis” path, batches of 15, fail-open keep-batch.
| Category | Follow-up |
|---|---|
| Exact / Partial | Record only |
| missing_in_client | Optional Jira create (ADF payload, user REST creds) |
| missing_in_llm | Optional SRS regenerate via feedback mode, then auto Layer 4 |
08Layer 6 — traceability
GET-only. Checks that software_requirement.md exists for the group and that the latest named snapshot has a matching *_jira_features.json. Never generates.
09Services at a glance
| Service | Role |
|---|---|
| Pipeline facade | Threads, status, logs, stop events |
| Archive | G1 baseline + revision history |
| Session manager | Single-editor / multi-viewer lock, heartbeat |
| Gap analysis | Feature vs ticket matcher |
| Ticket fetch | Jira MCP + relevance judge |
| Ticket create | REST create parent + sub-tasks |
| SRS gap regen | Feedback round seeded with missing tickets |
| Eval | Async scoring, fail-open |
| URL extractor | Enrich chat with linked ticket/page text |