@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,182 +0,0 @@
1
- # 16 · Releasing
2
-
3
- [← 15 Foundations & Lineage](./15-foundations-and-lineage.md) · [Contents](./README.md) · Next: [17 Components →](./17-components.md)
4
-
5
- ---
6
-
7
- The flow chapters ([03](./03-step-1-specify.md)–[08](./08-step-6-verify.md)) take one feature from
8
- spec to verified. The loop chapter ([09](./09-the-loop.md)) keeps a milestone going until its goal
9
- is met. The stages chapter ([10](./10-setup-and-stages.md)) graduates the project's rigor. None of
10
- them *ship*. This chapter names the act every project eventually performs and that the method, until
11
- now, never formalized: bundling closed milestones into a versioned, user-facing release whose notes
12
- are evidence-backed, whose risk is disclosed, and whose behaviour is then watched.
13
-
14
- Releasing is the **fifth scope level** — after setup, intake, the milestone loop, and stage graduation.
15
- Like every scope level it runs the same shape: **gather → propose → the human
16
- confirms → the engine records and enforces a floor.** And like graduation, it ends with an outward
17
- act the human owns. The operational recipe lives in the `release.md` skill guide; this chapter is the
18
- *why* behind it.
19
-
20
- ## 16.1 · Why release is its own scope level
21
-
22
- A number bump is not a release. A release is the moment one or more **closed milestones** become a
23
- versioned cut that real users can run. Three distinctions make it its own scope level:
24
-
25
- - **Milestone ≠ release.** A milestone is *feature-complete and consolidated* — its goal is met and
26
- its lessons are gathered into the foundation (see [14 · The foundation](./14-foundation.md) and the
27
- `fold.md` retrospective consolidation). A release is *shipped and watched*. The first is an internal
28
- state; the second faces outward.
29
- - **Graduation ≠ release.** Stage graduation moves the project's *rigor* (mvp → production); a release
30
- ships a *version*. The two axes are orthogonal: you cut a prototype preview, an mvp beta, and a
31
- production GA, each at its own stage. You release at every stage, not only at the end.
32
- - **A release bundles; it does not equal.** One version may attribute several milestones — "we shipped
33
- after a couple of milestones closed" is the normal case, not the exception. Forcing one release per
34
- milestone is the anti-pattern; the decoupling is the whole point.
35
-
36
- So release sits beside the other scope levels rather than inside any of them. The granularity ladder
37
- is now complete: intake → milestone → task, with stage graduation and release as the two cross-cutting
38
- levels that change *rigor* and ship *versions* respectively (see the **Scope level** entry in
39
- [Appendix C](./appendix-c-glossary.md)).
40
-
41
- ## 16.2 · The cue and the inventory — gather, never judge
42
-
43
- The trigger is a status line. When at least one milestone is `done`, archived, and not yet attributed
44
- to any release, `add.py status` prints:
45
-
46
- ```
47
- → releasable: N milestone(s) closed since last release
48
- ```
49
-
50
- That line is a **tally**, never a verdict. It counts archived-but-unreleased milestones; it is silent
51
- for a project that has never released or has already shipped everything (grandfathered — zero change).
52
- It says *there is something to consider*, not *you are ready*.
53
-
54
- To gather the cut's evidence, run `add.py release-report`. It clusters five labeled record-sets: the
55
- closed milestones since the last release · their **consolidated deltas** (the "what changed" record) ·
56
- the open `RISK-ACCEPTED` waivers riding into the release · any open security `HARD-STOP` (a blocker) ·
57
- the §2 scenarios to take live as monitors. The report **gathers; it does not judge** — there is no
58
- readiness score to read off, because a tally that pretended to be a verdict would invite reading the
59
- number instead of the evidence.
60
-
61
- The reuse claim, stated plainly: **the consolidated deltas are the changelog source.** You do not write
62
- release notes from memory. The foundation already recorded what changed when each milestone was
63
- consolidated (`fold.md`); the release surfaces it. This is why release runs *after* consolidation, not
64
- before. The lifecycle order is one line:
65
- `milestone-done → fold → compact → archive → (repeat ≥1×) → release → watch`.
66
-
67
- ## 16.3 · Drafting the notes and the version — the proposal
68
-
69
- From those record-sets you draft a [Keep a Changelog](https://keepachangelog.com/) entry: group the
70
- changes under Added / Changed / Fixed and name the headline capabilities concretely, in the user's
71
- language, not the commit's. Each bundled milestone's goal anchors one or more entries.
72
-
73
- Then propose the version. Semver is a decision the evidence informs but does not make for you: a
74
- breaking change is a MAJOR, a new capability a MINOR, a fix-only cut a PATCH. You propose the bump; the
75
- **human confirms it** — the version is a judgement, not a default the tool fills in.
76
-
77
- Both the notes and the version are *shown before they are asked about*. Present the drafted entry, the
78
- proposed version, and the waivers shipping in this cut via the report template — opening with the ARC
79
- (goal · done · plan) — and let the human approve once. The question is a summary to decide on; the
80
- artifact itself is rendered first, never pre-stamped.
81
-
82
- ## 16.4 · The floor — what the engine enforces
83
-
84
- `add.py release <version>` is **guarded**. Before it records anything it enforces a readiness floor,
85
- refusing with a non-zero exit and leaving every file byte-unchanged on any of four conditions:
86
-
87
- - `release_security_open` — an open security `HARD-STOP` exists. This is the non-negotiable one: a
88
- security finding is never shipped. Resolve it first, as a change request back to Specify.
89
- - `release_build_in_flight` — a build is in flight: a task sits in build/verify with no recorded green gate. A release ships on evidence, not on a plausible diff.
90
- - `release_no_closed_milestone` — nothing new since the last release. The cut would be a no-op; do not
91
- bump a version to mark time.
92
- - `release_undisclosed_waiver` — a `RISK-ACCEPTED` waiver rides into the release but is missing from the
93
- notes. Disclosure *is* the floor: a shipped risk the user cannot read about is a hidden risk.
94
-
95
- The security stop is **un-forceable.** `--force` exists for grandfathered and brownfield first-cuts —
96
- the same authority valve as `stage --force` ([10 · Setup and stages](./10-setup-and-stages.md)) — and
97
- it can override the other three rejects, but it can never override `release_security_open`. This mirrors
98
- the verify gate exactly ([08 · Verify](./08-step-6-verify.md)) and the governance ceiling that no
99
- autonomy level may lift ([11 · Governance](./11-governance.md)): a security `HARD-STOP` is the one
100
- outcome the method refuses to auto-pass, at verify and again at the cut.
101
-
102
- ## 16.5 · The cut versus the ship — the engine records, the human ships
103
-
104
- Only after the human confirms do you run the cut. And here is the line that keeps releasing honest:
105
- **the engine records; the human ships.**
106
-
107
- `add.py release <version>` **records** the marker. It prepends the entry to `CHANGELOG.md`, stamps one
108
- append-only row (newest-first, like the §Key Decisions log) into `RELEASES.md` — date · version ·
109
- milestones · waivers shipped · evidence — and attributes the bundled milestones to this version, so the
110
- cue stops firing for them. The ledger is the attribution source: a milestone is "released" because a
111
- `RELEASES.md` row says so, never because a file was edited to claim it.
112
-
113
- What the engine does **not** do is act outward. It **never tags, publishes, or deploys.** The outward
114
- act — `git tag`, `npm publish`, the deploy pipeline — is the human's, tool-agnostic, exactly as the
115
- method tool "never renders" in design and "never spawns" a subagent. Design-for-failure — timeouts,
116
- retries, rollback, a tested revert path — belongs in the pipeline the human owns, not in a method tool
117
- that has no business holding deploy credentials. The tag is the human-gated trigger; the record is the
118
- engine's receipt that the floor was met.
119
-
120
- > **A caveat worth one paragraph.** `add.py release` writes `CHANGELOG.md` at the **project root**. That
121
- > is the right default for most repositories. But a repo with a different changelog convention — for
122
- > instance a **nested-package** layout whose root `CHANGELOG.md` is a deliberate pointer to a package's
123
- > own changelog — will get release blocks *prepended above* its existing content rather than replacing
124
- > it (the writer preserves what is there; it does not clobber). Reconcile per repo: either let the root
125
- > file carry the canonical log, or point the human's publish step at the package changelog the team
126
- > treats as the source of truth.
127
-
128
- ## 16.6 · Watch and the hotfix path — re-entering observe
129
-
130
- A release is not the finish line; it is where the most reliable information finally appears. The §2
131
- scenarios that were pass/fail cases at build time become **live monitors** for the released version, and
132
- error-budget burn feeds the next loop. Live-registry and deploy confirmation are post-cut *evidence*,
133
- gathered after the tag — not unit tests pretending to be one.
134
-
135
- The unhappy path is first-class. A regression found in the wild re-enters at Specify as a **change
136
- request**, which narrows to a **hotfix release** — the same seven-step flow, scoped to the fix, cut as a
137
- PATCH. Releasing does not have a separate emergency mode; it has the ordinary flow at a tighter scope.
138
-
139
- Depth follows the stage, as everywhere in the method:
140
-
141
- - **prototype / poc** — a one-line preview note and a tag; no deploy ceremony. The point is feedback.
142
- - **mvp** — full notes, a tag, a guarded publish; watch the headline scenarios.
143
- - **production** — every step at full rigor: notes, tag, a deploy behind a rollback-tested pipeline,
144
- live scenario monitors, and error-budget watch. The hotfix path is a routine capability here, not a
145
- fire drill.
146
-
147
- ## 16.7 · The flow, in one arc
148
-
149
- One arc, seven steps:
150
-
151
- **cue → gather → draft notes → readiness floor → human confirms → cut → watch**
152
-
153
- 1. **cue** — `add.py status` prints `→ releasable: N` when an archived milestone is unreleased.
154
- 2. **gather** — `add.py release-report` clusters the five record-sets (gather, never judge).
155
- 3. **draft notes** — a Keep-a-Changelog entry drawn from the consolidated deltas; propose the version.
156
- 4. **readiness floor** — the four guarded rejects; the security stop is un-forceable.
157
- 5. **human confirms** — the notes, version, and waivers are shown, then approved once.
158
- 6. **cut** — `add.py release <version>` records the CHANGELOG block + the `RELEASES.md` row + attribution.
159
- 7. **watch** — the scenarios become monitors; a wild regression becomes a PATCH hotfix release.
160
-
161
- The recipe for each step — flags, the report's `--json` shape, the exact ledger row — lives in the
162
- `release.md` skill guide. This chapter is the reasoning; the guide is the procedure.
163
-
164
- ## 16.8 · Worked example — this method's own 1.5.0
165
-
166
- The repository already runs this by hand, which is the best evidence the flow is real. The
167
- `udd-design-loop` milestone closed (4/4) and consolidated into `foundation-version 33`. From those
168
- deltas the human drafted the `## [1.5.0]` changelog entry, bumped the three version sources in
169
- lockstep, and a forward-pinned `test_release_1_5_0.py` asserted in-repo readiness: the versions agree,
170
- the changelog lineage survives, the feature anchors are named, and the engine is untouched by the
171
- release. The cut itself — the `git tag` that triggers the npm and PyPI publish — stayed human-gated,
172
- and the live-registry confirmation was gathered *after* the tag as verify evidence, never as a unit
173
- test.
174
-
175
- That ritual is what this chapter formalizes. `release-report` gathers the inventory, the floor enforces
176
- the security stop and the disclosures, `add.py release` records the cut, and the human still owns the
177
- tag. The method releases itself the way it asks every project to release: gather the evidence, disclose
178
- the risk, record the marker, and let a person make the outward call.
179
-
180
- ---
181
-
182
- [← 15 Foundations & Lineage](./15-foundations-and-lineage.md) · [Contents](./README.md) · Next: [17 Components →](./17-components.md)
@@ -1,143 +0,0 @@
1
- # 17 · Components — monorepo and multi-repo
2
-
3
- [← 16 Releasing](./16-releasing.md) · [Contents](./README.md) · Next: [Appendix A Templates →](./appendix-a-templates.md)
4
-
5
- ---
6
-
7
- Most of this book treats a project as one codebase with one green bar. Real
8
- systems are rarely that tidy: a backend and a frontend, a shared library and two
9
- apps, or three services across three repos. ADD models all of these the same
10
- way — as a **graph of components**. A component owns a source root, its own
11
- green bar, and the contracts it produces or consumes. With that, **one milestone
12
- can ship a vertical slice across components** — a backend endpoint and the
13
- frontend that calls it — instead of splitting the slice across milestones.
14
-
15
- This pillar is **opt-in and additive**: a project that declares no components
16
- behaves exactly as the rest of the book describes. You reach for it only when a
17
- milestone genuinely spans more than one green bar.
18
-
19
- ## Declare the components
20
-
21
- Components are **declared, never inferred** — ADD does not scan `apps/*` and
22
- guess. You name them in `.add/components.toml`:
23
-
24
- ```toml
25
- [component.gateway]
26
- root = "apps/gateway"
27
- green_bar = "pytest + pyright"
28
-
29
- [component.dashboard]
30
- root = "apps/web"
31
- green_bar = "vitest + a11y"
32
- ```
33
-
34
- Each component owns a **root** (the source subtree it governs) and a
35
- **green-bar** (the suite + checks that prove *that* component healthy). A task
36
- binds to a component with a `component:` header line; the component's root is
37
- then added to the task's §5 Scope automatically. A project with no
38
- `components.toml`, or a task with no `component:` line, is byte-identical to a
39
- single-component project.
40
-
41
- ## Verify each task against its own green bar
42
-
43
- In a mixed milestone, a backend task and a frontend task pass on **different
44
- toolchains**. The verify gate enforces this per component: a task bound to
45
- `gateway` must cite its component's green-bar (`pytest + pyright`) in the §6
46
- Build-expectations evidence, or the gate refuses `component_green_bar_uncited`.
47
- The engine never *runs* the suite — that invariant holds here too. The AI runs
48
- the right suite for the bound component; the gate checks the **right bar was
49
- cited** in the evidence. Two tasks, one milestone, two green bars — each held to
50
- its own.
51
-
52
- At the gate the engine also **surfaces** the bound component's `verify` command —
53
- the literal suite to run (e.g. `pytest -q`) — beside the expected green-bar, and
54
- records it in the §6 gate record so the ledger shows which suite backed the gate.
55
- It prints *what* to run; it never runs it (NO-EXEC). In the fast lane the same
56
- `component:` affordance is available, so a small task in a monorepo can bind a
57
- component and get its bar and `verify` surfaced too.
58
-
59
- ## Freeze a contract between components
60
-
61
- When one component produces an interface another consumes, that boundary needs a
62
- **frozen, machine-checkable contract**. Declare it, name its producer and
63
- consumers:
64
-
65
- ```toml
66
- [contract.gateway-api]
67
- producer = "gateway"
68
- consumers = ["dashboard"]
69
- ```
70
-
71
- A task declares its role with a header line — `produces: gateway-api` or
72
- `consumes: gateway-api`. When the **producer** task freezes its §3 and crosses
73
- contract→tests, the engine writes an immutable snapshot at
74
- `.add/contracts/gateway-api.json` (id, producer, version, frozen date, and a
75
- hash over the frozen §3 shape). When a **consumer** task crosses contract→tests,
76
- it **pins** that live hash. If the producer later re-freezes a *changed* shape,
77
- `add.py check` flags every consumer `contract_consumer_stale` — a §7 delta to
78
- re-pin against the new shape. A missing or malformed snapshot is a HARD-STOP, not
79
- a guess: the consumer never builds against a shape that was never frozen.
80
-
81
- ## One milestone, a full-stack slice
82
-
83
- The reason to put a producer and a consumer in the *same* milestone is to ship a
84
- vertical slice — but the frontend must not commit to an endpoint the backend has
85
- not frozen yet. ADD enforces that ordering with a **hold**: a `consumes:` task
86
- cannot advance scenarios→contract (it cannot write its §3) while its producer's
87
- snapshot does not yet exist. The engine refuses `producer_contract_unfrozen` and
88
- the task stays at `scenarios`. Once the backend freezes its contract, the
89
- frontend proceeds and pins it. The slice is **ordered by the frozen contract**,
90
- all inside one milestone — the FE stays downstream of the BE endpoint, not split
91
- into a later milestone.
92
-
93
- The hold checks more than existence. Even once a snapshot exists, if a live
94
- producer task has *re-opened or drifted* its §3 — the snapshot no longer matches
95
- a frozen producer — the consumer is held `producer_contract_stale` rather than
96
- pinning a shape that is mid-change (the freeze-recency guard). Outside the hold,
97
- `add.py check` surfaces the softer `contract_producer_stale` (a live producer
98
- drifted past a pinned consumer) and `contract_snapshot_hashless` (a snapshot
99
- carrying no hash to verify against) as **never-red warnings** — measured and
100
- reported, never blocking.
101
-
102
- ## Across repositories: federation
103
-
104
- Components in separate repositories work the same way; only the
105
- **snapshot transport** differs. A consumer repo declares where a producer repo
106
- publishes its frozen contract:
107
-
108
- ```toml
109
- [federation.gateway-api]
110
- source = "../gateway/.add/contracts/gateway-api.json"
111
- pin = "v1" # optional — the version this repo expects
112
- ```
113
-
114
- `add.py federate pull gateway-api` reads that source, validates it (valid JSON,
115
- matching id, a hash, and — if `pin` is set — a matching version), and lands a
116
- **byte-for-byte copy** at the local `.add/contracts/gateway-api.json`. From
117
- there, the consuming repo's task holds and pins exactly as in a monorepo. The
118
- pull is **fail-loud by design**: an unknown id, an unreadable source, a `source`
119
- that **escapes the consumer repo's allowlist** (`federation_source_escapes` — the
120
- path is confined to a sibling of the repo root, so a `../../etc`-style traversal
121
- lands nothing), an invalid snapshot, or a version mismatch each HARD-STOPS — federation
122
- never builds an FE against a guessed, out-of-tree, or stale endpoint. The producer's snapshot
123
- is the published artifact; "publishing" is committing that file in the producer
124
- repo. Each repo keeps its own git-native `state.json`; federation transports only
125
- the immutable frozen shape, never shared mutable state.
126
-
127
- ## What this pillar is not
128
-
129
- - **Not auto-discovery.** Components are declared in `components.toml`, not
130
- inferred from the directory tree.
131
- - **Not a central server.** Federation copies an immutable snapshot between
132
- repos; there is no shared service and no shared mutable state.
133
- - **Not a new approval.** The component machinery rides the existing six-step
134
- flow and its single contract-freeze approval — it adds gates the engine
135
- enforces, not human checkpoints.
136
-
137
- The whole pillar is structure, not policy: who *owns* a component and how
138
- autonomy is set per component is the identity/governance story (chapters 11–12),
139
- layered on top of this graph.
140
-
141
- ---
142
-
143
- [← 16 Releasing](./16-releasing.md) · [Contents](./README.md) · Next: [Appendix A Templates →](./appendix-a-templates.md)
@@ -1,80 +0,0 @@
1
- # 18 · Personas — the project-fit learning loop
2
-
3
- [← 17 Components](./17-components.md) · [Contents](./README.md) · Next: [Appendix A Templates →](./appendix-a-templates.md)
4
-
5
- ---
6
-
7
- A **persona** is a project-fit requirements lens the agent adopts so its work matches *this*
8
- codebase's standards instead of a generic default. It is not a chat costume: a persona is a small,
9
- versioned file under `.add/personas/<slug>.md` with three machine-readable parts —
10
-
11
- - **Identity** — the stance the worker takes (e.g. *a payments engineer who treats money as exact*).
12
- - **Critical Rules** — the constraints that must hold (the non-negotiables for this domain).
13
- - **Success Metrics** — the measurable done-bar (what "good" looks like, in numbers where it can).
14
-
15
- The **persona loop** is how those files come to exist, improve, and get used: **seed → grow →
16
- apply**. The loop is opt-in and additive — a project with no personas behaves exactly as before.
17
-
18
- ## Where personas come from — the teacher
19
-
20
- ADD does not invent personas from nothing. It learns them from a **teacher**: a corpus of worked
21
- agent definitions that ADD ships as a vendored local library at `.add/personas-teacher/`.
22
- The teacher is read **off-build**, by the AI, while drafting a persona — it is a *source of ideas*,
23
- **never a runtime dependency**: nothing in the engine imports it, fetches it, or needs it present to
24
- run. You distil a teacher entry down to the three-part shape above and commit the result; from then
25
- on the project owns that persona outright.
26
-
27
- ## Seed — at setup
28
-
29
- The first personas are **seeded** during project setup, from the foundation (`PROJECT.md`'s domain
30
- and standards). Setup proposes a starter persona or two that fit the project's domain; the human
31
- confirms. Seeding writes `.add/personas/<slug>.md` and nothing else — no behaviour changes until a
32
- task actually applies one.
33
-
34
- ## Grow — observe → delta → consolidate
35
-
36
- Personas are **living documents**: they improve through the same loop the foundation uses. In a
37
- task's **observe** phase the AI emits a **persona delta** — a one-line, tagged proposal to add or
38
- sharpen a critical-rule, success-metric, anti-pattern, or ability, written `open` with evidence (just like a lesson learned).
39
- At a retrospective the human **consolidates** confirmed deltas into the persona file (the same
40
- `fold` step the foundation uses), bumping it forward. The consolidation is judgment-free
41
- transcription: the engine routes a confirmed delta into the named
42
- persona's `## Critical Rules`, `## Success Metrics`, `## Anti-patterns`, or `## Abilities` section and **never clobbers** existing content.
43
- So a persona gets *more* accurate every milestone instead of drifting.
44
-
45
- ## Apply — three surfaces
46
-
47
- A seeded, grown persona earns its keep when work adopts it. Three surfaces apply a persona, and all
48
- three treat it the same way — as **advice**, never authority:
49
-
50
- - **UDD (design).** At the design-definition loop a persona frames the requirements lens: which
51
- rules and metrics a UI/UX slice must satisfy for this project's users.
52
- - **advisor / streams (delegation).** When you delegate a piece of your plan to a subagent, its
53
- `<persona>` block **selects** the best-fit `.add/personas/<slug>.md` and the returned verdict
54
- **records** which persona did the work. The independent earned-green refute-read selects a
55
- **Code-Reviewer** persona whose findings carry severity markers — 🔴 blocker · 🟡 concern · 💭 note.
56
- The same canonical persona body rides every runner (Claude, Cursor, Copilot, Codex), so a
57
- **cross-runner subagent** behaves identically wherever it is spawned.
58
- - **build (overlay).** While building, the orchestrating agent may load the active persona as a
59
- domain identity **overlay** layered on `SOUL.md`: SOUL is the voice and trust rules; the persona is
60
- the domain stance. The overlay **never rewrites** SOUL.md (it is human-owned) and never overrides a
61
- trust rule.
62
-
63
- ## The non-negotiable — a persona never lowers a gate
64
-
65
- A persona changes *how carefully* the work is done; it never changes *what passes*. This is the one
66
- hard rule across every surface:
67
-
68
- - A **security** finding is always a **HARD-STOP**, whatever persona was adopted.
69
- - High-risk scope still escalates to the human; a stronger persona never buys back a gate.
70
- - The engine stays **NO-EXEC** throughout: it never spawns a subagent, never runs a persona, never
71
- reads one on the build path. Selecting, loading, and applying a persona is the orchestrating
72
- agent's judgment — the engine only records what was used (for the audit trail) and measures that
73
- the record is present; it never auto-passes on a persona's say-so.
74
-
75
- In short: a persona makes the agent *fit the project*. Direction, freezing, evidence, and the gate
76
- are exactly as strict as they were before — the loop adds expertise, not permission.
77
-
78
- ---
79
-
80
- [← 17 Components](./17-components.md) · [Contents](./README.md) · Next: [Appendix A Templates →](./appendix-a-templates.md)
package/docs/README.md DELETED
@@ -1,77 +0,0 @@
1
- # AI-Driven Development
2
-
3
- ### A complete, practical book on building software when AI writes the code
4
-
5
- **Edition:** 1.0 · **Type:** Methodology + operating manual
6
-
7
- ---
8
-
9
- ## What this book is
10
-
11
- This is a complete guide to **AIDD (AI-Driven Development)** — a way of building software in which an AI agent writes most of the code and people do the two things AI cannot reliably do alone: decide *what* to build, and *verify* that what was built is correct.
12
-
13
- It is written to be read once front to back, then kept open beside you as a working manual. The early chapters explain *why* the method has the shape it does; the middle chapters explain each step in detail; the later chapters explain how to operate it across a real team and product; the appendices are copy-paste reference material.
14
-
15
- A single worked example — *transferring money between a user's own accounts* — runs through the entire book so that every abstract step has a concrete form you can see.
16
-
17
- ## Who it is for
18
-
19
- Anyone who builds software with AI in the loop: engineers, architects, testers, designers, product owners, and the managers who lead them. No part assumes you have read the others; cross-references point you to what you need.
20
-
21
- ## The method in one paragraph
22
-
23
- For every feature, before AI writes any code, you write four short artifacts in order — the rules it must obey, those rules as pass/fail scenarios, the data and interface contract, and the failing tests — and then you direct the AI to make the tests pass without changing them, and finally you verify the result through evidence rather than inspection. That ordered set of artifacts *is* the method. The code is disposable; the artifacts are the durable asset. Direction comes before speed, and trust comes from passing tests rather than from reading code and finding it plausible.
24
-
25
- ## The flow
26
-
27
- > **Specify → Scenarios → Contract → Tests → Build → Verify → observe, then repeat.**
28
-
29
- ---
30
-
31
- ## Table of contents
32
-
33
- **Part I — Foundations**
34
- - [00 · The shift: why AIDD exists](./00-introduction.md)
35
- - [01 · Core principles](./01-principles.md)
36
- - [02 · The flow, and what is disposable](./02-the-flow.md)
37
-
38
- **Part II — The method, step by step**
39
- - [03 · Step 1 — Specify](./03-step-1-specify.md)
40
- - [04 · Step 2 — Scenarios](./04-step-2-scenarios.md)
41
- - [05 · Step 3 — Contract](./05-step-3-contract.md)
42
- - [06 · Step 4 — Tests](./06-step-4-tests.md)
43
- - [07 · Step 5 — Build](./07-step-5-build.md)
44
- - [08 · Step 6 — Verify](./08-step-6-verify.md)
45
- - [09 · The loop — observe and learn](./09-the-loop.md)
46
-
47
- **Part III — Operating the method**
48
- - [10 · Project setup and stages](./10-setup-and-stages.md)
49
- - [11 · Governance](./11-governance.md)
50
- - [12 · Roles and responsibilities](./12-roles.md)
51
- - [13 · Adoption and onboarding](./13-adoption.md)
52
- - [14 · The foundation: project context across milestones](./14-foundation.md)
53
-
54
- **Lineage**
55
- - [15 · Foundations & Lineage](./15-foundations-and-lineage.md)
56
-
57
- **Releasing**
58
- - [16 · Releasing](./16-releasing.md)
59
-
60
- **Part IV — Reference**
61
- - [Appendix A · Templates](./appendix-a-templates.md)
62
- - [Appendix B · Prompt library](./appendix-b-prompts.md)
63
- - [Appendix C · Glossary](./appendix-c-glossary.md)
64
- - [Appendix D · The worked example, end to end](./appendix-d-worked-example.md)
65
- - [Appendix E · Checklists](./appendix-e-checklists.md)
66
- - [Appendix F · Document requirements matrix (Project → Milestone → Task)](./appendix-f-requirements-matrix.md)
67
- - [Appendix G · References & lineage](./appendix-g-references.md)
68
-
69
- ---
70
-
71
- ## Conventions used in this book
72
-
73
- - **▶ Example** marks the running worked example.
74
- - **Do / Don't** boxes give the rule in its shortest form.
75
- - A **gate** is a checkpoint with an explicit pass/fail exit. Its outcome is always one of `PASS`, `RISK-ACCEPTED` (a signed waiver), or `HARD-STOP`.
76
- - File names like `SPEC.md`, `features/*.feature`, `contracts/*` refer to the artifacts you create per feature; see [Appendix A](./appendix-a-templates.md).
77
- - Where this book uses a plain step name, the formal phase name (for teams mapping to a larger standard) appears once in [Appendix C](./appendix-c-glossary.md).
Binary file
package/docs/add-flow.png DELETED
Binary file
Binary file
Binary file
Binary file
@@ -1,88 +0,0 @@
1
- # Appendix A · Templates
2
-
3
- [← 15 Foundations & Lineage](./15-foundations-and-lineage.md) · [Contents](./README.md) · Next: [Appendix B Prompts →](./appendix-b-prompts.md)
4
-
5
- Copy-paste blanks. Project-level templates are filled once at setup; feature-level templates are filled once per feature.
6
-
7
- ---
8
-
9
- ## Project-level (set up once)
10
-
11
- ### `CONVENTIONS.md`
12
- ```
13
- Language/framework: <e.g. Python 3.12 / FastAPI>
14
- Folders: src/ tests/ contracts/ features/ playbook/
15
- Naming: <file case>, <type case>, verbs for functions
16
- Lint/format: <tools>, enforced in the pipeline
17
- Errors: machine-readable error codes (string enums), never free text
18
- Architecture: <layering and dependency rules>
19
- ```
20
-
21
- ### `MODEL_REGISTRY.md`
22
- ```
23
- Model: <name>
24
- Version: <version/date>
25
- Adopted: <date>
26
- Notes: re-run the prompt golden-cases before changing this.
27
- ```
28
-
29
- ### `dependencies.allowlist`
30
- ```
31
- # one package per line; the pipeline rejects anything not listed
32
- <package>==<version-or-range>
33
- ```
34
-
35
- ---
36
-
37
- ## Feature-level (once per feature)
38
-
39
- ### `SPEC.md`
40
- ```
41
- Feature: <name>
42
- Framings weighed: <chosen> (chosen) · <alternative> · <alternative>
43
- Must:
44
- - <required behavior>
45
- Reject:
46
- - <bad input / situation> -> "<error_code>"
47
- After:
48
- - <state true once it succeeds>
49
- Assumptions — lowest-confidence first:
50
- ⚠ <most-likely-wrong assumption> — lowest confidence because <why>; if wrong: <cost>
51
- - [x] <confirmed / low-stakes assumption> — <one line>
52
- ```
53
-
54
- ### `features/<name>.feature`
55
- ```
56
- Scenario: <short name>
57
- Given <starting situation>
58
- When <action>
59
- Then <expected result>
60
- And <what must remain unchanged> # when relevant
61
- ```
62
-
63
- ### `contracts/<name>.md`
64
- ```
65
- <METHOD> <path> body: { <fields> }
66
- 200 -> { <success fields> }
67
- 4xx -> { error: "<code>" | "<code>" }
68
- Schema: <tables/fields touched, and access pattern>
69
- Status: FROZEN @ v<n>
70
- ```
71
-
72
- ### `tests/<name>_test.<ext>` (stub)
73
- ```
74
- test_<scenario_name>:
75
- arrange: <set up the Given>
76
- act: <do the When>
77
- assert: <check the Then>
78
- assert: <check what must stay unchanged> # when relevant
79
- ```
80
-
81
- ### Gate outcome record
82
- ```
83
- Feature: <name> Step: <Specify|...|Verify> Date: <date>
84
- Reports: Test=<pass/fail> Quality=<pass/fail> Risk=<summary>
85
- Outcome: <PASS | RISK-ACCEPTED | HARD-STOP>
86
- If RISK-ACCEPTED -> owner: <name> ticket: <link> expires: <date>
87
- Reviewed by: <name>
88
- ```