@@ -15,8 +15,9 @@ CI verifies the committed bundle is reproducible (`pnpm run check:build`).
1515## Pipeline
1616
1717```
18- init → (interview, agent-driven) → research → render → check
19- brief.json evidence/ SRD tree + SRD.json report
18+ init → (interview, agent-driven) → research → analyze → render → check → verify
19+ brief.json evidence/ gap report SRD tree + SRD.json report build referee
20+ + BUILD-PLAN.json
2021```
2122
2223### ` init `
@@ -41,13 +42,24 @@ subprocesses through `util.ts::sh` — the two mock seams that make the rest
4142offline-testable. Every angle degrades honestly to an empty result with a note
4243rather than aborting the run.
4344
44- ### ` render ` (` src/render.ts ` , ` src/srd.ts ` , ` src/templates.ts ` )
45+ ### ` analyze ` (` src/analyze.ts ` )
46+ The post-research gap signal. Pure read of ` brief.json ` + the dossier that
47+ reuses the render's own ` matchEvidence ` , so every reported gap is a claim that
48+ WILL render ungrounded: features with no matchable evidence, competitors the
49+ market angle never surfaced, candidate tech without docs/SO grounding, unmined
50+ OSS seeds — each with the drill command that fixes it. Informational; exit 0.
51+
52+ ### ` render ` (` src/render.ts ` , ` src/srd.ts ` , ` src/templates.ts ` , ` src/plan.ts ` )
4553` buildSRD(brief, evidence, {level}) ` assembles a pure, deterministic SRD model
4654(` src/srd.ts ` ): one FR per feature with templated Given/When/Then, the required
47- NFRs for the level, ADRs from the candidate stack, a competitive table, a build
48- plan and a traceability matrix. Evidence ` [E#] ` hooks are auto-attached by
49- keyword overlap (` matchEvidence ` ). ` templates.ts ` turns each model slice into
50- Markdown (pure, golden-testable); ` render.ts ` writes the tree + ` SRD.json ` .
55+ NFRs for the level, an * inferred* data model and interface set (recurring nouns
56+ + boundary detection, FR references closed symmetrically), ADRs from the
57+ candidate stack, a competitive table, a build plan and a traceability matrix.
58+ Evidence ` [E#] ` hooks are auto-attached by keyword overlap (` matchEvidence ` ).
59+ ` templates.ts ` turns each model slice into Markdown (pure, golden-testable);
60+ ` render.ts ` writes the tree + ` SRD.json ` + ` BUILD-PLAN.json ` (` src/plan.ts ` :
61+ ` derivePlan ` builds the task DAG from the SRD; ` mergePlan ` preserves the
62+ building agent's progress across re-renders, keyed by feature title).
5163
5264Conventions: ` > 🧠 **Decide:** ` for open decisions; ` [E#] ` for grounded claims.
5365
@@ -57,7 +69,18 @@ Two independent passes:
5769 acceptance criteria and resolving entity/interface/NFR references; required
5870 NFR categories present for the level; ADRs well-formed; required files present.
5971- ** Grounding coverage (advisory):** per-section grounded fraction, dangling
60- ` [E#] ` , uncited evidence. Never changes the exit code.
72+ ` [E#] ` , uncited evidence, renderer-templated criteria nudges. Never changes
73+ the exit code — unless the caller opts into ` --min-grounding <0-100> ` , which
74+ adds a third gate failing below the threshold.
75+
76+ ### ` verify ` (` src/verify.ts ` )
77+ The build referee. Static by default: ` BUILD-PLAN.json ` well-formed and
78+ acyclic, every ` frIds ` /` acceptance ` ref resolves into ` SRD.json ` , done tasks'
79+ declared artifacts/tests exist under the app dir, and every FR is referenced by
80+ a test (greps ` conventions.frTagPattern ` over test files via ` walk.ts ` ; stale
81+ tags after an id shift are flagged). ` --run-tests ` opts into executing
82+ ` conventions.testCommand ` + per-task ` verify.commands ` (via ` util.ts::sh ` );
83+ ` --strict ` fails a built must-have FR with no referencing test.
6184
6285## The three axes
6386
@@ -72,6 +95,10 @@ Two independent passes:
7295 openQuestions.
7396- ` evidence/evidence.json ` — ` EvidenceItem[] ` with stable ` E# ` ids.
7497- ` SRD.json ` — the full ` SRD ` manifest the ` check ` reads.
98+ - ` BUILD-PLAN.json ` — ` BuildPlanDoc ` : engine-derived task structure (ids,
99+ milestones, ` acceptance ` pointers into ` SRD.json ` , dependency edges) +
100+ agent-owned progress (` status ` , ` artifacts ` , ` tests ` , ` verify.commands ` ,
101+ ` conventions.testCommand ` /` appDir ` ) that survives re-renders.
75102
76103## Release
77104
0 commit comments