@pilotspace/add 1.16.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +227 -0
- package/GETTING-STARTED.md +20 -64
- package/README.md +128 -56
- package/agents/add.md +68 -0
- package/bin/cli.js +229 -29
- package/package.json +2 -3
- package/personas-teacher/VENDOR.md +6 -0
- package/skill/add/SKILL.md +100 -134
- package/skill/add/adopt.md +28 -0
- package/skill/add/beyond.md +36 -0
- package/skill/add/deltas.md +25 -2
- package/skill/add/design.md +56 -74
- package/skill/add/{report-template.md → gate-udd.md} +28 -37
- package/skill/add/intake.md +65 -29
- package/skill/add/loop.md +35 -23
- package/skill/add/phases/build.md +78 -0
- package/skill/add/phases/direction.md +280 -0
- package/skill/add/phases/verify.md +160 -0
- package/skill/add/run.md +13 -30
- package/skill/add/terms.md +18 -0
- package/tooling/add.py +2520 -2933
- package/tooling/add_engine/autonomy.py +2 -37
- package/tooling/add_engine/components.py +4 -87
- package/tooling/add_engine/constants.py +153 -87
- package/tooling/add_engine/guidelines.py +9 -11
- package/tooling/add_engine/io_state.py +82 -2
- package/tooling/add_engine/predicates.py +90 -2
- package/tooling/add_engine/search.py +6 -6
- package/tooling/add_engine/taskdoc.py +15 -10
- package/tooling/templates/CONVENTIONS.md.tmpl +1 -1
- package/tooling/templates/GLOSSARY.md.tmpl +10 -4
- package/tooling/templates/MILESTONE.md.tmpl +20 -16
- package/tooling/templates/PLAN.md.tmpl +128 -0
- package/tooling/templates/PROJECT.md.tmpl +6 -1
- package/tooling/templates/PROMPT.persona.md.tmpl +17 -21
- package/tooling/templates/personas/_template.md.tmpl +35 -29
- package/tooling/templates/personas/build-engineer.md.tmpl +45 -0
- package/tooling/templates/personas/data-steward.md.tmpl +45 -0
- package/tooling/templates/personas/evidence-verifier.md.tmpl +45 -0
- package/tooling/templates/personas/platform-engineer.md.tmpl +45 -0
- package/tooling/templates/personas/product-lead.md.tmpl +51 -0
- package/tooling/templates/personas/quality-auditor.md.tmpl +47 -0
- package/tooling/templates/personas/release-manager.md.tmpl +52 -0
- package/tooling/templates/personas/security-gatekeeper.md.tmpl +45 -0
- package/tooling/templates/personas/software-architect.md.tmpl +45 -0
- package/tooling/templates/personas/stream-orchestrator.md.tmpl +44 -0
- package/tooling/templates/personas/technical-writer.md.tmpl +49 -0
- package/tooling/templates/personas/ux-experience-lead.md.tmpl +48 -0
- package/tooling/templates/specs/SPEC.md.tmpl +18 -0
- package/tooling/templates/udd-wireframe.md +1 -1
- package/agents/add-advisor.md +0 -31
- package/agents/add-build.md +0 -29
- package/agents/add-design.md +0 -32
- package/agents/add-persona.md +0 -31
- package/agents/add-verify.md +0 -34
- package/docs/00-introduction.md +0 -46
- package/docs/01-principles.md +0 -71
- package/docs/02-the-flow.md +0 -113
- package/docs/03-step-1-specify.md +0 -123
- package/docs/04-step-2-scenarios.md +0 -90
- package/docs/05-step-3-contract.md +0 -80
- package/docs/06-step-4-tests.md +0 -85
- package/docs/07-step-5-build.md +0 -82
- package/docs/08-step-6-verify.md +0 -105
- package/docs/09-the-loop.md +0 -75
- package/docs/10-setup-and-stages.md +0 -118
- package/docs/11-governance.md +0 -91
- package/docs/12-roles.md +0 -99
- package/docs/13-adoption.md +0 -67
- package/docs/14-foundation.md +0 -142
- package/docs/15-foundations-and-lineage.md +0 -106
- package/docs/16-releasing.md +0 -182
- package/docs/17-components.md +0 -143
- package/docs/18-personas.md +0 -80
- package/docs/README.md +0 -77
- package/docs/add-competencies.png +0 -0
- package/docs/add-flow.png +0 -0
- package/docs/add-foundation.png +0 -0
- package/docs/add-hierarchy.png +0 -0
- package/docs/add-milestone-task-lifecycle.png +0 -0
- package/docs/add-task-growth-wheel.png +0 -0
- package/docs/appendix-a-templates.md +0 -88
- package/docs/appendix-b-prompts.md +0 -154
- package/docs/appendix-c-glossary.md +0 -176
- package/docs/appendix-d-worked-example.md +0 -231
- package/docs/appendix-e-checklists.md +0 -92
- package/docs/appendix-f-requirements-matrix.md +0 -171
- package/docs/appendix-g-references.md +0 -106
- package/skill/add/advisor.md +0 -80
- package/skill/add/compact-foundation.md +0 -40
- package/skill/add/components.md +0 -52
- package/skill/add/confidence.md +0 -32
- package/skill/add/fold.md +0 -63
- package/skill/add/graduate.md +0 -39
- package/skill/add/phases/0-ground.md +0 -64
- package/skill/add/phases/0-setup.md +0 -103
- package/skill/add/phases/1-specify.md +0 -61
- package/skill/add/phases/2-scenarios.md +0 -48
- package/skill/add/phases/3-contract.md +0 -60
- package/skill/add/phases/4-tests.md +0 -59
- package/skill/add/phases/5-build.md +0 -62
- package/skill/add/phases/6-verify.md +0 -69
- package/skill/add/phases/7-observe.md +0 -47
- package/skill/add/phases/fast-lane.md +0 -31
- package/skill/add/release.md +0 -61
- package/skill/add/scope.md +0 -72
- package/skill/add/sensitivity.md +0 -51
- package/skill/add/setup-review.md +0 -48
- package/skill/add/soul.md +0 -58
- package/skill/add/streams.md +0 -268
- package/tooling/add_engine/release.py +0 -86
- package/tooling/templates/TASK.fast.md.tmpl +0 -77
- package/tooling/templates/TASK.md.tmpl +0 -216
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
# Appendix D · The worked example, end to end
|
|
2
|
-
|
|
3
|
-
[← Appendix C Glossary](./appendix-c-glossary.md) · [Contents](./README.md) · Next: [Appendix E Checklists →](./appendix-e-checklists.md)
|
|
4
|
-
|
|
5
|
-
The running example, assembled in one place so you can see a complete pass through the flow without flipping between chapters. The feature: **transfer money between a user's own accounts.**
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Step 1 — Specify → `SPEC.md`
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
Feature: Transfer money between my own accounts
|
|
13
|
-
Framings weighed: synchronous single-currency transfer (chosen) · queued transfer · multi-currency with FX
|
|
14
|
-
Must:
|
|
15
|
-
- move an amount from one of my accounts to another of mine
|
|
16
|
-
- amount > 0
|
|
17
|
-
- source and destination are different accounts
|
|
18
|
-
- source has enough balance
|
|
19
|
-
After:
|
|
20
|
-
- source balance -= amount, destination balance += amount
|
|
21
|
-
Reject:
|
|
22
|
-
- amount <= 0 -> "amount_invalid"
|
|
23
|
-
- source == destination -> "same_account"
|
|
24
|
-
- balance < amount -> "insufficient_funds"
|
|
25
|
-
- account not mine -> "forbidden"
|
|
26
|
-
Assumptions — lowest-confidence first:
|
|
27
|
-
⚠ same currency only (no FX) in v1 — lowest confidence because the ticket never said; if wrong: the amount/rounding model changes and this contract is wrong
|
|
28
|
-
- [x] no daily limit in v1 — confirmed: out of scope for v1
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The product owner read the flagged assumption first — the single-currency choice, the one most likely to be wrong and most expensive if it were — and confirmed it: v1 is single-currency with no daily limit.
|
|
32
|
-
|
|
33
|
-
## Step 2 — Scenarios → `features/transfer.feature`
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Scenario: successful transfer
|
|
37
|
-
Given A has 100 and B has 0, both mine
|
|
38
|
-
When I transfer 30 from A to B
|
|
39
|
-
Then A has 70 and B has 30
|
|
40
|
-
|
|
41
|
-
Scenario: amount must be positive
|
|
42
|
-
Given A has 100, mine
|
|
43
|
-
When I transfer 0 from A to B
|
|
44
|
-
Then it is rejected "amount_invalid"
|
|
45
|
-
And no balance changes
|
|
46
|
-
|
|
47
|
-
Scenario: same account
|
|
48
|
-
Given A has 100, mine
|
|
49
|
-
When I transfer 10 from A to A
|
|
50
|
-
Then it is rejected "same_account"
|
|
51
|
-
And no balance changes
|
|
52
|
-
|
|
53
|
-
Scenario: insufficient funds
|
|
54
|
-
Given A has 20, mine
|
|
55
|
-
When I transfer 50 from A to B
|
|
56
|
-
Then it is rejected "insufficient_funds"
|
|
57
|
-
And no balance changes
|
|
58
|
-
|
|
59
|
-
Scenario: not my account
|
|
60
|
-
Given account C is not mine
|
|
61
|
-
When I transfer 10 from C to B
|
|
62
|
-
Then it is rejected "forbidden"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Five scenarios for four rejections plus the happy path — every rule from the spec is covered.
|
|
66
|
-
|
|
67
|
-
## Step 3 — Contract → `contracts/transfer.md`
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
POST /transfers body: { fromAccountId, toAccountId, amount }
|
|
71
|
-
200 -> { transferId, fromBalance, toBalance }
|
|
72
|
-
400 -> { error: "amount_invalid" | "same_account" | "insufficient_funds" }
|
|
73
|
-
403 -> { error: "forbidden" }
|
|
74
|
-
Schema: accounts.balance (read + write, must be transactional)
|
|
75
|
-
Status: FROZEN @ v1
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Frozen at v1. The schema note flags the atomicity requirement the verification step will check.
|
|
79
|
-
|
|
80
|
-
## Step 4 — Tests → `tests/transfer_test.py` (run first; all fail)
|
|
81
|
-
|
|
82
|
-
```python
|
|
83
|
-
def test_successful_transfer():
|
|
84
|
-
a = account(balance=100, owner=me); b = account(balance=0, owner=me)
|
|
85
|
-
r = transfer(a.id, b.id, 30)
|
|
86
|
-
assert r.status == 200
|
|
87
|
-
assert a.balance == 70 and b.balance == 30
|
|
88
|
-
|
|
89
|
-
def test_amount_must_be_positive():
|
|
90
|
-
a = account(balance=100, owner=me); b = account(balance=0, owner=me)
|
|
91
|
-
r = transfer(a.id, b.id, 0)
|
|
92
|
-
assert r.status == 400 and r.error == "amount_invalid"
|
|
93
|
-
assert a.balance == 100 and b.balance == 0
|
|
94
|
-
|
|
95
|
-
def test_same_account():
|
|
96
|
-
a = account(balance=100, owner=me)
|
|
97
|
-
r = transfer(a.id, a.id, 10)
|
|
98
|
-
assert r.status == 400 and r.error == "same_account"
|
|
99
|
-
assert a.balance == 100
|
|
100
|
-
|
|
101
|
-
def test_insufficient_funds():
|
|
102
|
-
a = account(balance=20, owner=me); b = account(balance=0, owner=me)
|
|
103
|
-
r = transfer(a.id, b.id, 50)
|
|
104
|
-
assert r.status == 400 and r.error == "insufficient_funds"
|
|
105
|
-
assert a.balance == 20
|
|
106
|
-
|
|
107
|
-
def test_not_my_account():
|
|
108
|
-
c = account(balance=100, owner=someone_else); b = account(balance=0, owner=me)
|
|
109
|
-
r = transfer(c.id, b.id, 10)
|
|
110
|
-
assert r.status == 403 and r.error == "forbidden"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Run now, with no implementation: all five fail. That is the honest baseline.
|
|
114
|
-
|
|
115
|
-
## Step 5 — Build → the prompt given to the AI
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
Read SPEC.md, contracts/transfer.md, and tests/transfer_test.py.
|
|
119
|
-
Implement POST /transfers so that EVERY test passes.
|
|
120
|
-
Constraints:
|
|
121
|
-
- Do NOT change any test.
|
|
122
|
-
- Do NOT change the contract.
|
|
123
|
-
- Make the balance update atomic: debit and credit in a single transaction,
|
|
124
|
-
and re-check the balance inside the transaction.
|
|
125
|
-
- Stop and ask if any requirement is unclear — do not guess.
|
|
126
|
-
- Use only packages in dependencies.allowlist.
|
|
127
|
-
Report which tests pass and exactly what you changed.
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
The AI implements, runs the suite, iterates, and reports all five green, listing the files it changed.
|
|
131
|
-
|
|
132
|
-
## Step 6 — Verify → the human checks
|
|
133
|
-
|
|
134
|
-
- **Evidence:** all five tests pass; coverage held; no test or contract was altered. ✓
|
|
135
|
-
- **Concurrency (the key check):** two simultaneous transfers from account A must not both pass the balance check and overdraw it. The reviewer confirms the balance re-check happens *inside* the transaction and that the row is locked for the update — so a race cannot double-spend. ✓
|
|
136
|
-
- **Security:** no hardcoded secrets; inputs validated; no new dependency added. ✓
|
|
137
|
-
- **Architecture:** the change respects the layering in `CONVENTIONS.md`. ✓
|
|
138
|
-
- **Outcome recorded:** `PASS`, reviewed by the senior engineer.
|
|
139
|
-
|
|
140
|
-
## The loop — observe
|
|
141
|
-
|
|
142
|
-
Released behind a feature flag to 5% of users. Monitored:
|
|
143
|
-
|
|
144
|
-
- transfer error rate (target: well under 0.1% of attempts);
|
|
145
|
-
- the rate of each rejection — a spike in `insufficient_funds` would suggest a UX problem (users not seeing their balance) rather than a code defect;
|
|
146
|
-
- latency of the atomic update under load.
|
|
147
|
-
|
|
148
|
-
A week later, telemetry shows an unexpectedly high `forbidden` rate. The `6_observe` prompt clusters it: users are trying to transfer *into* a shared account they can see but do not own. That observation becomes a `SPEC.md` delta — "support transfers into accounts I am authorized on, not only accounts I own" — and the flow returns to Step 1 for the next cycle.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
This is the whole method in one feature: four artifacts written in order, an AI build bounded by them, a verification grounded in evidence plus the one check tests miss, and a loop that turns production reality into the next specification.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Multi-component, end to end
|
|
157
|
-
|
|
158
|
-
The example above is a single codebase with one green bar. Real slices often cross components — a backend endpoint and the frontend that calls it. ADD ships that slice *inside one milestone* using the component pillar (chapter 17). Here is the same flow, now spanning two components: a `gateway` backend that **produces** an `orders` contract, and a `web` frontend that **consumes** it.
|
|
159
|
-
|
|
160
|
-
### Declare the components
|
|
161
|
-
|
|
162
|
-
The two parts and the boundary between them are declared in `.add/components.toml` — never inferred:
|
|
163
|
-
|
|
164
|
-
```toml
|
|
165
|
-
[component.gateway]
|
|
166
|
-
root = "apps/gateway"
|
|
167
|
-
green_bar = "pytest + pyright"
|
|
168
|
-
verify = "pytest -q apps/gateway"
|
|
169
|
-
|
|
170
|
-
[component.web]
|
|
171
|
-
root = "apps/web"
|
|
172
|
-
green_bar = "vitest + a11y"
|
|
173
|
-
verify = "pnpm -C apps/web test"
|
|
174
|
-
|
|
175
|
-
[contract.orders]
|
|
176
|
-
producer = "gateway"
|
|
177
|
-
consumers = ["web"]
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
One milestone, **list-orders slice**, holds two tasks: `orders-api` (the BE, `produces: orders`) and `orders-list` (the FE, `consumes: orders`).
|
|
181
|
-
|
|
182
|
-
### The backend freezes first → an immutable snapshot
|
|
183
|
-
|
|
184
|
-
`orders-api` carries a `component: gateway` and a `produces: orders` header. It runs the normal flow — specify, scenarios, contract — and the human freezes its §3:
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
GET /orders?status= -> 200 { orders: [{ id, status, total, placedAt }], nextCursor }
|
|
188
|
-
400 { error: "bad_status" }
|
|
189
|
-
Status: FROZEN @ v1 — approved by the tech lead
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
The moment that contract freezes and the task crosses contract→tests, the engine writes an immutable snapshot — `.add/contracts/orders.json` — recording the id, producer, version, frozen date, and a hash over the frozen §3 shape. That file *is* the published interface.
|
|
193
|
-
|
|
194
|
-
### The frontend is held until the backend freezes
|
|
195
|
-
|
|
196
|
-
`orders-list` (`component: web`, `consumes: orders`) was started in the same milestone, but it must not commit to a shape the backend has not frozen. When it tries to advance scenarios→contract before the snapshot exists, the engine refuses:
|
|
197
|
-
|
|
198
|
-
```
|
|
199
|
-
$ python3 .add/tooling/add.py advance
|
|
200
|
-
add: error: producer_contract_unfrozen: orders-list consumes 'orders' but no frozen producer snapshot exists yet — the FE is held until gateway freezes
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Once `orders.json` exists, the same `advance` succeeds: the FE writes its §3 against the frozen shape and **pins that snapshot's hash**. The slice is ordered by the contract, not by splitting BE and FE across two milestones.
|
|
204
|
-
|
|
205
|
-
If the backend later *re-opens* its §3 to change the shape, the engine holds the consumer `producer_contract_stale` rather than letting it pin a shape that is mid-change — and `add.py check` separately surfaces `contract_producer_stale` / `contract_snapshot_hashless` as never-red warnings. Freeze-recency, not just existence.
|
|
206
|
-
|
|
207
|
-
### Each task verifies against its own green bar
|
|
208
|
-
|
|
209
|
-
At the gate, the engine holds each task to *its* component. `orders-api` must cite `pytest + pyright` in its §6 evidence; `orders-list` must cite `vitest + a11y` — cite the wrong bar (or none) and the gate refuses `component_green_bar_uncited`. The engine never runs either suite; it **surfaces** the component's `verify` command so the operator sees exactly what to run:
|
|
210
|
-
|
|
211
|
-
```
|
|
212
|
-
$ python3 .add/tooling/add.py gate PASS
|
|
213
|
-
task 'orders-api' gate -> PASS
|
|
214
|
-
component: gateway · expected green-bar: pytest + pyright · verify: pytest -q apps/gateway # run this suite — the engine does not (NO-EXEC)
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
Two tasks, one milestone, two green bars — each held to its own, each suite run by you.
|
|
218
|
-
|
|
219
|
-
### Across repositories — federation
|
|
220
|
-
|
|
221
|
-
When `gateway` and `web` live in *separate* repos, only the snapshot transport changes. The `web` repo declares where the producer publishes:
|
|
222
|
-
|
|
223
|
-
```toml
|
|
224
|
-
[federation.orders]
|
|
225
|
-
source = "../gateway/.add/contracts/orders.json"
|
|
226
|
-
pin = "v1"
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
`add.py federate pull orders` validates the producer repo's published snapshot (valid JSON, matching id, a hash, matching version) and lands a byte-for-byte copy locally — from there the FE holds and pins exactly as in a monorepo. The pull is fail-loud: an unknown id, an unreadable source, a `source` that escapes the repo's allowlist (`federation_source_escapes`), an invalid snapshot, or a version mismatch each HARD-STOPS and lands nothing. Federation never builds the FE against a guessed, out-of-tree, or stale endpoint.
|
|
230
|
-
|
|
231
|
-
That is the component pillar in one slice: declare the parts, freeze the boundary, hold the consumer behind the producer, verify each part on its own bar, and carry the frozen contract across repos — all within the same six-step flow and its single contract-freeze approval.
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Appendix E · Checklists
|
|
2
|
-
|
|
3
|
-
[← Appendix D Worked example](./appendix-d-worked-example.md) · [Contents](./README.md) · Next: [Appendix F Requirements matrix →](./appendix-f-requirements-matrix.md)
|
|
4
|
-
|
|
5
|
-
Every exit check in the book, collected for quick use. Print this page.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Setup (once per project)
|
|
10
|
-
|
|
11
|
-
- [ ] Pipeline runs and is green on the empty skeleton.
|
|
12
|
-
- [ ] AI model pinned in `MODEL_REGISTRY.md`.
|
|
13
|
-
- [ ] Dependency allow-list exists; pipeline fails on anything outside it.
|
|
14
|
-
- [ ] `playbook/` contains the six prompts.
|
|
15
|
-
|
|
16
|
-
## Step 1 — Specify
|
|
17
|
-
|
|
18
|
-
- [ ] Every required behavior stated explicitly.
|
|
19
|
-
- [ ] Every rejection has a named error code.
|
|
20
|
-
- [ ] Success state-change described.
|
|
21
|
-
- [ ] Assumptions ranked lowest-confidence first; the 1–2 most-likely-wrong ⚠-flagged with why + cost (or an honest "none material" that still names the single biggest risk).
|
|
22
|
-
- [ ] "Existing behavior" assumptions carry grep/line citations; wiring claims name the production caller chain.
|
|
23
|
-
|
|
24
|
-
## Step 2 — Scenarios
|
|
25
|
-
|
|
26
|
-
- [ ] Every "Must" rule has a scenario.
|
|
27
|
-
- [ ] Every "Reject" rule has a scenario.
|
|
28
|
-
- [ ] Each result is a specific, observable fact.
|
|
29
|
-
- [ ] Rejections assert what must stay unchanged.
|
|
30
|
-
|
|
31
|
-
## Step 3 — Contract
|
|
32
|
-
|
|
33
|
-
- [ ] Contract versioned and `FROZEN`.
|
|
34
|
-
- [ ] Contract tests pass against the mock.
|
|
35
|
-
- [ ] Names match the glossary.
|
|
36
|
-
- [ ] Every spec rejection has a contracted response.
|
|
37
|
-
|
|
38
|
-
## Step 4 — Tests
|
|
39
|
-
|
|
40
|
-
- [ ] One test per scenario.
|
|
41
|
-
- [ ] Suite runs in the pipeline and is red for the right reason.
|
|
42
|
-
- [ ] Tests assert behavior, not internals.
|
|
43
|
-
- [ ] Coverage target recorded.
|
|
44
|
-
- [ ] No `should_panic` lying reds — unimplemented paths use `todo!()` so they fail.
|
|
45
|
-
- [ ] Collateral tests for globally-enumerated things listed by exact name.
|
|
46
|
-
- [ ] Arithmetic checked: fixtures can reach green against frozen constants.
|
|
47
|
-
|
|
48
|
-
## Step 5 — Build
|
|
49
|
-
|
|
50
|
-
- [ ] All tests pass.
|
|
51
|
-
- [ ] Coverage did not decrease.
|
|
52
|
-
- [ ] No test or contract modified by the AI.
|
|
53
|
-
- [ ] No package outside the allow-list added.
|
|
54
|
-
- [ ] Change is small enough to review in full.
|
|
55
|
-
|
|
56
|
-
## Step 6 — Verify
|
|
57
|
-
|
|
58
|
-
- [ ] All tests pass (the evidence).
|
|
59
|
-
- [ ] Concurrency/timing of the risky operation is safe.
|
|
60
|
-
- [ ] No exposed secrets, injection, or unexpected dependencies.
|
|
61
|
-
- [ ] Layering and dependencies follow `CONVENTIONS.md`.
|
|
62
|
-
- [ ] Deep check: wiring trace recorded (every new symbol reachable from production entry point) and no dead code introduced.
|
|
63
|
-
- [ ] Was the green earned? Adversarial refute-read on the unchanged suite (no overfit, no vacuous asserts, no stubbed logic).
|
|
64
|
-
- [ ] Full-suite rerun by orchestrator (not only the agent's scoped run).
|
|
65
|
-
- [ ] A person reviewed and approved, **or** auto-resolved by the run (under `autonomy: auto`, no residue).
|
|
66
|
-
- [ ] Outcome recorded (`PASS` / `RISK-ACCEPTED` / `HARD-STOP`).
|
|
67
|
-
|
|
68
|
-
## The loop
|
|
69
|
-
|
|
70
|
-
- [ ] Released behind a flag or gradual rollout.
|
|
71
|
-
- [ ] Scenarios reused as production monitors.
|
|
72
|
-
- [ ] Learnings written back as a `SPEC.md` delta.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Master shippable checklist
|
|
77
|
-
|
|
78
|
-
A feature is shippable only when all are true:
|
|
79
|
-
|
|
80
|
-
- [ ] Spec complete: behavior stated, rejections named, assumptions ranked lowest-confidence first with the biggest risk flagged.
|
|
81
|
-
- [ ] Wiring and "existing behavior" assumptions carry grep/line citations; wiring claims name the production caller chain.
|
|
82
|
-
- [ ] Every rule has a scenario.
|
|
83
|
-
- [ ] Contract frozen; contract tests green.
|
|
84
|
-
- [ ] A test per scenario; suite was red before the build (no `should_panic` lying reds).
|
|
85
|
-
- [ ] Collateral tests listed by exact name; arithmetic checked against frozen constants.
|
|
86
|
-
- [ ] All tests green; coverage held; tests and contract untouched by the AI.
|
|
87
|
-
- [ ] Wiring trace recorded: every new symbol reachable from production entry point.
|
|
88
|
-
- [ ] Adversarial refute-read confirms the green was earned (no overfit, no vacuous asserts, no stubbed logic).
|
|
89
|
-
- [ ] Full-suite rerun by orchestrator; not just the agent's scoped run.
|
|
90
|
-
- [ ] Concurrency, security, and architecture checked by a person.
|
|
91
|
-
- [ ] Gate outcome recorded with an accountable owner.
|
|
92
|
-
- [ ] Released behind a flag, with monitors in place.
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# Appendix F · Document requirements matrix (Project → Milestone → Task)
|
|
2
|
-
|
|
3
|
-
[← Appendix E Checklists](./appendix-e-checklists.md) · [Contents](./README.md)
|
|
4
|
-
|
|
5
|
-
This appendix maps every AIDD document to a three-level project hierarchy, so that at any level a team can answer three questions: **which documents must exist, who owns them, and what proves the level is complete.** It is the traceability backbone of the method — read it alongside the stage-depth matrix in [10 Setup and stages](./10-setup-and-stages.md), which covers *step* depth; this appendix covers *document* requirements.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## The three levels
|
|
10
|
-
|
|
11
|
-
| Level | What it is | AIDD meaning | Spans |
|
|
12
|
-
|-------|-----------|--------------|-------|
|
|
13
|
-
| **Project** | the whole product or engagement | the living documentation — documents created once and kept for the life of the product | all milestones |
|
|
14
|
-
| **Milestone** | a stage or release | one pass of the flow at a chosen depth: Prototype, POC, MVP, or Production-Ready; groups many tasks | many tasks |
|
|
15
|
-
| **Task** | one feature through the flow | a single pass of Specify → … → Verify → Observe; the smallest unit with its own gate records | the seven steps |
|
|
16
|
-
|
|
17
|
-
A **project** sets up the living documentation once. A **milestone** is a depth-bounded goal that groups tasks and has its own entry and exit document gates. A **task** is one feature, and it produces the per-feature artifacts.
|
|
18
|
-
|
|
19
|
-
## How the hierarchy decomposes
|
|
20
|
-
|
|
21
|
-
```mermaid
|
|
22
|
-
flowchart TD
|
|
23
|
-
P["PROJECT — the product<br/>PROJECT.md (foundation) · CONVENTIONS · GLOSSARY · MODEL_REGISTRY · allowlist · playbook"]
|
|
24
|
-
P --> M1["MILESTONE · Prototype"]
|
|
25
|
-
P --> M2["MILESTONE · POC"]
|
|
26
|
-
P --> M3["MILESTONE · MVP"]
|
|
27
|
-
P --> M4["MILESTONE · Production-Ready"]
|
|
28
|
-
M3 --> T1["TASK · Transfer between accounts<br/>SPEC · feature · contract · tests · code · gate records"]
|
|
29
|
-
M3 --> T2["TASK · View balance"]
|
|
30
|
-
M3 --> T3["TASK · Transaction history"]
|
|
31
|
-
classDef p fill:#F1EFE8,stroke:#5F5E5A,color:#2C2C2A;
|
|
32
|
-
classDef m fill:#FAEEDA,stroke:#BA7517,color:#633806;
|
|
33
|
-
classDef t fill:#E6F1FB,stroke:#185FA5,color:#042C53;
|
|
34
|
-
class P p; class M1,M2,M3,M4 m; class T1,T2,T3 t;
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Matrix 1 — Documents by level (ownership and lifespan)
|
|
40
|
-
|
|
41
|
-
Which document lives at which level, who is accountable for it, and how long it lasts.
|
|
42
|
-
|
|
43
|
-
| Document | Level | Created | Lifespan | Accountable owner |
|
|
44
|
-
|----------|:-----:|---------|----------|-------------------|
|
|
45
|
-
| `PROJECT.md` (foundation: domain · spec · UI/UX) | Project | setup, grows | whole project | Product / Architect |
|
|
46
|
-
| `CONVENTIONS.md` | Project | setup | whole project | Architect / Lead |
|
|
47
|
-
| `GLOSSARY.md` | Project | setup, grows | whole project | Product / Domain |
|
|
48
|
-
| `MODEL_REGISTRY.md` | Project | setup | whole project | Architect / Lead |
|
|
49
|
-
| `dependencies.allowlist` | Project | setup | whole project | Security |
|
|
50
|
-
| `playbook/*.md` (prompts) | Project | setup, versioned | whole project | Eng Lead |
|
|
51
|
-
| Stage plan / roadmap | Milestone | per milestone | the milestone | EM / Delivery |
|
|
52
|
-
| Milestone exit report | Milestone | milestone end | the milestone | EM / Delivery |
|
|
53
|
-
| `SLO.md` (objectives) | Milestone (MVP+) | from MVP | from MVP onward | DevOps / SRE |
|
|
54
|
-
| `SPEC.md` | Task | per feature | living | Product / Domain |
|
|
55
|
-
| `features/*.feature` | Task | per feature | living | QA / Test |
|
|
56
|
-
| `contracts/*.md` | Task → **Project** | per feature, then frozen | living doc (promoted to project) | Architect / Lead |
|
|
57
|
-
| `tests/*` | Task | per feature | living | QA / Engineer |
|
|
58
|
-
| Source code | Task | per feature | **disposable** | Engineer |
|
|
59
|
-
| Gate outcome records | Task | per step | kept for audit | the reviewer |
|
|
60
|
-
|
|
61
|
-
> Note the one promotion: a **contract** is authored at task level but, once frozen, becomes part of the project's living documentation — other tasks depend on it. That promotion is why a contract change is a project-level change request, not a task-local edit.
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Matrix 2 — Documents required by milestone
|
|
66
|
-
|
|
67
|
-
Which documents must exist, and at what depth, to **exit** each milestone. Depth: **Deep** · **Core** · **Light** · **—** (not required).
|
|
68
|
-
|
|
69
|
-
| Document | Prototype | POC | MVP | Production-Ready |
|
|
70
|
-
|----------|:---------:|:---:|:---:|:----------------:|
|
|
71
|
-
| `CONVENTIONS.md` | Light | Core | Required | Required |
|
|
72
|
-
| `GLOSSARY.md` | seed | Core | Required | Required |
|
|
73
|
-
| `MODEL_REGISTRY.md` | Required | Required | Required | Required |
|
|
74
|
-
| `dependencies.allowlist` | optional | Required | Required | Required |
|
|
75
|
-
| `playbook/*.md` | Required | Required | Required | Required |
|
|
76
|
-
| `SPEC.md` | Light | Deep (risky slice) | Required (full) | Required (full) |
|
|
77
|
-
| Design: flows + screen states | **Deep** | Light | Core | Deep |
|
|
78
|
-
| `features/*.feature` | — | Core | Required | Exhaustive |
|
|
79
|
-
| `contracts/*.md` (frozen) | — | Core (risky slice) | Required (frozen) | Required (versioned) |
|
|
80
|
-
| `tests/*` | — | Core | Core | Full coverage |
|
|
81
|
-
| `SLO.md` | — | — | Light | Required |
|
|
82
|
-
| Gate outcome records | — | Core | Required | Required (all `HARD-STOP`) |
|
|
83
|
-
| Operate / observe report | — | — | Light | Required |
|
|
84
|
-
| Milestone exit report | Light | Core | Required | Required |
|
|
85
|
-
|
|
86
|
-
**Reading it:** a Prototype exits on a deep design and little else; a POC adds a deep spec, core scenarios/contract/tests on the risky slice; an MVP requires the full per-feature document set plus light operations; Production requires everything at full depth with operations and audit-grade gate records.
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Matrix 3 — Documents required per task (the seven steps)
|
|
91
|
-
|
|
92
|
-
Every task, regardless of milestone, produces this artifact chain. The depth varies by milestone (Matrix 2); the *sequence and exit gate* do not.
|
|
93
|
-
|
|
94
|
-
| Step | Required document | Exit gate (the proof) | Detail |
|
|
95
|
-
|------|-------------------|------------------------|--------|
|
|
96
|
-
| 1 Specify | `SPEC.md` | rules + named rejections, assumptions ranked lowest-confidence first (biggest risk ⚠-flagged) | [03](./03-step-1-specify.md) |
|
|
97
|
-
| 2 Scenarios | `features/<task>.feature` | one scenario per rule | [04](./04-step-2-scenarios.md) |
|
|
98
|
-
| 3 Contract | `contracts/<task>.md` | frozen + contract tests green | [05](./05-step-3-contract.md) |
|
|
99
|
-
| 4 Tests | `tests/<task>_*` | one test per scenario, red first | [06](./06-step-4-tests.md) |
|
|
100
|
-
| 5 Build | source code + evidence bundle | all tests green, nothing weakened | [07](./07-step-5-build.md) |
|
|
101
|
-
| 6 Verify | gate outcome record | `PASS` / `RISK-ACCEPTED` / `HARD-STOP` (auto-resolved on evidence under `autonomy: auto`; security always escalates) | [08](./08-step-6-verify.md) |
|
|
102
|
-
| 7 Observe | `TASK.md` §7 OBSERVE block | released behind a flag; scenario-monitors live; spec delta + lessons learned captured | [09](./09-the-loop.md) |
|
|
103
|
-
|
|
104
|
-
A task is **done** when the build's documents exist and the Verify record reads `PASS` (or a signed `RISK-ACCEPTED`); the seventh step — **Observe** (§7) — then runs in production and feeds the next loop's Specify. See the master shippable checklist in [Appendix E](./appendix-e-checklists.md).
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## Matrix 4 — Executable proofs (the claims the engine enforces)
|
|
109
|
-
|
|
110
|
-
The rows above are the method's *promises*. A promise a tool quietly breaks is worse than none — so the `add` engine ships a proof-harness: each invariant below is pinned by an automated test that fails loudly if the **Story** (this book) and the **State** (the engine) drift apart. This table is the coverage *so far*, not a completeness claim — but the minimalism-and-coverage audit has now run once over Matrices 1–3 (see **Sweep findings** below); what it could cheaply prove, it added; what it deliberately left unenforced, it recorded.
|
|
111
|
-
|
|
112
|
-
| Claim (where it lives) | The engine enforces | Proof test |
|
|
113
|
-
|------------------------|---------------------|------------|
|
|
114
|
-
| No silent skips (principle 7) · "done only when Verify reads `PASS`" (Matrix 3) | `gate PASS` is **refused** unless the task has reached `verify` | `test_gate_pass_refused_before_verify` |
|
|
115
|
-
| A passed task is genuinely done | `gate PASS` at `verify` advances to `done` | `test_gate_pass_at_verify_reaches_done` |
|
|
116
|
-
| Deliberate ≠ silent | the explicit `phase` command is a logged escape hatch the guardrail does not block | `test_phase_override_escape_hatch` |
|
|
117
|
-
| "A security finding is ALWAYS `HARD-STOP`" | `HARD-STOP` is recordable from any phase and never forces `done` | `test_hardstop_recordable_mid_build` |
|
|
118
|
-
| "done … or a signed `RISK-ACCEPTED`" (Matrix 3) | `gate RISK-ACCEPTED` at `verify` advances to `done` (same guard as `PASS`) | `test_risk_accepted_complete_reaches_done` |
|
|
119
|
-
| A waived task **can complete its milestone** (the point of the waiver) | the completeness predicate counts a signed `RISK-ACCEPTED` as done, so `milestone-done` / `ready` / `check` / `archive` accept it — it does not silently block | `test_milestone_done_accepts_a_waived_task` · `test_check_tolerates_a_recorded_waiver` |
|
|
120
|
-
| A waiver is **signed** (owner · ticket · expiry) | `gate RISK-ACCEPTED` is refused without all three; they are stored in state | `test_risk_accepted_requires_waiver` · `test_risk_accepted_partial_waiver_refused` |
|
|
121
|
-
| A waiver can **expire** — a lapsed one is caught, not trusted forever | `check` **FAILS** a `RISK-ACCEPTED` task whose stored `expires` is before today; fail-closed on a missing/unparseable date (`waiver_expired`) | `test_check_flags_expired_waiver` · `test_check_passes_unexpired_waiver` · `test_check_failclosed_on_unparseable_expires` |
|
|
122
|
-
| **The Story is never auto-loaded** (principle 9, the *Minimal* pillar) | **no** command reads a `docs/` chapter at runtime — and the spy runs *every* subcommand the parser exposes, so "no command" is universal, not a subset; a project with **no** `docs/` runs the whole lifecycle | `test_full_lifecycle_runs_with_no_story` · `test_no_command_reads_a_docs_chapter` · `test_every_subcommand_is_covered` |
|
|
123
|
-
| The book's gate outcomes are the engine's | `PASS` · `RISK-ACCEPTED` · `HARD-STOP` exist in both prose and `GATES` | `test_book_gate_outcomes_match_engine` |
|
|
124
|
-
|
|
125
|
-
The tests are the source of truth; this table is their index. If a row here is ever unproven, that is a gap in the method, not a detail — the proof-harness exists to make such gaps fail loudly. (Tests: `add-method/tooling/test_proof_harness.py`, `test_waiver.py`.)
|
|
126
|
-
|
|
127
|
-
**Now closed:** an earlier version of this table flagged a `RISK-ACCEPTED` gap — the engine advanced only `PASS` to `done`, so a waived task could not complete its milestone, and the waiver fields were uncaptured. The `RISK-ACCEPTED` rows above close it: a signed waiver (owner · ticket · expiry) now completes a verify-phase task and is stored in state for a later `check` to expire. Closing it took *two* edits, not one — advancing the gate to `done` was necessary but not sufficient, because the shared completeness predicate (`milestone-done` / `ready` / `check` / `archive` all read it) still counted only `PASS`; a waived task reached `done` yet silently blocked its milestone until that predicate was taught to count a signed `RISK-ACCEPTED` too. The end-to-end row above is what catches that class of half-fix — proving the *task* completes is not proving the *milestone* can. The pattern that found it — book-claim → engine-enforces → named test — is the standing way to audit the remaining rows.
|
|
128
|
-
|
|
129
|
-
**Sweep findings (minimalism-and-coverage audit, v2):** the audit walked Matrices 1–3 for claims the engine *could* enforce but did not yet prove.
|
|
130
|
-
|
|
131
|
-
- **Proved and added** (rows above): the *Minimal* pillar's headline — "the Story is never auto-loaded" (principle 9) — was written but unproven; it is now pinned behaviorally (the engine runs the whole lifecycle with no `docs/` present, and a read-spy over *every* subcommand confirms none reads a chapter at runtime). And waiver **expiry**, which Matrix 4 already promised the state captured "for a later `check` to expire," is now enforced.
|
|
132
|
-
- **Recorded, deliberately *not* enforced:** Matrix 3 says a task is done only when "all six documents exist." The engine checks that `TASK.md` *exists* and that its phase marker matches state — it does **not** parse the file to confirm each of the seven sections is filled. Teaching it to grade section completeness would push the engine toward reading and judging the Story it is supposed to keep off the runtime path — an anti-minimal move. The reviewer owns section completeness at the Verify gate (the human-led half of the method); the engine owns the cheap structural invariants. This is a chosen boundary, not an oversight.
|
|
133
|
-
- **Lean check:** the audit confirmed `state.json` carries no redundant per-task fields — `title`, `phase`, `gate`, `milestone`, `depends_on`, the two timestamps, and a `waiver` only once one is signed; nothing to trim. A clean bill is a finding too.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Worked example — the hierarchy filled in
|
|
138
|
-
|
|
139
|
-
- **Project:** *Mobile Banking App.* Living documentation: `CONVENTIONS.md`, `GLOSSARY.md` (defines *account*, *balance*, *transfer*), `MODEL_REGISTRY.md`, `dependencies.allowlist`, `playbook/`.
|
|
140
|
-
- **Milestone:** *MVP — core money movement.* Exit requires the full per-feature document set for each task below, plus a light `SLO.md` and a milestone exit report.
|
|
141
|
-
- **Task:** *Transfer between own accounts* → `SPEC.md`, `features/transfer.feature`, `contracts/transfer.md` (frozen at v1), `tests/transfer_test.py`, code, and a `PASS` gate record. (The full set is in [Appendix D](./appendix-d-worked-example.md).)
|
|
142
|
-
- **Task:** *View balance* → its own SPEC, feature, contract, tests, code, record.
|
|
143
|
-
- **Task:** *Transaction history* → its own set.
|
|
144
|
-
|
|
145
|
-
When all three tasks read `PASS` and the milestone documents exist, the MVP milestone exits — and the frozen `transfer` contract is now a project-level living-documentation artifact the next milestone builds on.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Traceability chain
|
|
150
|
-
|
|
151
|
-
The hierarchy gives a clean line of evidence from a business goal down to a passing test — which is what makes an AIDD project auditable:
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
PROJECT goal "let customers move their own money safely"
|
|
155
|
-
└─ MILESTONE (MVP) "core money movement"
|
|
156
|
-
└─ TASK "transfer between own accounts"
|
|
157
|
-
└─ SPEC rule "source must have enough balance"
|
|
158
|
-
└─ SCENARIO "insufficient funds -> rejected, no change"
|
|
159
|
-
└─ TEST test_insufficient_funds (was red, now green)
|
|
160
|
-
└─ VERIFY record PASS (atomicity checked)
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Every level points down to the evidence beneath it and up to the goal above it. To audit any claim — "we handle insufficient funds correctly" — you follow the chain to a specific test and a specific gate record. Nothing rests on assertion.
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
*This matrix is the requirements view of the method. The flow ([Part II](./02-the-flow.md)) tells you the order; the stages ([10](./10-setup-and-stages.md)) tell you the depth; this appendix tells you, at each level of the project, exactly which documents must exist and who owns them.*
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
*End of book. AIDD is one repeatable loop — Specify → Scenarios → Contract → Tests → Build → Verify → observe, then repeat. People own direction and verification; the AI owns the build; the artifacts are the asset and the code is disposable.*
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# Appendix G — References & Lineage
|
|
2
|
-
|
|
3
|
-
ADD did not appear from nowhere. It sits at the meeting point of three currents:
|
|
4
|
-
the **recursive self-improvement** thesis (AI that helps build the next AI), the
|
|
5
|
-
**spec-driven development** movement (the specification, not the code, is the
|
|
6
|
-
source of truth), and a decade of **agentic + tests-first** research showing that
|
|
7
|
-
a generate→check→refine loop, constrained by executable tests, turns fluent model
|
|
8
|
-
output into trustworthy software. This appendix is the curated, verified grounding
|
|
9
|
-
for that lineage — every source below is reachable and annotated with a `↔ ADD:`
|
|
10
|
-
line saying exactly how it relates to the method.
|
|
11
|
-
|
|
12
|
-
**The frame — "closing the loop."** Anthropic's recursive-self-improvement picture
|
|
13
|
-
runs from autonomous agents delegating to workers *today* toward a future where
|
|
14
|
-
Claude improves Claude. ADD is a deliberately **human-gated, evidence-trusted**
|
|
15
|
-
instance of that loop: the AI drives spec→build→verify→observe, but a human owns the
|
|
16
|
-
frozen contract and the verify gate, and trust comes from passing tests and
|
|
17
|
-
re-resolved evidence — never from a plausible-looking diff. The sources here are
|
|
18
|
-
the shoulders that posture stands on.
|
|
19
|
-
|
|
20
|
-
The four sections below are the four currents. The comparison table places ADD next
|
|
21
|
-
to its two closest peers — GitHub's **spec-kit** and **GSD (Get Shit Done)** — and
|
|
22
|
-
names where ADD diverges. Read "How to cite" first; the rest of the book cites into
|
|
23
|
-
the keys defined here.
|
|
24
|
-
|
|
25
|
-
## How to cite
|
|
26
|
-
|
|
27
|
-
The book uses one inline citation form — **author-year** — and every entry's lead
|
|
28
|
-
`(Author Year)` *is* its cite-key. Resolve any inline `[…]` to the matching entry below.
|
|
29
|
-
|
|
30
|
-
| Authors | Inline form | Example |
|
|
31
|
-
|---|---|---|
|
|
32
|
-
| one author | `[Surname Year]` | `[Schmidhuber 2003]` |
|
|
33
|
-
| two authors | `[Surname & Surname Year]` | `[Mathews & Nagappan 2024]` |
|
|
34
|
-
| three or more | `[Surname et al. Year]` | `[Zelikman et al. 2023]` |
|
|
35
|
-
| an organisation | `[Org Year]` | `[Anthropic 2026a]` · `[GitHub 2025]` |
|
|
36
|
-
| several at once | joined by `; ` | `[Schmidhuber 2003; Zelikman et al. 2023]` |
|
|
37
|
-
| same author, same year | add a `Year`-letter suffix | `[Anthropic 2025a]` / `[Anthropic 2025b]` |
|
|
38
|
-
|
|
39
|
-
The 3+-author rule becomes **et al.**; an organisation stands in as the author
|
|
40
|
-
when no individual is credited; and when two org-authored sources collide on a year
|
|
41
|
-
(several Anthropic 2025/2026 items do, below) a trailing letter disambiguates them.
|
|
42
|
-
There is exactly one entry per cite-key.
|
|
43
|
-
|
|
44
|
-
## spec-kit ↔ ADD (and GSD)
|
|
45
|
-
|
|
46
|
-
ADD shares the spec-first DNA of GitHub's **spec-kit** and the Claude-Code,
|
|
47
|
-
context-rot-fighting niche of **GSD**. The phase models line up closely:
|
|
48
|
-
|
|
49
|
-
| ADD phase | spec-kit command | GSD phase |
|
|
50
|
-
|---|---|---|
|
|
51
|
-
| foundation · principles | `/speckit.constitution` → `constitution.md` | (project setup / `CLAUDE.md`-level) |
|
|
52
|
-
| §1 specify (what / why) | `/speckit.specify` → `spec.md` | **discuss** — capture decisions before planning |
|
|
53
|
-
| §3 contract (how, frozen) | `/speckit.plan` → `plan.md`, `contracts/` | **plan** — research, decompose, fit fresh context |
|
|
54
|
-
| milestone tasks / waves | `/speckit.tasks` → `tasks.md` | (phases → parallel waves) |
|
|
55
|
-
| §5 build | `/speckit.implement` | **execute** — parallel waves, fresh 200k-token context each |
|
|
56
|
-
| §6 verify | `/speckit.analyze` + `/speckit.checklist` | **verify** — walk what was built, fix before declaring done |
|
|
57
|
-
|
|
58
|
-
**Where ADD diverges.** spec-kit stops at `implement`; GSD ends at verify (GSD Core
|
|
59
|
-
adds a fifth *ship* phase). ADD closes the loop past both by adding three things
|
|
60
|
-
neither has as a first-class gate: a **failing-tests-first** gate (§4 — no build
|
|
61
|
-
starts until the tests are red for the right reason), an **observe→`fold`**
|
|
62
|
-
self-improvement step (§7 — confirmed learnings consolidate into a versioned foundation),
|
|
63
|
-
and an engine-tracked **dynamic goal-loop** that will hold a milestone open and
|
|
64
|
-
reopen tasks until its exit criteria are met. ADD also deliberately targets **less
|
|
65
|
-
doc-time than GSD** — a lean foundation and one human approval per task, rather than
|
|
66
|
-
a document per phase. The shared lineage is real; the tests-first gate, the `fold`,
|
|
67
|
-
and the goal-loop are ADD's contribution.
|
|
68
|
-
|
|
69
|
-
## 1. Recursive self-improvement
|
|
70
|
-
|
|
71
|
-
- **When AI builds itself** (Favaro & Clark 2026) — https://www.anthropic.com/institute/recursive-self-improvement — essay. The RSI thesis: by 2026 >80% of code merged at Anthropic was Claude-authored and the 50%-task time-horizon keeps doubling; recursive self-improvement would shift humans from builders to validators. ↔ ADD: the seed source — ADD is the human-gated, evidence-trusted way to run a spec→build→verify→observe loop while the human stays the validator.
|
|
72
|
-
- **Automated Alignment Researchers** (Anthropic 2026a) — https://www.anthropic.com/research/automated-alignment-researchers — research. Nine parallel Claude agents recovered ~97% of the human-expert gap on an alignment task in 5 days versus 7 for the human team. ↔ ADD: the strongest evidence the recursive loop is not speculative — parallel agents under review are exactly ADD's wave-plus-verify shape.
|
|
73
|
-
- **Machines of Loving Grace** (Amodei 2024) — https://www.darioamodei.com/essay/machines-of-loving-grace — essay. A "country of geniuses in a datacenter," argued with a measured, bounded position on recursive self-improvement. ↔ ADD: the intent framing behind milestoning — bound the loop with human direction rather than let it run open.
|
|
74
|
-
- **Gödel Machines: Self-Referential Universal Problem Solvers** (Schmidhuber 2003) — https://arxiv.org/abs/cs/0309048 — paper. A provably-optimal self-modifying agent that rewrites itself only when it can prove the rewrite helps. ↔ ADD: the mathematical anchor of the lineage — and a precedent for "only change on proof," which ADD enforces socially via the never-weaken-a-test rule.
|
|
75
|
-
- **STOP: Self-Taught Optimizer** (Zelikman et al. 2023) — https://arxiv.org/abs/2310.02304 — paper. A scaffolding program recursively improves the code that improves code. ↔ ADD: the algorithmic kin of the `fold` step — consolidate confirmed learnings back into the method that produced them.
|
|
76
|
-
- **Self-Refine: Iterative Refinement with Self-Feedback** (Madaan et al. 2023) — https://arxiv.org/abs/2303.17651 — paper. Generate→critique→refine with the same model lifts quality ~20% with no extra training. ↔ ADD: the micro-loop inside build→verify — produce, check against the contract, refine.
|
|
77
|
-
- **Self-Rewarding Language Models** (Yuan et al. 2024) — https://arxiv.org/abs/2401.10020 — paper. A model acts as its own reward judge to improve across iterations. ↔ ADD: the risk ADD answers — a self-judging loop needs an external gate; ADD makes tests and a human the reward signal, not the model's own opinion.
|
|
78
|
-
- **Reflexion: Language Agents with Verbal Reinforcement Learning** (Shinn et al. 2023) — https://arxiv.org/abs/2303.11366 — paper. Agents keep verbal reflections in episodic memory and retry, reaching 91% on HumanEval. ↔ ADD: the principle behind "reopen the task if criteria are unmet" — a failed check becomes feedback for the next attempt, not a dead end.
|
|
79
|
-
- **Voyager: An Open-Ended Embodied Agent with LLMs** (Wang et al. 2023) — https://arxiv.org/abs/2305.16291 — paper. An auto-curriculum agent that grows a reusable skill library over time. ↔ ADD: the growing foundation — each milestone's consolidated deltas are ADD's accumulating skill library.
|
|
80
|
-
- **AlphaEvolve: A Coding Agent for Scientific and Algorithmic Discovery** (Novikov et al. 2025) — https://arxiv.org/abs/2506.13131 — paper. An evolutionary coding agent that beat a long-standing matrix-multiplication record and shipped a production scheduler improvement. ↔ ADD: the end-state evidence — a generate-and-verify loop can exceed human baselines when every candidate is checked.
|
|
81
|
-
|
|
82
|
-
## 2. Autonomous & agentic workflows
|
|
83
|
-
|
|
84
|
-
- **Building Effective Agents** (Schluntz & Zhang 2024) — https://www.anthropic.com/research/building-effective-agents — blog. The canonical taxonomy: prompt-chaining, routing, orchestrator-workers, and the evaluator-optimizer loop. ↔ ADD: the architecture cite — evaluator-optimizer is build→verify→refine; orchestrator-workers is ADD's wave parallelism.
|
|
85
|
-
- **Enabling Claude Code to work more autonomously** (Anthropic 2025a) — https://www.anthropic.com/news/enabling-claude-code-to-work-more-autonomously — news. Checkpoints, subagents, hooks, background tasks, and `/rewind` rollback. ↔ ADD: checkpoint/rewind is the rollback strategy behind phase gates; hooks are where the engine enforces them.
|
|
86
|
-
- **How we built our multi-agent research system** (Anthropic 2025b) — https://www.anthropic.com/engineering/multi-agent-research-system — blog. An Opus lead orchestrating Sonnet subagents, with an LLM acting as judge, lifting task performance ~90%. ↔ ADD: the lead-plus-subagents-plus-judge pattern is exactly ADD's wave execution under a verify gate.
|
|
87
|
-
- **ReAct: Synergizing Reasoning and Acting in Language Models** (Yao et al. 2022) — https://arxiv.org/abs/2210.03629 — paper. Interleaving think→act→observe turns a model into an agent. ↔ ADD: the base loop every ADD phase runs on.
|
|
88
|
-
- **Toolformer: Language Models Can Teach Themselves to Use Tools** (Schick et al. 2023) — https://arxiv.org/abs/2302.04761 — paper. Self-supervised learning of when and how to call external tools. ↔ ADD: the capability that lets an agent run its own tests, linters, and builds — the evidence ADD trusts.
|
|
89
|
-
- **SWE-agent: Agent–Computer Interfaces Enable Automated Software Engineering** (Yang et al. 2024) — https://arxiv.org/abs/2405.15793 — paper. A designed agent–computer interface materially improves autonomous issue resolution. ↔ ADD: the structured agent↔environment contract — ADD's `add.py` engine is that interface for the method.
|
|
90
|
-
- **The AI Scientist: Towards Fully Automated Open-Ended Scientific Discovery** (Lu et al. 2024) — https://arxiv.org/abs/2408.06292 — paper. A full idea→experiment→write→review research loop at ~$15 per paper. ↔ ADD: the research analog of ADD's loop — and a reminder that an automated reviewer is the weak link a human gate protects.
|
|
91
|
-
|
|
92
|
-
## 3. Spec-driven development & spec-kit
|
|
93
|
-
|
|
94
|
-
- **GitHub Spec Kit** (GitHub 2025) — https://github.com/github/spec-kit — repo. The reference SDD toolkit: the phase model is `constitution` → `specify` → `plan` → `tasks` → `implement`, with the spec as the executable source of truth. ↔ ADD: the closest spec-first sibling — ADD's specify and contract phases map onto specify and plan; see the comparison table for the divergence.
|
|
95
|
-
- **Spec-driven development with AI: get started with a new open-source toolkit** (Delimarsky 2025) — https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/ — blog. The spec-kit launch post; frames `tasks` as "TDD for your AI agent." ↔ ADD: independent articulation of why decomposing a spec into checkable units beats one big prompt.
|
|
96
|
-
- **Spec-driven development: using Markdown as a programming language when building with AI** (Vesely 2025) — https://github.blog/ai-and-ml/generative-ai/spec-driven-development-using-markdown-as-a-programming-language-when-building-with-ai/ — blog. Spec-as-source, with context-rot named as the failure SDD exists to solve. ↔ ADD: the rationale for the frozen contract — a stable written spec is what survives when the model's context degrades.
|
|
97
|
-
- **Get Shit Done (GSD)** (GSD 2025) — https://github.com/open-gsd/gsd-core — repo. A meta-prompting, context-engineering, spec-driven system for Claude Code; its `discuss` → `plan` → `execute` → `verify` cycle runs each phase in a fresh subagent context to fight context-rot (originally `gsd-build/get-shit-done`, now continued as GSD Core). ↔ ADD: ADD's closest peer — same Claude-Code, context-rot niche; ADD diverges with the tests-first gate, the observe→`fold` step, and the dynamic goal-loop, and aims for less doc-time than GSD.
|
|
98
|
-
- **Beyond Vibe Coding: Amazon Introduces Kiro, the Spec-Driven Agentic IDE** (InfoQ 2025) — https://www.infoq.com/news/2025/08/aws-kiro-spec-driven-agent/ — blog. Kiro structures work as requirements→design→tasks with execution hooks. ↔ ADD: cross-vendor confirmation that spec-first is converging across the industry, not a single-tool idea.
|
|
99
|
-
- **Spec-Driven Development: From Code to Contract in the Age of AI Coding Assistants** (Piskala 2026) — https://arxiv.org/abs/2602.00180 — paper. A taxonomy of SDD rigor — Spec-First, Spec-Anchored, Spec-as-Source — reporting human-refined specs can cut LLM code errors substantially, with BDD as SDD's ancestor. ↔ ADD: places ADD as "Spec-Anchored" and gives the academic vocabulary for the contract-freeze decision.
|
|
100
|
-
|
|
101
|
-
## 4. Tests-first & verification
|
|
102
|
-
|
|
103
|
-
- **Test-Driven Development for Code Generation** (Mathews & Nagappan 2024) — https://arxiv.org/abs/2402.13521 — paper. Supplying tests alongside the prompt measurably lifts pass rates on MBPP and HumanEval. ↔ ADD: the empirical backbone of the failing-tests-first gate — tests as the constraint that makes generation verifiable.
|
|
104
|
-
- **SWE-bench: Can Language Models Resolve Real-World GitHub Issues?** (Jimenez et al. 2023) — https://arxiv.org/abs/2310.06770 — paper. 2,294 real issues judged by whether the project's own tests pass; <2% solved at release. ↔ ADD: the yardstick that proves the point — "done" means the tests pass, which is exactly how ADD gates a feature.
|
|
105
|
-
- **Our framework for developing safe and trustworthy agents** (Anthropic 2025c) — https://www.anthropic.com/news/our-framework-for-developing-safe-and-trustworthy-agents — news. Five principles: human control, transparency, alignment, privacy, and security. ↔ ADD: the frozen-contract gate and never-weaken-a-test rule are human control and transparency made concrete; the security HARD-STOP is the security principle.
|
|
106
|
-
- **Responsible Scaling Policy v3.0** (Anthropic 2026b) — https://www.anthropic.com/news/responsible-scaling-policy-v3 — policy. The AI Safety Level framework; ASL-3 governs autonomous R&D capability. ↔ ADD: the governance ceiling that makes ADD's discipline necessary — as the loop gets more capable, the gates and the human-owned verify matter more, not less.
|