You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: build phase — machine-readable BUILD-PLAN.json and construct verify
The engine now plans and referees the build; the agent writes all app code.
- BUILD-PLAN.json emitted on every render: deterministic task DAG (T-000
skeleton + one task per FR, milestone-ordered must→should→could, entity-
aware dependency edges), acceptance entries POINT into SRD.json (refs,
never copies)
- merge-by-feature-title preserves agent progress (status, artifacts, tests,
verify commands, testCommand/appDir) across re-renders — FR ids are
positional, titles are the stable identity
- new `construct verify`: static referee (plan well-formed + acyclic, refs
resolve into the SRD, done tasks' files exist, FR→test coverage via the
FR-tag grep, stale-tag detection); `--run-tests` opt-in executes the
declared test commands; `--strict` fails a built must-have with no
referencing test; `--json` for orchestration; status shows task progress
- SKILL.md step 8 (Build): task-by-task TDD with FR-tagged tests, verify
after every task, `--run-tests --strict` + adversarial review per
milestone; frontmatter triggers extended to 'build the app from the SRD'
- references/build-playbook.md (the task loop, milestone gates, what to do
when reality pushes back) and references/verify.md (what each check proves
and what still needs eyes)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: SKILL.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: construct
3
-
description: "Use when the user wants to turn a product idea into a serious, buildable requirements document (an SRD/PRD) — e.g. 'write an SRD for my app idea', 'spec out this product', 'turn my idea into requirements', 'design the requirements for X'. construct interviews the user about the product, then GROUNDS every major decision in real research — competitors and market signal (keyless web: SearXNG → DuckDuckGo → your WebSearch), comparable open-source projects and their issues/PRs (GitHub/GitLab), candidate-technology official docs and StackOverflow pitfalls, and an optional local semantic pass (Qdrant + Ollama) — writing an evidence dossier the SRD cites. It then renders a complete SRD suite (vision, scope, numbered functional requirements with Given/When/Then acceptance criteria, non-functional requirements, system context, data model, interfaces, ADRs, competitive landscape, build plan, traceability) and validates it: a HARD structural completeness gate plus an ADVISORY grounding-coverage report. Triggers: SRD, PRD, software requirements document, spec a product, requirements from an idea, greenfield product spec, idea to requirements."
3
+
description: "Use when the user wants to turn a product idea into a serious, buildable requirements document (an SRD/PRD) — and optionally build the app from it. E.g. 'write an SRD for my app idea', 'spec out this product', 'turn my idea into requirements', 'design the requirements for X', 'build the app from the SRD', 'implement the spec'. construct interviews the user about the product, then GROUNDS every major decision in real research — competitors and market signal (keyless web: SearXNG → DuckDuckGo → your WebSearch), comparable open-source projects and their issues/PRs (GitHub/GitLab), candidate-technology official docs and StackOverflow pitfalls, and an optional local semantic pass (Qdrant + Ollama) — writing an evidence dossier the SRD cites. It then renders a complete SRD suite (vision, scope, numbered functional requirements with Given/When/Then acceptance criteria, non-functional requirements, system context, inferred data model and interfaces, ADRs, competitive landscape, build plan, traceability) and validates it: a HARD structural completeness gate plus an ADVISORY grounding-coverage report (opt-in --min-grounding threshold). For building, it emits a machine-readable BUILD-PLAN.json task DAG; the agent implements task-by-task with TDD while `construct verify` referees the app against the SRD (artifacts exist, every requirement is test-covered, suites pass). Triggers: SRD, PRD, software requirements document, spec a product, requirements from an idea, greenfield product spec, idea to requirements, build from spec, implement the SRD."
4
4
license: MIT
5
5
metadata:
6
6
version: 1.0.2
@@ -41,6 +41,11 @@ No `npm install`, no API keys. Run `--help` for the full surface. Key commands:
41
41
gate (exit ≠ 0 on an incomplete SRD) plus the ADVISORY grounding-coverage
42
42
report. `--min-grounding N` opts into a second gate that fails below N%
43
43
grounded claims.
44
+
-`verify --out <run> [--app <dir>] [--run-tests] [--strict] [--json]` — the
45
+
build referee: BUILD-PLAN.json well-formed and acyclic, every task ref
46
+
resolves into SRD.json, done tasks' files exist, every requirement is
47
+
referenced by a test. `--run-tests` also executes the declared test
48
+
commands; `--strict` fails a built must-have with no referencing test.
44
49
-`status --out <run>` — what exists in the run so far.
# What `construct verify` proves — and what it cannot
2
+
3
+
`verify` is the deterministic referee between `BUILD-PLAN.json`, `SRD.json`
4
+
and the app directory. Knowing exactly what each check proves keeps you (and
5
+
the user) honest about the build.
6
+
7
+
## Static checks (always run, pure reads)
8
+
9
+
| Check | Proves | Does NOT prove |
10
+
|---|---|---|
11
+
| plan parses, schema version, unique ids | the plan is machine-readable | the plan is sensible |
12
+
| DAG acyclic, `dependsOn` resolve | the task order is executable | the order is optimal |
13
+
|`frIds` / `acceptance` refs resolve into SRD.json | the plan builds *this* SRD, no orphan claims | the SRD itself is right (that is `check`'s job) |
14
+
| done tasks' `artifacts`/`tests` exist under the app dir | the declared files are real | the files do what the task says |
15
+
| FR-tag grep over test files (`conventions.frTagPattern`) | each FR is *referenced* by at least one test | the test actually exercises the criterion — a test can name FR-001 and assert nothing |
16
+
| stale-tag warning | tags match the current SRD's FR ids | — |
17
+
18
+
Exit ≠ 0 on any hard error. `--strict` upgrades "a built must-have FR has no
19
+
referencing test" from warning to error — use it at every milestone gate.
20
+
21
+
## `--run-tests` (opt-in execution)
22
+
23
+
Runs `conventions.testCommand` and every done task's `verify.commands` inside
24
+
the app directory (your own toolchain — the engine installs nothing). Proves
25
+
**the suite passes**. Does not prove the suite is honest: a weakened
26
+
assertion, a skipped test, or a tautological expect all pass. It is opt-in
27
+
because executing user-declared commands is side-effectful — never run it on
28
+
a plan you have not read.
29
+
30
+
## The gap that needs eyes
31
+
32
+
Greps prove *reference*; execution proves *green*; neither proves a test
33
+
faithfully encodes its acceptance criterion. That is the milestone
34
+
adversarial review in `references/build-playbook.md`: a fresh reader compares
35
+
each criterion in `SRD.json` against what the tests actually assert. Engine
36
+
for structure, agent for honesty — same split as `check` vs. grounding.
0 commit comments