@pilotspace/add 1.17.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/GETTING-STARTED.md +20 -64
  3. package/README.md +138 -158
  4. package/agents/add-advisor.md +66 -21
  5. package/agents/add-worker.md +102 -0
  6. package/bin/cli.js +88 -21
  7. package/package.json +2 -3
  8. package/personas-teacher/VENDOR.md +6 -0
  9. package/skill/add/SKILL.md +100 -144
  10. package/skill/add/adopt.md +28 -0
  11. package/skill/add/beyond.md +37 -0
  12. package/skill/add/deltas.md +25 -2
  13. package/skill/add/design.md +56 -74
  14. package/skill/add/{report-template.md → gate-udd.md} +28 -38
  15. package/skill/add/intake.md +56 -25
  16. package/skill/add/loop.md +32 -19
  17. package/skill/add/persona-author/SKILL.md +116 -0
  18. package/skill/add/persona-author/assets/example-design-persona.md +55 -0
  19. package/skill/add/persona-author/assets/example-persona.md +57 -0
  20. package/skill/add/persona-author/references/contract.md +69 -0
  21. package/skill/add/persona-author/references/patterns.md +122 -0
  22. package/skill/add/persona-author/references/seeding.md +79 -0
  23. package/skill/add/phases/build.md +79 -0
  24. package/skill/add/phases/direction.md +287 -0
  25. package/skill/add/phases/verify.md +161 -0
  26. package/skill/add/run.md +16 -18
  27. package/skill/add/terms.md +18 -0
  28. package/tooling/add.py +2421 -3258
  29. package/tooling/add_engine/autonomy.py +2 -37
  30. package/tooling/add_engine/components.py +4 -87
  31. package/tooling/add_engine/constants.py +148 -93
  32. package/tooling/add_engine/guidelines.py +10 -11
  33. package/tooling/add_engine/io_state.py +72 -5
  34. package/tooling/add_engine/predicates.py +90 -2
  35. package/tooling/add_engine/search.py +6 -6
  36. package/tooling/add_engine/taskdoc.py +15 -10
  37. package/tooling/templates/CONVENTIONS.md.tmpl +1 -1
  38. package/tooling/templates/GLOSSARY.md.tmpl +10 -4
  39. package/tooling/templates/MILESTONE.md.tmpl +20 -16
  40. package/tooling/templates/PLAN.md.tmpl +129 -0
  41. package/tooling/templates/PROJECT.md.tmpl +6 -1
  42. package/tooling/templates/PROMPT.persona.md.tmpl +17 -21
  43. package/tooling/templates/personas/build-engineer.md.tmpl +45 -0
  44. package/tooling/templates/personas/data-steward.md.tmpl +45 -0
  45. package/tooling/templates/personas/evidence-verifier.md.tmpl +45 -0
  46. package/tooling/templates/personas/platform-engineer.md.tmpl +45 -0
  47. package/tooling/templates/personas/product-lead.md.tmpl +51 -0
  48. package/tooling/templates/personas/quality-auditor.md.tmpl +47 -0
  49. package/tooling/templates/personas/release-manager.md.tmpl +52 -0
  50. package/tooling/templates/personas/security-gatekeeper.md.tmpl +45 -0
  51. package/tooling/templates/personas/software-architect.md.tmpl +45 -0
  52. package/tooling/templates/personas/stream-orchestrator.md.tmpl +44 -0
  53. package/tooling/templates/personas/technical-writer.md.tmpl +49 -0
  54. package/tooling/templates/personas/ux-experience-lead.md.tmpl +48 -0
  55. package/tooling/templates/specs/SPEC.md.tmpl +18 -0
  56. package/tooling/templates/udd-wireframe.md +1 -1
  57. package/agents/add-build.md +0 -29
  58. package/agents/add-design.md +0 -32
  59. package/agents/add-persona.md +0 -33
  60. package/agents/add-verify.md +0 -36
  61. package/docs/00-introduction.md +0 -46
  62. package/docs/01-principles.md +0 -71
  63. package/docs/02-the-flow.md +0 -113
  64. package/docs/03-step-1-specify.md +0 -123
  65. package/docs/04-step-2-scenarios.md +0 -90
  66. package/docs/05-step-3-contract.md +0 -80
  67. package/docs/06-step-4-tests.md +0 -85
  68. package/docs/07-step-5-build.md +0 -82
  69. package/docs/08-step-6-verify.md +0 -105
  70. package/docs/09-the-loop.md +0 -75
  71. package/docs/10-setup-and-stages.md +0 -118
  72. package/docs/11-governance.md +0 -91
  73. package/docs/12-roles.md +0 -99
  74. package/docs/13-adoption.md +0 -67
  75. package/docs/14-foundation.md +0 -142
  76. package/docs/15-foundations-and-lineage.md +0 -106
  77. package/docs/16-releasing.md +0 -182
  78. package/docs/17-components.md +0 -143
  79. package/docs/18-personas.md +0 -80
  80. package/docs/README.md +0 -77
  81. package/docs/add-competencies.png +0 -0
  82. package/docs/add-flow.png +0 -0
  83. package/docs/add-foundation.png +0 -0
  84. package/docs/add-hierarchy.png +0 -0
  85. package/docs/add-milestone-task-lifecycle.png +0 -0
  86. package/docs/add-task-growth-wheel.png +0 -0
  87. package/docs/appendix-a-templates.md +0 -88
  88. package/docs/appendix-b-prompts.md +0 -154
  89. package/docs/appendix-c-glossary.md +0 -176
  90. package/docs/appendix-d-worked-example.md +0 -231
  91. package/docs/appendix-e-checklists.md +0 -92
  92. package/docs/appendix-f-requirements-matrix.md +0 -171
  93. package/docs/appendix-g-references.md +0 -106
  94. package/skill/add/advisor.md +0 -81
  95. package/skill/add/compact-foundation.md +0 -40
  96. package/skill/add/components.md +0 -52
  97. package/skill/add/confidence.md +0 -32
  98. package/skill/add/fold.md +0 -63
  99. package/skill/add/graduate.md +0 -39
  100. package/skill/add/phases/0-ground.md +0 -64
  101. package/skill/add/phases/0-setup.md +0 -103
  102. package/skill/add/phases/1-specify.md +0 -61
  103. package/skill/add/phases/2-scenarios.md +0 -48
  104. package/skill/add/phases/3-contract.md +0 -60
  105. package/skill/add/phases/4-tests.md +0 -61
  106. package/skill/add/phases/5-build.md +0 -62
  107. package/skill/add/phases/6-verify.md +0 -69
  108. package/skill/add/phases/7-observe.md +0 -45
  109. package/skill/add/phases/fast-lane.md +0 -34
  110. package/skill/add/release.md +0 -61
  111. package/skill/add/scope.md +0 -72
  112. package/skill/add/self-improve.md +0 -20
  113. package/skill/add/sensitivity.md +0 -51
  114. package/skill/add/setup-review.md +0 -48
  115. package/skill/add/soul.md +0 -58
  116. package/skill/add/streams.md +0 -269
  117. package/tooling/add_engine/release.py +0 -86
  118. package/tooling/templates/TASK.fast.md.tmpl +0 -78
  119. package/tooling/templates/TASK.md.tmpl +0 -181
  120. package/tooling/templates/personas/_template.md.tmpl +0 -82
@@ -0,0 +1,37 @@
1
+ # Beyond the bundle — the full routing prose
2
+
3
+ SKILL.md's compact index names each trigger; this guide carries the full routing
4
+ prose. Load it (or the one guide you need) only when a trigger fires.
5
+
6
+ - **§3 CONTRACT FROZEN** → build→verify is a dynamic, auto-gated run (`autonomy: auto` default; lower to
7
+ `conservative`/`manual` for a human gate) — `run.md`. Pipeline ready tasks behind frozen
8
+ contracts — the stream-orchestrator persona owns the playbook. Delegate one piece of your plan to a subagent — the named roster
9
+ (`add-worker` runs the beat — mode: direction/build/verify/persona; `add-advisor` is the second
10
+ mind it spawns to propose a plan, pressure-test a draft, or decide a delegable ambiguity) is
11
+ agent-call-preferred, the default over an ad-hoc spawn; when to spawn, the prompt template, the
12
+ tier — the advisor spawn (`phases/verify.md`). Self-score a draft (0–1 across six dimensions,
13
+ refine if any < 0.9) — the confidence self-score (`phases/direction.md`). Both advisory; the engine never spawns.
14
+ - **Small, low-risk task**, less ceremony → the ONE atomic template already IS the lean render:
15
+ `new-task` scaffolds only the interface (contract · red suite · scope · verdict), bundle approved
16
+ in one freeze. Floor held (frozen contract · red test · verify gate; freeze-gated under any
17
+ milestone). Collapse, never skip — there is no separate lane to opt into.
18
+ - **UI feature** at specify → the **design-definition loop** (UDD): intake the design axes → review the
19
+ domain → research and reuse components → wireframe → a captured screen the human confirms **before** build — `design.md`.
20
+ Tool-agnostic; the engine never renders.
21
+ - Tasks all done but the milestone **goal** unmet → `milestone-done` holds it open; the loop turns open
22
+ deltas + extras into the next tasks until the goal is met — `loop.md`.
23
+ - **Graduating mvp → production** — co-specify interview → draft ≥1 production milestone →
24
+ human confirm → then `stage production`. Guarded (`stage_no_roadmap`); the FINAL step, never a
25
+ bare flip. The quality-auditor persona carries the readiness playbook.
26
+ - **Cutting a release** — draft notes from the closed milestones' deltas → meet the readiness
27
+ floor (security HARD-STOP is un-forceable) → the human confirms and runs the tag/publish/deploy.
28
+ The release-manager persona carries the cut playbook; the engine records nothing.
29
+ - **Monorepo / multi-repo** — a milestone spans more than one green bar (a BE + its FE) → the
30
+ platform-engineer seed persona carries the components playbook (declare the parts, gate each
31
+ task on its part's green bar, hold a consumer until its producer's contract freezes). Opt-in.
32
+ - **Project-fit personas** — the **persona loop** seeds `.add/personas/<slug>.md`, grows them via
33
+ observe→delta→consolidate, applies them in design/orchestration/advisor/build (advisory; never lowers a gate) — `docs/18-personas.md`.
34
+ - **Risk-class of a task** — declare `sensitivity:` in the TASK header (base `security|data|architecture|
35
+ mechanical`, always valid). EXTEND it with your project's domain classes in `GLOSSARY.md`'s `## Sensitivity
36
+ classes` section; freeze/status/check read base ∪ project. The AI keeps the domain vocabulary current —
37
+ the Sensitivity section (`phases/verify.md`). Security is a human floor in every tier; only `mechanical` is advisor-gatable — see `advisor-gate-relax` in `run.md`.
@@ -1,9 +1,11 @@
1
1
  # Lessons learned — how each loop sharpens the foundation
2
2
 
3
- A **lesson learned** is a single learning a task produces, tagged by which of ADD's five competencies it improves. Write deltas in **OBSERVE**; later `fold.md` consolidates confirmed ones into a versioned `PROJECT.md` — how `DDD · SDD · UDD · TDD · ADD` stop being write-once and converge.
3
+ A **lesson learned** is a single learning a task produces, tagged by which of ADD's five competencies it improves. Write deltas in **OBSERVE** and file each into its living spec (`add.py delta-append`) — how `DDD · SDD · UDD · TDD · ADD` stop being write-once and converge.
4
4
 
5
5
  You **emit** deltas as `open`; only the **human** moves one to `folded` or `rejected`. You never self-approve a consolidation.
6
6
 
7
+ **Emit in-flight, not batched**: the moment a lesson is learned — any phase, any task — file it with `add.py delta-append <dd> "<lesson>"` (`ddd|sdd|udd|tdd|add`). The verb prepends one `[open · <date>]` line (newest first, active task stamped) into the lesson's **living spec** under `.add/specs/` — `domain.md · system.md · experience.md · quality.md · method.md`, seeded at init and on demand for pre-2.0 projects. The task's §7 Competency-deltas block stays the per-task record; the living spec is where the lessons accumulate across tasks.
8
+
7
9
  ## The grammar (frozen)
8
10
 
9
11
  Each delta begins on its own **tag line**; the learning may wrap:
@@ -16,7 +18,7 @@ Each delta begins on its own **tag line**; the learning may wrap:
16
18
  - `<status>` — `open` | `folded` | `rejected`. A **newly emitted delta is `open`**.
17
19
  - `<learning>` — the insight; the tag line comes **first**, `(evidence: …)` **closes** the delta.
18
20
  - `(evidence: …)` — **required**, non-empty: a failing scenario, a production signal, a review note. No evidence → it is an opinion, not a delta.
19
- - **persona target (optional)** — a competency lesson MAY add `· persona:<slug> · <critical-rule|success-metric|anti-pattern|ability>` in brackets, e.g. `- [UDD · open · persona:ui-designer · success-metric] 4.5:1 contrast (evidence: audit)`. At `add.py fold` it lands in `.add/personas/<slug>.md` under that section (newest-first, never clobbering) instead of `PROJECT.md` (`fold.md`).
21
+ - **persona target (optional)** — a competency lesson MAY add `· persona:<slug> · <critical-rule|success-metric|anti-pattern|ability>` in brackets, e.g. `- [UDD · open · persona:ui-designer · success-metric] 4.5:1 contrast (evidence: audit)`. The persona loop lands it in `.add/personas/<slug>.md` under that section (newest-first, never clobbering) instead of the shared specs.
20
22
 
21
23
  A long learning may wrap — `add.py check` joins continuation lines into **one** delta:
22
24
 
@@ -62,3 +64,24 @@ emit (OBSERVE) human review
62
64
  ```
63
65
 
64
66
  At the next update the human consolidated DDD+TDD (→ `folded`) and rejected ADD. Sharper foundation; nothing lost.
67
+
68
+ ## Voice deltas — SOUL.md converges to the human
69
+
70
+ `SOUL.md` (Tone · Communication style · Trust) is the AI's voice — a proposed starter,
71
+ **human-owned**. Emit voice deltas beside the lessons learned in observe, grounded ONLY in the
72
+ working session — their wordings, their corrections, their flow — never their private files:
73
+
74
+ ```
75
+ - [VOICE · <status>] <observation about the voice> (evidence: <in-session pointer>)
76
+ ```
77
+
78
+ `<status>` = `open` | `confirmed` | `declined`; evidence is required (a correction, a re-ask, a
79
+ visible preference) — none → drop it. The loop: **emit** `open` (show-before-ask) → the human
80
+ **confirms or declines** each → on a confirm, rewrite the routed SOUL.md section surgically
81
+ (how I *sound* → `## Tone` · how I *structure* → `## Communication style` · what keeps *trust* →
82
+ `## Trust`) and record the line `confirmed` at the top of `## Voice deltas` (newest-first,
83
+ append-only; declined stays in place). **The human's confirm is the only writer.** Rejects:
84
+ `unconfirmed_voice_rewrite` (a SOUL.md write without a recorded confirm — stop, get the confirm) ·
85
+ `no_open_voice_deltas` (nothing open — a no-op, touch nothing) · `unroutable_voice_delta` (maps
86
+ to no section — fix the delta or widen the routing before writing). No `add.py` command writes
87
+ the voice.
@@ -1,12 +1,11 @@
1
1
  # Design — the design-definition loop (UDD)
2
2
 
3
- When a **UI feature** reaches specify, design it before you build it. This loop takes the
4
- feature from the **domain** to a screen the human has **seen and confirmed** a real captured
5
- image *before* any implementation. Loaded on demand; the engine never runs it for you.
6
-
7
- Design before code is the UDD half of the method. It fills the existing token + component
8
- foundation — `tokens.json` (`udd-tokens.md`), `catalog.json` + `prototypes/<name>.json`
9
- (`udd-catalog.md`) — for a feature and earns the human's sign-off before build.
3
+ When a **UI feature** or any human-facing **experience surface** (screen · interactive flow ·
4
+ **human gate**) reaches specify, design it first. UDD is experience-driven, not UI-only: it takes
5
+ the surface from the **domain** to a real captured image the human has **seen and confirmed**
6
+ *before* build. Loaded on demand; the engine never runs it. It fills the existing token + component
7
+ foundation `tokens.json` (schema: `templates/udd-tokens.md`), `catalog.json` +
8
+ `prototypes/<name>.json` (schema: `templates/udd-catalog.md`).
10
9
 
11
10
  ## The loop — five beats
12
11
 
@@ -16,91 +15,74 @@ design-intake → review-domain → research-components → wireframe →
16
15
 
17
16
  Run the beats in order; the last ends at a human design-confirm.
18
17
 
18
+ ## Personas carry the design — the loop carries the discipline
19
+
20
+ Load the design-fit persona FIRST: it brings the **frontend-designer** performance, the loop keeps
21
+ the rigor (personas carry the expertise, the loop the discipline). Two `flow: design` dimensions
22
+ (`.add/personas/*` frontmatter, else description-match) — **UI-Designer** (visual systems · component
23
+ libraries · pixel-craft · WCAG-AA **accessibility**) and **UX-Researcher** (evidence-validated,
24
+ never assumed). None fits? Seed from `.add/personas-teacher/design/` (ui-designer · ux-researcher ·
25
+ ux-architect) + `engineering-frontend-developer` via the add agent in persona mode, then load — seed
26
+ per DOMAIN, reuse across screens. The persona's **Critical Rules** shape every beat; its **Success
27
+ Metrics** become the beat-4 confirm checklist. Advisory: it sharpens the design, never lowers a gate.
28
+
19
29
  ### 0 · design-intake
20
- Before reading the domain, interview the human on **four design axes** so the look is *directed*,
21
- not guessed — ask each, show options, record the pick:
30
+ Before reading the domain, interview the human on **five design axes** ask each, show options,
31
+ record the pick:
22
32
 
23
- - **FIDELITY** — how far this goes: *lo-fi wireframe* · *hi-fi mockup* · *production*. Recorded
24
- **intent** informing the later beats, not an engine gate.
25
- - **CONCEPT** — the design *idea / mood / direction* in a line.
26
- - **LAYOUT** — the *structure / grid / hierarchy* the screens lean on.
33
+ - **FIDELITY** — *lo-fi wireframe* · *hi-fi mockup* · *production*. Recorded intent, not a gate.
34
+ - **CONCEPT** the *idea / mood / direction* in a line.
35
+ - **LAYOUT** — the *structure / grid / hierarchy*.
27
36
  - **VISUAL DESIGN** — *color · type · spacing · imagery*. **Surface** identity values for the human
28
- to choose — never auto-pick a brand value (identity stays **human-owned**, `udd-tokens.md`).
37
+ to choose — never auto-pick (identity stays **human-owned**, `templates/udd-tokens.md`).
38
+ - **INTERACTION** — *cadence · when/how to seek the human · turn-rhythm*; static screen → *none*.
29
39
 
30
- Record the answers **before** review-domain: project **defaults** in DESIGN.md's `## Design intake`;
31
- per-screen **overrides** (deltas only) in the per-feature design note (`prototypes/<name>.json`
32
- companion). Show-before-ask — confirm the picks.
40
+ Record **before** review-domain: project **defaults** in DESIGN.md's `## Design intake`; per-screen
41
+ **overrides** in the per-feature note (`prototypes/<name>.json` companion). Show-before-ask.
33
42
 
34
43
  ### 1 · review-domain
35
44
  Start from the **domain**, not a blank canvas. Read the domain model — entities, flows, the
36
- ubiquitous language in `PROJECT.md` / `GLOSSARY.md` — and derive **which screens** the feature
37
- needs + the **regions** each holds. Map each entity to a *presentational* component (shows state;
38
- owns no domain decision). The screen list + regions are this beat's output.
45
+ ubiquitous language in `PROJECT.md` / `GLOSSARY.md` — and derive **which screens** the feature needs
46
+ + each screen's **regions**. Map each entity to a *presentational* component (owns no domain
47
+ decision). Output: the screen list + regions.
39
48
 
40
49
  ### 2 · research-components (reuse before you invent)
41
- Check `catalog.json` **first** and **reuse** what's there it keeps screens consistent. Research
42
- a reference UI only to fill a **genuine gap**; propose a **new** catalog component for it with a
43
- **cited** reference. Reuse before invention — a new component is the exception.
50
+ Check `catalog.json` **first** and **reuse** it. Research a reference UI only for a **genuine gap**;
51
+ propose a **new** catalog component with a **cited** reference the exception, not the reflex.
44
52
 
45
53
  ### 3 · wireframe
46
54
  Draw a **low-fi**, **structural** layout per screen — regions and component slots, no styling, no
47
- color. The cheapest artifact that shows the *expected layout*, so the human corrects structure
48
- before a pixel is styled. Confirm, then move on.
55
+ color. Confirm structure before a pixel is styled, then move on.
49
56
 
50
57
  ### 4 · render-capture-confirm
51
- Render the screen as a **self-contained HTML mock** — the component library via CDN, bound to
52
- `tokens.json` (CSS variables), composed from the **reusable per-component kit** (one token-bound
53
- partial per catalog component), with realistic **mock** data.
54
- **Capture** a real image (a headless screenshot) and present it to the human for **design-confirm**
55
- show-before-ask, **before build**. On confirm, record the layout to `prototypes/<name>.json` +
56
- `catalog.json`, save the image to `.add/design/captures/<name>.<ext>`, and **mention it in the
57
- feature's `TASK.md`** so the approved screen is traceable from the task. The HTML mock is the
58
- *visible evidence*; the json-render tree is the *machine-checkable* record.
59
-
60
- **Persona evidence checklist.** Before design-confirm, load the `flow: design` personas
61
- (`.add/personas/*` frontmatter, else description-match) and render their `## Success Metrics`
62
- as a confirmable **checklist** beside the captured image — **both dimensions**: **UI-Designer**
63
- (visual + WCAG-AA **accessibility**) and **UX-Researcher** (methodology-first,
64
- **validated by user evidence, not assumed**). Each item traces to a success-metric
65
- the human confirms; it is **evidence, never an auto-pass** a persona **never lowers a gate**
66
- (ADD principle 2). **No UI personas**? A **generic design-confirm**, never blocked; UI-less skips it.
58
+ Render the screen as a **self-contained HTML mock** (component library via CDN, bound to
59
+ `tokens.json`, composed from the per-component kit, realistic **mock** data). **Capture** a real
60
+ image (headless screenshot), present it for **design-confirm** — show-before-ask, **before build**.
61
+ On confirm: record layout to `prototypes/<name>.json` + `catalog.json`, save image to
62
+ `.add/design/captures/<name>.<ext>`, mention it in the feature's `PLAN.md`.
63
+
64
+ **Persona evidence checklist.** Render the loaded personas' `## Success Metrics` as a confirmable
65
+ **checklist** beside the image both dimensions: **UI-Designer** (visual/**accessibility**) and
66
+ **UX-Researcher** (evidence, not assumed). Each item traces to a metric the human confirms —
67
+ **evidence, never an auto-pass**; a persona **never lowers a gate**. **No UI personas** → a
68
+ generic design-confirm; UI-less skips it.
69
+
70
+ ### Text-mode gate variant
71
+ A **human gate** runs the loop in **text mode** intake the **INTERACTION** axis → design the
72
+ report per `gate-udd.md` **confirm**; no capture beat.
67
73
 
68
74
  ## Tool-agnostic capture
69
75
 
70
- How you render and capture is **your** choice (headless browser, `html2image`, a design tool, a
71
- screenshot service). The default is the self-contained HTML mock above, captured headless no app
72
- build, yet wearing the project's real tokens and components. For a json-render project, the default
73
- is **`@json-render/image`** (Satori PNG/SVG, no browser). The captured image is **design-confirm
74
- evidence** the human approves; the engine never renders the loop stays tool-agnostic, the method
75
- renderer-free.
76
-
77
- Captures live at **`.add/design/captures/<name>.<ext>`**, mentioned in the feature's `TASK.md`.
78
- `add.py check` raises a never-red `missing_capture` WARN for any prototype lacking one — a nudge
79
- to render + confirm.
76
+ Render/capture however you like (headless browser, `html2image`, a screenshot service); the default
77
+ is the self-contained HTML mock above, captured headless. For a json-render project, the default is
78
+ **`@json-render/image`** (Satori PNG/SVG, no browser). The engine never renders the loop stays
79
+ tool-agnostic. Captures live at **`.add/design/captures/<name>.<ext>`**, mentioned in `PLAN.md`;
80
+ `add.py check` raises a never-red `missing_capture` WARN for any prototype lacking one.
80
81
 
81
82
  The loop **binds** the UDD contracts **read-only** — `tokens.json` / `catalog.json` /
82
83
  `prototypes/<name>.json` are read, never reshaped (a reshape is a change request). **Identity**
83
- values stay **human-owned** (`udd-tokens.md`).
84
-
85
- ## The hard rules
86
-
87
- <constraints>
88
- - **Intake before domain.** The four axes (FIDELITY · CONCEPT · LAYOUT · VISUAL DESIGN) are
89
- interviewed and recorded — DESIGN.md defaults + per-screen overrides — before beat 1.
90
- - **Domain first.** A screen is derived from the domain (beat 1), never sketched blind.
91
- - **Reuse before invent.** Beat 2 checks the catalog first; a new component is a justified,
92
- cited exception — never the reflex.
93
- - **Confirm before build.** The captured image is approved by the human *before* implementation;
94
- a design-confirm placed at or after build defeats the loop.
95
- - **The engine never renders.** Capture is a recommended, tool-agnostic recipe run by the
96
- agent's own tools; the image is evidence, not an engine artifact.
97
- - **Bind, don't break.** The loop reads `tokens.json` / `catalog.json` / `prototypes/<name>.json`
98
- read-only; the data contract is unchanged, and identity values stay human-owned.
99
- - **Confirm against the personas.** With UI personas seeded, the checklist carries the UI-Designer
100
- (visual/accessibility) + UX-Researcher (evidence-not-assumption) success-metrics — evidence,
101
- never an auto-pass.
102
- </constraints>
103
-
104
- > Used at specify for a UI feature: `phases/0-setup.md` scaffolds `DESIGN.md`, and
105
- > `phases/1-specify.md` points here when the feature has a screen — run the four beats, then
84
+ values stay **human-owned** (`templates/udd-tokens.md`).
85
+
86
+ > Used at specify for a UI feature: `phases/direction.md`'s setup span scaffolds `DESIGN.md`, and
87
+ > its Rules span points here when the feature has a screen — run the four beats, then
106
88
  > carry the confirmed layout into the contract.
@@ -1,8 +1,8 @@
1
- # Chat reports — the decision-point template (for the AI, not for add.py)
1
+ # Gate reports — the text-mode UDD gate surface (for the AI, not add.py)
2
2
 
3
- The engine renders artifacts (`report`, `report --decide`, `status`); this file governs the CHAT MESSAGE you wrap around them.
3
+ The engine renders artifacts (`report`, `report --decide`, `status`); this file governs the CHAT MESSAGE you wrap around them. Use it at every human gate; its UDD-family design home is `design.md`.
4
4
 
5
- Use it every time you report at or near a human gate.
5
+ **The fitting persona owns the gate report** these are PRINCIPLES, not a fixed template: CONVEY the content below, but the persona owns structure, order, and cadence per project. The layout shown is a sensible DEFAULT; the four floors (below) it may never drop.
6
6
 
7
7
  ## The decision banner — rendered first, above everything
8
8
 
@@ -11,11 +11,11 @@ Every report at a human gate opens with a banner line, so a human scanning a lon
11
11
  ```
12
12
  ════════════════════════════════════════════════════════════════
13
13
  PLAN · <task/milestone title, bold> · <gate name> → APPROVE?
14
- 📄 <task's TASK.md path> · <milestone's MILESTONE.md path>
14
+ 📄 <task's PLAN.md path> · <milestone's MILESTONE.md path>
15
15
  ════════════════════════════════════════════════════════════════
16
16
  ```
17
17
 
18
- - The title is the real H1 from TASK.md/MILESTONE.md, **bolded** — not the bare slug.
18
+ - The title is the real H1 from PLAN.md/MILESTONE.md, **bolded** — not the bare slug.
19
19
  - The path line names the actual file(s) so the human can open them directly; omit the milestone half for a milestone-free/fast task.
20
20
  - Any `§`-numbered section named anywhere in the report (SHAPE, FLAGS, APPROVE, NEXT) is **bolded** — e.g. `**§3 CONTRACT**` — so a scanning eye finds exactly which part of the file is in play.
21
21
 
@@ -29,7 +29,7 @@ ARC goal: <the milestone / project goal this decision serves>
29
29
  plan: <this gate → the next step → the goal>
30
30
  ```
31
31
 
32
- - **goal** — read from `m-goal` in `add.py status`; never re-typed from memory.
32
+ - **goal** — read from `m-goal` in `add.py status --all`; never from memory.
33
33
  - **done** — proven progress only: exit-criteria met/total, tasks done, what this gate proves. An honest fact, never a hope.
34
34
  - **plan** — this gate → the next step → the goal, mirroring the rollup's `DECIDE NEXT` line.
35
35
 
@@ -37,11 +37,6 @@ The arc is required at every human gate: **baseline-lock · contract-freeze · v
37
37
 
38
38
  Its facts are engine-sourced (goal = `m-goal` · done = exit-criteria + tasks done · plan = `DECIDE NEXT`); if your arc and `add.py` disagree, the engine wins.
39
39
 
40
- ### Per-gate examples
41
-
42
- - **verify** — `goal:` ship the arc · `done:` tests 6/6 green · `plan:` PASS → every gate → goal.
43
- - **contract-freeze** — `done:` bundle drafted, flag surfaced · `plan:` freeze §3 → build → goal.
44
-
45
40
  ## PLAN / SHAPE — when there's more than one step, or a shape to freeze
46
41
 
47
42
  Render one of these (never both) right after the ARC, whenever the message needs to show more than a single fact — a multi-task breakdown, a roadmap, mid-milestone orientation, or (at a contract freeze) the shape itself:
@@ -62,16 +57,15 @@ SHAPE <task title, bold> — v<N> (DRAFT — not yet frozen)
62
57
  <error case / reject token> <what triggers it>
63
58
  ```
64
59
 
65
- - **Collapse done to a count.** Never enumerate finished tasks by name.
66
- - **Cap live items at ~5–7**, dependency-ordered; footer `+N more queued`.
67
- - **One line per item** slug + what it does or blocks on; never restate the whole TASK.md.
68
- - **Glyphs are fixed** — done · 🔄 active · pending · blocked/flagged; never invent new ones.
69
- - **Sourced from the engine, summarized by you** — pull from `add.py status`'s `tasks:`/`streams:` output; never paste it verbatim into chat.
70
- - **SHAPE is freeze-only** — the concrete thing being locked, so the human reviews the actual shape, not just commentary about it.
60
+ - **Collapse done to a count** (never enumerate finished); **cap live items ~5–7**, dependency-ordered, footer `+N more queued`; one line each — never restate the PLAN.md.
61
+ - **Glyphs fixed** done · 🔄 active · ⬜ pending · ⚠ blocked/flagged; never invent new ones.
62
+ - **Sourced from `add.py status`, summarized by you** never pasted raw into chat.
63
+ - **SHAPE is freeze-only** — the concrete shape being locked, so the human reviews it, not commentary.
64
+ - **BUILD PLAN is the HOW** — at a freeze `report --decide` also renders the §3 Build-strategy (Scope · batches · Persona · Spawn) as a `BUILD PLAN (§3 …)` block, so the human approves how the build runs, not only the SHAPE; placeholders skipped.
71
65
 
72
- ## The report blocks, in order
66
+ ## The report blocks what to convey (you own the order)
73
67
 
74
- Render every block (write "none" rather than dropping one); add MORE when needed.
68
+ A gate report CONVEYS these; the persona owns the order and may merge, reorder, or trim to fit the project — conveying each (write "none" rather than silently dropping one), never dropping a floor. A sensible default order follows, not a mandate; add MORE when needed.
75
69
 
76
70
  ```
77
71
  SUMMARY one line: intent + target + where we are + what we done
@@ -82,16 +76,11 @@ APPROVE what you need from the human (or "none — FYI") — exactly one — s
82
76
  NEXT the recommended next actions, ranked (top ▶ highlighted, bolded) + what each unlocks
83
77
  ```
84
78
 
85
- 1. **SUMMARY** — one line: intent + target + position. **Never optional** even when PLAN/SHAPE already carries most of the context, SUMMARY still renders as its own line; it is never merged into or silently replaced by another block.
86
- 2. **FLAGS** — lowest-confidence first, each with *why* and *cost if wrong*. Where TASK.md markers exist (`⚠` / `- [~]` / `- [ ]`), quote verbatim and keep document order.
87
- 3. **DECIDED** — high-confidence autonomous calls, highest-confidence first, each with *why* it was safe. "none" when none. NEVER list a security / residue / lowered-autonomy call here.
88
- 4. **EVIDENCE** — engine-sourced facts from `add.py` output, never re-typed.
89
- 5. **APPROVE** — as a **guided decision**: one `▶ … (recommended)` + 1–3 described alternatives. Exactly one per report, or "none — FYI". Rendered last among the core blocks — the actual interactive ask fires only after everything above it (show-before-ask).
90
- 6. **NEXT** — ranked next actions, top one marked `▶` with what it unlocks. Mirror the rollup's `DECIDE NEXT` for the top action; overrule it only with a stated reason. **Informational, not a second gate**.
79
+ - **SUMMARY** never optional — one line even when PLAN/SHAPE carries the context. **FLAGS** lowest-confidence-first (why + cost-if-wrong; quote PLAN.md `⚠` / `- [~]` / `- [ ]` verbatim). **DECIDED** highest-confidence-first ("none" when none; never a security / residue / lowered-autonomy call). **EVIDENCE** engine-sourced, never re-typed. **APPROVE** the guided ask, last, after show-before-ask. **NEXT** ranked recommendations, not a second gate. **The ask itself** is a summary, never the artifact.
91
80
 
92
81
  ### Beyond the core blocks
93
82
 
94
- When a report needs more — a `RISK` ledger, a `DIFF`, a `SCOPE` map — add an extra block (SCREAMING-CASE label · one-line intent · engine-sourced where possible) AFTER EVIDENCE and BEFORE APPROVE. Add only when it carries what the core blocks don't; never pad; never drop a core block.
83
+ When a report needs more — a `RISK` ledger, a `DIFF`, a `SCOPE` map — add an extra block (SCREAMING-CASE label · one-line intent · engine-sourced) AFTER EVIDENCE and BEFORE APPROVE. Add only when it carries what the core blocks don't; never pad; never drop a core block.
95
84
 
96
85
  ### The APPROVE block as a guided choice
97
86
 
@@ -104,27 +93,28 @@ APPROVE <the question>
104
93
  <one-line description>
105
94
  ```
106
95
 
107
- - **Exactly one** option carries `▶ … (recommended)`. `confidence.md` self-score informs which; the human overrides freely.
108
- - **1–3 real alternatives** only — no strawmen, no filler; one genuine path → show one.
109
- - **Every option is described** pick and each alternative carry a one-line description.
110
- - **Human gates only** — render at `[human gate]` points; not at `[you drive]` steps.
96
+ - **Exactly one** `▶ … (recommended)` (per the confidence self-score, `phases/direction.md`; human overrides) + **1–3 real alternatives**, each described — no strawmen. **Human gates only** (`[human gate]`, not `[you drive]`). As an `AskUserQuestion` picker: recommended first with `(Recommended)`; else a numbered/`▶` menu. The question is a summary, never the artifact — intent + what "yes" means + flag count.
97
+
98
+ ## The four floorsthe persona owns the form, never these
111
99
 
112
- **The ask itself** — when the APPROVE block becomes an `AskUserQuestion` picker: recommended option goes first with `(Recommended)` suffix. On tools without `AskUserQuestion`, render as a numbered/`▶` menu. The question is a summary, never the artifact intent + what "yes" means + the flag count.
100
+ Whatever shape the persona renders per project, it MUST hold all four:
101
+ - **show-before-ask** · **one-approval-at-the-freeze** · **never-pre-stamp** a human decision point
102
+ - **security = HARD-STOP** — the one **un-persona-negotiable** floor: a security finding is never persona-softened (the human alone may strike this carve-out). The "## Hard rules" below detail how they play out.
113
103
 
114
104
  ## Hard rules
115
105
 
116
106
  <constraints>
117
107
  - **Summary-first.** Never bury the decision under a task list or a diff.
118
- - **Show before ask.** Render the artifact (digest · diff · report) before any approval question. PLAN/SHAPE counts as the artifact here too.
108
+ - **Show before ask.** Render the artifact (digest · diff · report) before any approval question; PLAN/SHAPE counts too.
119
109
  - **Guided decision.** At a `[human gate]`, APPROVE is a guided choice — one `▶ … (recommended)` + 1–3 described alternatives; never a bare next step.
120
- - **Reconcile the count.** FLAGS must reconcile with `add.py report --decide`'s open-item count before the ask. Engine wins if prose disagrees — fix the data, not the sentence.
110
+ - **Reconcile the count.** FLAGS must reconcile with `add.py report --decide`'s open-item count before the ask. Engine wins on disagreement — fix the data, not the sentence.
121
111
  - **Never pre-stamp a human decision point.** Freeze / gate / lock fields stay DRAFT or blank until the answer returns: show → ask → stamp → advance.
122
- - **Never dump raw engine output as the plan.** Summarize `add.py status`/`report` through PLAN/SHAPE (or prose) — the engine's full verbosity is for `add.py` itself, not the chat message wrapped around it.
112
+ - **Never dump raw engine output as the plan.** Summarize `add.py status`/`report` through PLAN/SHAPE (or prose) — the engine's verbosity is for `add.py`, not the chat wrapped around it.
123
113
  - **One report per decision point.** After an approval, point at the frozen artifact — do not re-render the bundle.
124
- - **Batch, don't serialize.** N same-gate decisions ready together (intake items · ready-to-freeze contracts) render as ONE report: PLAN lists each item with its own lowest-confidence flag; APPROVE covers the batch in one ask, and any item can be held back by name.
114
+ - **Batch, don't serialize.** N same-gate decisions ready together (intake items · ready-to-freeze contracts) render as ONE report: PLAN lists each with its own lowest-confidence flag; APPROVE covers the batch in one ask, any item held back by name.
125
115
  - **Honest scope.** "Done" means the request, not the last task: report "task 2/3", never "done" while approved scope remains.
126
- - **The question is a summary, never the artifact.** A compact SUMMARY · FLAGS block sits in chat immediately before the ask; the question text itself is two lines at most — intent + what "yes" means + flag count — pointing at the report above.
127
- - **NEXT is not a second gate.** The single decision stays in APPROVE; NEXT is ranked recommendations only.
116
+ - **The question is a summary, never the artifact.** A compact SUMMARY · FLAGS block sits in chat immediately before the ask; the question text itself is two lines at most — intent + what "yes" means + the flag count — pointing at the report above.
117
+ - **NEXT is not a second gate.** The decision stays in APPROVE; NEXT is ranked recommendations only.
128
118
  - **DECIDED never holds a gate-class call.** Security / residue / lowered-autonomy calls escalate in APPROVE.
129
- - **Recorded, not just performed.** Rendering this template at a gate is recorded, not assumed — TASK.md's `Reported: yes` (§3/§6) is the mechanical trace; `add.py audit` surfaces an unrecorded one (`contract_report_unrecorded` / `verify_report_unrecorded`), a spot-audit the backstop.
119
+ - **Recorded, not just performed.** A gate render is recorded, not assumed — PLAN.md `Reported: yes` (§3/§6) is the trace; a human spot-audit is the backstop for a missed render.
130
120
  </constraints>
@@ -4,14 +4,52 @@ Before a task exists, ADD turns a raw request into correctly-sized, versioned sc
4
4
  **intake level** (the per-task flow is phases 0–7; intake is the step *before* a task). You
5
5
  (the AI) **propose**; the human **confirms**. Never create scope without a confirmed proposal.
6
6
 
7
+ ## Analyze the request before you size it
8
+
9
+ A raw request is rarely a task yet — it is intent wrapped in prose. ADD's first job is not to
10
+ route it but to *read it into a task shape*. Do this BEFORE any bucket or interview:
11
+
12
+ 1. **Restate the intent** in one line — the outcome the human wants, in their world, not the
13
+ mechanism. If you cannot state it, it is underspecified → `ask_human` (never guess it).
14
+ 2. **Extract the latent requirements** — the acceptance signals hiding in the ask ("fast",
15
+ "secure", "works like X") are the measurable Targets in disguise; name each one explicitly.
16
+ 3. **Name the unstated** — the assumptions, defaults, and edge behavior the prose skips. These
17
+ become the interview agenda below; surface them, never silently fill them.
18
+ 4. **Surface the hidden work** — the migrations, new contract surface, and risks a naive read
19
+ misses. This is what separates a real task from a wish, and what escalates sensitivity.
20
+
21
+ This analysis IS the task's raw material: the restated intent seeds §1 grounding, the latent
22
+ requirements seed the §3 Target, the unstated becomes what the interview settles. Sizing (below)
23
+ only decides *where* the task lives — the analysis decides *what it is*. Skipping it is how a
24
+ vague prompt becomes a mis-sized, under-specified task.
25
+
7
26
  ## Interview before you size
8
27
 
9
- Run `add.py search <keyword> [<keyword> ...]` first — it surfaces overlapping/prior work in one
10
- command instead of a full manual re-read. When the request arrives as a question, or its intent is
11
- not sharp enough to place in one bucket: explore it WITH the user before classifying. Reflect the intent you heard, name what seems in and
12
- out of scope, and offer 2–3 sized options with your own recommendation. Only then emit
13
- `{ bucket, rationale, command }`. `ask_human` stays the floor: when interviewing cannot sharpen the
14
- request, reject — never guess a bucket.
28
+ Run `add.py search <keyword> ...` first — it surfaces overlapping/prior work in one command. When
29
+ the request is a question or won't place in one bucket, explore it WITH the user first: reflect
30
+ the intent, name in/out of scope, offer 2–3 sized options with a recommendation. Only then emit
31
+ `{ bucket, rationale, command }`. `ask_human` stays the floor: if interviewing can't sharpen it,
32
+ reject never guess a bucket.
33
+
34
+ ## The inline lane — below the bucket floor
35
+
36
+ Buckets create versioned scope; some changes are too small to deserve any. After the
37
+ interview sharpens the request, judge the lane FIRST — you (the AI) route it, silently:
38
+
39
+ **Inline fits when ALL hold**: one file or a few adjacent ones · behavior the current specs
40
+ already cover (a typo, a wording fix, a config value, a mechanical rename) · no new contract
41
+ surface anyone else consumes · sensitivity mechanical. Then: **no task, no milestone** — make
42
+ the edit directly, and leave the receipt:
43
+
44
+ 1. the **git diff** is the change record (commit it as usual);
45
+ 2. `add.py delta-append <dd> "<lesson>"` files what was learned into the living 5-DD spec —
46
+ the spec diff IS the approval artifact; a lane run that teaches nothing appends nothing.
47
+
48
+ **The floor is closed**: a change touching **security · data · architecture** ALWAYS escalates
49
+ to a real task — never inline, no matter how small (security stays HARD-STOP everywhere).
50
+ New behavior, a new/changed contract, or anything you would want a frozen §3 for → bucket it.
51
+ The route is yours, the veto is not: the human saying "make it a task" overrides the lane,
52
+ always. When in doubt, bucket — the lane is for changes whose whole story fits in a diff.
15
53
 
16
54
  ## The four buckets
17
55
 
@@ -29,21 +67,23 @@ already-frozen scope?" → if yes it is a `change-request` (never re-size frozen
29
67
  Only if no, apply the size test: a new theme → `new-major`; a slice of a live theme → `sub-milestone`;
30
68
  fits the active milestone → `task`.
31
69
 
32
- **One-task gap rule.** If the request is ONE task but does NOT fit the active milestone's stated
33
- scope, do not force it into `sub-milestone` (which requires "too big for one task"): create a new
34
- micro-milestone to house it (`new-milestone` + `new-task`) ledger attribution + clear
35
- exit criteria without inflating scope.
70
+ **Size the freeze, not the template (task bucket only).** ONE atomic template serves every task;
71
+ single behavior · no new contract surface others consume · sensitivity mechanical propose drafting
72
+ the whole Direction bundle in one pass to a single freeze. Any doubt draft §1–§4 beat by beat.
36
73
 
37
- **Batched intake.** N same-bucket items arriving together (one directive; a drafted
38
- milestone's task list) classify as ONE proposal: one report listing every item, one
39
- human confirm covering the batch never N sequential asks. Mixed buckets stay
74
+ **One-task gap rule.** ONE task that does NOT fit the active milestone's scope: never force it
75
+ into `sub-milestone` create a micro-milestone to house it (`new-milestone` + `new-task`) for
76
+ ledger attribution + clear exit criteria without inflating scope.
77
+
78
+ **Batched intake.** N same-bucket items arriving together classify as ONE proposal: one report,
79
+ one human confirm covering the batch — never N sequential asks. Mixed buckets stay
40
80
  `split_required`.
41
81
 
42
82
  ## What you emit (the proposal)
43
83
 
44
- Present the proposal via `report-template.md` — open with the ARC (goal · done · plan): the goal this
84
+ Present the proposal via `gate-udd.md` — open with the ARC (goal · done · plan): the goal this
45
85
  request serves, what is already covered, and the plan the chosen bucket sets up. Render it as a guided
46
- choice — the recommended bucket + its described alternatives (per `report-template.md`). For every
86
+ choice — the recommended bucket + its described alternatives (per `gate-udd.md`). For every
47
87
  request, emit ONE of:
48
88
 
49
89
  - **a classification** — `{ bucket, rationale, command }` — `rationale` names WHY (the theme, the
@@ -60,7 +100,7 @@ request, emit ONE of:
60
100
  </reject_codes>
61
101
 
62
102
  When confirmed, record the `rationale` in the artifact you create or affect — the new MILESTONE.md
63
- goal/body, the new TASK.md, or a note in the affected TASK.md — never in state.json.
103
+ goal/body, the new PLAN.md, or a note in the affected PLAN.md — never in state.json.
64
104
 
65
105
  ## Roadmap — a request that is several milestones
66
106
 
@@ -77,12 +117,3 @@ Don't create only the first and lose the rest. Instead:
77
117
 
78
118
  NOT `split_required` (that is for a request spanning **different buckets**); a roadmap is
79
119
  several milestones of the **same line**, created queued.
80
-
81
- ## Worked examples (from this project's own history)
82
-
83
- | request | bucket | rationale |
84
- |---------|--------|-----------|
85
- | give ADD a hosted web dashboard | new-major | a new product theme → a fresh major line (v5) |
86
- | add the build corridor + tests-red-before-build | sub-milestone | a slice of the live v4 theme, too big for one task → v4-2 |
87
- | expose owner/stop as --json | task | fits the active v4-1 (intake interface) scope → one task |
88
- | guide --json phase/gate should be nullable | change-request | changes a FROZEN contract → reopen its CONTRACT, never a new milestone |
package/skill/add/loop.md CHANGED
@@ -1,33 +1,33 @@
1
1
  # The dynamic loop — open deltas and extras become the next tasks
2
2
 
3
3
  A milestone is done when its **GOAL** is met, not when its tasks are.
4
- This guide drives toward that goal: turn what each task leaves behind (open lessons, and
5
- work discovered but out of scope) into the next tasks until the exit criteria are all met.
4
+ This guide drives toward that goal: turn what each task leaves behind (open lessons,
5
+ work discovered out of scope) into the next tasks until the exit criteria are all met.
6
6
 
7
7
  You **gather and propose**; the **human confirms**; the existing `add.py new-task`
8
- creates each one. The engine never decides what the next task is — that is judgment.
8
+ creates each one. The engine never decides the next task — that's judgment.
9
9
 
10
10
  ## The goal-gate (what holds the loop open)
11
11
 
12
- `add.py milestone-done <slug>` REFUSES to close a milestone while its exit criteria are not
13
- all met — it stops with `milestone_goal_unmet` and the milestone stays active. The exit-criteria
12
+ `add.py milestone-done <slug>` REFUSES to close a milestone while its exit criteria aren't
13
+ all met — it stops with `milestone_goal_unmet`, the milestone stays active. The exit-criteria
14
14
  checkboxes in `MILESTONE.md` ARE the human's goal-met affirmation: the engine reads the
15
- `- [x]`/`- [ ]` tally, it never judges whether the goal is met. Checking the last box is the
15
+ `- [x]`/`- [ ]` tally, never judging whether the goal is met. Checking the last box is the
16
16
  deliberate act that releases the gate.
17
17
 
18
18
  The gate fires only when criteria exist. A milestone with no exit-criteria checkboxes closes as
19
- before — write criteria into `MILESTONE.md` if you want the goal-gate to hold the milestone open.
19
+ before — write criteria into `MILESTONE.md` to hold the milestone open.
20
20
 
21
- `milestone-done` is the only way a milestone reaches `done`; `archive-milestone` and `compact`
22
- both refuse a milestone that is not done. The one gate is enough — there is no quiet way around it.
21
+ `milestone-done` is the only way a milestone reaches `done`; `archive-milestone`
22
+ refuses a milestone not done. The one gate is enough — no quiet way around it.
23
23
 
24
24
  ## The loop
25
25
 
26
26
  Every task done but not the goal? `add.py status` shows
27
- `goal not met (m/n exit criteria)`. That is the cue:
27
+ `goal not met (m/n exit criteria)`. That's the cue:
28
28
 
29
29
  1. **Gather** the carried inventory:
30
- - open lessons — `add.py deltas` (§7 deltas still `open`) + the deferred pile — `add.py deltas --carried`;
30
+ - open lessons — `add.py deltas` (§7 deltas still `open`);
31
31
  - the planned-but-unscaffolded tasks — the plan-vs-state line in `add.py status`;
32
32
  - any reopened task — one a deepened verify returned to the flow (see below).
33
33
  2. **Propose** the next tasks: for each carried item worth doing now, draft a one-line task
@@ -40,18 +40,31 @@ Every task done but not the goal? `add.py status` shows
40
40
  - **Fill the ship review first** — write the milestone's `## Close — ship review` section:
41
41
  **Ship by domain** — what changed per bounded context (`tooling` · `skill` · `book`, or
42
42
  "untouched"); **Cross-task evidence** — one row per task (`gate` · `tests` · `residue`);
43
- and the **Goal met?** map — each exit criterion tied to the evidence that satisfies it.
44
- This is the whole-milestone cross-task evidence the human READS; it is evidence, not a gate.
43
+ and the **Goal met?** map — each exit criterion tied to its evidence.
44
+ This is the whole-milestone cross-task evidence the human READS evidence, not a gate.
45
45
  - **Check the boxes** — read that evidence, then check the exit-criteria boxes in `MILESTONE.md`
46
- (the single affirmation), and `add.py milestone-done <slug>` succeeds (then consolidate open
47
- deltas and archivethe `milestone-done fold → compact → archive` lifecycle, per
48
- `fold.md` · `compact-foundation.md`).
46
+ (the single affirmation), and `add.py milestone-done <slug>` succeeds (then file the open
47
+ deltas into their living specs `add.py delta-append` and archive).
49
48
  - **Define the release steps** — write the milestone's `## Release steps` (merge is one small
50
- step among them; PR, asset export, tag/publish are others). These **feed** the release scope —
51
- read `release.md` for the cut; loop.md never re-specifies it.
52
- Present the close via `report-template.md` — open with the ARC (goal · done · plan),
49
+ step among them; PR, asset export, tag/publish are others). The human owns the cut;
50
+ loop.md never re-specifies it.
51
+ Present the close via `gate-udd.md` — open with the ARC (goal · done · plan),
53
52
  render as a guided choice — **before `milestone-done`/`archive-milestone` run, not after.**
54
53
 
54
+ ## Route reflection (GEPA) — the routes learn at close
55
+
56
+ `add.py deltas` ends with the **route scoreboard**: per-lane evidence (gated · outcome mix ·
57
+ heals · median age) rolled up from `.add/traces/route-outcomes.jsonl` — one line the engine
58
+ appends at every recorded gate. At close, reflect on it GEPA-style under the PM persona:
59
+
60
+ - **keep** a route rule whose lane cut heals/age with no gate regressions;
61
+ - **prune** a rule no trace ever took (it never fired);
62
+ - **propose** each change as `add.py delta-append add "<route-rule delta>"`, evidence cited.
63
+
64
+ The **human folds** ratified rules into `.add/personas/<slug>.md` — the only mutation path
65
+ (never-clobber). Personas never touch frozen contracts, tests, the SKILL core, or the
66
+ security HARD-STOP.
67
+
55
68
  ## Reopen is the verb; this loop is the trigger
56
69
 
57
70
  When a deepened verify finds a criterion unmet on a task already marked done,