@pilotspace/add 1.0.0 → 1.2.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/GETTING-STARTED.md +172 -84
  3. package/README.md +14 -8
  4. package/bin/cli.js +39 -38
  5. package/docs/01-principles.md +3 -3
  6. package/docs/02-the-flow.md +20 -13
  7. package/docs/03-step-1-specify.md +13 -13
  8. package/docs/04-step-2-scenarios.md +3 -1
  9. package/docs/05-step-3-contract.md +4 -2
  10. package/docs/06-step-4-tests.md +3 -1
  11. package/docs/07-step-5-build.md +1 -1
  12. package/docs/08-step-6-verify.md +22 -4
  13. package/docs/09-the-loop.md +25 -1
  14. package/docs/10-setup-and-stages.md +52 -9
  15. package/docs/11-governance.md +2 -2
  16. package/docs/12-roles.md +3 -3
  17. package/docs/13-adoption.md +3 -3
  18. package/docs/14-foundation.md +19 -11
  19. package/docs/15-foundations-and-lineage.md +106 -0
  20. package/docs/README.md +4 -0
  21. package/docs/appendix-a-templates.md +3 -3
  22. package/docs/appendix-b-prompts.md +40 -5
  23. package/docs/appendix-c-glossary.md +42 -12
  24. package/docs/appendix-d-worked-example.md +2 -2
  25. package/docs/appendix-e-checklists.md +2 -2
  26. package/docs/appendix-f-requirements-matrix.md +12 -11
  27. package/docs/appendix-g-references.md +106 -0
  28. package/package.json +5 -3
  29. package/skill/add/SKILL.md +50 -21
  30. package/skill/add/adopt.md +67 -0
  31. package/skill/add/deltas.md +20 -8
  32. package/skill/add/fold.md +19 -17
  33. package/skill/add/graduate.md +74 -0
  34. package/skill/add/intake.md +22 -7
  35. package/skill/add/loop.md +59 -0
  36. package/skill/add/phases/0-setup.md +92 -24
  37. package/skill/add/phases/1-specify.md +23 -13
  38. package/skill/add/phases/2-scenarios.md +14 -4
  39. package/skill/add/phases/3-contract.md +38 -9
  40. package/skill/add/phases/4-tests.md +29 -5
  41. package/skill/add/phases/5-build.md +14 -4
  42. package/skill/add/phases/6-verify.md +38 -4
  43. package/skill/add/phases/7-observe.md +13 -5
  44. package/skill/add/report-template.md +106 -0
  45. package/skill/add/run.md +53 -34
  46. package/skill/add/scope.md +24 -2
  47. package/skill/add/setup-review.md +65 -0
  48. package/skill/add/streams.md +256 -0
  49. package/tooling/add.py +1388 -62
  50. package/tooling/templates/CONVENTIONS.md.tmpl +1 -1
  51. package/tooling/templates/GLOSSARY.md.tmpl +23 -0
  52. package/tooling/templates/MILESTONE.md.tmpl +1 -0
  53. package/tooling/templates/PROJECT.md.tmpl +4 -3
  54. package/tooling/templates/TASK.md.tmpl +39 -11
package/CHANGELOG.md ADDED
@@ -0,0 +1,88 @@
1
+ # Changelog
2
+
3
+ All notable changes to the ADD method (`@pilotspace/add` on npm,
4
+ `pilotspace-add` on PyPI) are documented here. The format follows
5
+ [Keep a Changelog](https://keepachangelog.com/); versions follow semver.
6
+
7
+ ## [1.2.0] — 2026-06-10
8
+
9
+ The decision-arc release: the method now narrates the build as one continuous
10
+ arc of decisions, and the loop reaches past a single milestone — graduating a
11
+ prototype to production, gating milestones on their own goal, and running tasks
12
+ in parallel waves. All additive; no breaking changes (SemVer MINOR).
13
+
14
+ ### Added
15
+ - **The decision arc** — every human-gate report opens by naming where you are
16
+ on the arc (intent → cases → contract → tests → build → verify → observe), and
17
+ the book + GLOSSARY describe it as the spine of the method. The one human
18
+ approval is always placed on the arc, never floating.
19
+ - **Graduation to production** — `add.py graduate` plus a graduate-guide and a
20
+ `→production` stage guard turn the mvp→production transition into an
21
+ analytics-driven, criteria-gated step instead of a label flip: a
22
+ graduation-report surfaces the evidence and a stage-goal-criteria cue tells you
23
+ when the prototype has earned the next stage.
24
+ - **Goal-gated milestones & the dynamic task loop** — an explicit project GOAL
25
+ now rides on `status`/`guide`, a milestone completes only when every success
26
+ criterion is met, and a recorded `done → phase` reopen-transition lets a closed
27
+ task legitimately re-open without losing its history.
28
+ - **verify-deepen** — the verify phase gained a deep-check rubric
29
+ (wiring · dead-code · semantic) so verification probes intent, not just a green
30
+ suite.
31
+ - **Parallel waves** — `WAVE.md`, the wave ledger that is the resume point for
32
+ parallel task execution; `status` surfaces a live wave so a multi-task wave can
33
+ pause and resume cleanly.
34
+ - **The flag-first freeze guard** — declaring a contract freeze is now
35
+ fail-closed: an `unflagged_freeze` is refused at `advance` time and flagged by
36
+ `add.py audit`, so a freeze can never be recorded without its explicit marker.
37
+ - **Foundations & Lineage chapter** — the book gained an annotated Foundations
38
+ chapter with author-year citations and a references appendix, tracing the
39
+ method's lineage.
40
+
41
+ ### Changed
42
+ - Engine prose now speaks one ubiquitous language — `add.py` output uses
43
+ consistent domain terms (scope level, decision point, retrospective, …).
44
+ - `add.py compact` keeps the active state lean by compacting heavy archive
45
+ history, with the bundled engine frozen in lockstep.
46
+
47
+ ## [1.1.0] — 2026-06-05
48
+
49
+ Production-ready enforcement: the gates are now verified by machinery distinct
50
+ from the agent, and any AI agent can follow the method through the CLI alone.
51
+
52
+ ### Added
53
+ - **`add.py audit [--json]`** — judgment-free, read-only verification that
54
+ human seams left well-formed records: a named human at every contract freeze,
55
+ exactly one gate outcome per done task, a human reviewer wherever the
56
+ security line carries a `NOTE`/`⚠` marker, no waivers on security. Exit 0
57
+ clean / exit 1 with `{task, code, detail}` findings.
58
+ - **Seam audit in CI** — a `seam-audit` job (this repo) plus a copy-paste
59
+ workflow for consumer projects (GETTING-STARTED "Enforce the seams in CI"):
60
+ a malformed seam record fails CI on a machine the agent does not control
61
+ (*never self-gate*, enforced).
62
+ - **The mechanized high-risk guard** — declare `risk: high` in a TASK.md
63
+ header and the engine refuses to complete the task (`PASS`/`RISK-ACCEPTED`)
64
+ until the dial is lowered to `autonomy: conservative`; error and audit
65
+ finding `unguarded_high_risk_auto`. Judging *what* is high-risk stays human;
66
+ the declared combination is enforced. `HARD-STOP` is never blocked.
67
+ - **Agent portability** — `add.py guide` now names the exact phase-guide file
68
+ to read (`guide : .claude/skills/add/phases/<n>-<phase>.md`, never a dead
69
+ pointer; additive `"guide"` key in `--json`), and the AGENTS.md/CLAUDE.md
70
+ block routes any agent — Claude, Cursor, Copilot, Codex — through the CLI
71
+ alone.
72
+ - **The freeze review checklist** — six ⚠-first lines inside the contract
73
+ phase guide that aim the human's one approval (intent · cases · shape ·
74
+ risk declaration · tests), never a second gate.
75
+
76
+ ### Changed
77
+ - GitHub Actions bumped off the deprecated Node-20 runtimes
78
+ (checkout v5, setup-python v6, setup-node v5).
79
+ - GETTING-STARTED: CI enforcement section + `guide :` orientation.
80
+
81
+ ## [1.0.0] — 2026-06-04
82
+
83
+ First public release: the seven-phase flow (specify → scenarios → contract →
84
+ tests → build → verify → observe) driven by one `TASK.md` per task, the
85
+ `add.py` state tracker (init · status · guide · report · check · gates ·
86
+ milestones · competency deltas · fold), the `add` skill for Claude Code, and
87
+ the full method book (`.add/docs/`). Installable via
88
+ `npx @pilotspace/add init` or `pip install pilotspace-add`.
@@ -8,114 +8,228 @@ You'll learn the whole loop by doing it once:
8
8
 
9
9
  > **Specify → Scenarios → Contract → Tests → Build → Verify → Observe**
10
10
 
11
- ADD is **AI-first**: you talk to the agent and it drives the method you don't
12
- hand-type the commands. The commands below are the agent's hands (and your escape
13
- hatch); the rest of this guide shows both so you can see what the agent does.
11
+ ADD is **AI-first**: you talk to the agent and it drives the method. Reading this
12
+ guide top to bottom, you will type exactly **one shell command the install**.
13
+ After that, everything happens in conversation (`/add` is how you start it, not
14
+ a terminal command): the agent's hands are the CLI, and the same CLI is your
15
+ escape hatch whenever you want to take the wheel (it's all in the appendix at
16
+ the end).
14
17
 
15
18
  ---
16
19
 
17
- ## The fast path — talk to the agent
20
+ ## 0 · Prerequisites
21
+
22
+ - **Python 3.10+** — required; the tool itself is stdlib-only (no pip dependencies).
23
+ - **One installer**, whichever you already have: **Node.js ≥ 18** (for `npx`) *or*
24
+ **pip** (Python). Both install the exact same `.add/` runtime.
25
+ - A project folder. It can be empty or an existing repo.
26
+
27
+ > **Windows:** use `py` wherever this guide writes `python3` (the Python launcher on
28
+ > Windows) — e.g. `py .add\tooling\add.py status`. Both installers handle the install
29
+ > step for you; only the by-hand `add.py` commands in the appendix differ.
30
+
31
+ ---
18
32
 
19
- After installing (step 1 below), the whole on-ramp is one move:
33
+ ## 1 · Install the one command you type
34
+
35
+ From your project root, pick **one** path — both produce the same install:
36
+
37
+ **Option A — npm (Node.js ≥ 18):**
38
+
39
+ ```bash
40
+ npx @pilotspace/add init
41
+ ```
42
+
43
+ **Option B — pip (Python 3.10+):**
44
+
45
+ ```bash
46
+ pip install pilotspace-add
47
+ pilotspace-add init
48
+ ```
49
+
50
+ No flags needed — the agent infers your project's name from the folder and starts
51
+ at the `prototype` stage. (Prefer to choose up front? Both installers take
52
+ `--name "My App" --stage prototype|poc|mvp|production`; the stage can also be
53
+ changed later — see the appendix.)
54
+
55
+ Either one creates `.add/` (your runtime), drops the `add` skill into
56
+ `.claude/skills/add/`, and bundles the book into `.add/docs/`. It deliberately
57
+ does **not** initialise the project — that's the agent's first move, so nothing
58
+ gets decided without you in the loop.
59
+
60
+ **When the install finishes: open Claude Code and type `/add`.** That's the
61
+ handoff — from here on it's conversation, not terminal commands.
62
+
63
+ > Why stages exist: the steps never change, only how *deeply* you run them.
64
+ > See `.add/docs/10-setup-and-stages.md`.
65
+
66
+ ---
67
+
68
+ ## 2 · Your first feature — talk to the agent
69
+
70
+ In Claude Code, the whole onboarding is one move:
20
71
 
21
72
  ```
22
73
  in Claude Code: /add
23
74
  you: "I want to let users transfer money between their own accounts."
24
75
  ```
25
76
 
26
- From there the agent runs the **on-ramp** for you:
77
+ From there the agent runs the **onboarding** for you:
27
78
 
28
- 1. **Orient** — it reads `add.py status` (the resume point), never re-reading your repo.
79
+ 1. **Orient** — it reads the project state (the resume point), never re-reading
80
+ your repo. On a fresh install it initialises the project itself and drafts
81
+ the foundation for your sign-off (the **baseline approval** — the one signature the
82
+ installer's closing message points at).
29
83
  2. **Intake** — it sizes your request into versioned scope and proposes a **milestone**
30
84
  (goal · scope · breadth-first tasks · exit criteria). *You confirm the shape.*
31
- 3. **One-approval front** — for each task it drafts Spec + Scenarios + Contract + Tests
32
- as one bundle. *You give one approval at the frozen contract.*
85
+ 3. **Specification bundle** — for each task it drafts Spec + Scenarios + Contract + Tests
86
+ as one bundle, led by its lowest-confidence points. *You give one approval at the
87
+ frozen contract.*
33
88
  4. **Self-driving run** — build→verify runs to green; a security finding always stops
34
89
  back to you.
35
90
 
36
91
  So a milestone-sized feature is: **describe it → confirm the milestone → approve each
37
- contract → review the result.** Everything between is the agent.
92
+ contract → review the result.** Everything between is the agent. For the
93
+ transfer-money feature above, that's four short conversations — and zero typed
94
+ commands.
38
95
 
39
- > New term: **On-ramp** — the install→first-milestone path. See `docs/appendix-c-glossary.md`.
96
+ > New term: **Onboarding** — the install→first-milestone path. See `.add/docs/appendix-c-glossary.md`.
40
97
 
41
98
  ---
42
99
 
43
- ## 0 · Prerequisites
44
-
45
- - **Node.js ≥ 16** (to install) and **Python 3.12+** (the tool is stdlib-only).
46
- - A project folder. It can be empty or an existing repo.
100
+ ## 3 · What just happened (and your override)
47
101
 
48
- ---
102
+ Behind the conversation, the agent drove the CLI: it read the resume point, sized
103
+ the milestone, froze the contract you approved, ran the tests red, built to green,
104
+ and recorded the gate. The state lives on disk, not in the chat window.
49
105
 
50
- ## 1 · Install
51
-
52
- From your project root:
106
+ If you ever want to see that state yourself — or take over entirely — the same
107
+ CLI is yours:
53
108
 
54
109
  ```bash
55
- npx @pilotspace/add init --name "My App" --stage prototype
110
+ python3 .add/tooling/add.py status
56
111
  ```
57
112
 
58
- This creates `.add/` (your runtime), drops the `add` skill into
59
- `.claude/skills/add/`, and bundles the book into `.add/docs/`. Pick the stage that
60
- matches your intent `prototype`, `poc`, `mvp`, or `production`. You can change it
61
- later with `python3 .add/tooling/add.py stage mvp`.
113
+ `add.py status` is the resume point: project stage, active task, current phase.
114
+ And `add.py guide` tells you what the current phase needs its `guide :` line
115
+ names the exact phase-guide file to read (`.claude/skills/add/phases/…` plain
116
+ markdown), which is how **any** agent — Claude, Cursor, Copilot, Codex — follows
117
+ ADD through the CLI alone.
62
118
 
63
- > Why stages exist: the steps never change, only how *deeply* you run them.
64
- > See `.add/docs/10-setup-and-stages.md`.
119
+ > Tip: shorten typing with an alias `alias add="python3 .add/tooling/add.py"`
120
+ > then you can run `add status`, `add guide`, etc. These are override and resume
121
+ > surfaces, not steps you owe the method: the appendix walks the full by-hand path
122
+ > whenever you want the wheel.
65
123
 
66
124
  ---
67
125
 
68
- ## 2 · Orient — the command you'll use most
126
+ ## Resume next session
127
+
128
+ Close your laptop, come back tomorrow, type `/add` again — the agent reorients
129
+ itself from disk and continues exactly where you left off. No context rot.
130
+
131
+ The same resume point is yours directly:
69
132
 
70
133
  ```bash
71
134
  python3 .add/tooling/add.py status
72
135
  ```
73
136
 
74
- `add.py status` is your home base. It reads `.add/state.json` and tells you the
75
- project stage, the active task, and which phase you're in. **Start every session
76
- with it** — that's how ADD resumes work without re-reading your whole repo.
137
+ ---
77
138
 
78
- > Tip: shorten typing with an alias — `alias add="python3 .add/tooling/add.py"` —
79
- > then you can run `add status`, `add advance`, etc. The rest of this guide writes
80
- > the full `python3 .add/tooling/add.py ...` form so copy-paste always works.
139
+ ## Self-check
81
140
 
82
- And when you're mid-task and unsure what the current phase needs, ask:
141
+ Confirm your project is internally consistent at any time:
83
142
 
84
143
  ```bash
85
- python3 .add/tooling/add.py guide
144
+ python3 .add/tooling/add.py check
86
145
  ```
87
146
 
88
- `status` tells you *where* you are; `guide` tells you *what to do next* — the active
89
- task's phase, the one concrete next action, the chapter to read, and the exact command
90
- to run once that phase is done.
147
+ It verifies state is valid, every task has its TASK.md, and markers match. Exit
148
+ code 0 means healthy handy as a CI gate.
91
149
 
92
150
  ---
93
151
 
94
- ## 3 · Start your first feature
152
+ ## Enforce the decision points in CI
95
153
 
96
- ```bash
97
- python3 .add/tooling/add.py new-task transfer --title "Transfer money between my accounts"
98
- ```
154
+ `add.py audit` re-verifies every recorded human gate on your board — a named
155
+ human at each contract freeze, exactly one gate outcome per done task, a human
156
+ reviewer wherever the security line carries a note. It exits non-zero naming
157
+ the task and the finding, which makes it a CI gate: enforcement runs on a
158
+ machine the agent does not control, so the agent can never stamp its own work
159
+ green (*never self-gate*).
99
160
 
100
- This scaffolds `.add/tasks/transfer/TASK.md` — **one file holding all seven phase
101
- sections** — plus empty `tests/` and `src/` folders, and makes it the active task
102
- at phase `specify`.
161
+ Drop this workflow into `.github/workflows/seam-audit.yml`:
162
+
163
+ ```yaml
164
+ name: seam-audit
165
+
166
+ on:
167
+ push:
168
+ branches: [main]
169
+ pull_request:
170
+
171
+ permissions:
172
+ contents: read
173
+
174
+ jobs:
175
+ seam-audit:
176
+ name: Decision-point audit (recorded human gates)
177
+ runs-on: ubuntu-latest
178
+ steps:
179
+ - uses: actions/checkout@v4
103
180
 
104
- Open `.add/tasks/transfer/TASK.md` in your editor. You'll fill it top to bottom.
181
+ - uses: actions/setup-python@v5
182
+ with:
183
+ python-version: '3.12'
184
+
185
+ - name: Audit recorded decision points
186
+ run: python3 .add/tooling/add.py audit
187
+ ```
188
+
189
+ The command is the same one you can run locally — the installer already placed
190
+ `add.py` at `.add/tooling/add.py`, and the audit is read-only (it never edits
191
+ your board). A red `seam-audit` job means a decision record is malformed or a
192
+ security note was left to the auto-gate; fix the record (or escalate the gate
193
+ to a human), never the auditor.
105
194
 
106
195
  ---
107
196
 
108
197
  ## Under the hood — the seven phases by hand (escape hatch)
109
198
 
110
- Everything above is what the agent drives for you through the one-approval front. This
111
- section is the **escape hatch**: the same seven phases run by hand, so you can see what
199
+ Everything above is what the agent drives for you through the one-approval flow. This
200
+ appendix is the **escape hatch**: the same seven phases run by hand, so you can see what
112
201
  each one produces and step in manually whenever you want to. You never *have* to type
113
202
  these — they are the agent's hands, and yours when you take the wheel.
114
203
 
115
204
  The rhythm is always: **fill the section → run `python3 .add/tooling/add.py advance`.**
116
205
  The tool keeps the `phase:` marker at the top of TASK.md in sync.
117
206
 
118
- ### Phase 1Specify (`docs/03-step-1-specify.md`)
207
+ ### Before the phases initialise and scaffold
208
+
209
+ Starting cold? Install first as in §1 (`npx @pilotspace/add init`). Then
210
+ initialise once and scaffold the task yourself (the agent normally does both):
211
+
212
+ ```bash
213
+ python3 .add/tooling/add.py init
214
+ python3 .add/tooling/add.py new-task transfer --title "Transfer money between my accounts"
215
+ ```
216
+
217
+ > **Note:** the installer's closing hint shows `init --await-lock` — that form
218
+ > arms the baseline-approval gate so a *human* signs the AI-drafted foundation before
219
+ > any build. Plain `init` skips that gate, which is fine here: by hand, the
220
+ > human IS the one driving every step.
221
+
222
+ This scaffolds `.add/tasks/transfer/TASK.md` — **one file holding all seven phase
223
+ sections** — plus empty `tests/` and `src/` folders, and makes it the active task
224
+ at phase `specify`. Open it in your editor; you'll fill it top to bottom.
225
+
226
+ You can also change the project's depth at any time:
227
+
228
+ ```bash
229
+ python3 .add/tooling/add.py stage mvp
230
+ ```
231
+
232
+ ### Phase 1 — Specify (`.add/docs/03-step-1-specify.md`)
119
233
 
120
234
  Write the rules in **§1**. State what it *must* do, what it must *reject* (each
121
235
  with a named error code), and what's true after success:
@@ -139,7 +253,7 @@ Confirm every assumption (no FX, no daily limit in v1). Then:
139
253
  python3 .add/tooling/add.py advance
140
254
  ```
141
255
 
142
- ### Phase 2 — Scenarios (`docs/04-step-2-scenarios.md`)
256
+ ### Phase 2 — Scenarios (`.add/docs/04-step-2-scenarios.md`)
143
257
 
144
258
  In **§2**, turn each rule into a Given/When/Then. For every rejection, assert what
145
259
  must stay **unchanged**:
@@ -154,7 +268,7 @@ Scenario: insufficient funds
154
268
 
155
269
  Then `python3 .add/tooling/add.py advance`.
156
270
 
157
- ### Phase 3 — Contract (`docs/05-step-3-contract.md`)
271
+ ### Phase 3 — Contract (`.add/docs/05-step-3-contract.md`)
158
272
 
159
273
  In **§3**, fix the external shape and **freeze** it (`Status: FROZEN @ v1`):
160
274
 
@@ -165,21 +279,21 @@ POST /transfers body: { fromAccountId, toAccountId, amount }
165
279
  403 -> { error: "forbidden" }
166
280
  ```
167
281
 
168
- A frozen contract is the seam that makes the AI build safe. Then advance.
282
+ A frozen contract is the decision point that makes the AI build safe. Then advance.
169
283
 
170
- ### Phase 4 — Tests, red first (`docs/06-step-4-tests.md`)
284
+ ### Phase 4 — Tests, red first (`.add/docs/06-step-4-tests.md`)
171
285
 
172
286
  Write one test per scenario into `.add/tasks/transfer/tests/`, then **run them and
173
287
  confirm they FAIL** — there's no code yet. A test that passes now is testing
174
288
  nothing. This is red/green TDD: red before green. Then advance.
175
289
 
176
- ### Phase 5 — Build (`docs/07-step-5-build.md`)
290
+ ### Phase 5 — Build (`.add/docs/07-step-5-build.md`)
177
291
 
178
292
  Now let the AI write code into `.add/tasks/transfer/src/` until **every test
179
293
  passes** — without changing any test or the frozen contract. Honor the safety rule
180
294
  (here: debit + credit in one atomic transaction). Then advance.
181
295
 
182
- ### Phase 6 — Verify (`docs/08-step-6-verify.md`)
296
+ ### Phase 6 — Verify (`.add/docs/08-step-6-verify.md`)
183
297
 
184
298
  In **§6**, confirm the evidence (all green, nothing weakened) and check what tests
185
299
  miss: concurrency, security, architecture. Record the gate — and close the task:
@@ -191,46 +305,20 @@ python3 .add/tooling/add.py gate PASS
191
305
  `gate PASS` marks the task `done`. (Use `gate HARD-STOP` to send it back to Build,
192
306
  or `gate RISK-ACCEPTED` for a signed, non-security waiver.)
193
307
 
194
- ### Phase 7 — Observe (`docs/09-the-loop.md`)
308
+ ### Phase 7 — Observe (`.add/docs/09-the-loop.md`)
195
309
 
196
310
  In **§7**, note what to watch in production and the next spec delta. Every learning
197
311
  becomes the next `new-task`. The flow is a loop, not a finish line.
198
312
 
199
313
  ---
200
314
 
201
- ## 5 · Self-check
202
-
203
- Confirm your project is internally consistent at any time:
204
-
205
- ```bash
206
- python3 .add/tooling/add.py check
207
- ```
208
-
209
- It verifies state is valid, every task has its TASK.md, and markers match. Exit
210
- code 0 means healthy — handy as a CI gate.
211
-
212
- ---
213
-
214
- ## 6 · Resume next session
215
-
216
- Close your laptop, come back tomorrow, run:
217
-
218
- ```bash
219
- python3 .add/tooling/add.py status
220
- ```
221
-
222
- It tells you exactly where you left off and what to do next. No context rot — the
223
- state lives on disk, not in a chat window.
224
-
225
- ---
226
-
227
- ## 7 · Where to read more
315
+ ## Where to read more
228
316
 
229
317
  You just ran the method; now read *why* it's shaped this way:
230
318
 
231
319
  - The shift & principles — `.add/docs/00-introduction.md`, `.add/docs/01-principles.md`
232
320
  - The flow end to end — `.add/docs/02-the-flow.md`
233
- - Each step in depth — `.add/docs/03..09`
321
+ - Each step in depth — `.add/docs/03-step-1-specify.md` through `.add/docs/09-the-loop.md`
234
322
  - Operating it on a team — `.add/docs/11-governance.md`, `.add/docs/12-roles.md`
235
323
  - A fully worked example — `.add/docs/appendix-d-worked-example.md`
236
324
 
package/README.md CHANGED
@@ -34,15 +34,18 @@ Pick your ecosystem — both install the same skill, tooling, and book:
34
34
 
35
35
  ```bash
36
36
  # Node / npm
37
- npx @pilotspace/add init --name "My App" --stage prototype
37
+ npx @pilotspace/add init
38
38
  ```
39
39
 
40
40
  ```bash
41
41
  # Python / pip
42
- pip install add-method
43
- add-method init --name "My App" --stage prototype
42
+ pip install pilotspace-add
43
+ pilotspace-add init
44
44
  ```
45
45
 
46
+ No flags needed — the project name is inferred from your folder and the stage
47
+ defaults to `prototype` (pass `--name "My App" --stage mvp` to choose up front).
48
+
46
49
  **New here?** Follow the [10-minute Quickstart](./GETTING-STARTED.md) — it walks
47
50
  your first feature end to end.
48
51
 
@@ -52,9 +55,12 @@ This installs:
52
55
  |------|------|
53
56
  | `.claude/skills/add/` | the `add` skill Claude loads (thin router + per-phase guides) |
54
57
  | `.add/tooling/add.py` | scaffolder + state tracker (Python, stdlib only) |
55
- | `.add/docs/` | the AIDD book — the trust layer |
56
- | `.add/state.json` | where the project is |
57
- | `.add/CONVENTIONS.md`, `GLOSSARY.md`, `MODEL_REGISTRY.md`, `dependencies.allowlist` | survivor-layer files |
58
+ | `.add/docs/` | the AIDD book — the method rationale |
59
+
60
+ Project state (`.add/state.json`) and the living-documentation files (`CONVENTIONS.md`,
61
+ `GLOSSARY.md`, `MODEL_REGISTRY.md`, `dependencies.allowlist`) are *not* created
62
+ here — the installer drops files only; initialisation is the agent's first move
63
+ when you run `/add`.
58
64
 
59
65
  ## Use it
60
66
 
@@ -64,7 +70,7 @@ ADD is AI-first: you talk to the agent; it drives the method. In Claude Code, ru
64
70
  > `/add` — *"I want to let users transfer money between their own accounts."*
65
71
 
66
72
  The agent orients from `state.json`, **sizes your request into a milestone** (you
67
- confirm the shape), then drafts each feature's **one-approval front** — Spec +
73
+ confirm the shape), then drafts each feature's **specification bundle** — Spec +
68
74
  Scenarios + Contract + Tests as one bundle — and you give **one approval at the
69
75
  frozen contract**. A self-driving build→verify run takes it to green; security
70
76
  findings always stop back to you.
@@ -80,7 +86,7 @@ python3 .add/tooling/add.py status # where am I? (resume point)
80
86
  1. **Direction before speed** — no Build until spec, scenarios, contract, and *red*
81
87
  tests exist.
82
88
  2. **Trust evidence, not inspection** — a feature is trusted because its tests pass
83
- and the blind spots (concurrency, security, architecture) were checked.
89
+ and the non-functional risks (concurrency, security, architecture) were checked.
84
90
  3. **Never weaken a test or edit a frozen contract** to make the build pass.
85
91
  4. **No silent skips** — every Verify records `PASS`, `RISK-ACCEPTED`, or
86
92
  `HARD-STOP`. Security findings are always `HARD-STOP`.
package/bin/cli.js CHANGED
@@ -10,15 +10,17 @@
10
10
  * <target>/.claude/skills/add/ (the skill Claude loads)
11
11
  * <target>/.add/tooling/ (add.py scaffolder + state tracker)
12
12
  * <target>/.add/docs/ (the AIDD book — the trust layer)
13
- * Then runs `add.py init` to create .add/state.json and survivor files.
13
+ * It DROPS FILES ONLY — it does NOT run `add.py init`. Initialisation is deferred to
14
+ * the AI (via `/add`, which runs `init --await-lock` to arm the v12 lock-down gate) or
15
+ * to a CLI user. A pre-run plain init would grandfather-lock the gate before `/add` runs
16
+ * AND consume the brownfield signal in the terminal, where the AI never sees it.
14
17
  *
15
- * Zero npm dependencies. Designed for failure: verifies sources, never clobbers
16
- * an existing state.json, and degrades gracefully if python3 is absent.
18
+ * Zero npm dependencies, no Python needed at install time. Designed for failure:
19
+ * verifies sources exist before copying, never clobbers an existing skill.
17
20
  */
18
21
 
19
22
  const fs = require("fs");
20
23
  const path = require("path");
21
- const { spawnSync } = require("child_process");
22
24
 
23
25
  const PKG_ROOT = path.resolve(__dirname, "..");
24
26
 
@@ -27,36 +29,43 @@ function warn(msg) { process.stderr.write("warn: " + msg + "\n"); }
27
29
  function fail(msg) { process.stderr.write("error: " + msg + "\n"); process.exit(1); }
28
30
 
29
31
  function parseArgs(argv) {
30
- const args = { _: [], force: false, stage: "prototype", name: null };
32
+ // stage/name stay null unless EXPLICITLY passed the engine's own `init`
33
+ // defaults the stage and infers the name from the folder, so the manual-init
34
+ // hint only echoes flags the user actually chose (shortest true command).
35
+ const args = { _: [], force: false, stage: null, name: null };
31
36
  for (let i = 0; i < argv.length; i++) {
32
37
  const a = argv[i];
33
38
  if (a === "--force") args.force = true;
34
- else if (a === "--stage") args.stage = argv[++i];
35
- else if (a === "--name") args.name = argv[++i];
39
+ else if (a === "--stage" || a === "--name") {
40
+ const v = argv[++i];
41
+ // fail loudly on a trailing/abutting flag — never silently drop a value
42
+ // the user tried to pass (parity with the pip twin's argparse error)
43
+ if (v == null || v.startsWith("--")) fail(a + " requires a value");
44
+ if (a === "--stage") args.stage = v; else args.name = v;
45
+ }
36
46
  else if (a.startsWith("--")) warn("ignoring unknown flag " + a);
37
47
  else args._.push(a);
38
48
  }
39
49
  return args;
40
50
  }
41
51
 
42
- function copyDir(src, dest, { skipIfExists } = {}) {
52
+ function copyDir(src, dest, { skipIfExists, cleanReplace } = {}) {
43
53
  if (!fs.existsSync(src)) fail("missing packaged source: " + src);
44
54
  if (skipIfExists && fs.existsSync(dest)) {
45
55
  warn(dest + " exists — leaving it untouched");
46
56
  return;
47
57
  }
58
+ // Clean replace: drop a stale dest before copying so a `--force` re-install can
59
+ // never leave orphaned files from a previous version behind. fs.cpSync merges
60
+ // (it never removes), so without this `--force` is a merge, not a replace. Mirrors
61
+ // _installer.py's `shutil.rmtree(skill_dest)` so npm and pip behave identically.
62
+ if (cleanReplace && fs.existsSync(dest)) {
63
+ fs.rmSync(dest, { recursive: true, force: true });
64
+ }
48
65
  fs.mkdirSync(path.dirname(dest), { recursive: true });
49
66
  fs.cpSync(src, dest, { recursive: true });
50
67
  }
51
68
 
52
- function hasPython() {
53
- for (const py of ["python3", "python"]) {
54
- const r = spawnSync(py, ["--version"], { stdio: "ignore" });
55
- if (r.status === 0) return py;
56
- }
57
- return null;
58
- }
59
-
60
69
  function cmdInit(args) {
61
70
  const target = path.resolve(args._[0] || ".");
62
71
  if (!fs.existsSync(target)) fail("target directory does not exist: " + target);
@@ -66,7 +75,7 @@ function cmdInit(args) {
66
75
  copyDir(
67
76
  path.join(PKG_ROOT, "skill", "add"),
68
77
  path.join(target, ".claude", "skills", "add"),
69
- { skipIfExists: !args.force }
78
+ { skipIfExists: !args.force, cleanReplace: args.force }
70
79
  );
71
80
  log(" ✓ skill -> .claude/skills/add/");
72
81
 
@@ -88,27 +97,19 @@ function cmdInit(args) {
88
97
  { skipIfExists: false });
89
98
  log(" ✓ trust docs -> .add/docs/ (the AIDD book)");
90
99
 
91
- // 4. run add.py init (idempotent — add.py refuses to clobber state.json)
92
- const py = hasPython();
93
- const addPy = path.join(toolingDest, "add.py");
94
- if (!py) {
95
- warn("python3 not foundskipping `add.py init`.");
96
- log("\nFinish setup manually once Python is available:");
97
- log(" python3 .add/tooling/add.py init" +
98
- (args.name ? ` --name "${args.name}"` : "") + ` --stage ${args.stage}`);
99
- return;
100
- }
101
- const initArgs = [addPy, "init", "--dir", target, "--stage", args.stage];
102
- if (args.name) initArgs.push("--name", args.name);
103
- if (args.force) initArgs.push("--force");
104
- const r = spawnSync(py, initArgs, { stdio: "inherit" });
105
- if (r.status !== 0 && r.status !== null) {
106
- warn("`add.py init` exited non-zero (state may already exist). Run `add.py status` to check.");
107
- }
108
-
109
- log("\nDone. In Claude Code, the `add` skill is now installed.");
110
- log("Next: open Claude Code, run `/add`, and say what you want to build —");
111
- log(" the agent sizes it into a milestone and drives the build with you.");
100
+ // NO step 4: the installer DROPS FILES ONLY. Initialisation is deferred to the AI
101
+ // (via `/add`) or a CLI user — a pre-run plain `add.py init` would grandfather-lock
102
+ // the v12 lock-down gate before `/add` runs (see file header). So no Python is run here.
103
+ log("\nDone. The `add` skill + tooling are installed (no project state yet — that's intentional).");
104
+ log("Next: open Claude Code, run `/add`, and say what you want to build the agent");
105
+ log(" sets up the foundation, sizes it into a milestone, and drives the build with you;");
106
+ log(" you sign off once, at the lock-down.");
107
+ log("");
108
+ log("Prefer the CLI / not using Claude Code? Initialise it yourself (this arms the lock-down):");
109
+ const launcher = process.platform === "win32" ? "py" : "python3";
110
+ log(` ${launcher} .add/tooling/add.py init --await-lock` +
111
+ (args.stage ? ` --stage ${args.stage}` : "") +
112
+ (args.name ? ` --name "${args.name}"` : ""));
112
113
  }
113
114
 
114
115
  function main() {