@pilotspace/add 1.7.3 → 1.9.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 CHANGED
@@ -4,6 +4,88 @@ All notable changes to the ADD method (`@pilotspace/add` on npm,
4
4
  `pilotspace-add` on PyPI) are documented here. The format follows
5
5
  [Keep a Changelog](https://keepachangelog.com/); versions follow semver.
6
6
 
7
+ ## [1.9.0] — 2026-06-24
8
+
9
+ Lean-pass major — make ADD's own surface (skill · flow · engine) the most-effective
10
+ prompt at optimized token cost, *not* token-golf. Bundles four closed milestones:
11
+ `skill-effectiveness` (M1), `flow-simplification` (M3), `flow-enforcement` (M4), and
12
+ the `fast-lane` sub-milestone. The skill tree routes identically but loads lighter;
13
+ the method's three fill-seams are now engine-enforced rather than convention; and a
14
+ new opt-in **fast lane** collapses ceremony for small tasks without lowering the trust
15
+ floor. Every new gate is opt-in or grandfathered — existing flows are byte-unchanged.
16
+
17
+ ### Added
18
+ - **Fast lane (`fast-lane`)** — `add.py new-task <slug> --fast` runs a small task
19
+ through a minimal `TASK.fast.md` (sections {0,1,3,4,5,6}) that still freezes a
20
+ contract, proves a red→green, and reads back cold in a later session. The lane is
21
+ *collapse-never-skip*: a `--fast` task is freeze-gated under ANY milestone (the floor
22
+ fires on `_optin OR fast`). Human-triggered only — the engine never auto-classifies a
23
+ task as "small". New `phases/fast-lane.md` guide + a SKILL.md quick-ref document it.
24
+ - **Freeze-before-build gate (`fast-lane`)** — crossing tests→build now refuses
25
+ `contract_not_frozen` when §3 is still DRAFT and the task is opted-in or fast, closing
26
+ the gap where a task could reach `gate=PASS` without an approved, frozen contract.
27
+ - **Contract-fill + build-expectations gates (opt-in, `flow-enforcement`)** — under
28
+ `new-milestone --await-confirm`, the engine HOLDS a task whose §3 CONTRACT or §6
29
+ Build-expectations block is still a placeholder, so the method's fill-seams are
30
+ enforced rather than trusted. `await_confirm` is the master switch; without it no key
31
+ is written → grandfathered → byte-unchanged.
32
+ - **Gate-record write-back (`flow-enforcement`)** — recording a verify gate now stamps
33
+ the verdict into the §6 GATE RECORD of the TASK.md for ALL tasks (grandfathered
34
+ backfill), so the file itself carries the outcome the Seam audit reads.
35
+ - **Confirm-parent gate (opt-in, `flow-simplification`)** — `new-milestone <slug>
36
+ --await-confirm` seeds the milestone *unconfirmed*, so `new-task` is HELD (reject
37
+ `milestone_unconfirmed`) until you show the filled `MILESTONE.md`, get the human's go,
38
+ and run the new `add.py milestone-confirm <slug>`. Closes the gap where the AI would
39
+ detail a task's §0–§5 before the human had agreed the parent milestone. Mirrors
40
+ `init --await-lock` one level down.
41
+
42
+ ### Changed
43
+ - **Skill tree 25% lighter (`skill-effectiveness`)** — the on-demand skill guides were
44
+ compacted tree-wide (164,333 → ~123,000 bytes) with zero routing, gate, reject-code,
45
+ threshold, or rule lost; an independent adversarial review confirmed every operative
46
+ element preserved (it flagged 6 dropped nuances → all restored). Same flow an agent
47
+ reads, fewer tokens to load.
48
+ - **One home for the worker-spawn model tiers (`spawn-fold`)** — the tier→model mapping
49
+ (mid→sonnet / top→opus) now lives only in `streams.md`; `advisor.md` points at it
50
+ instead of copying. Advisor keeps its own advisory template.
51
+
52
+ ## [1.8.0] — 2026-06-23
53
+
54
+ Team collaboration: ADD becomes git-native and multi-user, with N
55
+ parallel-active milestones, plus a polish pass on the delta-resolution
56
+ machinery. Additive and backward-compatible — `add.py` ships a one-way state
57
+ migration (single-active → multi-active), and the non-interactive byte stream
58
+ for existing single-user flows is preserved. Bundles six closed milestones.
59
+
60
+ ### Added
61
+ - **Multi-active milestones (`team-collaboration`)** — work N milestones in
62
+ parallel: `add.py activate` / `deactivate` manage an active working SET,
63
+ `add.py mine` is a my-work lens over owned tasks, the `streams:` block shows a
64
+ per-stream owner, and waves can span all active milestones.
65
+ - **Git-native user identity** — `add.py whoami` resolves the actor from git
66
+ config; tasks carry an owner.
67
+ - **Ownership & assignment** — `add.py assign` / `unassign` attach a task to an
68
+ owner; ownership renders across status and reports.
69
+ - **Git-merge safety** — merge-base enforcement guards a stale worker base; the
70
+ drift vectors a parallel-wave merge can introduce are pinned suite fixtures.
71
+ - **Multi-file commit primitive** — `_atomic_write_many` is now true
72
+ all-or-nothing: stage every temp → fsync → rename-aside → rename-all, with
73
+ rollback-on-any-failure restoring prior bytes. `fold`, `release`, and the
74
+ delta seed all route through it, closing the prior mid-rename residual window.
75
+ - **`--match <substr>` selector** — `add.py new-task --from-delta` and
76
+ `add.py drop-delta` accept `--match` to target ONE open SPEC delta among
77
+ several; a 0-match or ambiguous match is a named reject. First-open behavior
78
+ is byte-identical when `--match` is absent.
79
+ - **`compact --force`** — `add.py compact --force` overrides the project-wide
80
+ `open_spec_deltas_unresolved` block ONLY (never a structural guard) so an
81
+ urgent compaction is not blocked by an UNRELATED open SPEC delta; the bypass
82
+ is warned and recorded as `force_bypassed_spec_deltas`.
83
+
84
+ ### Notes
85
+ - One version tag publishes both channels: `@pilotspace/add` (npm) and
86
+ `pilotspace-add` (PyPI). The engine (`add.py`) is mirrored byte-identical
87
+ across all three trees with `ENGINE_MD5` re-pinned.
88
+
7
89
  ## [1.7.3] — 2026-06-18
8
90
 
9
91
  Multi-agent installer reach (`multi-agent-installer`). Additive; no breaking
@@ -22,6 +22,8 @@
22
22
 
23
23
  **Foundation version** — a monotonic integer marker in `PROJECT.md` that advances by one each time confirmed lessons learned are consolidated into the foundation. It makes the living documentation's evolution auditable: a rising version with fewer new deltas per milestone is the signal that a competency is converging rather than drifting. Bumped only by the retrospective consolidation (see the `add` skill's `fold.md`).
24
24
 
25
+ **Fast lane** — the collapsed, opt-in task path for small, low-risk work. `add.py new-task <slug> --fast` scaffolds a minimal `TASK.fast.md` (sections {0,1,3,4,5,6}; scenarios and observe dropped) and the specification bundle is approved in one freeze. It runs the SAME flow with fewer sections — it never drops the trust floor: a `--fast` task is held to a frozen contract, a red test before build, and a recorded verify gate under any milestone. Collapse, never skip; the human opts in (the engine never auto-classifies a task as small). See the `add` skill's `phases/fast-lane.md`.
26
+
25
27
  **Gate** — a checkpoint with an explicit pass/fail exit. Its outcome is `PASS`, `RISK-ACCEPTED`, or `HARD-STOP`.
26
28
 
27
29
  **Ground (phase-0 preamble)** — the per-task phase *before* Specify in which the AI gathers the real current codebase the task touches — files, symbols, signatures, patterns, conventions — into a lean **grounding map**, surfacing the **anchors** the frozen contract will cite. It is AI-owned and adds no approval (the one approval stays at the contract freeze); it precedes the seven steps as step 0 so the contract, tests, and build are grounded in the code as it actually is, not in assumption. Lives in the `add` skill's `phases/0-ground.md`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilotspace/add",
3
- "version": "1.7.3",
3
+ "version": "1.9.0",
4
4
  "description": "ADD (AI-Driven Development). One skill. Eight steps. Five disciplines. Every feature ships through the loop — a minimal, state-tracked Claude Code skill that ships the AIDD book as its trust layer.",
5
5
  "bin": {
6
6
  "add": "bin/cli.js"
@@ -15,79 +15,64 @@ user-invocable: true
15
15
  when_to_use: "Invoke in any repo with a `.add/` directory, or when the user wants spec/tests-first feature work, resumes ADD work, or asks to start/advance a task."
16
16
  category: workflows
17
17
  keywords: [add, aidd, ai-driven-development, spec-first, tdd, contract, scenarios, verify, milestone, task-orchestration]
18
- argument-hint: "[describe your goals] OR [describe what is your expectation] (e.g., implement authentication flows for both server api and client side to handle email + Google OAuth login, session refresh, RBAC guards, and a profile page that survives page reloads)"
18
+ argument-hint: "status | init | continue | [describe new short goals or expectation]"
19
19
  license: MIT
20
20
  metadata:
21
21
  author: add
22
- version: "1.0.0"
22
+ version: "1.8.0"
23
23
  ---
24
24
 
25
25
  # ADD — the orchestration engine
26
26
 
27
27
  You are the orchestrator. ADD keeps the AI fast *and* safe by fixing direction
28
- (spec, scenarios, contract, failing tests) **before** the build, and trusting
29
- the result through passing evidence rather than a plausible-looking diff.
28
+ (spec, scenarios, contract, failing tests) **before** the build, and trusting the
29
+ result through passing evidence rather than a plausible-looking diff.
30
30
 
31
- **One file = one task.** Each feature lives in a single `.add/tasks/<slug>/TASK.md`
32
- with a §0 ground preamble and seven step sections. You fill them top to bottom; the Python tool tracks where
33
- you are so context never rots across sessions.
31
+ **One file = one task.** Each feature is one `.add/tasks/<slug>/TASK.md` — a §0 ground
32
+ preamble plus seven step sections, filled top to bottom. The Python tool tracks where you
33
+ are so context never rots across sessions.
34
34
 
35
35
  ## Always start here (orient — do not skip)
36
36
 
37
- The engine lives at `.add/tooling/add.py` and the book at `.add/docs/`. Make sure the
38
- engine is in this project before anything else:
37
+ Engine: `.add/tooling/add.py` · book: `.add/docs/`. Ensure the engine is in the project first:
39
38
 
40
- - If `.add/tooling/add.py` exists, go straight to `status` below.
41
- - If it does NOT exist, ADD was installed as a Claude Code plugin — the engine and the
42
- book ride in the plugin, not the project. Materialize them into the project once, before
43
- any other step:
39
+ - It exists go straight to `status` below.
40
+ - It does NOT (ADD installed as a Claude Code plugin — engine + book ride in the plugin) →
41
+ materialize once: `node "${CLAUDE_PLUGIN_ROOT}/bin/cli.js" init --no-skill`. That drops
42
+ `.add/tooling/` (engine) + `.add/docs/` (book) + the agent-agnostic `CLAUDE.md` block — like an
43
+ npm/pip install; the skill stays in the plugin, nothing duplicated.
44
44
 
45
- ```bash
46
- node "${CLAUDE_PLUGIN_ROOT}/bin/cli.js" init --no-skill
47
- ```
48
-
49
- That drops `.add/tooling/` (the engine) and `.add/docs/` (the book) here, so the engine,
50
- the book, and the agent-agnostic guideline block in `CLAUDE.md` all work for every agent
51
- and for a human at the shell — exactly like an npm or pip install. The skill itself stays
52
- in the plugin, so nothing is duplicated.
53
-
54
- Run the tool to find the resume point instead of re-reading the repo:
45
+ Find the resume point from the tool, not by re-reading the repo:
55
46
 
56
47
  ```bash
57
48
  python3 .add/tooling/add.py status
58
49
  ```
59
50
 
60
- `status` points at two things to read when orienting: `.add/PROJECT.md` (the foundation) and
61
- `.add/SOUL.md` (your **voice** — tone, communication style, what keeps the human's trust). Read
62
- `.add/SOUL.md` each session and let it shape how you speak; it is human-owned and self-improving
63
- (the `soul-self-improve` path proposes voice deltas the human confirms).
64
-
65
- - **No `.add/state.json` yet** (a fresh install drops tooling + docs but does *not* init — so `status` says
66
- `no .add/ project found`) → enter **autonomous setup**: first, if `.add/.intent` exists, read it — the
67
- one-line first-build intent the user gave the installer (a NOTE, never an init trigger) — and let it seed
68
- your kickoff suggestion (`phases/0-setup.md`); then YOU run init yourself —
69
- `add.py init --name "<inferred>" --stage <picked> --await-lock` (don't tell the human to) — then read
70
- `phases/0-setup.md` and draft the foundation + first scope + first contract through to the human baseline approval.
71
- - **A task is active** → open `.add/tasks/<active>/TASK.md`, look at its `phase:`
72
- marker, and read the matching `phases/<n>-<phase>.md`. Work *only* that phase.
73
- - **No active task** → first SIZE the request (see Intake below), then create the
74
- right scope: `python3 .add/tooling/add.py new-task <slug> --title "..."`.
51
+ `status` names two files to read when orienting: `.add/PROJECT.md` (the foundation) and `.add/SOUL.md`
52
+ (your **voice** — tone, style, what keeps the human's trust; read it each session — human-owned and
53
+ self-improving via the `soul-self-improve` path). Then branch on state:
75
54
 
76
- ## Intake size a request before creating scope
55
+ - **No `.add/state.json` yet** (`status` says `no .add/ project found`) → **autonomous setup**: if
56
+ `.add/.intent` exists, read it — the installer's one-line first-build intent (a NOTE, never an init
57
+ trigger) — to seed your kickoff; then YOU run init — `add.py init --name "<inferred>" --stage <picked>
58
+ --await-lock` — and read `phases/0-setup.md` to draft the foundation + §1–§3 through to the human
59
+ baseline approval.
60
+ - **A task is active** → open its `.add/tasks/<active>/TASK.md`, read the `phase:` marker, load the
61
+ matching `phases/<n>-<phase>.md`. Work *only* that phase.
62
+ - **No active task** → first SIZE the request (Intake below), then `add.py new-task <slug> --title "..."`.
77
63
 
78
- When the user brings a raw request, classify it BEFORE making a milestone or task:
79
- read `intake.md` and place it in exactly one bucket `new-major` · `sub-milestone`
80
- · `task` · `change-request` — then propose `{ bucket, rationale, command }` and let
81
- the human confirm. This is the intake level (request versioned scope); see
82
- `intake.md` for the rubric, the tie-break order, and worked examples. A question or
83
- unsharp intent? **Interview before you size** — explore and suggest first (`intake.md`).
64
+ **Quick ref** `status` resume · `init` bootstrap · `advance` continue · `gate PASS` at verify.
65
+ **Opt-in flags** (human picks, never auto): `new-task --fast` = fast lane (minimal template, freeze-gated) · `new-milestone --await-confirm` = confirm-gate the milestone's tasks.
66
+
67
+ ## Intake size a request before creating scope
84
68
 
85
- Once a request is classified `new-major`/`sub-milestone`, drafting the actual
86
- `MILESTONE.md` (goal · scope · exit criteria · breadth-first tasks) is the second
87
- half of intake: read `scope.md` for how to fill it well, the per-outcome behavior,
88
- and the confirm-before-create rule. Or if it's classified `task`/`change-request`,
89
- create the task with `add.py new-task` and then read the phase guide for the first phase (probably `0-setup.md`).
90
- You propose the draft; the human confirms.
69
+ Classify a raw request BEFORE any milestone or task: read `intake.md`, place it in one bucket —
70
+ `new-major` · `sub-milestone` · `task` · `change-request` propose `{ bucket, rationale, command }`;
71
+ the human confirms. A question or unsharp intent? **Interview before you size** (`intake.md`). Once
72
+ `new-major`/`sub-milestone`, draft the `MILESTONE.md` (goal · scope · exit criteria · breadth-first
73
+ tasks) read `scope.md`. Create it `new-milestone --await-confirm`, then `milestone-confirm <slug>`
74
+ gates `new-task` until the parent is agreed. For `task`/`change-request`: `add.py new-task` then the
75
+ first phase guide.
91
76
 
92
77
  ## The flow and which file to load
93
78
 
@@ -106,77 +91,63 @@ Load the phase guide **only for the phase you are in** (progressive disclosure):
106
91
  | observe | `phases/7-observe.md` | §7 spec delta | human + AI |
107
92
 
108
93
  † **The specification bundle (v7).** §1–§4 are one bundle; the human gives **one approval at the
109
- contract freeze** (the decision point), presented lowest-confidence-first. See `run.md`.
110
- ‡ **Verify auto-gate (v6–v7).** Under `autonomy: auto` (the default) a run may auto-PASS on
111
- complete evidence — recorded as *auto-resolved*, an explicit PASS, not a skip. **Security always
112
- escalates** (HARD-STOP); so do concurrency / architecture residue and a lowered autonomy level (`conservative` / `manual`).
113
- See `run.md`.
114
-
115
- Whenever you present a decision point to the human in chat (intake · bundle approval · gate ·
116
- milestone close), follow `report-template.md` open with the ARC (goal · done · plan,
117
- engine-sourced), then SUMMARY → DECISION → FLAGS → DECIDED → EVIDENCE → NEXT, show-before-ask, never
118
- pre-stamp a decision point and the question is a summary, never the artifact.
119
-
120
- In **observe**, also emit **lessons learned** learnings tagged by which of the five
121
- (`DDD · SDD · UDD · TDD · ADD`) they improve — so the foundation self-improves across loops.
122
- You write them as `open`; the human consolidates them into `PROJECT.md`. Read `deltas.md` for the
123
- grammar and the status lifecycle. At milestone close (or on demand), run the retrospective consolidation that
124
- gathers confirmed deltas into a versioned foundation — read `fold.md`. Then (or on demand) compact the stable tail of each foundation spec into a rolled-up settled line — read `compact-foundation.md` (a SEPARATE step, run after `fold.md`).
125
-
126
- Observe also tunes your **voice**: propose a confirmable **voice delta** from the human's wordings +
127
- flow that, once they confirm, rewrites `SOUL.md` (the human is the only writer) — read `soul.md`.
94
+ contract freeze**, lowest-confidence-first see `run.md`.
95
+ ‡ **Verify auto-gate (v6–v7).** Under `autonomy: auto` (default) a run may auto-PASS on complete
96
+ evidence (*auto-resolved* an explicit PASS, not a skip). **Security always escalates** (HARD-STOP);
97
+ so do concurrency / architecture residue and a lowered autonomy level (`conservative` / `manual`) — `run.md`.
98
+
99
+ At every human decision point (intake · bundle approval · gate · milestone close) follow
100
+ `report-template.md`: open with the ARC (goal · done · plan, engine-sourced), then SUMMARY DECISION
101
+ FLAGS DECIDED → EVIDENCE → NEXT; show-before-ask; never pre-stamp; the question is a summary, never the artifact.
102
+
103
+ In **observe**, emit **lessons learned** tagged by which of the five (`DDD · SDD · UDD · TDD · ADD`)
104
+ they improve (write them `open`; the human consolidates into `PROJECT.md`) — grammar + lifecycle in
105
+ `deltas.md`. At milestone close (or on demand) the retrospective consolidation gathers confirmed deltas
106
+ into a versioned foundation `fold.md`; then (separately, after) compact each foundation spec's stable
107
+ tail `compact-foundation.md`. Observe also tunes your voice: propose a confirmable voice delta that,
108
+ once the human confirms, rewrites `SOUL.md` (the human is the only writer) — `soul.md`.
128
109
 
129
110
  ## Beyond the bundle — load on demand
130
111
 
131
- Once **§3 CONTRACT is FROZEN**, the build→verify half is a dynamic, auto-gated run
132
- (`autonomy: auto` default, lowered to `conservative` or `manual` for a human gate) — read `run.md`. To
133
- pipeline several ready tasks behind their own frozen contracts, read `streams.md`. To delegate
134
- one piece of your plan to a subagent that follows it when to spawn, the plan-following prompt
135
- template, the tier pick read `advisor.md`; and at any decision point self-score your draft
136
- (0–1 across six dimensions, refine if any < 0.9) with `confidence.md`. Both are advisory: the
137
- engine never spawns, and the self-score is never a gate.
138
-
139
- When a **UI feature** reaches specify, run the **design-definition loop** in `design.md` (UDD):
140
- review the domain → research and reuse components → wireframe → render a real captured screen the
141
- human confirms **before** build — so the build matches the expected layout. Tool-agnostic; the
142
- engine never renders.
143
-
144
- When a milestone's tasks are all done but its **goal** (the `MILESTONE.md` exit criteria) is not
145
- yet met, `milestone-done` holds the milestone open read `loop.md` for the dynamic loop that turns
146
- open deltas + extras into the next tasks, proposed by you and confirmed by the human, until the goal is met.
147
-
148
- When `add.py status` prints **`MVP covered propose graduation`** (every milestone done AND the
149
- stage-goal-criteria all `[x]`), the project is ready to graduate its stage read `graduate.md` for the
150
- orchestration: gather `graduation-report` analytics co-specify interview draft ≥1 production
151
- milestone human confirm then (and only then) `stage production`. The flip is guarded
152
- (`stage_no_roadmap`) and is the FINAL step — never a bare label change.
153
-
154
- When one or more milestones have closed since the last release, `add.py status` prints
155
- **`→ releasable: N milestone(s) closed since last release`** — read `release.md` for the 5th scope
156
- level: gather `release-report` → draft notes from the consolidated deltas → meet the readiness floor
157
- (security HARD-STOP is un-forceable) → human confirms → `add.py release <version>` records the cut
158
- (CHANGELOG + `RELEASES.md` ledger + milestone attribution) → watch. The engine records; the human runs
159
- the tag / publish / deploy. A release bundles ≥1 milestone and is orthogonal to stage.
112
+ - **§3 CONTRACT FROZEN** build→verify is a dynamic, auto-gated run (`autonomy: auto` default; lower to
113
+ `conservative`/`manual` for a human gate) — `run.md`. Pipeline several ready tasks behind their frozen
114
+ contracts `streams.md`. Delegate one piece of your plan to a subagent (when to spawn, the prompt
115
+ template, the tier) `advisor.md`. Self-score a draft (0–1 across six dimensions, refine if any < 0.9)
116
+ — `confidence.md`. Both advisory: the engine never spawns; the self-score is never a gate.
117
+ - **Small, low-risk task**, less ceremony the **fast lane**: `new-task --fast` scaffolds the minimal
118
+ `TASK.fast.md`, bundle approved in one freeze — `phases/fast-lane.md`. Floor held (frozen contract ·
119
+ red test · verify gate; `--fast` is freeze-gated under any milestone). Collapse, never skip; opt-in.
120
+ - **UI feature** at specify the **design-definition loop** (UDD): review the domain → research and
121
+ reuse components → wireframe → a real captured screen the human confirms **before** build — `design.md`.
122
+ Tool-agnostic; the engine never renders.
123
+ - Tasks all done but the milestone **goal** unmet → `milestone-done` holds it open; the loop turns open
124
+ deltas + extras into the next tasks (you propose, the human confirms) until the goal is met — `loop.md`.
125
+ - `status` prints **`MVP covered propose graduation`** (every milestone done AND stage criteria all
126
+ `[x]`) `graduate.md`: `graduation-report` co-specify interview draft ≥1 production milestone
127
+ human confirm then `stage production`. Guarded (`stage_no_roadmap`); the FINAL step, never a bare flip.
128
+ - `status` prints **`→ releasable: N milestone(s) closed since last release`** → `release.md` (the 5th
129
+ scope level): `release-report` draft notes from the consolidated deltas meet the readiness floor
130
+ (security HARD-STOP is un-forceable) human confirms `add.py release <version>` records the cut
131
+ (CHANGELOG + `RELEASES.md` ledger + milestone attribution). The engine records; the human runs the
132
+ tag / publish / deploy. A release bundles ≥1 milestone and is orthogonal to stage.
160
133
 
161
134
  ## Non-negotiable rules (from the method)
162
135
 
163
136
  <constraints>
164
137
  1. **Direction before speed.** Never start Build until §1–§4 exist and tests are red.
165
- 2. **Trust evidence, not inspection.** A feature is trusted because its tests pass
166
- and the non-functional risks (concurrency, security, architecture) were checked — not
167
- because the code reads plausibly.
168
- 3. **Never weaken a test or edit a frozen contract to make the build pass.** That
169
- inverts the method. A real change is a *change request* back to Specify.
170
- 4. **No silent skips.** Every Verify ends in exactly one recorded outcome:
171
- `PASS`, `RISK-ACCEPTED` (signed, non-security only), or `HARD-STOP`. A security
172
- finding is always `HARD-STOP`.
138
+ 2. **Trust evidence, not inspection.** A feature is trusted because its tests pass and the
139
+ non-functional risks (concurrency, security, architecture) were checked — not because the code
140
+ reads plausibly.
141
+ 3. **Never weaken a test or edit a frozen contract to make the build pass.** That inverts the method.
142
+ A real change is a *change request* back to Specify.
143
+ 4. **No silent skips.** Every Verify ends in exactly one recorded outcome: `PASS`, `RISK-ACCEPTED`
144
+ (signed, non-security only), or `HARD-STOP`. A security finding is always `HARD-STOP`.
173
145
  5. **Ask, don't guess.** If a requirement is unclear, stop and ask the user.
174
146
  </constraints>
175
147
 
176
148
  ## Advancing
177
149
 
178
- After a phase's exit gate is met, advance the state (this also syncs the marker
179
- inside TASK.md):
150
+ After a phase's exit gate is met, advance the state (this also syncs the TASK.md marker):
180
151
 
181
152
  ```bash
182
153
  python3 .add/tooling/add.py advance # next phase of the active task
@@ -186,17 +157,16 @@ python3 .add/tooling/add.py use <slug> # switch the active task (e.g. ac
186
157
 
187
158
  ## Depth by stage
188
159
 
189
- The steps never change; their depth does. Read the stage from `add.py status`:
160
+ The steps never change; their depth does (read the stage from `add.py status`):
190
161
 
191
162
  - **prototype** — run light; code is throwaway; design/experience is the point.
192
163
  - **poc** — run contract/tests/build deeply on the single riskiest slice only.
193
164
  - **mvp** — full flow, narrow scope, light observation.
194
- - **production** — every step at full rigor + the observe loop. Reach it via the graduation
195
- orchestration (`graduate.md`) when status shows `MVP covered → propose graduation`, never a bare
196
- `stage production` flip — the transition is guarded behind a human-confirmed roadmap.
165
+ - **production** — every step at full rigor + the observe loop. Reach it via the `graduate.md`
166
+ orchestration when status shows `MVP covered → propose graduation`, never a bare `stage production` flip.
197
167
 
198
168
  ## The method rationale
199
169
 
200
- The full method (the *why* behind every rule) is the AIDD book in `.add/docs/`.
201
- When a phase decision is genuinely unclear, read the linked chapter — each phase
202
- guide points to its chapter. Do not duplicate the book here; load it on demand.
170
+ The full method (the *why* behind every rule) is the AIDD book in `.add/docs/`. When a phase decision is
171
+ genuinely unclear, read the linked chapter — each phase guide points to its chapter. Do not duplicate
172
+ the book here; load it on demand.
@@ -1,10 +1,6 @@
1
1
  # Adopt — map an existing repo into the foundation (silent)
2
2
 
3
- When ADD is pointed at a repo that already has code, onboarding is **silent**: the code
4
- answers the questions a greenfield interview would ask, so you read it rather than ask.
5
- This is the **brownfield path** of setup (the greenfield path keeps the 4-lens interview —
6
- see `phases/0-setup.md`). You fill the living-documentation files from evidence, then stop at the one
7
- human gate: the **baseline approval** (`add.py lock`).
3
+ When ADD is pointed at a repo that already has code, onboarding is **silent**: the code answers the questions a greenfield interview would ask, so you read it rather than ask. This is the **brownfield path** of setup. You fill the living-documentation files from evidence, then stop at the one human gate: the **baseline approval** (`add.py lock`).
8
4
 
9
5
  ## The signal — and arming the gate
10
6
 
@@ -14,54 +10,37 @@ Enter a brownfield repo with `--await-lock`:
14
10
  python3 .add/tooling/add.py init --await-lock
15
11
  ```
16
12
 
17
- `--await-lock` does two things. It seeds an **unlocked** setup, which *arms the baseline-approval gate*
18
- — the engine then refuses a second task, crossing into build, and recording a gate until you
19
- `lock`. And init, being brownfield-aware, prints a line that begins:
13
+ `--await-lock` seeds an **unlocked** setup, *arming the baseline-approval gate* — the engine refuses crossing into build until you `lock`. Init prints:
20
14
 
21
15
  ```
22
16
  brownfield: existing code detected — the `add` skill maps it into your foundation …
23
17
  ```
24
18
 
25
- That line is your cue to run this guide. **Always use `--await-lock` for brownfield onboarding**:
26
- a plain `init` writes no setup and is grandfathered-locked, so its gate never arms *and* the
27
- closing `lock` below would refuse with `already_locked`. The engine only *detects* the existing
28
- code (a mechanical fact); it never reads or fills it — interpreting it is your job.
19
+ That line is your cue. **Always use `--await-lock` for brownfield**: a plain `init` is grandfathered-locked, so its gate never arms *and* the closing `lock` would refuse with `already_locked`.
29
20
 
30
21
  ## The silent mapping
31
22
 
32
- Fill each living-doc file in `.add/` from what the code actually shows — **ask nothing**:
23
+ Fill each living-doc file in `.add/` from what the code shows — **ask nothing**:
33
24
 
34
25
  | Living doc | Read it from |
35
26
  |----------|--------------|
36
- | `PROJECT.md` (foundation) | the domain nouns, entry points, the README, the first milestone the code implies |
37
- | `CONVENTIONS.md` | the languages, folder layout, naming, lint config, error style already in the tree |
38
- | `GLOSSARY.md` | the recurring names in modules, models, and public APIs (one name per concept) |
39
- | `MODEL_REGISTRY.md` | leave the active model record; note any AI-authored code you can detect |
40
- | `dependencies.allowlist` | the manifests already in the repo (package.json, pyproject, go.mod, …) |
41
-
42
- Two rules that never bend:
27
+ | `PROJECT.md` (foundation) | domain nouns, entry points, README, first milestone the code implies |
28
+ | `CONVENTIONS.md` | languages, folder layout, naming, lint config, error style in the tree |
29
+ | `GLOSSARY.md` | recurring names in modules, models, and public APIs (one name per concept) |
30
+ | `MODEL_REGISTRY.md` | leave the active model record; note any AI-authored code you detect |
31
+ | `dependencies.allowlist` | manifests already in the repo (package.json, pyproject, go.mod, …) |
43
32
 
44
33
  <constraints>
45
- 1. **Never clobber a living doc.** `init` already skips any living-doc file that exists; if a human
46
- already wrote `PROJECT.md`, you READ it, you do not overwrite it. Add, never replace.
47
- 2. **Tag every drafted decision `evidence-grounded` vs `guessed`.** A line you read from the
48
- code is *evidence-grounded* (cite the file). A line you inferred because the code was silent
49
- is *guessed*. The human's single baseline approval is only honest if they can see which is which —
50
- the guesses are what they actually need to check. (The tags feed `SETUP-REVIEW.md`.)
34
+ 1. **Never clobber a living doc.** `init` already skips any living-doc file that exists; if a human already wrote `PROJECT.md`, READ it, do not overwrite it. Add, never replace.
35
+ 2. **Tag every drafted decision `evidence-grounded` vs `guessed`.** A line you read from the code is *evidence-grounded* (cite the file). A line you inferred because the code was silent is *guessed*. The human's single baseline approval is only honest if they can see which is which — the guesses are what they actually need to check. (The tags feed `SETUP-REVIEW.md`.)
51
36
  </constraints>
52
37
 
53
38
  ## Where it ends — the baseline approval
54
39
 
55
- Brownfield onboarding draws no per-step approvals. You map the foundation, then draft the
56
- first milestone's scope and the first task's candidate specification bundle exactly as greenfield does, and
57
- present it all at **one** human gate. The human reviews the decisions (lowest-confidence / `guessed`
58
- first) and confirms in conversation; you run the lock with their name:
40
+ Brownfield onboarding draws no per-step approvals: map the foundation, draft the first milestone's scope and first task's candidate specification bundle, then present it all at **one** human gate. The human reviews decisions (`guessed` first) and confirms; you run the lock:
59
41
 
60
42
  ```bash
61
43
  python3 .add/tooling/add.py lock --by "<name>"
62
44
  ```
63
45
 
64
- `lock` freezes the foundation + scope + first contract in one atomic write and opens the build.
65
- Until it is run, the engine refuses a second task, crossing into build, and recording a gate —
66
- so nothing is built on an unreviewed map. That gate is the only thing brownfield onboarding asks
67
- of a human; everything before it, you did from the code.
46
+ `lock` freezes the foundation + scope + first contract in one atomic write and opens the build. Until it runs, the engine refuses crossing into build.
@@ -10,16 +10,15 @@ engine never spawns; this is your judgment to make per step.
10
10
 
11
11
  Spawn a subagent when the piece is **separable and worth the round-trip**:
12
12
 
13
- - **Broad / expensive sweep** — gather a wide map cheaply, return a compact result (the `0-ground`
14
- broad sweep is the canonical case).
15
- - **Independent adversarial review** a fresh context argues *against* your result (the `6-verify`
16
- earned-green refute-read), so the check is not graded by the author.
13
+ - **Broad / expensive sweep** — gather a wide map cheaply, return a compact result.
14
+ - **Independent adversarial review** a fresh context argues *against* your result (the
15
+ `6-verify` earned-green refute-read), so the check is not graded by the author.
17
16
  - **A well-scoped delegable batch** — a self-contained slice with a clear contract and return shape.
18
17
  - **Context offload** — work that would bloat your context but compresses to a small verdict.
19
18
 
20
19
  Do **not** spawn when the work is narrow and cheap enough to do in-context: a small sweep, a
21
- two-file read, a quick edit. A spawn costs a round-trip and a fresh context — pay it only when
22
- the piece is big or independent enough to earn it. When in doubt, do it in-context.
20
+ two-file read, a quick edit. A spawn costs a round-trip — pay it only when the piece is big or
21
+ independent enough to earn it. When in doubt, do it in-context.
23
22
 
24
23
  ## The plan-following prompt template
25
24
 
@@ -54,10 +53,10 @@ Do NOT run add.py or write any shared state — you propose, the orchestrator re
54
53
 
55
54
  ## Choosing the model — vendor-neutral tiers
56
55
 
57
- Reuse `streams.md`'s tiers, never a new vocabulary: **mid** (Claude Code: `sonnet`) for ordinary,
58
- well-scoped pieces with a clear contract; **top** (Claude Code: `opus`) for complex, ambiguous, or
59
- cross-cutting pieces. The tier maps to the runner's model id through the same adapter `streams.md`
60
- defines. A stronger model never buys back a human gate: high-risk scope still escalates.
56
+ Pick the tier from `streams.md`'s vocabulary: **mid** for an ordinary, well-scoped piece; **top**
57
+ for a complex, ambiguous, or cross-cutting one. The tier→model-id mapping and the spawn adapter
58
+ live there one home, not repeated here. A stronger model never buys back a human gate: high-risk
59
+ scope still escalates.
61
60
 
62
61
  ## The hard rule — you delegate, you do not abdicate
63
62
 
@@ -1,53 +1,40 @@
1
1
  # Foundation compaction — collapse the stable tail
2
2
 
3
- This is the **retrospective shrink**. `fold.md` PREPENDS new learnings (newest-first); foundation
4
- compaction later COLLAPSES the stable tail of each foundation spec into a rolled-up settled line — so
5
- PROJECT.md, CONVENTIONS.md, GLOSSARY.md, and MODEL_REGISTRY.md keep to one screen as the project grows.
3
+ `fold.md` PREPENDS new learnings (newest-first); foundation compaction COLLAPSES the stable tail of each foundation spec into a rolled-up settled line — keeping PROJECT.md, CONVENTIONS.md, GLOSSARY.md, and MODEL_REGISTRY.md to one screen as the project grows.
6
4
 
7
- You (the AI) **gather and propose**; the **human confirms**; you then write the settled line. This is a
8
- **convention**, not a command — there is no `add.py compact-foundation` (the engine stays judgment-free).
9
- It is DISTINCT from the engine `add.py compact <slug>` (the archive recovery-bundle move).
5
+ You **gather and propose**; the **human confirms**; you then write the settled line. This is a **convention**, not a command — there is no `add.py compact-foundation`. It is DISTINCT from engine `add.py compact <slug>` (the archive recovery-bundle move).
10
6
 
11
7
  ## When
12
8
 
13
- At **milestone close** (after `fold.md`) or **on demand** when a spec has grown past one screen.
14
- Compaction is a SEPARATE step from `fold.md` — never merged into the retrospective consolidation.
9
+ At **milestone close** (after `fold.md`) or **on demand** when a spec has grown past one screen. Always a SEPARATE step from `fold.md`.
15
10
 
16
- ## Eligibility (one shared test)
11
+ ## Eligibility
17
12
 
18
- An entry is compaction-eligible **IFF** its milestone is **shipped** (done/archived) **AND** it carries
19
- **zero open residues**/deltas. An unshipped or open-residue entry is NOT eligible — leave it live
20
- (`open-residue-version`).
13
+ An entry is compaction-eligible **IFF** its milestone is **shipped** (done/archived) **AND** it carries **zero open residues**/deltas. Unshipped or open-residue entries are NOT eligible (`open-residue-version`).
21
14
 
22
15
  ## The ritual
23
16
 
24
- 1. **Gather** — collect the stable, shipped, zero-residue tail of the target spec (its oldest entries).
25
- 2. **Propose** — draft the per-spec rolled-up settled line (see the shapes below) and show the human.
26
- 3. **Confirm** — the human accepts or declines. No write happens without confirmation.
27
- 4. **Write** — replace the collapsed tail with ONE settled line at the BOTTOM (newest-first: live records
28
- stay on top, the settled line anchors at the tail), carrying a git/archive pointer.
17
+ 1. **Gather** — collect the stable, shipped, zero-residue tail of the target spec.
18
+ 2. **Propose** — draft the per-spec rolled-up settled line and show the human.
19
+ 3. **Confirm** — no write happens without confirmation.
20
+ 4. **Write** — replace the collapsed tail with ONE settled line at the BOTTOM (newest-first: live records stay on top, settled line anchors at the tail), carrying a git/archive pointer.
29
21
 
30
- ## Per-spec rolled-line shapes (from the frozen compaction-contract)
22
+ ## Per-spec rolled-line shapes
31
23
 
32
- - **PROJECT.md §Spec** — a run of stable `[folded fv N..M]` bullets → `settled fvN–fvM — <theme> (see git)`.
33
- - **PROJECT.md §Key-Decisions** — matching shipped rows → one `| settled <dateA>–<dateB> | <N> decisions rolled | … | see git |` row at the tail.
34
- - **CONVENTIONS.md** — a run of stable `(TAG)` learnings → `- settled conventions <range> — <N> rules (see git)`.
35
- - **GLOSSARY.md** — a verbose, stable definition → its terse canonical line + `(rationale: see git)`. *(forward-looking — small today.)*
36
- - **MODEL_REGISTRY.md** — superseded model rows → `Prior models: <list> (see git)`. *(forward-looking — nothing to compact yet.)*
24
+ - **PROJECT.md §Spec** — `[folded fv N..M]` bullets → `settled fvN–fvM — <theme> (see git)`.
25
+ - **PROJECT.md §Key-Decisions** — shipped rows → `| settled <dateA>–<dateB> | <N> decisions rolled | … | see git |` at the tail.
26
+ - **CONVENTIONS.md** — `(TAG)` learnings → `- settled conventions <range> — <N> rules (see git)`.
27
+ - **GLOSSARY.md** — verbose stable definition → terse canonical line + `(rationale: see git)`.
28
+ - **MODEL_REGISTRY.md** — superseded model rows → `Prior models: <list> (see git)`.
37
29
 
38
- ## Preservation (every collapse)
30
+ ## Preservation
39
31
 
40
32
  - **Never delete** — summarize and point; a settled line is lossy on prose, lossless on traceability.
41
- - A surviving **git**/archive pointer is mandatory (`trail-loss` if dropped).
42
- - **OPEN residues stay** live; the audit trail is summarized-not-deleted.
33
+ - A git/archive pointer is mandatory (`trail-loss` if dropped).
34
+ - OPEN residues stay live.
43
35
 
44
- ## Reject codes (judgment-checked — the AI proposes, the human confirms)
36
+ ## Reject codes
45
37
 
46
- - `open-residue-version` — the entry is unshipped or has ≥1 open delta/residue; leave it live.
47
- - `trail-loss` — the collapse would drop the git/archive pointer or the audit summary.
38
+ - `open-residue-version` — entry is unshipped or has ≥1 open delta/residue; leave it live.
39
+ - `trail-loss` — the collapse would drop the git/archive pointer or audit summary.
48
40
  - `wrong-order` — a record is not newest-first, or the settled line is not at the tail.
49
-
50
- ## Distinct from `add.py compact`
51
-
52
- Foundation compaction ≠ engine `add.py compact <slug>`. It mirrors `fold.md`'s "AI proposes, human
53
- confirms" voice and stays convention-guided — no engine command, no `add.py check` enforcement.