@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/skill/add/run.md CHANGED
@@ -1,57 +1,39 @@
1
1
  # The dynamic run — executing a locked scope
2
2
 
3
- Once a task's CONTRACT is frozen (phase 3), the scope is *locked*: the external shape will not move.
4
- That lock is ADD's autonomy decision point — below it code is disposable; above it nothing breaks. This rubric
5
- covers what runs on the far side of the decision point: the **build->verify half, executed as a dynamic,
6
- self-improving run** instead of a manual, sequential build. The human-led **specification bundle** (Specify · Scenarios
7
- · Contract) still owns *direction*, but v7 compresses it to a **single human approval at the decision point**
8
- (see "The specification bundle" below) the AI drafts the whole bundle, a human approves it once.
9
-
10
- > **Self-improving = within-run convergence + emit v5 deltas** — same definition as v5: tracked,
11
- > evidence-backed, never autonomous training. The run converges in-turn AND feeds the human-gated
12
- > consolidation loop (`deltas.md` · `fold.md`). The engine stays judgment-free: this is a rubric, not `add.py`.
3
+ Once a task's CONTRACT is frozen (phase 3), the scope is *locked*. That lock is ADD's autonomy
4
+ decision point — below it code is disposable; above it nothing breaks. This rubric covers the
5
+ **build->verify half, executed as a dynamic, self-improving run**. The human-led **specification
6
+ bundle** (Specify · Scenarios · Contract) still owns *direction*, but v7 compresses it to a
7
+ **single human approval at the decision point** the AI drafts the whole bundle, a human approves
8
+ it once. The engine stays judgment-free: this is a rubric, not `add.py`.
13
9
 
14
10
  ## The specification bundle (v7)
15
11
 
16
- The specification bundle used to be three separate approvals Specify, then Scenarios, then the Contract
17
- freeze. v7 compresses it to **one**. From the user's input the AI **drafts the whole specification bundle in one pass** — the Spec, the Scenarios, the Contract, and the failing Tests — and presents it together. The
18
- human gives **one approval, at the frozen contract** (the decision point). That single approval is the green light
19
- for the self-driving run.
20
-
21
- Why one approval and not zero: the contract freeze is the autonomy decision point, and the decision point **stays human**.
22
- The AI *drafts* the contract but never *freezes its own* a person approves the frozen shape before any
23
- auto-run touches code. This is exactly what keeps "never self-gate a human-led gate" true under an auto
24
- default: the one gate that remains is human. Drop it to zero and the AI would freeze the interface it
25
- then builds against and self-gate the result the circular trust v6's dogfood warned against.
26
-
27
- What the human is actually approving in that one gate: that the drafted Spec captures the real intent,
28
- that the Scenarios cover the cases that matter, and that the Contract shape is the one to freeze. Reject
29
- any part and the bundle goes back to draft that is backward-correction (principle 4), not failure.
30
- Approve, and the run begins. The decision-point guide (`phases/3-contract.md`) carries the
31
- **freeze review checklist** seven lines that walk the human through exactly this, ⚠-first.
32
-
33
- **The lowest-confidence flag — aiming the one approval.** A single approval over a whole bundle is easy to
34
- grant without reading. So the AI presents the bundle **lowest-confidence first**: of everything it is asking the human
35
- to freeze, it names the **1–2 points most likely to be wrong**, tagged by part
36
- (`⚠ [spec|scenario|contract|test] … — because …; if wrong: …`), each with *why* it is uncertain and
37
- *what it costs if wrong*. The §1 assumptions feed it, but a flag may equally point at an uncovered
38
- scenario or the contract shape. If nothing is materially uncertain, the AI still names the single
39
- biggest risk, however small — never a blank "none". Honest about its limit: the flag records that the
40
- human approved with the soft spots **in front of them**, eyes open; it makes a real review cheap and a
41
- lazy one visibly negligent, but it cannot *force* engagement — and the AI never asserts that the human
42
- engaged when it cannot know (a self-asserted gate would just move the unread approval one level up). Closing
43
- that enforcement gap is the job of a CI checker, not of prose.
12
+ v7 compresses the old three-approval flow to **one**. The AI **drafts the whole specification
13
+ bundle in one pass** — Spec, Scenarios, Contract, and failing Tests — and presents it together.
14
+ The human gives **one approval, at the frozen contract** (the decision point).
15
+
16
+ Why one and not zero: the decision point **stays human**. The AI *drafts* the contract but never
17
+ *freezes its own* a person approves the frozen shape before any auto-run touches code. What the
18
+ human approves: that the Spec captures real intent, the Scenarios cover the cases that matter, and
19
+ the Contract shape is the one to freeze. Reject any part and the bundle goes back to draft —
20
+ backward-correction (principle 4), not failure. The decision-point guide (`phases/3-contract.md`) carries the **freeze review checklist**
21
+ seven lines that walk the human through exactly this, ⚠-first.
22
+
23
+ **The lowest-confidence flag.** The AI presents the bundle **lowest-confidence first**: the
24
+ **1–2 points most likely to be wrong**, tagged by part
25
+ (`⚠ [spec|scenario|contract|test] because …; if wrong: …`). The `because` names the §1
26
+ assumption that makes it uncertain; the `if wrong` names what it costs if that assumption is off.
27
+ If nothing is materially uncertain, the AI still names the single biggest risk never a blank "none".
28
+ Raising this flag is honor-system: the lint cannot force the AI to engage with it — closing that
29
+ gap is a CI checker's job, not prose.
44
30
 
45
31
  ## When the run begins — the scope-lock trigger
46
32
 
47
- The trigger is the **frozen contract**, nothing else. A run may start only when:
48
-
49
- - §3 CONTRACT is marked `FROZEN @ vN` (the shape is fixed), AND
50
- - §4 TESTS exist and are RED for the right reason (the target the run drives to green).
33
+ The trigger is the **frozen contract**, nothing else. A run may start only when §3 CONTRACT is
34
+ marked `FROZEN @ vN` AND §4 TESTS exist and are RED for the right reason.
51
35
 
52
- No frozen contract -> no run: you are still inside the specification bundle, and starting early is the
53
- forward-skip the flow forbids. The lock is what makes autonomous execution *safe* — the AI cannot
54
- drift the interface, because the interface is frozen above it.
36
+ No frozen contract -> no run: starting early is the forward-skip the flow forbids.
55
37
 
56
38
  ## The change scope — what the run may and may not touch
57
39
 
@@ -59,156 +41,104 @@ drift the interface, because the interface is frozen above it.
59
41
  A locked run has a hard boundary. It MAY:
60
42
 
61
43
  - write and rewrite **code** (`src/`) — code is disposable below the decision point;
62
- - drive the **tests** to green WITHOUT weakening them (a weakened test is a method violation);
44
+ - drive the **tests** to green WITHOUT weakening them;
63
45
  - gather **evidence** for the verify gate (test output, non-functional review).
64
46
 
65
47
  It MUST NOT:
66
48
 
67
49
  - change the **frozen contract** or the **locked scope** — a discovered gap is backward-correction:
68
- the run STOPS and hands back to a human to reopen Specify (principle 4). The run never re-locks
69
- scope on its own.
70
- - weaken, delete, or skip a **test** to make the build pass (that inverts the method).
50
+ the run STOPS and hands back to a human to reopen Specify (principle 4).
51
+ - weaken, delete, or skip a **test** to make the build pass.
71
52
  - touch the **specification-bundle artifacts** (§1–§3) except to halt and escalate.
72
53
  </constraints>
73
54
 
74
- Crossing the boundary is not a fast run; it is an unverified one. When the run hits something only the
75
- specification bundle can resolve, it stops — and that stop is the loop working, not failing.
76
-
77
55
  ## The dynamic run — fan-out and in-run convergence
78
56
 
79
- Once it starts, the run does not crawl the build in one linear pass. It **fans out** the independent
80
- work — several build attempts, several test-fix loops, several checks at once — and then **converges**
81
- on a trustworthy result with three loops:
57
+ The run **fans out** independent work and **converges** with three loops:
82
58
 
83
- - **loop-until-dry** — keep hunting failures and gaps until N consecutive passes find nothing new.
84
- Stopping at the first green is how defects survive; the run stops only when the well runs dry.
85
- - **adversarial verify** — for every "done" claim, an independent skeptic tries to REFUTE it. The
86
- claim survives only if it withstands refutation, not because one pass looked plausible.
87
- - **completeness-critic** — a final pass that asks "what did we NOT cover — a scenario, a non-functional risk,
88
- an unstated assumption?" Whatever it finds re-enters the run.
59
+ - **loop-until-dry** — keep hunting failures until N consecutive passes find nothing new.
60
+ - **adversarial verify** an independent skeptic tries to REFUTE every "done" claim.
61
+ - **completeness-critic** — a final pass asking "what did we NOT cover?" Whatever it finds re-enters.
89
62
 
90
- The run ends only when the loops go dry AND the auto-gate's evidence is satisfied. This is the run
91
- **self-improving within the turn** — the same convergence the foundation loop runs across milestones,
92
- compressed into one task.
63
+ The run ends only when the loops go dry AND the auto-gate's evidence is satisfied.
93
64
 
94
65
  ## The automated quality gate
95
66
 
96
67
  <constraints>
97
- The verify gate may be resolved by **evidence** rather than by a person when the evidence is
98
- sufficient and the result is recorded (principle 7, reframed: an automated, recorded pass is an
99
- explicit pass, not a skip).
68
+ The verify gate may be resolved by **evidence** rather than by a person (principle 7: an automated,
69
+ recorded pass is an explicit pass, not a skip).
100
70
 
101
71
  - **Auto-PASS requires ALL of:** every test green; coverage not decreased; no test weakened and no
102
- contract edited; the convergence loops dry; the completeness-critic found nothing open; and the
103
- deep check below recorded.
104
- - **The deep check (every gate, no skim).** Deep check — do not skim. If the task produced code, record
105
- that every new symbol is referenced (wiring) and that no new dead/unused code was introduced. If it
106
- produced prose or non-code, record a semantic read — what you read in full and what it confirmed.
107
- Which path applies is the resolver's judgement; the engine never classifies. An unfilled deep check is
108
- a **shallow verify**, not an auto-PASS — evidence the work is wired, not merely plausible.
72
+ contract edited; loops dry; completeness-critic clean; and the deep check below.
73
+ - **The deep check (every gate, do not skim).** If the task produced code, record that every new symbol is referenced (wiring) and that no new dead/unused code was introduced. If it produced prose or non-code, record a semantic read. An unfilled deep check is a **shallow verify**, not an auto-PASS.
109
74
  - **Always escalates to a human (never auto-passed):** any **security** finding (HARD-STOP, always);
110
- a **concurrency**/timing risk the tests cannot exercise; an **architecture**/layering violation; and
111
- any failing test. These are the residue principle 2 names — automation cannot judge them.
112
- - **Records exactly one outcome** (no silent skip): `PASS` (evidence + the named run as accountable
113
- owner) · `RISK-ACCEPTED` (non-security, signed) · `HARD-STOP`. The record states it was
114
- auto-resolved, names the run, and lists the residue checks performed.
115
-
116
- The auto-gate NEVER writes a human signature it did not get. An auto-PASS is logged as *auto-resolved*,
117
- honestly — the line between a pass and a skip is the recorded outcome, not a forged name.
75
+ a **concurrency**/timing risk the tests cannot exercise; an **architecture**/layering violation;
76
+ any failing test.
77
+ - **Records exactly one outcome** (no silent skip): `PASS` · `RISK-ACCEPTED` · `HARD-STOP`. The
78
+ record states it was auto-resolved, names the run, and lists the residue checks performed.
79
+
80
+ The auto-gate NEVER writes a human signature it did not get.
118
81
  </constraints>
119
82
 
120
- ## The bounded self-heal loop — a confirmed cheat returns to build
83
+ ## The bounded self-heal loop
121
84
 
122
- The auto-gate trusts evidence; but evidence can be **gamed**. A build can make the unchanged red suite
123
- pass without EARNING it a test or the frozen contract edited after the red run, src **overfit** to the
124
- fixtures, **vacuous** asserts, or real logic **stubbed away**. That is a **confirmed cheat**, and a cheat
125
- is **HARD-STOP-class**: never auto-passed, never RISK-ACCEPTED-waived (like a security finding). But a
126
- first cheat is not yet a stop — it is a chance to redo honestly.
85
+ Evidence can be **gamed** test or contract edited after the red run, src overfit to fixtures,
86
+ vacuous asserts, or real logic stubbed away. That is a **confirmed cheat**: HARD-STOP-class, never
87
+ auto-passed, never RISK-ACCEPTED-waived.
127
88
 
128
- So a confirmed cheat enters a **bounded self-heal loop**: the engine returns the task to **build** for an
129
- honest redo, **counts** the attempt, and **caps** it. After **3** honest re-build attempts a fourth
130
- confirmed cheat forces a **HARD-STOP that escalates to the human** never an auto-PASS, never an unbounded
131
- loop. The engine COUNTS, CAPS, and ESCALATES; the **agent** does the honest re-build (the engine never
132
- auto-fixes). The counter is **monotonic** — it never auto-resets, so the cap cannot be cleared by
133
- re-crossing a phase; only an honest build (no cheat) escapes the loop, and an honest build PASSes even at
134
- the third attempt (the cap bites a *continued* cheat, never a recovery).
89
+ A first cheat enters a **bounded self-heal loop**: the engine returns the task to **build** for an
90
+ honest redo, counts the attempt, and caps it. After **3 honest** re-build attempts a fourth confirmed
91
+ cheat forces a **HARD-STOP** that escalates to the human. The counter is **monotonic** only an
92
+ honest build escapes.
135
93
 
136
94
  Two findings enter the loop:
137
- - **mechanical** (enforced) — the tamper tripwire (`tamper-tripwire`): at the gate the engine re-hashes the
138
- red test files + the frozen §3 against the `tests→build` snapshot; any divergence is a cheat, routed to
139
- the loop before any completing outcome is recorded.
140
- - **semantic** (honor-system, necessary-not-sufficient) the **adversarial refute-read** (`6-verify.md`):
141
- an independent reviewer argues "the green was NOT earned" and, on a confirmed overfit/vacuous/stub, the
142
- agent reports it with `add.py heal <slug> --reason "<finding>"`. The engine cannot SEE a judgment cheat,
143
- so this entry is the agent's honest report — the human verify gate stays the real backstop.
95
+ - **mechanical** (enforced) — the tamper tripwire: at the gate the engine re-hashes the red test
96
+ files + frozen §3 against the `tests→build` snapshot; any divergence routes to the loop.
97
+ - **semantic** (honor-system) the **adversarial refute-read** (`6-verify.md`): on a confirmed
98
+ overfit/vacuous/stub the agent reports it with `add.py heal <slug> --reason "<finding>"`.
99
+ The engine cannot see a judgment cheat, so this entry is the agent's honest report — the human
100
+ verify gate stays the real backstop.
144
101
 
145
- The mechanical entry returns-to-build automatically at the gate; the `heal` verb is how a *reported* cheat
146
- enters the same bounded loop. Either way: ≤3 honest redos, then escalate. A gamed green never ships.
102
+ Either way: ≤3 honest redos, then escalate. A gamed green never ships.
147
103
 
148
104
  ## Emitting deltas — feeding the foundation back
149
105
 
150
- The completeness-critic does not discard what it finds. Every gap, surprise, or convention that helped
151
- or hurt becomes an **`open` lesson learned** in the task's OBSERVE block, in the `deltas.md` grammar,
152
- tagged by competency:
153
-
154
- - a finding the run FIXED but that taught the foundation something (a missing scenario -> `TDD`);
155
- - a finding the run could NOT fix — a residue escalation -> a delta AND the escalation to a human.
156
-
157
- These `open` deltas feed v5's human-gated consolidation (`fold.md`) at milestone close: the run emits `open`;
158
- the human consolidates. That is the loop closing — **v6 run -> v5 foundation** — so a dynamic run sharpens the
159
- five competencies instead of letting its findings evaporate at end-of-run.
106
+ Every gap the completeness-critic finds becomes an **`open` lesson learned** in the task's OBSERVE
107
+ block (`deltas.md` grammar). These `open` deltas feed v5's human-gated consolidation (`fold.md`)
108
+ at milestone close — the loop closing: **v6 run -> v5 foundation**.
160
109
 
161
110
  ## The autonomy level
162
111
 
163
112
  <constraints>
164
- How much a run may auto-gate is a **per-scope setting**, not a global switch (principle 5: trust is
165
- earned per scope). A task declares its level in its `TASK.md` header:
113
+ How much a run may auto-gate is a **per-scope setting** (principle 5). A task declares it in its
114
+ `TASK.md` header this is not an add.py flag; it is a rubric convention:
166
115
 
167
116
  ```
168
117
  autonomy: manual | conservative | auto
169
118
  ```
170
119
 
171
- An ordered ladder`manual < conservative < auto` declared once in the header and reviewed at the freeze:
172
-
173
- - **auto (the seeded default)** — the run may auto-PASS when the evidence + residue checks above are
174
- satisfied. Security still always escalates. This is the default starting point: a frozen contract
175
- flips the task into a self-driving run that converges and auto-gates on evidence.
176
- - **conservative** the deliberate *lowering*: the run does all the work and converges, but STOPS at
177
- the verify gate for a human. Auto-PASS is disabled. Choose it wherever evidence is thin or risk is high.
178
- - **manual** the strict floor: the human owns the verify gate and the engine never auto-resolves
179
- (behaviourally the conservative floor with the explicit "I drive this decision; the AI proposes only"
180
- name). Choose it for the highest-stakes scope; like `conservative`, it satisfies the high-risk guard.
181
-
182
- > **v7 reversal (recorded, not hidden).** Earlier the default was `conservative` and `auto` was the
183
- > earned exception; v7 flips this — `auto` is the default, `conservative` is the deliberate lowering.
184
- > What did **not** change is principle 5: the autonomy level is still **per-scope**, and it still lives in the
185
- > `TASK.md` header, and you still lower it anywhere risk demands. Only the starting point moved.
186
-
187
- **The high-risk guard `auto` is refused where it matters most.** The autonomy level is not a blank cheque. On a
188
- **high-risk or method-defining scope** anything where a wrong-but-plausible result is expensive or
189
- hard to reverse (auth, money, data-loss paths, the method/trust-layer itself) — `auto` must be lowered
190
- to a stricter rung`conservative` or `manual`; leaving it at `auto` there is the reject code
191
- **`unguarded_high_risk_auto`**. This
192
- closes the v6 dogfood gap, where the whole milestone ran at `auto` on the riskiest possible
193
- scope (defining the method) with no friction. The default is `auto` *for ordinary, well-tested scope*;
194
- high risk still earns a human gate.
195
-
196
- Judging *what* is high-risk stays human — the scope declares **`risk: high`** in the same `TASK.md`
197
- header where the autonomy level lives, reviewed at the freeze like every header line (the engine never
198
- classifies scope). **Since v14 the guard is mechanical for the declared case:**
199
- the engine refuses the declared combination — `add.py gate` will not complete (`PASS`/`RISK-ACCEPTED`) a task whose header
200
- carries `risk: high` without a lowered level — `conservative` or `manual` (error `unguarded_high_risk_auto`; `HARD-STOP`
201
- always records — stopping is never blocked), and `add.py audit` flags the same code on a finished
202
- record whose header was tampered or whose GATE RECORD reviewer is the auto-gate — which CI enforces
203
- (audit-ci). The honest limit mirrors the audit's: an **undeclared** high-risk scope passes; declaring
204
- is the human decision point, the engine enforces what was declared.
205
-
206
- **Autonomy is earned by goal-clarity — the auto-ready goal.** The level decides *who* resolves Verify;
207
- an **auto-ready goal** decides whether a self-verifying run is even *meaningful*. A milestone goal is
208
- auto-ready when **every exit criterion cites a verifier** — `(verify: <test | command | metric>)` — so the
209
- run can check its own result against the goal without human judgment. `add.py check` raises a
210
- `goal_not_auto_ready` WARN (never red, the active milestone only) while criteria are uncited, and `status`
211
- prints a `goal-ready:` line every session. It **measures, never blocks** — it changes neither the freeze
212
- gate nor the autonomy level. The lint forces a citation slot per criterion (raising the floor) but cannot
213
- prove the citation is honest (`(verify: it works)` passes) — that judgment stays the human's.
120
+ - **auto (the default)** the run may auto-PASS when evidence + residue checks are satisfied.
121
+ Security still always escalates.
122
+ - **conservative** — the deliberate *lowering*: the run converges but STOPS at the verify gate.
123
+ - **manual** the strict floor: the human owns the verify gate; the engine never auto-resolves.
124
+
125
+ > **v7 reversal (recorded).** Earlier the default was `conservative`; v7 flips it `auto` is the
126
+ > default, `conservative` is the deliberate lowering. The level is still **per-scope** and is
127
+ > lowered wherever risk demands.
128
+
129
+ **The high-risk guard.** On a **high-risk or method-defining scope** `auto` must be lowered to
130
+ `conservative` or `manual`; leaving it at `auto` is the reject code **`unguarded_high_risk_auto`**.
131
+ The scope declares **`risk: high`** in the `TASK.md` header (the engine never classifies scope).
132
+ Since v14 the guard is mechanical for the declared case:
133
+ the engine refuses the declared combination `add.py gate` will not complete (`PASS`/`RISK-ACCEPTED`)
134
+ a task whose header carries `risk: high` without a lowered level (`HARD-STOP` always records);
135
+ `add.py audit` flags finished records whose header was tampered or whose GATE RECORD reviewer is
136
+ the auto-gate (CI enforces). An undeclared high-risk scope passes a scope without `risk: high`
137
+ in its header is not blocked by the v14 mechanical guard.
138
+
139
+ **Autonomy is earned by goal-clarity the auto-ready goal.** A milestone goal is auto-ready
140
+ when **every exit criterion cites a verifier** — `(verify: <test | command | metric>)`.
141
+ `add.py check` raises a `goal_not_auto_ready` WARN while criteria are uncited, and `status`
142
+ prints a `goal-ready:` line every session. It **measures, never blocks**. The lint cannot prove
143
+ the citation is honest `(verify: it works)` passes the check — that judgment stays the human's.
214
144
  </constraints>
@@ -1,121 +1,72 @@
1
1
  # Scope drafting — turn a classified request into a versioned MILESTONE.md
2
2
 
3
- This is the **second half of intake**. `intake.md` CLASSIFIES a request into a bucket; scope
4
- drafting turns that classified request into a confirmed, well-formed, versioned `MILESTONE.md`
5
- through discussion. The MILESTONE.md template is the SHAPE; this rubric is HOW to fill it well.
6
- You (the AI) **propose**; the human **confirms before anything is created**.
3
+ `intake.md` CLASSIFIES a request into a bucket; scope drafting turns that into a confirmed, well-formed, versioned `MILESTONE.md` through discussion. The MILESTONE.md template is the SHAPE; this rubric is HOW to fill it well.
7
4
 
8
5
  ## What to do per intake outcome
9
6
 
10
- scope drafting honors intake's classification — it never re-sizes a request:
11
-
12
7
  | intake outcome | scope-loop action | creates (after confirm) |
13
8
  |----------------|-------------------|-------------------------|
14
9
  | `new-major` / `sub-milestone` | draft ONE MILESTONE.md (fill the template via discussion) | 1 milestone |
15
- | `task` | route to `add.py new-task <slug>` (it fits the active milestone) | 0 milestones |
10
+ | `task` | route to `add.py new-task <slug>` (fits the active milestone) | 0 milestones |
16
11
  | `change-request` | route to SPECIFY/CONTRACT of the affected task | 0 milestones |
17
12
  | `split_required` | draft ALL N items as a batch in ONE pass | N milestones/tasks |
18
13
 
19
- **Confirm before create is the invariant.** It holds in the one-pass split case too: "one pass"
20
- means one drafting pass, NOT auto-creation. Nothing is written to disk — single draft or the
21
- whole batch — until the human confirms. You propose; you wait.
14
+ **Confirm before create is the invariant.** "One pass" means one drafting pass, NOT auto-creation nothing is written until the human confirms.
22
15
 
23
- ## Position the goalground in assets, relate to the milestone map (do this FIRST)
16
+ **Confirm the milestone before detailing tasks.** `new-milestone <slug> --await-confirm` seeds it *unconfirmed* `new-task` is HELD (`milestone_unconfirmed`) until you show the filled `MILESTONE.md`, get the human's go, and run `milestone-confirm <slug>`. Keeps you from digging into task §0–§5 before the parent is agreed. (Omit the flag: no gate.)
24
17
 
25
- Before you draft the goal sentence before Diverge below position the request in what
26
- already exists. You cannot write a correct goal without knowing where it sits.
18
+ ## Position the goal — ground in assets, relate to the milestone map (do this FIRST)
27
19
 
28
- 1. **Ground in current assets.** Read the goal input against `PROJECT.md` (domain · spec ·
29
- UI/UX), the code it touches, and the existing docs — so the goal is grounded in what the
30
- project already is, not in what you assume.
31
- 2. **Relate to the milestone map.** Read every existing goal — `.add/milestones/*/MILESTONE.md`
32
- and `.add/archive/*` — and name THIS request's relationship to them: *extends* theme X ·
33
- *depends-on* Y · *overlaps* Z. Record that relationship in the `rationale` line you will write.
34
- 3. **If the goal is already delivered** by an existing milestone, do NOT fork it — reject
35
- `duplicate_goal` and route the request as a `task` or `change-request` (create nothing).
20
+ Before drafting the goal sentence, position the request in what already exists distinct from intake's classification, not redundant with it.
36
21
 
37
- This COMPLEMENTS `intake.md`'s bucket test (which weighs only whether a live milestone's goal
38
- covers the request); positioning also grounds the goal in current assets and relates it to the
39
- prior milestone map (`.add/milestones/*` + `.add/archive/*`) which classification does not do.
40
- Point at intake for the bucket; do not restate it here.
22
+ 1. **Ground in current assets.** Read the goal against `PROJECT.md` (domain · spec · UI/UX), the code it touches, and existing docs — the goal must reflect what the project already is.
23
+ 2. **Relate to the milestone map.** Read every existing goal `.add/milestones/*/MILESTONE.md` and `.add/archive/*` — and name THIS request's relationship: *extends* X · *depends-on* Y · *overlaps* Z. Record in the `rationale` line.
24
+ 3. **If the goal is already delivered** by an existing milestone, reject `duplicate_goal` and route as `task` or `change-request`.
41
25
 
42
26
  ## Brainstorm before you draft — co-specify at milestone level
43
27
 
44
- Don't draft a MILESTONE.md from thin input. Run the same three-move co-specify as a
45
- task's §1 (`phases/1-specify.md`) — Diverge (framings + open questions) → Converge
46
- (draft + rank) → Validate (show flags first) — raised to milestone scope. Ask only
47
- what moves the goal, the In/Out line, or the task list; skip what PROJECT.md settles.
48
- Draft the WHOLE milestone before showing; nothing hits disk until the human confirms.
28
+ Don't draft from thin input. Run the three-move co-specify (`phases/1-specify.md`) — Diverge → Converge → Validate — raised to milestone scope. Ask only what moves the goal, the In/Out line, or the task list.
49
29
 
50
30
  Diverge seeds (pick the live ones):
51
- - **Outcome** — done means a user can do *what* they can't today? (goal sentence)
52
- - **Edge of scope** — nearest thing assumed IN that you want OUT? (Out list)
53
- - **Riskiest decision point** — which contract, if wrong, costs the most rework? (freeze-first)
54
- - **Done-looks-like** — how do we SEE each outcome without reading code? (exit criteria)
55
- - **First slice** — which task unblocks the rest? (breadth-first order)
56
-
57
- Rank assumptions lowest-confidence first; the top 1–2 get the flag the human reads at confirm:
58
- `⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>`. Present the draft via
59
- `report-template.md` — open with the ARC (goal · done · plan): the goal this milestone serves,
60
- what is already covered, and the plan its task list lays out.
61
- Render the draft as a guided choice — the recommended scope + its described alternatives (per `report-template.md`).
31
+ - **Outcome** — done means a user can do *what* they can't today?
32
+ - **Edge of scope** — nearest thing assumed IN that you want OUT?
33
+ - **Riskiest decision point** — which contract, if wrong, costs the most rework?
34
+ - **Done-looks-like** — how do we SEE each outcome without reading code?
35
+ - **First slice** — which task unblocks the rest?
36
+
37
+ Rank assumptions lowest-confidence first; top 1–2 get the flag: `⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>`. Present via `report-template.md` — open with the ARC (goal · done · plan), render as a guided choice.
62
38
 
63
39
  ## Drafting a good MILESTONE.md (section by section)
64
40
 
65
- - **goal** — ONE sentence, an outcome not an output ("a user can size any request", not "write
66
- intake.md"). If it needs an "and", it is probably two milestones.
67
- - **rationale** — the confirmed intake bucket + WHY (the theme · slice · fit), AND the milestone
68
- relationship you captured in "Position the goal" above. One or two header lines; never in state.json.
69
- - **Scope In/Out** the explicit anti-creep deferral list. Naming what is OUT is as important
70
- as what is IN; an empty Out list usually means the scope is not yet thought through.
71
- - **Shared decisions & glossary deltas** cross-cutting rules every task must honor, named from
72
- the glossary. New terms get a glossary entry (the living documentation stays honest).
73
- - **Shared / risky contracts to freeze first** — the decision points between tasks; name the owning task.
74
- - **Tasks (breadth-first)** — `slug · depends-on · one line` each. Decompose by deliverable, not
75
- by phase; keep each task one-file-sized. Order by dependency, not by guesswork.
76
- - **Exit criteria** observable, and **every exit criterion maps to a declared task slug**
77
- (no dangling criterion). Each line answers "which task delivers this, and how would we see it?"
78
- - **Close — ship review** + **Release steps** — leave these as the template at draft time: they are
79
- **drafted-blank** here and filled LATER (Close at `milestone-done`, the close flow; Release steps when
80
- the ship path is known, owned by `release.md`) — not scope drafting. Named here so you know the full
81
- 9-section shape and neither fill them early nor read a fresh draft as "incomplete".
82
-
83
- ## Draft well-formedness gate (a draft passes ALL of these before you propose it)
84
-
85
- A scope draft is well-formed — ready to show the human — only when:
86
- - [ ] the goal is ONE outcome sentence (no "and" — that is two milestones)
41
+ - **goal** — ONE outcome sentence (no "and" that is two milestones).
42
+ - **rationale** — intake bucket + WHY, AND the milestone relationship from "Position the goal". Never in state.json.
43
+ - **Scope In/Out** — explicit anti-creep deferral list. An empty Out list means scope is not yet thought through.
44
+ - **Shared decisions & glossary deltas** cross-cutting rules every task must honor. New terms get a glossary entry.
45
+ - **Shared / risky contracts to freeze first** decision points between tasks; name the owning task.
46
+ - **Tasks (breadth-first)** `slug · depends-on · one line` each. Decompose by deliverable; keep each task one-file-sized.
47
+ - **Exit criteria** observable; **every exit criterion maps to a declared task slug** (no dangling criterion).
48
+ - **Close ship review** + **Release steps** **drafted-blank** here; filled LATER (`milestone-done` and `release.md`). Named so you know the full 9-section shape.
49
+
50
+ ## Draft well-formedness gate
51
+
52
+ A scope draft is well-formed only when:
53
+ - [ ] goal is ONE outcome sentence (no "and")
87
54
  - [ ] every exit criterion maps to a declared task slug (no dangling criterion)
88
- - [ ] `rationale` records the bucket + the milestone relationship from "Position the goal"
55
+ - [ ] `rationale` records the bucket + milestone relationship from "Position the goal"
89
56
  - [ ] `Close — ship review` and `Release steps` are left as the template (drafted-blank)
90
- - [ ] the In/Out list names what is deferred (an empty Out list is unfinished thinking)
57
+ - [ ] the In/Out list names what is deferred
91
58
 
92
- Propose only a well-formed draft — an incomplete one is the gap that lets a milestone reach
93
- task breakdown half-formed.
59
+ Propose only a well-formed draft — an incomplete one lets a milestone reach task breakdown half-formed.
94
60
 
95
- ## Reject codes (emit `{ reject, rationale }`, create nothing)
61
+ ## Reject codes
96
62
 
97
63
  <reject_codes>
98
- - `not_classified` — the request has not been through intake yet. Classify it first; you cannot
99
- draft scope for an unclassified request.
100
- - `dangling_criterion` — a drafted MILESTONE.md has an exit criterion that maps to no declared
101
- task slug. FIX the draft (add the task or drop the criterion) before proposing never propose
102
- a malformed milestone. With no engine lint, you are the first check and the human is the backstop.
103
- - `no_milestone` — intake routed the request to `task` or `change-request`; scope drafting
104
- creates NO milestone. Honor the classification; do not invent milestone-sized scope.
105
- - `duplicate_goal` — the goal is already delivered by an existing milestone (live or in
106
- `.add/archive/`). Do NOT fork it into a parallel milestone; route the request as a `task` or
107
- `change-request` and create nothing. (Raised by the "Position the goal" step.)
64
+ - `not_classified` — the request has not been through intake. Classify it first.
65
+ - `dangling_criterion` a drafted MILESTONE.md has an exit criterion that maps to no declared task slug. FIX the draft before proposing.
66
+ - `no_milestone` — intake routed to `task` or `change-request`; create NO milestone.
67
+ - `duplicate_goal` the goal is already delivered by an existing milestone (live or in `.add/archive/`). Route as `task` or `change-request`, create nothing.
108
68
  </reject_codes>
109
69
 
110
- ## Worked example (from this repo's own history)
111
-
112
- Request: *"open the Interface & Intake milestone"* → intake classified it `sub-milestone` of the
113
- live v4 self-driving theme → scope drafting produced **`.add/milestones/v4-1/MILESTONE.md`**:
70
+ ## Worked example
114
71
 
115
- - **goal**: make ADD harness-drivable and self-scoping machine-readable state plus an
116
- AI-facilitated request→versioned-milestone intake loop (the real v4-1 goal, one outcome sentence).
117
- - **tasks** (breadth-first): `machine-state-json` · `versioning-policy` · `scope-loop`.
118
- - **exit criteria** — each maps to its task slug: `--json` emits owner+stop (← machine-state-json),
119
- the AI proposes a bucket with rationale (← versioning-policy), the AI drafts a versioned
120
- MILESTONE.md via discussion (← scope-loop). Every criterion names the task that delivers it —
121
- which is exactly the well-formedness rule above, checkable against the real file.
72
+ Request: *"open the Interface & Intake milestone"* → intake classified it `sub-milestone` of v4 → scope drafting produced **`.add/milestones/v4-1/MILESTONE.md`**: goal *make ADD harness-drivable and self-scoping*; tasks (breadth-first) `machine-state-json` · `versioning-policy` · `scope-loop`; each exit criterion maps to its slug.
@@ -1,19 +1,12 @@
1
1
  # Setup review — the one page the human signs
2
2
 
3
- Autonomous setup ends at a single human gate: the **baseline approval** (`add.py lock`). Before that
4
- signature is honest, the human needs to see *what you drafted and how sure you were* — not re-derive
5
- it. `SETUP-REVIEW.md` is that page: every decision you made while drafting the foundation, first-scope,
6
- and the first contract, **ordered lowest-confidence-first** so the riskiest guesses meet their eye first.
3
+ Autonomous setup ends at a single human gate: the **baseline approval** (`add.py lock`). `SETUP-REVIEW.md` is that page: every decision you made while drafting the foundation, first-scope, and the first contract, **ordered lowest-confidence-first** so the riskiest guesses meet the human's eye first.
7
4
 
8
- This is the setup-level analog of presenting a task's specification bundle lowest-confidence-first at the contract freeze.
9
- The engine never reads this file — `add.py lock` is judgment-free, the signature *is* the gate (see
10
- `setup-lock-state`). The human **reading** this page is the review; your job is to make the reading honest.
5
+ The engine never reads this file — `add.py lock` is judgment-free, the signature *is* the gate. The human **reading** this page is the review.
11
6
 
12
7
  ## Where it lives
13
8
 
14
- Write **one** artifact at `.add/SETUP-REVIEW.md`. **Never clobber a human-edited one** — if it already
15
- exists with hand edits, append/update, don't overwrite (the same non-clobber rule `init` applies to
16
- living docs). It is a per-onboarding, setup-level artifact; it sits beside `PROJECT.md`, not under a task.
9
+ Write **one** artifact at `.add/SETUP-REVIEW.md`. **Never clobber a human-edited one** — if it already exists with hand edits, append/update, don't overwrite. It sits beside `PROJECT.md`, not under a task.
17
10
 
18
11
  ## The template
19
12
 
@@ -35,31 +28,21 @@ Rows are numbered for reference at the gate ("row 1 is where my confidence is lo
35
28
  ## The two rules that make it honest
36
29
 
37
30
  <constraints>
38
- 1. **Lowest-confidence-first.** Order rows by confidence **ascending**. A `guessed` row always floats above an
39
- `evidence-grounded` one. The point is not completeness theatre — it is to spend the human's attention
40
- where it changes outcomes: the top of the table is the part they actually need to challenge.
31
+ 1. **Lowest-confidence-first.** Order rows by confidence **ascending**. A `guessed` row always floats above an `evidence-grounded` one. The top of the table is the part the human actually needs to challenge.
41
32
 
42
33
  2. **Every row is tagged — `guessed` or `evidence-grounded`.**
43
- - `evidence-grounded` — you read it from the code/repo. **Cite the file** (e.g. `pyproject.toml`,
44
- `src/orders/models.py`). Brownfield onboarding (see `adopt.md`) is mostly these.
45
- - `guessed` — the repo was silent, so you inferred it. **State the inference and why.** Thin-greenfield
46
- onboarding (a near-empty repo, only the 4-lens answers) produces these. These are what the human
47
- must check; that is why they sit on top.
48
-
49
- The tag vocabulary is shared with `adopt.md` — the brownfield map tags each filled living-doc decision
50
- `guessed`/`evidence-grounded`, and those tags flow straight into this table.
34
+ - `evidence-grounded` — you read it from the code/repo. **Cite the file** (e.g. `pyproject.toml`). Brownfield onboarding (see `adopt.md`) is mostly these.
35
+ - `guessed` — the repo was silent, so you inferred it. **State the inference and why.** Thin-greenfield onboarding produces these. These are what the human must check; that is why they sit on top.
36
+
37
+ The tag vocabulary is shared with `adopt.md` brownfield map tags flow straight into this table.
51
38
  </constraints>
52
39
 
53
40
  ## Where it ends
54
41
 
55
- `SETUP-REVIEW.md` is **read-only context** for the baseline approval. You do not ask the human to approve it
56
- field-by-field; you present it, lowest-confidence-first; they confirm in conversation, and you run the lock
57
- with their name:
42
+ `SETUP-REVIEW.md` is read-only context for the baseline approval present it lowest-confidence-first, not field-by-field; the human confirms in conversation; you run the lock:
58
43
 
59
44
  ```bash
60
45
  python3 .add/tooling/add.py lock --by "<name>"
61
46
  ```
62
47
 
63
- `lock` records the lock layers and opens the build — it does **not** parse or validate this file (the
64
- engine stays judgment-free). The review lives in the human's reading of the page, not in the tool. Make
65
- the top of the table the truth they most need, and the one signature is informed.
48
+ `lock` records the lock layers and opens the build — it does **not** parse or validate this file. Make the top of the table the truth they most need.