@pilotspace/add 2.1.0 → 2.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ 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
+ ## [2.2.0] — 2026-07-22
8
+
9
+ Minor: the Direction beat gains a **fable reasoning discipline** — a prompt-only
10
+ pass that makes the agent derive from the task in front of it instead of a fluent
11
+ template, distilled from the fable-thinking protocol. No engine change.
12
+
13
+ - **fable reasoning discipline** — `phases/direction.md` opens with the lens for
14
+ the whole bundle: **Fluent ≠ true** (a draft's polish tracks its token count,
15
+ not its evidence), the **Five Moves** (FRAME · GROUND · REASON · ATTACK ·
16
+ DELIVER) each mapped to the beat that already applies it, and two pre-answer
17
+ checks the fluent draft skips — the **Floor** (restate the Goal in the human's
18
+ world, then sweep the Leftovers: every supplied invariant and the BARE runtime)
19
+ and the **constraint loop** (expand → verify mechanically → repair the §3 tag
20
+ census · §5 scope tokens · §4 `covers:` keys · REDS refs before the freeze).
21
+ - **claim grammar** — `add-advisor`'s §6 Return tags every factual assertion by
22
+ how it's known: `[OBSERVED]` (checked live this session) · `[DERIVED]` ·
23
+ `[PRIOR]` (memory, may be stale) · `[ASSUMED]`; a bare claim reads as OBSERVED,
24
+ so a guess never rides in unmarked. **GROUND** makes the same rule structural:
25
+ a recalled file/flag/symbol is `[PRIOR]` until re-confirmed against the live tree.
26
+ - Prompt-only, propagated byte-identical across the three synced skill trees;
27
+ `add.py` == ENGINE_MD5 unchanged. Pinned by `test_fable_floor.py`.
28
+
7
29
  ## [2.1.0] — 2026-07-22
8
30
 
9
31
  Minor: the two-agent roster matures and the persona author learns from real
@@ -19,8 +19,10 @@ beat keeps moving. Personas carry the expertise; you carry independent, first-pr
19
19
  options and RETURN A DECISION with its rationale. This is delegated judgement — binding for
20
20
  the beat — not one more opinion to hold open.
21
21
  - **refute** — an adversarial read of a drafted artifact (bundle · earned-green · verdict):
22
- try to BREAK it. Name the input/state that makes it wrong. Default to "not yet proven" when
23
- uncertain your job is to catch the plausible-but-wrong before the human or the gate does.
22
+ try to BREAK it. Your PRIMARY output is the concrete input/state/interleaving that makes it wrong
23
+ values, file, line; not a category, not a bare verdict. A "looks fine" with no attempted repro is
24
+ not a refute; if a real attempt finds none, concede it holds and say so. Default to "not yet proven"
25
+ when uncertain — catch the plausible-but-wrong before the human or the gate does.
24
26
 
25
27
  Every mode serves EVERY beat — the spawn names the beat + mode, and you calibrate to it:
26
28
  **direction** (propose the bundle plan · refute the draft so the human freezes the stronger
@@ -71,6 +73,12 @@ worker cannot be about its own work.
71
73
  `{ mode, persona, kind, recommendation, decision|verdict, tradeoffs: [weighed],
72
74
  weakest_dimension, risks: [🔴|🟡|💭 …], assumptions, confidence: {per-dimension 0–1},
73
75
  escalate: {security_hard_stop|change_request|residue}? }`
76
+ **Claim grammar** — tag each factual assertion in `recommendation`/`decision`/`risks` by its
77
+ evidence basis, so the worker can tell a checked fact from a recalled one: `[OBSERVED]` you
78
+ verified it against the live tree this session · `[DERIVED]` it follows from an observation ·
79
+ `[PRIOR]` training or memory, may be stale · `[ASSUMED]` unverified but required. A bare claim
80
+ reads as OBSERVED — so never leave a guess untagged. **Fluent ≠ true**: your confidence rises
81
+ with token count, not evidence; the tag is what keeps the two apart.
74
82
  You PROPOSE and DECIDE the delegable; you never RUN the engine or write shared state.
75
83
 
76
84
  Method depth: the AIDD book — read only when a decision is genuinely unclear.
@@ -29,6 +29,8 @@ Read YOUR mode's guide from the project's skill tree (`.claude/skills/add/phases
29
29
  spawn — the orchestrator reads only SKILL.md and does not pre-read it for you.
30
30
 
31
31
  ## 2 · Become the persona (FIRST — before any task-specific instruction)
32
+ The §3 Boundary below is the floor this persona cannot lower — it binds BEFORE the persona's voice
33
+ can soften it; a persona is advisory, the boundary is not. Now become the persona:
32
34
  Select from `.add/personas/` by frontmatter alone (name · vibe · flow · task-kinds ·
33
35
  use-when · not-when): prefer a persona whose `flow:` names your mode's surface
34
36
  (direction→design · build→build · verify→verify) AND whose `task-kinds:` covers the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilotspace/add",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "ADD (AI-Driven Development) 2.0. The agent is the hands; ADD is the memory, judgment, and conscience — a minimal, state-tracked skill: one freeze per feature, trust from passing tests, state on disk so context rot never survives a new session.",
5
5
  "bin": {
6
6
  "add": "bin/cli.js"
@@ -69,10 +69,10 @@ confirms. Unsharp intent? **Interview before you size** (`intake.md`). A milesto
69
69
 
70
70
  Every task is three beats (seven steps, folded), three engine calls, ONE human decision:
71
71
 
72
- 1. **DIRECTION** — load the domain-fit persona (seed via add-worker persona-mode if none), then draft
73
- the whole bundle top-to-bottom in PLAN.md: §1 rules + ranked ⚠ flag (co-specify) ·
74
- §2 scenarios · §3 PLAN (grounding → frozen contract shape → build-strategy + Scope + Target) · §4 red suite
75
- (run it — red for the RIGHT reason; fill each bullet's `covers:` clause key). Then the ONE approval,
72
+ 1. **DIRECTION** — load the domain-fit persona (seed via add-worker persona-mode if none), then compose
73
+ the whole bundle in ONE silent draft — §1–§3 + §5-scope, no per-section narration; §4 then runs red — in PLAN.md: §1 rules + ranked ⚠ flag (co-specify) ·
74
+ §2 scenarios (optional gherkin — §4 is canonical) · §3 PLAN (grounding → frozen contract shape → build-strategy + Scope + Target) ·
75
+ §4 red suite — one test per Must & per Reject (a Must/Reject encoded in neither §2 nor §4 = §1 not understood stop); run red for the RIGHT reason; fill each `covers:` key. Then the ONE approval,
76
76
  presented lowest-confidence-first: `add.py freeze` (a setup session's baseline `lock` IS this approval).
77
77
  2. **BUILD** — code in `src/` until every red is green; change no test, no frozen contract; stay
78
78
  inside the §3 Scope. A test OUTSIDE your suite failing? `add.py locate` names the owning node, the
@@ -118,7 +118,7 @@ confirmable delta the human confirms rewrites `SOUL.md` (the human is the only w
118
118
 
119
119
  ## Command cookbook — copy a line; `-h` only off-menu
120
120
 
121
- `add.py` = `python3 .add/tooling/add.py`; lines 2–4 = the 3-call walk (`advance --fill <draft>` = step-wise).
121
+ `add.py` = `python3 .add/tooling/add.py`; lines 2–4 = the 3 calls — default is ONE composed draft then bare `advance`/`freeze`; `advance --fill <draft>` = step-wise, only for a large/uncertain task.
122
122
 
123
123
  ```bash
124
124
  add.py status --brief # resume · status --section <n|phase> = §body · --foundation · --json
@@ -76,4 +76,4 @@ verify residue → a SPEC delta.
76
76
  Routing: `ddd`→domain · `sdd`→system · `udd`→experience · `tdd`→quality · `add`→method — each
77
77
  lands in-flight in its living spec via `add.py delta-append <dd>` (grammar: `deltas.md`). A
78
78
  HOW-an-agent-behaves lesson → a persona, not the shared pile. Deltas prepend newest-first;
79
- the spec diff is the receipt. Self-score before emitting (the confidence six dimensions; < 0.9 refine).
79
+ the spec diff is the receipt. Self-score before emitting (the confidence six dimensions; name the weakest, refine).
@@ -1,9 +1,39 @@
1
1
  # Direction — the whole specification bundle (setup · rules · plan · red suite) to the ONE freeze
2
2
 
3
- Every task drafts §1–§4 top-to-bottom, then ONE human approval crosses it into build:
4
- `add.py freeze --by <name> --cross`. This file is the reference depth for that span —
3
+ Every task COMPOSES §1–§3 + §5-scope in ONE silent draft a single write, no "moving on to §N"
4
+ narration then §4 runs red and ONE human approval crosses it into build:
5
+ `add.py freeze --by <name> --cross`. The only mandatory breaks in the draft are running the §4 red
6
+ suite (a tool action, not prose) and the freeze. This file is the reference depth for that span —
5
7
  SKILL.md carries the loop; read the section you're stuck in, not the file.
6
8
 
9
+ ## The reasoning discipline (the lens for the sections below)
10
+
11
+ **Fluent ≠ true.** A draft's polish tracks its token count, not its evidence; every check in this
12
+ file forces a fresh derivation from THIS task over a plausible template. It is Rule 2 (trust
13
+ evidence, not inspection) turned inward — on your own reasoning, not just the build. Distilled from
14
+ the fable-thinking protocol; each move maps to where the loop already applies it.
15
+
16
+ **Five moves, one arc per beat:**
17
+ - **FRAME** — restate the real question + the load-bearing facts. → §1 co-specify.
18
+ - **GROUND** — verify by observation, not memory; a recalled file/flag/symbol/lesson is `[PRIOR]`
19
+ until re-confirmed against the live tree THIS session; a live read outranks memory. → §3 Grounding.
20
+ - **REASON** — hold more than one hypothesis; demand a mechanism ("because…"), not a correlation;
21
+ simulate with concrete values before committing. → the persona plan · the advisor's propose-plan.
22
+ - **ATTACK** — switch to reviewer, run the cheap kill-test; its output is a concrete falsifying input
23
+ (file · line · values), not a verdict. → advisor `refute` · verify earned-green (security = HARD-STOP).
24
+ - **DELIVER** — lead with the outcome, expose the weakness, recommend don't survey. → the gate report, lowest-confidence-first.
25
+
26
+ **Two pre-answer checks the fluent draft skips** (applied at the freeze — checklist below): the
27
+ **Floor** — restate the **Goal** in the human's world (not the wording), then sweep the
28
+ **Leftovers** (every supplied invariant / the BARE runtime encoded or waived) — and the
29
+ **constraint loop** for mechanically-checkable output shape (§3 tag census · §5 scope tokens · §4
30
+ `covers:` keys · REDS): expand → verify mechanically (grep/count, not a re-read) → repair → then freeze.
31
+
32
+ **Claim grammar** — tag each factual assertion by how you know it: `[OBSERVED]` (checked live this
33
+ session) · `[DERIVED]` (follows from an observation) · `[PRIOR]` (memory, may be stale) · `[ASSUMED]`
34
+ (unverified but required). A bare claim reads as OBSERVED — never leave a guess untagged; it is the
35
+ advisor's §6 Return discipline.
36
+
7
37
  ---
8
38
 
9
39
  ## Setup — first session only (autonomous draft → one baseline lock)
@@ -141,7 +171,8 @@ the design-definition loop (`design.md`).
141
171
  `⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>`.
142
172
  </output_format>
143
173
 
144
- §2 makes every rule checkable — one scenario per Must and per Reject:
174
+ Every Must and Reject must be checkable — canonically as a §4 test (its `covers:` tag); §2 gherkin is
175
+ an OPTIONAL readable projection, added only when a human needs prose cases at the freeze, never as ceremony:
145
176
 
146
177
  ```gherkin
147
178
  Scenario: <short name>
@@ -159,8 +190,8 @@ one per applicable case, or rule it out on purpose. Every Then is specific and o
159
190
  - [ ] Framings weighed noted; every required behavior stated; every rejection has a named error code.
160
191
  - [ ] Assumptions ordered lowest-confidence first; the 1–2 `⚠` flags carry why + cost — or an honest
161
192
  "none material" that still names the single biggest risk (never a blank "none").
162
- - [ ] §2: one scenario per Must and per Reject; every rejection asserts what stays unchanged; edge
163
- cases covered or ruled out on purpose.
193
+ - [ ] Every Must and Reject is encoded a §4 test (canonical) or an optional §2 gherkin scenario;
194
+ every rejection asserts what stays unchanged; edge cases covered or ruled out on purpose.
164
195
  </exit_gate>
165
196
 
166
197
  ---
@@ -173,7 +204,10 @@ above it the Contract does not move.
173
204
  ### Grounding — reason it in-context (don't write an essay — `PLAN.md.tmpl`: persist the interface, not prose)
174
205
  Project from the milestone `## Ground`, then deepen only where THIS task lands. Never invent a
175
206
  file/symbol you have not opened; cite the **symbol**, not a bare line number (`l.NNN` rots; symbols
176
- survive), via code-navigation tools, not memory. **Persist only what the contract needs**: the
207
+ survive), via code-navigation tools, not memory. A recalled fact a file, a flag, a symbol, or a
208
+ prior lesson (even one carried in from memory) — is **PRIOR until re-confirmed** against the live
209
+ tree THIS session; a live read outranks memory, and a safety-grep counts only once you have
210
+ confirmed it actually matched (a `for x in $VAR` that ran vacuous proves nothing). **Persist only what the contract needs**: the
177
211
  **Anchors** it may cite (the specific symbols §3 names — it may cite ONLY these) and, optionally, a
178
212
  **Ground SHA** (the commit grounded against — the engine stamps it when the line is present).
179
213
  Everything else — what it **Touches**, the **Honors**/seams consulted, the **Issues/Risks**, the
@@ -212,12 +246,27 @@ line the freeze records it (audit-only — `route_unrecorded` is measured, never
212
246
 
213
247
  ## The freeze review checklist
214
248
 
215
- The human's one minute, aimed. Walk these seven before saying yes:
216
-
249
+ The human's one minute, aimed. **Fluent true** a bundle's polish tracks its token count, not its
250
+ evidence, so these checks force a fresh read of THIS task over a plausible template. Run the **Floor**
251
+ first, then walk the rest before saying yes:
252
+
253
+ - **Floor (before you read the shape)** — the pre-answer check the fluent draft skips. (1) Restate the
254
+ **Goal**: the end-state the human actually wants, in their world, not the ticket's wording — a bundle
255
+ that satisfies the words but misses the goal is the most expensive miss. (2) Check the **Leftovers**:
256
+ every supplied constraint — each PROJECT.md `invariant:`, the BARE declared runtime, every ⚠ the
257
+ interview surfaced — is either encoded in §1–§4 or explicitly waived. An unused constraint is a trap,
258
+ not noise: the artifact must hold under the BARE runtime, so a leftover invariant is a defect already
259
+ waiting at verify.
217
260
  - **⚠ flags first** — read the lowest-confidence flags; accept each knowing its cost if wrong. The engine refuses an unflagged freeze before build (`unflagged_freeze`).
218
261
  - **Intent** — does §1 say what you actually want built?
219
262
  - **Cases** — does every Must and Reject have an observable §2 scenario?
220
263
  - **Shape** — glossary names, error codes, additive vs breaking: is THIS the shape to freeze?
264
+ - **Shape self-verify (the constraint loop)** — for the mechanically-checkable output-shape rules — the
265
+ frozen §3 tag census (the closed XML vocabulary), the §5 Scope path tokens, each §4 `covers:` key, any
266
+ REDS / dangling refs — don't eyeball them: expand the rule, self-verify the draft **mechanically**
267
+ (grep/count in reasoning space, not a re-read), repair, THEN freeze. This is where the freeze-parser
268
+ self-breaks get caught before the engine does — a bare `<word>` colliding with the tag census, a
269
+ `./src/` scope token tripping `scope_violation`.
221
270
  - **Grounded** — does the Contract cite anchors that exist in the Grounding map? `status`/`check` surface this.
222
271
  - **Risk** — high-risk or method-defining? Require `risk: high · autonomy: conservative` in the PLAN.md header.
223
272
  - **Tests** — will §4 go red for the right reason, asserting behavior rather than internals?
@@ -247,6 +296,8 @@ mode on any task). Coding kinds keep the executable red suite above.
247
296
 
248
297
  §4's `Tests live in:` line is machine-read — declare paths as backticked tokens on that line: with
249
298
  no local `tests/`, `add.py report` counts test functions at the declared paths (FIRST such line only).
299
+ REPLACE the template's `./tests/` placeholder in place — never append a SECOND `Tests live in:` line:
300
+ the report reads the FIRST, so a stale default left above your real path silently wins.
250
301
  `./…` → this task dir · a token with `/` → the project root · a bare name → a
251
302
  sibling of the previous token's dir. A directory counts its `*.py` files
252
303
  (non-recursive); a `.py` file counts itself. Resolved files dedupe; declared counts
@@ -278,9 +329,13 @@ it 0–1 on six dimensions: **Completeness** (every rule/scenario/rejection cove
278
329
  (understood without you in the room?) · **Practicality** (implementable against the real code?) ·
279
330
  **Optimization** (correctness/simplicity/cost balanced — no gold-plating, no corner cut?) ·
280
331
  **Edge cases** (failure modes, concurrency, empty/oversized inputs named?) · **Self-evaluation**
281
- (does it carry its own refine step?). Any dimension **< 0.9** refine, then re-score. The lowest
282
- dimension is what you surface ⚠-first at the freeze; persistently low on risky scope
283
- *recommend* lowering autonomy (the level stays the human's call).
332
+ (does it carry its own refine step?). Rank the six worstbest (a model ranks far more reliably than
333
+ it calibrates an absolute), then NAME the one concrete deficiency in your weakest dimension — a
334
+ missing scenario, an unhandled input, not a number — and fix THAT before presenting; re-rank after.
335
+ The lowest dimension is what you surface ⚠-first at the freeze; persistently low on risky scope →
336
+ *recommend* lowering autonomy (the level stays the human's call). The self-score is a **weak signal**:
337
+ the load-bearing correctness check is the adversarial refute-read (`phases/verify.md`) — the
338
+ plausible-but-wrong a self-score waves through is exactly what the refute exists to catch.
284
339
  The hard rule: **advisory, never a gate** — it never auto-passes a verify, never substitutes for evidence or the
285
340
  human decision, and a self-asserted score is never recorded as something the human "agreed to".
286
341
 
@@ -36,7 +36,7 @@ Record in the §6 **Deep checks** block — an unfilled one is a **shallow verif
36
36
 
37
37
  ## Part four — was the green earned?
38
38
 
39
- A green suite proves tests pass — not that the build EARNED them. Three judgment cheats pass the unchanged suite: src overfit to the test fixtures (special-cased to literal inputs), vacuous asserts (green against an empty implementation), and real logic stubbed away — all invisible to the mechanical tamper tripwire. Score them with an adversarial refute-read: an independent reviewer — the engine never spawns one — prompted to argue the green was NOT earned. A confirmed earned-green failure is HARD-STOP-class: never auto-passed, never RISK-ACCEPTED — a first cheat enters the bounded self-heal loop (run.md). Under `auto`, **record the verdict** in §6's `### Refute-read verdict` block — an unrecorded verdict leaves the auto-PASS untraceable (the human spot-audit is the backstop).
39
+ A green suite proves tests pass — not that the build EARNED them. Three judgment cheats pass the unchanged suite: src overfit to the test fixtures (special-cased to literal inputs), vacuous asserts (green against an empty implementation), and real logic stubbed away — all invisible to the mechanical tamper tripwire. Score them with an adversarial refute-read: an independent reviewer — the engine never spawns one — prompted to argue the green was NOT earned. Its PRIMARY output is a concrete falsifying input — the fixture value, interleaving, or caller that makes the green wrong (file · line · values), not a verdict; a "looks fine" with no attempted repro is not a refute, and if a real attempt finds none it concedes the green holds and says so. A confirmed earned-green failure is HARD-STOP-class: never auto-passed, never RISK-ACCEPTED — a first cheat enters the bounded self-heal loop (run.md). Under `auto`, **record the verdict** in §6's `### Refute-read verdict` block — an unrecorded verdict leaves the auto-PASS untraceable (the human spot-audit is the backstop).
40
40
 
41
41
  ## Record exactly one outcome (no silent pass)
42
42
 
@@ -44,7 +44,7 @@ Render this gate from the card: banner → ARC → SUMMARY → FLAGS → EVIDENC
44
44
  (`gate-udd.md` = the full template + examples, read at most once per session), and reconcile FLAGS
45
45
  with `add.py report --decide`'s open-item count. Right-size the render to the risk: `sensitivity: mechanical`
46
46
  tasks use the compact form — banner → SUMMARY → EVIDENCE → APPROVE; `security` / `data` /
47
- `architecture` always get the full card. **Human-led: render before `gate` and record `Reported: yes` in §6, never self-stamp.**
47
+ `architecture` always get the full card. Audience by mode: under `conservative` the card renders to the human before the gate; under `autonomy: auto` (no reachable human) you WRITE it to the §6/trace record as the accountable artifact and proceed — you render, you don't wait. **Human-led: render before `gate` and record `Reported: yes` in §6, never self-stamp.**
48
48
 
49
49
  | Outcome | When |
50
50
  |---------|------|