@pilotspace/add 1.0.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 (53) hide show
  1. package/GETTING-STARTED.md +238 -0
  2. package/LICENSE +20 -0
  3. package/README.md +106 -0
  4. package/bin/cli.js +131 -0
  5. package/docs/00-introduction.md +46 -0
  6. package/docs/01-principles.md +71 -0
  7. package/docs/02-the-flow.md +93 -0
  8. package/docs/03-step-1-specify.md +117 -0
  9. package/docs/04-step-2-scenarios.md +78 -0
  10. package/docs/05-step-3-contract.md +78 -0
  11. package/docs/06-step-4-tests.md +71 -0
  12. package/docs/07-step-5-build.md +80 -0
  13. package/docs/08-step-6-verify.md +63 -0
  14. package/docs/09-the-loop.md +43 -0
  15. package/docs/10-setup-and-stages.md +75 -0
  16. package/docs/11-governance.md +87 -0
  17. package/docs/12-roles.md +99 -0
  18. package/docs/13-adoption.md +67 -0
  19. package/docs/14-foundation.md +121 -0
  20. package/docs/README.md +70 -0
  21. package/docs/add-competencies.png +0 -0
  22. package/docs/add-flow.png +0 -0
  23. package/docs/add-foundation.png +0 -0
  24. package/docs/add-hierarchy.png +0 -0
  25. package/docs/appendix-a-templates.md +88 -0
  26. package/docs/appendix-b-prompts.md +119 -0
  27. package/docs/appendix-c-glossary.md +85 -0
  28. package/docs/appendix-d-worked-example.md +152 -0
  29. package/docs/appendix-e-checklists.md +80 -0
  30. package/docs/appendix-f-requirements-matrix.md +170 -0
  31. package/package.json +47 -0
  32. package/skill/add/SKILL.md +118 -0
  33. package/skill/add/deltas.md +69 -0
  34. package/skill/add/fold.md +66 -0
  35. package/skill/add/intake.md +49 -0
  36. package/skill/add/phases/0-setup.md +35 -0
  37. package/skill/add/phases/1-specify.md +55 -0
  38. package/skill/add/phases/2-scenarios.md +36 -0
  39. package/skill/add/phases/3-contract.md +41 -0
  40. package/skill/add/phases/4-tests.md +37 -0
  41. package/skill/add/phases/5-build.md +38 -0
  42. package/skill/add/phases/6-verify.md +39 -0
  43. package/skill/add/phases/7-observe.md +32 -0
  44. package/skill/add/run.md +152 -0
  45. package/skill/add/scope.md +58 -0
  46. package/tooling/add.py +1573 -0
  47. package/tooling/templates/CONVENTIONS.md.tmpl +8 -0
  48. package/tooling/templates/GLOSSARY.md.tmpl +3 -0
  49. package/tooling/templates/MILESTONE.md.tmpl +25 -0
  50. package/tooling/templates/MODEL_REGISTRY.md.tmpl +6 -0
  51. package/tooling/templates/PROJECT.md.tmpl +42 -0
  52. package/tooling/templates/TASK.md.tmpl +111 -0
  53. package/tooling/templates/dependencies.allowlist.tmpl +2 -0
@@ -0,0 +1,8 @@
1
+ # CONVENTIONS (survivor layer — set once, kept for the whole project)
2
+
3
+ Language/framework: <e.g. Python 3.12 / FastAPI>
4
+ Folders: .add/tasks/<slug>/{TASK.md, tests/, src/}
5
+ Naming: <file case>, <type case>, verbs for functions
6
+ Lint/format: <tools>, enforced in CI
7
+ Errors: machine-readable error codes (string enums), never free text
8
+ Architecture: <layering and dependency rules>
@@ -0,0 +1,3 @@
1
+ # GLOSSARY (one name per concept — used everywhere: specs, contracts, code)
2
+
3
+ <term>: <definition>
@@ -0,0 +1,25 @@
1
+ # MILESTONE: {{title}}
2
+
3
+ goal: {{goal}}
4
+ stage: {{stage}} · status: active · created: {{date}}
5
+
6
+ > SDD living doc for this milestone. Keep it THIN: breadth, shared decisions, and
7
+ > exit criteria only — per-task detail lives in each `.add/tasks/<slug>/TASK.md`,
8
+ > written just-in-time. Update this doc whenever a task reveals a milestone gap.
9
+
10
+ ## Scope
11
+ In: <what this milestone delivers>
12
+ Out: <explicitly deferred — the anti-scope-creep list>
13
+
14
+ ## Shared decisions & glossary deltas (living — every task must honor these)
15
+ - <cross-cutting rule, named from GLOSSARY.md>
16
+
17
+ ## Shared / risky contracts (freeze these first)
18
+ - <contract name> -> owning task <slug>
19
+
20
+ ## Tasks (breadth-first decomposition; detail lives in each TASK.md)
21
+ - [ ] <slug> depends-on: none — <one line>
22
+ - [ ] <slug> depends-on: <slug> — <one line>
23
+
24
+ ## Exit criteria (observable; map each to the task that delivers it)
25
+ - [ ] User can <observable behavior> (← <slug>)
@@ -0,0 +1,6 @@
1
+ # MODEL_REGISTRY (which AI wrote this project — for reproducibility & audit)
2
+
3
+ Model: <name>
4
+ Version: <version/date>
5
+ Adopted: {{date}}
6
+ Notes: re-run the playbook golden-cases before changing this.
@@ -0,0 +1,42 @@
1
+ # PROJECT — survivor layer (cross-milestone context)
2
+
3
+ > The durable foundation that outlives every milestone and feeds context into each
4
+ > TDD⇄ADD loop. Read this FIRST in any session. Keep it lean — one screen, not a
5
+ > manual. Map to the AIDD diagram: Domain = DDD · Spec = SDD (living document) ·
6
+ > UI/UX = UDD. When a loop reveals a gap here, come back and update this file —
7
+ > that is the re-entrant arrow from the engine down to the foundation.
8
+
9
+ slug: {{project}} · stage: {{stage}} · updated: {{date}}
10
+
11
+ ---
12
+
13
+ ## Domain (DDD) — the language and the boundaries
14
+ <!-- One name per concept (the GLOSSARY holds the full term list). What are the
15
+ core entities, the bounded contexts/modules, and the invariants that MUST
16
+ always hold? This is the ubiquitous language the spec and code share. -->
17
+ - Core concepts:
18
+ - Bounded contexts / modules:
19
+ - Invariants that must always hold:
20
+
21
+ ## Spec / Living Document (SDD) — what we are building, now
22
+ <!-- The spec is a living document, not a frozen plan. This section POINTS to the
23
+ active milestone + frozen contracts; it does not duplicate them. -->
24
+ - Active milestone → `.add/milestones/<slug>/MILESTONE.md` (see `add.py status`)
25
+ - Frozen contracts (survivor): the contracts other work builds against.
26
+ - Settled vs still open:
27
+
28
+ ## Users (UDD) — UI/UX: design before code
29
+ <!-- UI/UX-Driven Development: users use the interface, not the spec. Capture the
30
+ experience BEFORE code. Per-feature design detail lives in a DESIGN.md /
31
+ clickable prototype; keep here the cross-cutting UX stance + the source of truth.
32
+ For a no-UI project (CLI / library / service), say so and keep this short —
33
+ the "interface" is the command surface, API shape, or output it produces. -->
34
+ - Primary users & the jobs they hire the product for:
35
+ - Core user flows (happy + key alternative paths):
36
+ - UI states every screen handles: loading · empty · error · success
37
+ - Design source of truth → DESIGN.md / design system / clickable prototype
38
+
39
+ ## Key Decisions (append-only)
40
+ | date | decision | why | outcome |
41
+ |------|----------|-----|---------|
42
+ | {{date}} | (first decision) | | |
@@ -0,0 +1,111 @@
1
+ # TASK: {{title}}
2
+
3
+ slug: {{slug}} · created: {{date}} · stage: {{stage}}
4
+ phase: specify <!-- specify -> scenarios -> contract -> tests -> build -> verify -> observe -> done -->
5
+
6
+ > One file = one task. Fill sections top-to-bottom; the `add` skill drives each phase.
7
+ > When a phase is unclear, read its book chapter in `.add/docs/` (linked per section).
8
+ > The phase marker above is the single source of truth — keep it in sync via `add.py phase`.
9
+
10
+ ---
11
+
12
+ ## 1 · SPECIFY — the rules ▸ docs/03-step-1-specify.md
13
+
14
+ Feature: <name>
15
+ Framings weighed: <chosen> (chosen) · <alternative> · <alternative>
16
+ Must:
17
+ - <required behavior>
18
+ Reject:
19
+ - <bad input / situation> -> "<error_code>"
20
+ After:
21
+ - <state that is true once it succeeds>
22
+ Assumptions — least-sure first:
23
+ ⚠ <the one assumption most likely to be wrong> — least sure because <why>; if wrong: <cost>
24
+ - [ ] <next assumption, ranked> — confirm or deny; never carry an open one forward
25
+
26
+ <!-- EXIT: every rule stated, every rejection named; assumptions ranked least-sure first, the top one or two ⚠-flagged with why + cost (or, for trivial scope, an honest "none material" that still names the single biggest risk). -->
27
+
28
+ ---
29
+
30
+ ## 2 · SCENARIOS — pass/fail cases ▸ docs/04-step-2-scenarios.md
31
+
32
+ ```gherkin
33
+ Scenario: <short name>
34
+ Given <starting situation>
35
+ When <action>
36
+ Then <expected result>
37
+ And <what must remain unchanged> # required for every rejection
38
+ ```
39
+
40
+ <!-- EXIT: one scenario per Must AND per Reject; each result is observable. -->
41
+
42
+ ---
43
+
44
+ ## 3 · CONTRACT — freeze the shape ▸ docs/05-step-3-contract.md
45
+
46
+ ```
47
+ <METHOD> <path> body: { <fields> }
48
+ 200 -> { <success fields> }
49
+ 4xx -> { error: "<code>" | "<code>" }
50
+ Schema: <tables/fields touched, and access pattern>
51
+ ```
52
+
53
+ Status: DRAFT <!-- becomes: FROZEN @ v1 once approved. Changing a frozen contract = change request back to SPECIFY. -->
54
+ <!-- The freeze IS the one approval. Lead it with the bundle's least-sure flag: the 1–2 points
55
+ most likely wrong across the whole bundle, tagged [spec|scenario|contract|test], with why + cost.
56
+ The §1 ⚠ assumptions are its first feeder; a flag may point at a scenario or the contract too. See run.md. -->
57
+
58
+ <!-- EXIT: frozen + every spec rejection has a contracted response + names match GLOSSARY + the bundle's least-sure flag was surfaced at the freeze (or an honest "none material"). -->
59
+
60
+ ---
61
+
62
+ ## 4 · TESTS — red safety net ▸ docs/06-step-4-tests.md
63
+
64
+ Coverage target: <e.g. 90%>
65
+ Plan (one test per scenario, asserting behavior not internals):
66
+ - test_<scenario>: arrange <Given> / act <When> / assert <Then> + assert <unchanged>
67
+
68
+ Tests live in: `./tests/` · MUST run red (missing implementation) before Build.
69
+
70
+ <!-- EXIT: one test per scenario; suite red for the RIGHT reason; target recorded. -->
71
+
72
+ ---
73
+
74
+ ## 5 · BUILD — AI writes code ▸ docs/07-step-5-build.md
75
+
76
+ Safety rule (feature-specific): <e.g. debit+credit in one atomic transaction>
77
+ Code lives in: `./src/`
78
+ Constraints: do NOT change any test or the contract; allow-list packages only; ask if unclear.
79
+
80
+ <!-- EXIT: all green; coverage held; no test/contract touched; no unlisted dependency. -->
81
+
82
+ ---
83
+
84
+ ## 6 · VERIFY — evidence + blind-spot checks ▸ docs/08-step-6-verify.md
85
+
86
+ - [ ] all tests pass
87
+ - [ ] coverage did not decrease
88
+ - [ ] no test or contract was altered during build
89
+ - [ ] concurrency / timing of the risky operation is safe
90
+ - [ ] no exposed secrets, injection openings, or unexpected dependencies
91
+ - [ ] layering & dependencies follow CONVENTIONS.md
92
+ - [ ] a person reviewed and approved the change
93
+
94
+ ### GATE RECORD
95
+ Outcome: <PASS | RISK-ACCEPTED | HARD-STOP>
96
+ If RISK-ACCEPTED -> owner: <name> · ticket: <link> · expires: <date> (never for a security gap)
97
+ Reviewed by: <name> · date: <date>
98
+
99
+ <!-- A security finding is ALWAYS HARD-STOP. Record exactly one outcome — no silent pass. -->
100
+
101
+ ---
102
+
103
+ ## 7 · OBSERVE — feed the next loop ▸ docs/09-the-loop.md
104
+
105
+ Watch (reuse scenarios as monitors): <error rate / per-rejection rate / latency>
106
+ Spec delta for the next loop: <what production taught you>
107
+
108
+ ### Competency deltas
109
+ What did this loop teach the foundation? One line each, tagged by competency
110
+ (`DDD · SDD · UDD · TDD · ADD`), status `open`, with evidence. See the `add` skill's `deltas.md`.
111
+ <!-- e.g. - [DDD · open] the model missed multi-tenancy (evidence: scenario_x failed) -->
@@ -0,0 +1,2 @@
1
+ # dependencies.allowlist — one package per line; CI rejects anything not listed.
2
+ # Defeats the AI "invented a plausible package name" supply-chain risk.