@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
@@ -1,45 +0,0 @@
1
- # Phase 7 — Observe (feed the next loop)
2
-
3
- Goal: release deliberately, watch reality, turn what you learn into the next spec. Fill **§7** in TASK.md.
4
-
5
- ## Do
6
-
7
- 1. **Release behind a scope-of-impact limit** — a flag and/or gradual rollout
8
- 2. **Reuse scenarios as monitors** — the §2 scenarios that defined "correct" now
9
- define what you alert on: overall error rate, each rejection's rate (a spike is a
10
- signal), latency of the risky op.
11
- 3. **Draft the next spec delta** — every defect, surprise, or new need becomes a
12
- change that re-enters the flow at Specify (a new task).
13
- 4. **Propose a voice delta** — note where your voice diverged from the human's (wordings +
14
- flow); propose a confirmable **voice delta** tuning `SOUL.md`, emitted `open`. The human
15
- confirms, then you rewrite the routed section. Read `soul.md` (grammar, routing,
16
- human-is-only-writer).
17
-
18
- > **Decisions (ADR)** — at the gate the engine harvests §7's ADR block (§1/§3/§5/§6); `add.py audit` flags one never harvested.
19
-
20
- ## AI prompt
21
-
22
- <prompt>
23
- Role: a reliability analyst feeding the next cycle.
24
- Read first: telemetry · objectives · incidents.
25
- Steps: 1. report error-budget burn · 2. cluster errors, surface the top real failures ·
26
- 3. draft a SPEC delta with evidence links.
27
- Never: auto-roll-back — recommend; a human owns the production decision.
28
- </prompt>
29
-
30
- ## Exit gate
31
-
32
- <exit_gate>
33
- - [ ] Released behind a flag/rollout.
34
- - [ ] Scenario-based monitors live.
35
- - [ ] A reviewed spec delta captured (becomes the next `new-task`).
36
- </exit_gate>
37
-
38
- > **Persona** — tag `· persona:<slug> · critical-rule|success-metric|anti-pattern|ability`;
39
- > `fold` grows that section — a HOW-an-agent-behaves lesson belongs in a persona, not the shared pile.
40
- > **Advisor · Confidence** — spawn a reviewer to mine the run for lessons (advisor.md); score Self-evaluation — did this loop teach the foundation? (confidence.md).
41
-
42
- ## Next
43
-
44
- Loop — the artifacts are living docs the next cycle refines.
45
- Map: `self-improve.md` · book: `docs/09-the-loop.md`
@@ -1,34 +0,0 @@
1
- # Fast lane — less ceremony, same floor
2
-
3
- The fast lane is the **collapsed, opt-in task path for small work**. Same flow — ground → specify →
4
- contract → tests → build → verify — with fewer sections and the bundle approved in one pass. It
5
- **collapses** the ceremony; it never drops the floor. The human opts in (`--fast`); the engine never
6
- guesses that a task is small.
7
-
8
- ## When
9
-
10
- Pick it for a **small, low-risk, roughly single-file change**. Stay on the full lane when the work
11
- wants its scenarios enumerated — a milestone or release, an architecture or security change, anything
12
- cross-cutting, or anything you are not yet sure is small. In doubt, run the full lane.
13
-
14
- ## How
15
-
16
- 1. `add.py new-task <slug> --fast` scaffolds the minimal `TASK.fast.md` (sections {0,1,3,4,5,6};
17
- §2 SCENARIOS and §7 OBSERVE dropped — §1's Accept line carries the behavior a scenario would).
18
- 2. Ground, draft §1 + §3, and **freeze the contract as one batched approval** — the single decision
19
- point, led by the lowest-confidence flag.
20
- 3. Write a **red** test (§4), run it failing for the right reason.
21
- 4. Build (§5) to green, then record the **verify gate** (§6).
22
-
23
- Both human gates (freeze, verify) render `report-template.md` too — the fast lane collapses
24
- sections, never the report.
25
-
26
- ## Floor kept, only collapsed
27
-
28
- Three things never move, on either lane: a **frozen** §3 before build · a **red** test before build ·
29
- a recorded **verify gate** at the end (a security finding is always HARD-STOP). A `--fast` task is
30
- freeze-gated under ANY milestone — `advance` refuses `contract_not_frozen` while §3 is a draft. Speed
31
- comes from **fewer sections + auto-gating**, not from cutting any of the three.
32
-
33
- Not a way around the contract, the red test, or the gate; not for milestones or releases; not
34
- engine-chosen — ceremony is human-owned.
@@ -1,61 +0,0 @@
1
- # Release — cut a versioned ship, never an unwatched flip
2
-
3
- A project releases when ≥1 **closed milestones** are bundled into a versioned cut whose notes are evidence-backed, risk is disclosed, and behaviour is then watched. This is the **5th scope level** — distinct from milestone (feature-complete), graduation (rigor shift), and stage (mvp→prod).
4
-
5
- - **milestone** = feature-complete and consolidated; **release** = shipped + watched.
6
- - **graduation** changes *rigor*; a **release** ships a *version*. Orthogonal axes.
7
-
8
- You **gather and propose**; the **human confirms and ships**; the engine records the cut and enforces a floor — it **never tags, publishes, or deploys**.
9
-
10
- ## The cue
11
-
12
- When ≥1 milestone is `done` AND archived AND not yet attributed to a release, `add.py status` prints:
13
-
14
- ```
15
- → releasable: N milestone(s) closed since last release
16
- ```
17
-
18
- That line is a tally over unreleased-but-archived milestones — never a readiness judgment.
19
-
20
- ## The flow
21
-
22
- One arc, seven steps: **cue → gather → draft notes → readiness floor → human confirms → cut → watch.**
23
-
24
- 1. **Gather** — run `add.py release-report` (`--json` to branch on it). It clusters the cut's evidence: closed milestones since last release · consolidated deltas · open RISK-ACCEPTED waivers · open security HARD-STOP (blocker) · §2 scenarios to take live as monitors. Gathers, never judges.
25
- 2. **Draft notes** — write a [Keep a Changelog](https://keepachangelog.com/) entry from the consolidated deltas + each milestone's goal. Group Added / Changed / Fixed. Propose the **semver bump** (breaking→MAJOR, feature→MINOR, fix-only→PATCH) for human confirmation.
26
- 3. **Readiness floor** — the engine enforces: suite green, zero open security HARD-STOP, every RISK-ACCEPTED waiver signed and disclosed in the notes.
27
- 4. **Human confirms** — present via `report-template.md`, opening with the ARC (goal · done · plan). Render as a guided choice (per `report-template.md`). Never pre-stamp; show-before-ask.
28
- 5. **Cut** — only now run `add.py release <version> --notes <file>`. The engine records: CHANGELOG entry, append-only `RELEASES.md` row (newest-first: date · version · milestones · waivers · evidence), milestone attribution.
29
- 6. **Ship** — the **human** runs the tag / publish / deploy (`git tag`, `npm publish`, deploy pipeline). Engine never performs it.
30
- 7. **Watch** — §2 scenarios become live monitors. A regression re-enters at Specify as a **change request** → PATCH hotfix release.
31
-
32
- ## The floor
33
-
34
- `add.py release <version>` is **guarded** — refuses (non-zero exit, state byte-unchanged) on:
35
-
36
- <reject_codes>
37
- - `release_security_open` — open security HARD-STOP exists. Never shipped. `--force` does NOT override this.
38
- - `release_build_in_flight` — a build is in flight, ungated.
39
- - `release_no_closed_milestone` — nothing new since last release.
40
- - `release_undisclosed_waiver` — a RISK-ACCEPTED waiver rides into the release but is absent from the notes.
41
- </reject_codes>
42
-
43
- `--force` preserves human authority for grandfathered / edge cases (e.g. brownfield first cut) — never overrides `release_security_open`.
44
-
45
- ## Invariants
46
-
47
- - **Engine records; human ships.** `add.py release` writes CHANGELOG + ledger + attribution; never tags, publishes, or deploys.
48
- - **Security is a HARD-STOP at the cut**, not just at verify. No `--force`, no waiver, no exception.
49
- - **Notes draw from consolidated deltas** — release after `fold.md` has run. Lifecycle order: `milestone-done → fold → compact → archive → (repeat ≥1×) → release → watch`.
50
- - **Ledger is append-only (newest-first)** — a release row is never rewritten; a yanked version gets a new row.
51
- - **A release bundles, it does not equal.** One version may attribute several milestones.
52
-
53
- ## Depth by stage
54
-
55
- - **prototype/poc** — one-line preview note + tag; no deploy ceremony.
56
- - **mvp** — full notes + tag + guarded publish; watch headline scenarios.
57
- - **production** — full rigor: notes + tag + deploy behind rollback-tested pipeline + live monitors + error-budget watch. Hotfix path (step 7) is first-class.
58
-
59
- ## Worked example
60
-
61
- The `udd-design-loop` milestone closed (4/4), consolidated into `foundation-version 33`; the human drafted `## [1.5.0]` from those deltas, bumped version sources in lockstep, and `test_release_1_5_0.py` asserted readiness. The `git tag` stayed human-gated; live-registry confirmation gathered *after* the tag as verify evidence, never a unit test.
@@ -1,72 +0,0 @@
1
- # Scope drafting — turn a classified request into a versioned MILESTONE.md
2
-
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.
4
-
5
- ## What to do per intake outcome
6
-
7
- | intake outcome | scope-loop action | creates (after confirm) |
8
- |----------------|-------------------|-------------------------|
9
- | `new-major` / `sub-milestone` | draft ONE MILESTONE.md (fill the template via discussion) | 1 milestone |
10
- | `task` | route to `add.py new-task <slug>` (fits the active milestone) | 0 milestones |
11
- | `change-request` | route to SPECIFY/CONTRACT of the affected task | 0 milestones |
12
- | `split_required` | draft ALL N items as a batch in ONE pass | N milestones/tasks |
13
-
14
- **Confirm before create is the convention.** "One pass" means one drafting pass, NOT auto-creation — nothing is written until the human confirms; enforced only by the opt-in `--await-confirm` (below).
15
-
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.)
17
-
18
- ## Position the goal — ground in assets, relate to the milestone map (do this FIRST)
19
-
20
- Before drafting the goal sentence, position the request in what already exists — distinct from intake's classification, not redundant with it.
21
-
22
- 1. **Ground in current assets.** Read the goal against what exists — the goal must reflect what the project already is. Ground as rigorously as a task's §0 (`phases/0-ground.md`), using the **same four fields** at milestone scope: **Touches** (the subsystems/files the milestone spans) · **Context** (the docs · todos · config · data it works against) · **Honors** (the `PROJECT.md` / `CONVENTIONS.md` invariants it must respect) · **Anchors** (the existing contracts/symbols its tasks will cite). Grounding is complete when each is named from real assets, not assumed. Touches spanning >1 app root (BE+FE, or multiple independently-testable dirs)? weigh `.add/components.toml` (`components.md`) now — before tasks decompose with flat cross-app paths.
23
- 2. **Relate to the milestone map.** Run `add.py search <keyword> [<keyword> ...]` first — then 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`.
25
-
26
- ## Brainstorm before you draft — co-specify at milestone level
27
-
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.
29
-
30
- Diverge seeds (pick the live ones):
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.
38
-
39
- ## Drafting a good MILESTONE.md (section by section)
40
-
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. UI/UX scope? use the template's Scope hint vocabulary, not generic prose.
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")
54
- - [ ] every exit criterion maps to a declared task slug (no dangling criterion)
55
- - [ ] `rationale` records the bucket + milestone relationship from "Position the goal"
56
- - [ ] `Close — ship review` and `Release steps` are left as the template (drafted-blank)
57
- - [ ] the In/Out list names what is deferred
58
-
59
- Propose only a well-formed draft — an incomplete one lets a milestone reach task breakdown half-formed.
60
-
61
- ## Reject codes
62
-
63
- <reject_codes>
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.
68
- </reject_codes>
69
-
70
- ## Worked example
71
-
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,20 +0,0 @@
1
- # Self-improving ADD — the one map
2
-
3
- Every loop improves four artifacts. You emit `open`; the human confirms; the engine
4
- transcribes — nothing self-approves. Emission lives in observe (§7); every earlier step
5
- feeds it: ground surprises → §1 · the freeze's ⚠ flag → the next spec · a red-suite gap →
6
- a TDD lesson · build's strategy-actually-used → the ADR block · verify residue → a SPEC delta.
7
-
8
- | what improves | grammar (closes `(evidence: …)`) | consolidator |
9
- |---|---|---|
10
- | foundation — `PROJECT.md`/`CONVENTIONS.md` | `[DDD\|SDD\|UDD\|TDD\|ADD · open] lesson` | `add.py fold` → `fold.md` |
11
- | personas — the agents' stances | `… · persona:<slug> · critical-rule\|success-metric\|anti-pattern\|ability` | same `fold` run |
12
- | `SOUL.md` — your voice | a voice delta, `open` | human rewrite → `soul.md` |
13
- | the next scope | `[SPEC · open]` → seeded · dropped · carried | `loop.md` → `new-task` |
14
-
15
- Routing: `DDD`→§Domain · `SDD`→§Spec · `UDD`→§Users · `TDD`/`ADD`→§Method learnings
16
- (grammar: `deltas.md`). A HOW-an-agent-behaves lesson → a persona, not the shared pile.
17
-
18
- Convergence: `fold` prepends newest-first; the settled tail rolls via
19
- `compact-foundation.md`; `status` counts the debt — `carried:` · `compaction:`.
20
- Self-score before emitting — `confidence.md` (six dimensions; < 0.9 → refine).
@@ -1,51 +0,0 @@
1
- # Sensitivity — the project's risk-class vocabulary
2
-
3
- A task declares its risk-CLASS with a `sensitivity:` line in the TASK header — *what
4
- kind* of risk it carries, distinct from `risk:` (*how much*). The engine validates +
5
- surfaces the human's declaration; it **never classifies**. Read live by freeze/status/check.
6
-
7
- ## The base four (method-universal — always apply)
8
-
9
- - **security** — authn/authz, secrets, crypto, attack surface. A finding here is HARD-STOP;
10
- the human is in the loop in EVERY tier (never advisor-gated, never auto-passed).
11
- - **data** — persistence, migrations, privacy of stored records, data loss.
12
- - **architecture** — module boundaries, contracts, cross-cutting structure.
13
- - **mechanical** — rote, low-impact change (rename, move, format, doc). The only class
14
- a recorded advisor verdict (three §6 fields: Verdict · Residue · Binding) can gate for
15
- auto-completion (`advisor-gate-relax`).
16
-
17
- These four can't be removed — a project only EXTENDS them.
18
-
19
- ## Extend per project (you maintain this)
20
-
21
- Domain risk-classes live in `.add/GLOSSARY.md` under a `## Sensitivity classes` section,
22
- one `- <token>: <definition>` bullet per line:
23
-
24
- ```markdown
25
- ## Sensitivity classes
26
- Base (always apply): security · data · architecture · mechanical
27
- - pii: personally identifiable information; any task touching it escalates to human review
28
- - payments: money movement; reconciliation + an audit trail are required
29
- ```
30
-
31
- `freeze` then accepts a header `sensitivity:` value from **base ∪ your domain classes**;
32
- a token in neither is refused `sensitivity_invalid`. `status` prints the active task's
33
- class; `check` nudges (`sensitivity_classes_unset`, never red) until you declare some.
34
-
35
- ## The AI's job — keep it current
36
-
37
- - When a milestone or task reveals a **new kind of risk** this project carries (a regulated
38
- data category, a payment rail, a tenancy boundary), ADD it as a class with a one-line
39
- definition — propose it, the human confirms (it is foundation, like a glossary term).
40
- - **Re-read the section each session** (it rides `GLOSSARY.md`); pick the tightest class
41
- when you declare a task's `sensitivity:` at freeze.
42
- - **Map domain → base behavior** in the definition so downstream gating is unambiguous —
43
- e.g. "pii … escalates to human review" pins it as human-floor, not advisor-gatable.
44
-
45
- ## Hold the line
46
-
47
- - **Declared, never inferred** — the engine reads your token; it does not guess a class.
48
- - **Base four are universal** — domain classes add to them, never replace them; security
49
- stays a human floor in every tier.
50
- - **A comment is never a declaration** — commented-out example bullets don't count; only a
51
- real `- <token>:` line under the section is a class.
@@ -1,48 +0,0 @@
1
- # Setup review — the one page the human signs
2
-
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.
4
-
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.
6
-
7
- ## Where it lives
8
-
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.
10
-
11
- ## The template
12
-
13
- ```markdown
14
- # SETUP REVIEW — <project>
15
-
16
- <stage> · <brownfield | greenfield> · drafted by <model> @ <date>
17
-
18
- | # | Decision | Lands in | Tag | Why / Evidence |
19
- |---|----------|----------|-----|----------------|
20
- | 1 | <the drafted decision> | PROJECT.md \| scope \| first-contract | `guessed` | <the inference + why you had to guess> |
21
- | 2 | <…> | <…> | `evidence-grounded` | <cite the source file/line you read it from> |
22
-
23
- Sign: confirm in chat → the agent runs `add.py lock --by "<name>"` (typing it yourself works too)
24
- ```
25
-
26
- Rows are numbered for reference at the gate ("row 1 is where my confidence is lowest").
27
-
28
- ## The two rules that make it honest
29
-
30
- <constraints>
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.
32
-
33
- 2. **Every row is tagged — `guessed` or `evidence-grounded`.**
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.
38
- </constraints>
39
-
40
- ## Where it ends
41
-
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:
43
-
44
- ```bash
45
- python3 .add/tooling/add.py lock --by "<name>"
46
- ```
47
-
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.
package/skill/add/soul.md DELETED
@@ -1,58 +0,0 @@
1
- # Self-improving the voice — how SOUL.md converges to the human
2
-
3
- `SOUL.md` is the AI's voice (Tone · Communication style · Trust). It ships as a **proposed starter** and is **human-owned**; this doc is how it starts converging to *this* human. It mirrors `deltas.md` (emit) + `fold.md` (confirm → rewrite), but a confirmed voice delta consolidates into **SOUL.md**, not the foundation — voice is not one of the five competencies.
4
-
5
- You **emit** voice deltas as `open`. Only the **human** confirms one; **the human's confirm is the only writer** — you never self-approve a voice rewrite.
6
-
7
- ## What a voice delta is drawn from
8
-
9
- A voice delta is grounded in how the human shows up **in session**:
10
- - their **wordings** — the words they reach for, and the words they correct you on;
11
- - their **flow** — what they skip, what they double-check, where they want summary before detail.
12
-
13
- NOT from their private **memory** files or anything outside the working session — SOUL learns only from what you observed together.
14
-
15
- ## The grammar (mirrors deltas.md)
16
-
17
- ```
18
- - [VOICE · <status>] <observation about the voice> (evidence: <in-session pointer>)
19
- ```
20
-
21
- - `<observation>` — what the voice should become ("lead with the decision, not the preamble").
22
- - `<status>` — `open` | `confirmed` | `declined`. A newly emitted delta is **`open`**.
23
- - `(evidence: …)` — **required**, non-empty: a moment in the session (a correction, a re-ask, a visible preference). No evidence → drop it.
24
-
25
- ```
26
- - [VOICE · open] the human strips hedging from my drafts — cut "I think / it seems" and state it plainly
27
- (evidence: they rewrote two replies this session to remove the qualifier)
28
- ```
29
-
30
- ## The loop — observe → confirm → rewrite
31
-
32
- 1. **Emit** (OBSERVE) — propose 0–N voice deltas as `open` from wordings + flow. Surface in the report; show-before-ask.
33
- 2. **Confirm** — the human accepts or declines each. **No SOUL.md write happens without this.**
34
- 3. **Rewrite** — on a confirmed delta, edit the routed SOUL.md section, record the delta line (`confirmed`) at the **top** of "Voice deltas" (**newest-first**, append-only — declined stays in place).
35
-
36
- ## Routing — every voice delta has a SOUL.md home
37
-
38
- | the delta is about… | rewrite this SOUL.md section |
39
- |---------------------|------------------------------|
40
- | how I *sound* (warmth, directness, hedging) | **## Tone** |
41
- | how I *structure* what I say (summary-first, show-before-ask, length) | **## Communication style** |
42
- | what keeps the human's *trust* (gates, honesty, what I never do) | **## Trust** |
43
-
44
- The rewrite is surgical: refine or append the bullet the delta names; never silently rewrite the rest of the voice. Every confirmed delta also gets its line in **## Voice deltas** (newest-first).
45
-
46
- ## Reject codes
47
-
48
- <reject_codes>
49
- - `unconfirmed_voice_rewrite` — a SOUL.md write was attempted without a recorded human confirm. The AI proposes; it never self-approves. Stop and get the confirm.
50
- - `no_open_voice_deltas` — nothing is `open`. The loop is a no-op; do not touch SOUL.md.
51
- - `unroutable_voice_delta` — the observation maps to no SOUL.md section (not tone/style/trust). Fix the delta or widen the routing before writing.
52
- </reject_codes>
53
-
54
- ## Where it plugs in
55
-
56
- - **Emit**: `phases/7-observe.md` proposes voice deltas beside competency/spec deltas.
57
- - **Target**: `SOUL.md` — "## Voice deltas" ledger holds confirmed history.
58
- - **Kin**: `deltas.md` + `fold.md` (same propose→confirm→write discipline). No `add.py` command writes the voice.