@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.
- package/CHANGELOG.md +193 -0
- package/GETTING-STARTED.md +20 -64
- package/README.md +138 -158
- package/agents/add-advisor.md +66 -21
- package/agents/add-worker.md +102 -0
- package/bin/cli.js +88 -21
- package/package.json +2 -3
- package/personas-teacher/VENDOR.md +6 -0
- package/skill/add/SKILL.md +100 -144
- package/skill/add/adopt.md +28 -0
- package/skill/add/beyond.md +37 -0
- package/skill/add/deltas.md +25 -2
- package/skill/add/design.md +56 -74
- package/skill/add/{report-template.md → gate-udd.md} +28 -38
- package/skill/add/intake.md +56 -25
- package/skill/add/loop.md +32 -19
- package/skill/add/persona-author/SKILL.md +116 -0
- package/skill/add/persona-author/assets/example-design-persona.md +55 -0
- package/skill/add/persona-author/assets/example-persona.md +57 -0
- package/skill/add/persona-author/references/contract.md +69 -0
- package/skill/add/persona-author/references/patterns.md +122 -0
- package/skill/add/persona-author/references/seeding.md +79 -0
- package/skill/add/phases/build.md +79 -0
- package/skill/add/phases/direction.md +287 -0
- package/skill/add/phases/verify.md +161 -0
- package/skill/add/run.md +16 -18
- package/skill/add/terms.md +18 -0
- package/tooling/add.py +2421 -3258
- package/tooling/add_engine/autonomy.py +2 -37
- package/tooling/add_engine/components.py +4 -87
- package/tooling/add_engine/constants.py +148 -93
- package/tooling/add_engine/guidelines.py +10 -11
- package/tooling/add_engine/io_state.py +72 -5
- package/tooling/add_engine/predicates.py +90 -2
- package/tooling/add_engine/search.py +6 -6
- package/tooling/add_engine/taskdoc.py +15 -10
- package/tooling/templates/CONVENTIONS.md.tmpl +1 -1
- package/tooling/templates/GLOSSARY.md.tmpl +10 -4
- package/tooling/templates/MILESTONE.md.tmpl +20 -16
- package/tooling/templates/PLAN.md.tmpl +129 -0
- package/tooling/templates/PROJECT.md.tmpl +6 -1
- package/tooling/templates/PROMPT.persona.md.tmpl +17 -21
- package/tooling/templates/personas/build-engineer.md.tmpl +45 -0
- package/tooling/templates/personas/data-steward.md.tmpl +45 -0
- package/tooling/templates/personas/evidence-verifier.md.tmpl +45 -0
- package/tooling/templates/personas/platform-engineer.md.tmpl +45 -0
- package/tooling/templates/personas/product-lead.md.tmpl +51 -0
- package/tooling/templates/personas/quality-auditor.md.tmpl +47 -0
- package/tooling/templates/personas/release-manager.md.tmpl +52 -0
- package/tooling/templates/personas/security-gatekeeper.md.tmpl +45 -0
- package/tooling/templates/personas/software-architect.md.tmpl +45 -0
- package/tooling/templates/personas/stream-orchestrator.md.tmpl +44 -0
- package/tooling/templates/personas/technical-writer.md.tmpl +49 -0
- package/tooling/templates/personas/ux-experience-lead.md.tmpl +48 -0
- package/tooling/templates/specs/SPEC.md.tmpl +18 -0
- package/tooling/templates/udd-wireframe.md +1 -1
- package/agents/add-build.md +0 -29
- package/agents/add-design.md +0 -32
- package/agents/add-persona.md +0 -33
- package/agents/add-verify.md +0 -36
- package/docs/00-introduction.md +0 -46
- package/docs/01-principles.md +0 -71
- package/docs/02-the-flow.md +0 -113
- package/docs/03-step-1-specify.md +0 -123
- package/docs/04-step-2-scenarios.md +0 -90
- package/docs/05-step-3-contract.md +0 -80
- package/docs/06-step-4-tests.md +0 -85
- package/docs/07-step-5-build.md +0 -82
- package/docs/08-step-6-verify.md +0 -105
- package/docs/09-the-loop.md +0 -75
- package/docs/10-setup-and-stages.md +0 -118
- package/docs/11-governance.md +0 -91
- package/docs/12-roles.md +0 -99
- package/docs/13-adoption.md +0 -67
- package/docs/14-foundation.md +0 -142
- package/docs/15-foundations-and-lineage.md +0 -106
- package/docs/16-releasing.md +0 -182
- package/docs/17-components.md +0 -143
- package/docs/18-personas.md +0 -80
- package/docs/README.md +0 -77
- package/docs/add-competencies.png +0 -0
- package/docs/add-flow.png +0 -0
- package/docs/add-foundation.png +0 -0
- package/docs/add-hierarchy.png +0 -0
- package/docs/add-milestone-task-lifecycle.png +0 -0
- package/docs/add-task-growth-wheel.png +0 -0
- package/docs/appendix-a-templates.md +0 -88
- package/docs/appendix-b-prompts.md +0 -154
- package/docs/appendix-c-glossary.md +0 -176
- package/docs/appendix-d-worked-example.md +0 -231
- package/docs/appendix-e-checklists.md +0 -92
- package/docs/appendix-f-requirements-matrix.md +0 -171
- package/docs/appendix-g-references.md +0 -106
- package/skill/add/advisor.md +0 -81
- package/skill/add/compact-foundation.md +0 -40
- package/skill/add/components.md +0 -52
- package/skill/add/confidence.md +0 -32
- package/skill/add/fold.md +0 -63
- package/skill/add/graduate.md +0 -39
- package/skill/add/phases/0-ground.md +0 -64
- package/skill/add/phases/0-setup.md +0 -103
- package/skill/add/phases/1-specify.md +0 -61
- package/skill/add/phases/2-scenarios.md +0 -48
- package/skill/add/phases/3-contract.md +0 -60
- package/skill/add/phases/4-tests.md +0 -61
- package/skill/add/phases/5-build.md +0 -62
- package/skill/add/phases/6-verify.md +0 -69
- package/skill/add/phases/7-observe.md +0 -45
- package/skill/add/phases/fast-lane.md +0 -34
- package/skill/add/release.md +0 -61
- package/skill/add/scope.md +0 -72
- package/skill/add/self-improve.md +0 -20
- package/skill/add/sensitivity.md +0 -51
- package/skill/add/setup-review.md +0 -48
- package/skill/add/soul.md +0 -58
- package/skill/add/streams.md +0 -269
- package/tooling/add_engine/release.py +0 -86
- package/tooling/templates/TASK.fast.md.tmpl +0 -78
- package/tooling/templates/TASK.md.tmpl +0 -181
- package/tooling/templates/personas/_template.md.tmpl +0 -82
package/skill/add/fold.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# Consolidating lessons — how the foundation self-improves
|
|
2
|
-
|
|
3
|
-
This **closes the loop**. `deltas.md` lets a task EMIT `open` lessons in OBSERVE; consolidation gathers the confirmed ones into a **versioned foundation**, so `DDD · SDD · UDD · TDD · ADD` sharpen across milestones.
|
|
4
|
-
|
|
5
|
-
`add.py fold` is **judgment-free**: it only TRANSCRIBES each lesson's captured text into its routed home and bumps the version — it never composes prose and **never self-approves** (running the command records the human's confirmation). Choosing which lessons to keep, and polishing raw bullets into lean prose (the **compaction door**, `compact-foundation.md`), stay the human's work.
|
|
6
|
-
|
|
7
|
-
## When to consolidate
|
|
8
|
-
|
|
9
|
-
At **milestone close**, or on demand when opens pile up. One `add.py fold` = ONE session: one `foundation-version` bump, every resolved lesson stamped with it.
|
|
10
|
-
|
|
11
|
-
## The ritual
|
|
12
|
-
|
|
13
|
-
1. **Gather** — `add.py deltas` reads every task's OBSERVE block for lessons still `open`.
|
|
14
|
-
2. **Confirm** — mark any lesson you do NOT want `rejected` (left in place); running `add.py fold` over the rest IS your confirmation.
|
|
15
|
-
3. **Write** — `add.py fold [--task <slug>] [--comp <TAG>]` performs the mechanical write atomically:
|
|
16
|
-
- flips each selected `open` lesson to `folded` and stamps it `[folded foundation-version N]`;
|
|
17
|
-
- transcribes each VERBATIM as one bullet at the TOP (newest-first) of its routed section;
|
|
18
|
-
- prepends one §Key Decisions row (date · what · why · outcome);
|
|
19
|
-
- bumps `foundation-version` by one.
|
|
20
|
-
Validate-all-then-write: if any precondition fails the command writes NOTHING.
|
|
21
|
-
4. **Propose & polish** — raw bullets later merge into lean prose (append-only, newest-first) via the compaction door.
|
|
22
|
-
|
|
23
|
-
## Consolidation routing
|
|
24
|
-
|
|
25
|
-
| competency | consolidates into | how |
|
|
26
|
-
|------------|-----------|-----|
|
|
27
|
-
| `DDD` | `PROJECT.md` §Domain | transcribed bullet at the top (newest-first) |
|
|
28
|
-
| `SDD` | `PROJECT.md` §Spec | same |
|
|
29
|
-
| `UDD` | `PROJECT.md` §Users | same |
|
|
30
|
-
| `TDD` | `CONVENTIONS.md` §Method learnings | same |
|
|
31
|
-
| `ADD` | `CONVENTIONS.md` §Method learnings | same |
|
|
32
|
-
| `persona:<slug>` | `.add/personas/<slug>.md` §Critical Rules / §Success Metrics / §Anti-patterns / §Abilities | dated bullet at top; schema stays conformant |
|
|
33
|
-
|
|
34
|
-
A `persona:<slug> · <hint>` lesson routes into that persona doc, not a foundation file; it is still flipped `folded` and still bumps the version once (`deltas.md`).
|
|
35
|
-
|
|
36
|
-
## Status transitions & version
|
|
37
|
-
|
|
38
|
-
- **confirm** `open` → `folded`; **decline** `open` → `rejected` (left in place — auditable trail).
|
|
39
|
-
- Consolidation is **append-only (newest-first)** — PREPENDS, never silently rewrites, EXCEPT via the recorded compaction door.
|
|
40
|
-
|
|
41
|
-
## Reject codes
|
|
42
|
-
|
|
43
|
-
<reject_codes>
|
|
44
|
-
- `no_open_deltas` — nothing is `open` in the selected scope. Version is NOT bumped.
|
|
45
|
-
- `missing_route_section` — a lesson routes to a foundation section that does not exist. Add the section header, then re-run. Nothing is written.
|
|
46
|
-
- `no_foundation_version` — `PROJECT.md` carries no parseable `foundation-version:` marker to bump.
|
|
47
|
-
- `missing_persona_target` — a `persona:<slug>` lesson with no `.add/personas/<slug>.md`. Fail-closed: nothing written, no bump. Seed the persona first.
|
|
48
|
-
- `persona_section_unroutable` — the section hint is not one of `critical-rule | success-metric | anti-pattern | ability`. Nothing is written.
|
|
49
|
-
- `persona_clobber_forbidden` — INVARIANT: a persona consolidation prepends only; it never drops existing content or breaks the schema.
|
|
50
|
-
</reject_codes>
|
|
51
|
-
|
|
52
|
-
Retired: `unconfirmed_fold` · `unroutable_delta` — running `add.py fold` IS the confirmation; a missing destination is `missing_route_section`.
|
|
53
|
-
|
|
54
|
-
## Worked example
|
|
55
|
-
|
|
56
|
-
The `competency-deltas` task closed its OBSERVE with two lessons:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
- [ADD · open] dogfood .add/tooling can silently diverge from canonical (evidence: md5 mismatch)
|
|
60
|
-
- [TDD · open] structural tests guard canonical artifacts but not their dogfood twins (evidence: this build)
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The human runs `add.py fold`: both transcribe into `CONVENTIONS.md` §Method learnings, a §Key Decisions row is prepended, both flip to `folded`, and `foundation-version` bumps 1 → 2 — one atomic write.
|
package/skill/add/graduate.md
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Stage graduation — propose the move to production as a roadmap, never a flip
|
|
2
|
-
|
|
3
|
-
A project graduates when the MVP is genuinely covered AND a human-confirmed roadmap of production work exists. This is the **4th scope level** — after setup, intake/scope, and the milestone loop. It turns the bare `add.py stage` flip into the **final step** of an analytics-driven, interview-led orchestration.
|
|
4
|
-
|
|
5
|
-
You **gather and propose**; the **human confirms and judges**; the engine only counts tallies and enforces the floor. The engine never decides "ready" — that is judgment, and it belongs to the interview.
|
|
6
|
-
|
|
7
|
-
## The cue
|
|
8
|
-
|
|
9
|
-
When every milestone is `done` AND the human's stage-goal-criteria in `PROJECT.md` are all `[x]`, `add.py status` prints:
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
→ MVP covered → propose graduation
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Before both tallies complete, status is silent. A project with no stage-goal-criteria block is grandfathered — zero change.
|
|
16
|
-
|
|
17
|
-
## The flow
|
|
18
|
-
|
|
19
|
-
1. **Gather** — run `add.py graduation-report` (`--json` to branch on it). Clusters the MVP loop's evidence: open deltas by competency · open RISK-ACCEPTED waivers · RETRO records · verify residue · observe-loop coverage gaps. Gathers, never judges.
|
|
20
|
-
2. **Co-specify interview** — synthesize *"what production means HERE"* WITH the human, using the gathered records as the agenda. Interview to real confidence — do not guess what "production-ready" means for this project.
|
|
21
|
-
3. **Draft the roadmap** — for each production outcome the interview surfaces, draft a production milestone: `add.py new-milestone <slug> --stage production --goal "…"`, then write its exit criteria. The roadmap is **≥1** milestone containing the hardening work (SLOs, rollback tests, incident runbooks).
|
|
22
|
-
4. **Human confirms** — present the roadmap via `report-template.md`, opening with the ARC (goal · done · plan). Render as a guided choice (per `report-template.md`). Nothing advances on an unconfirmed draft.
|
|
23
|
-
5. **Flip — the final step** — only now run `add.py stage production`. Because ≥1 production milestone now exists, the guard passes and the transition is recorded.
|
|
24
|
-
|
|
25
|
-
## The floor
|
|
26
|
-
|
|
27
|
-
`add.py stage production` is **guarded**: refuses with `stage_no_roadmap` when zero milestones have `stage: production`. The check is a tally, never a readiness judgment. `--force` overrides for grandfathered/edge cases.
|
|
28
|
-
|
|
29
|
-
Guard is on the `→production` transition only. Flips to prototype/poc/mvp are unchanged. `add.py init --stage production` is an explicit at-creation declaration — out of scope of the guard.
|
|
30
|
-
|
|
31
|
-
## Invariants
|
|
32
|
-
|
|
33
|
-
- **The flip is the final step**, never called outside this confirmed-roadmap path.
|
|
34
|
-
- **No auto-flip.** Every step is human-confirmed; the engine gathers, counts, and enforces the floor — it does not advance the stage on its own.
|
|
35
|
-
- **The flow is continuous, not cue-reentrant.** Once you draft the first production milestone, `status` stops printing the cue. Do NOT re-await the cue; carry straight through to confirm and flip.
|
|
36
|
-
|
|
37
|
-
## Depth and reuse
|
|
38
|
-
|
|
39
|
-
The same orchestration serves prototype→poc and poc→mvp; **mvp→production** is the rigorous proof case. At lower stages, run it light — same shape, less depth.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Phase 0 — Ground (the real codebase)
|
|
2
|
-
|
|
3
|
-
Goal: before you specify, gather the REAL working folder the task touches — files, symbols,
|
|
4
|
-
signatures, docs, config, data, conventions — so the contract/tests/build are grounded in what
|
|
5
|
-
exists, not assumed. Fill **§0 GROUND** in TASK.md: a per-task preamble to the seven steps,
|
|
6
|
-
**AI-owned** — no human gate (the one approval stays at the §3 freeze).
|
|
7
|
-
|
|
8
|
-
If you cannot name the files and symbols the task touches, you do not yet understand it —
|
|
9
|
-
gathering them IS the job.
|
|
10
|
-
|
|
11
|
-
## Gather (in TASK.md §0)
|
|
12
|
-
|
|
13
|
-
- **Touches** — the real files · symbols · signatures the task reads or changes, named from the
|
|
14
|
-
actual code (code-navigation tools — grep / symbol search, never memory). Each as `path:symbol — what it is / how keyed`; cite the **symbol**, not a bare line number (`l.NNN` rots at build; symbols survive).
|
|
15
|
-
- **Context (working folder)** — NON-code artifacts touched: docs/textbase (`*.md`) · TODOs (`TODO`/`FIXME`) · config/manifests (`pyproject`/`package`/CI) · data/fixtures. Task-delta only.
|
|
16
|
-
- **Honors** — patterns/conventions the work must respect, cited from `PROJECT.md`/`CONVENTIONS.md`. Task-delta only — never re-derive the architecture.
|
|
17
|
-
- **Anchors the contract cites** — the specific symbols §3 CONTRACT will name. The contract may cite only anchors that appear here.
|
|
18
|
-
- **Issues/Risks (→ feed §1)** — concrete problems · traps · untestable risks you find in the real code while grounding; §1 SPECIFY builds on these, not on assumptions. Task-delta only.
|
|
19
|
-
- **Related intent** — the WHY: `PROJECT.md §` · `GLOSSARY` term(s) · the originating request/milestone rationale (intent, not Honors' conventions). Task-delta.
|
|
20
|
-
- **Ground SHA** — the commit you grounded against (`git rev-parse --short HEAD`); any line ref is "as of" it. `check` warns on a §0 that cites line numbers with no SHA.
|
|
21
|
-
|
|
22
|
-
**How:** sweep BROAD cheaply (small-model subagent / fast index / skim → compact map), then DEEPEN on what THIS task needs — don't lock a shallow pass.
|
|
23
|
-
|
|
24
|
-
## Greenfield / first task
|
|
25
|
-
|
|
26
|
-
The first task runs ground too. With little/no code (greenfield) or mid-setup, your grounding IS
|
|
27
|
-
the foundation docs / brownfield scan you produced — point at them, don't re-scan. An honest
|
|
28
|
-
"new module, no code; honors CONVENTIONS.md §X" is complete.
|
|
29
|
-
|
|
30
|
-
## AI prompt
|
|
31
|
-
|
|
32
|
-
<prompt>
|
|
33
|
-
Role: an engineer who reads the real code before designing against it.
|
|
34
|
-
Read first: PROJECT.md · CONVENTIONS.md · the files the task touches.
|
|
35
|
-
Objective: fill §0 GROUND from the codebase — files/symbols/signatures + conventions + the
|
|
36
|
-
anchors §3 cites + issues/risks found; never assumed.
|
|
37
|
-
Steps:
|
|
38
|
-
0. Sweep broad cheaply (small-model subagent / fast index / skim), then deepen task-specifically.
|
|
39
|
-
1. Locate the files/symbols the task reads or changes (code tools, not memory).
|
|
40
|
-
2. Record signatures/keying; cite conventions (task-delta); note risks for §1; name §3's anchors.
|
|
41
|
-
Never: invent a file, symbol, or signature you have not opened.
|
|
42
|
-
</prompt>
|
|
43
|
-
|
|
44
|
-
## Exit gate
|
|
45
|
-
|
|
46
|
-
<exit_gate>
|
|
47
|
-
- [ ] **Touches** — the real files/symbols the task touches are named (from the code, not assumed).
|
|
48
|
-
- [ ] **Context** (working folder) — the non-code artifacts touched (docs · config · data) are named, task-delta only.
|
|
49
|
-
- [ ] **Honors** — the patterns/conventions to honor are cited (task-delta; no architecture re-scan).
|
|
50
|
-
- [ ] **Anchors** — the anchors §3 will cite are listed (§3 names only anchors here).
|
|
51
|
-
- [ ] **Issues/Risks** — the problems/risks found are recorded for §1 (or an honest none).
|
|
52
|
-
- [ ] **Related intent** — the PROJECT/GLOSSARY/origin intent is linked (or an honest none).
|
|
53
|
-
- [ ] **Ground SHA** — the commit grounded against is recorded (line refs read "as of" it).
|
|
54
|
-
</exit_gate>
|
|
55
|
-
|
|
56
|
-
**Grounding is complete when** every field is filled from real assets (a `<…>` placeholder = weak;
|
|
57
|
-
all non-optional). Skipping **Context** (beyond code) is the usual silent gap. §3 cites only anchors here.
|
|
58
|
-
|
|
59
|
-
> **Advisor · Confidence** — a broad sweep is the canonical spawn (advisor.md); self-score before you specify (confidence.md).
|
|
60
|
-
|
|
61
|
-
## Next
|
|
62
|
-
|
|
63
|
-
`python3 .add/tooling/add.py advance` → read `phases/1-specify.md`.
|
|
64
|
-
Book: `docs/02-the-flow.md` (the flow; ground is the §0 preamble to the seven steps).
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Phase 0 — Setup (autonomous draft → one human baseline approval)
|
|
2
|
-
|
|
3
|
-
Goal: point ADD at a repo and **you** draft the whole foundation — domain, first-milestone scope, first task's contract — then hand the human one decision: the **baseline approval**. Brownfield silent; greenfield keeps a short interview; either way the only gate is `add.py lock`.
|
|
4
|
-
|
|
5
|
-
## 1 · Zero-touch entry — you run init yourself
|
|
6
|
-
|
|
7
|
-
No `.add/state.json`? Don't tell the human to initialise — run it yourself. Infer name + stage
|
|
8
|
-
from the repo and **arm the baseline-approval gate** with `--await-lock`:
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
python3 .add/tooling/add.py init --name "<inferred from repo/dir>" --stage <prototype|poc|mvp|production> --await-lock
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
- `--await-lock` seeds an *unlocked* setup — the engine refuses build or `gate` until you `lock`. A plain `init` is grandfathered-locked (`already_locked` on a later `lock`).
|
|
15
|
-
- name + stage are **your judgment**: throwaway → `prototype`, risky slice → `poc`, narrow → `mvp`, full rigor → `production`.
|
|
16
|
-
|
|
17
|
-
`init` prints one of two things — **that is your branch**:
|
|
18
|
-
- `brownfield:` → existing code (go to **2a**);
|
|
19
|
-
- no `brownfield:` → empty repo (go to **2b**).
|
|
20
|
-
|
|
21
|
-
## 2a · Brownfield — map it silently
|
|
22
|
-
|
|
23
|
-
The code answers what a greenfield interview would ask — **read it instead of asking**. Open `adopt.md`: fill each living-doc from code, never clobber, tag every decision `evidence-grounded` or `guessed`. Ask the human **nothing** here.
|
|
24
|
-
|
|
25
|
-
## 2b · Greenfield — the 4-lens interview (kept): co-specify at foundation level
|
|
26
|
-
|
|
27
|
-
An empty repo has no code, so run the short interview — the **co-specify at foundation level** move
|
|
28
|
-
(diverge → converge → validate, as §1 does in `phases/1-specify.md`), lifted to the foundation. Ask one load-bearing question per lens, draft, rank lowest-confidence-first, show the top flag:
|
|
29
|
-
|
|
30
|
-
| Lens | The one question that unblocks the section |
|
|
31
|
-
|------|--------------------------------------------|
|
|
32
|
-
| Domain (DDD) | The 3–5 core nouns, and the one invariant that must NEVER break? |
|
|
33
|
-
| Spec (SDD) | The first milestone's outcome — and what's explicitly NOT in v1? |
|
|
34
|
-
| Users (UDD) | The primary user and the one job they hire this for? (or "no UI — surface is X") |
|
|
35
|
-
| Decisions | What's already decided that you'd regret re-litigating? (first Key Decision row) |
|
|
36
|
-
|
|
37
|
-
Ask only the live ones. Rank: `⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>` — tag thin answers `guessed`.
|
|
38
|
-
|
|
39
|
-
## 2c · Domain deep-dive — per-drive, across multiple turns (deepens §2b)
|
|
40
|
-
|
|
41
|
-
| Drive | Deepen |
|
|
42
|
-
|-------|--------|
|
|
43
|
-
| **DDD** (domain) | core nouns → model: entities, invariants, bounded edges |
|
|
44
|
-
| **SDD** (spec) | milestone outcome → behaviors and explicit non-goals |
|
|
45
|
-
| **UDD** (users) | primary user → jobs, surface, the one flow that must feel right |
|
|
46
|
-
| **TDD** (trust) | what "done & trusted" means: risks to prove, evidence that closes them |
|
|
47
|
-
|
|
48
|
-
Capture each surfaced decision as an **ADR** in `PROJECT.md` **Key Decisions** as it lands.
|
|
49
|
-
|
|
50
|
-
**Under `autonomy: auto`, auto-complete all four drives in one pass** — lowest-confidence-first. This deepens **drafting**, never the gate — `lock` stays the one decision.
|
|
51
|
-
|
|
52
|
-
## 3 · Draft to the lock (both paths)
|
|
53
|
-
|
|
54
|
-
1. **Fill the living documentation**: `.add/PROJECT.md` (Domain · Spec · UI/UX · Key Decisions), `CONVENTIONS.md`, `GLOSSARY.md`, `MODEL_REGISTRY.md`, `dependencies.allowlist`, and — for a UI project — `DESIGN.md` (delete if no UI; `design.md`). Brownfield: from code. Greenfield: from interview, gaps flagged `guessed`.
|
|
55
|
-
- **Seed personas** (`.add/personas/`): `init` scaffolds `_template.md` (the schema). **Author one per role** from PROJECT.md + the vendored teacher library `.add/personas-teacher/` (read off-build; engine never fetches) — citing the teacher in `source:` and carrying its top `## Playbook` are the two optional parts, not the authoring. Covered by the **baseline approval**; `add.py check` validates; never clobber. Still unseeded later? `status`/`check`/`new-milestone`'s hint means: return here, draft every missing project persona — not just one.
|
|
56
|
-
2. **Propose, then size it.** Float a **kickoff suggestion** for the first milestone: a **goal** (one sentence), a **flow** (task order), **scenarios** (examples of what ships). Not the frozen `MILESTONE.md`. On their reaction, draft `MILESTONE.md` (read `scope.md`).
|
|
57
|
-
3. **Create the first task and draft its candidate specification bundle.** `new-task` is allowed pre-lock:
|
|
58
|
-
```bash
|
|
59
|
-
python3 .add/tooling/add.py new-task <slug> --title "<first feature>"
|
|
60
|
-
```
|
|
61
|
-
Draft the full bundle **§1–§4** incl. the **§4 red suite** (`phases/4-tests.md`); the lock approves it whole. **Leave §3 `Status: DRAFT`** — the lock is its approval. You MAY `advance` pre-lock, but the engine **refuses build** until you `lock` (`setup_unlocked`). Sequence: **bundle (§1–§4, tests RED) → lock → build** — the red suite must FAIL before build.
|
|
62
|
-
4. **Write `.add/SETUP-REVIEW.md`** per `setup-review.md`: every drafted decision, **lowest-confidence-first**, tagged `guessed` | `evidence-grounded`.
|
|
63
|
-
|
|
64
|
-
## Run mode — how the build will be driven (propose sequential + auto; confirm to keep)
|
|
65
|
-
|
|
66
|
-
Before the lock, surface the **run mode** — autonomy + streams (`run.md` · `streams.md`):
|
|
67
|
-
|
|
68
|
-
| Run mode | Human gates | Concurrency |
|
|
69
|
-
|----------|-------------|-------------|
|
|
70
|
-
| **sequential · auto** *(default)* | contract freeze **only** — Verify auto-PASSes on evidence | one task at a time |
|
|
71
|
-
| **sequential · manual/conservative** | contract freeze **and** every Verify | one task; safest |
|
|
72
|
-
|
|
73
|
-
**Propose `sequential + auto`; confirm-to-keep** (raise the gate: `add.py autonomy set conservative --project`; opt into parallel streaming for a milestone with independent tasks — `add.py streams set parallel --project`, then `add.py waves` schedules the fan-out). Record in **`PROJECT.md` Key Decisions**.
|
|
74
|
-
|
|
75
|
-
Floor: **one human approval per contract**.
|
|
76
|
-
|
|
77
|
-
## 4 · The one human gate — the baseline approval
|
|
78
|
-
|
|
79
|
-
Open the report with the ARC per `report-template.md`, render SHAPE then APPROVE as a guided choice, then present `SETUP-REVIEW.md` lowest-confidence-first. They confirm **once** — an explicit yes; ambient agreement is not a confirmation. **Never self-stamp a timeout — hold, or re-ask.** On that recorded confirmation, you run the lock:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
python3 .add/tooling/add.py lock --by "<name>"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Typing it themselves stays the **escape hatch** — the decision is the human's; you execute. `lock` writes the lock layers atomically and opens the build.
|
|
86
|
-
|
|
87
|
-
## 5 · After the lock
|
|
88
|
-
|
|
89
|
-
- The lock **is** the first task's contract approval — no separate contract-freeze sign-off.
|
|
90
|
-
- Stamp the first task's §3 `Status: FROZEN @ v1`, then read `phases/5-build.md`.
|
|
91
|
-
|
|
92
|
-
## Exit gate
|
|
93
|
-
|
|
94
|
-
<exit_gate>
|
|
95
|
-
- [ ] `.add/state.json` exists; setup was seeded unlocked (`--await-lock`) then locked.
|
|
96
|
-
- [ ] Living docs filled (brownfield: from code, tagged evidence-grounded; greenfield: from the interview).
|
|
97
|
-
- [ ] First task created; **§1–§4 drafted — the red suite (per `phases/4-tests.md`) runs RED before build opens**; `.add/SETUP-REVIEW.md` written lowest-confidence-first.
|
|
98
|
-
- [ ] Human confirmed the baseline approval and `add.py lock --by` ran with their name; first task §3 `FROZEN @ v1`; build open.
|
|
99
|
-
</exit_gate>
|
|
100
|
-
|
|
101
|
-
## Next
|
|
102
|
-
|
|
103
|
-
After the lock, read `phases/5-build.md` (build is open). Book: `docs/10-setup-and-stages.md`.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Phase 1 — Specify (the rules)
|
|
2
|
-
|
|
3
|
-
Goal: state what the feature MUST do and what it must REJECT, with zero ambiguity
|
|
4
|
-
for the AI to resolve by guessing. Fill **§1 SPECIFY** in TASK.md.
|
|
5
|
-
|
|
6
|
-
Specify is **co-specification**: brainstorm the shape WITH the user, draft, then validate. If you cannot write the spec, you don't yet understand the feature — stop and ask.
|
|
7
|
-
|
|
8
|
-
## Co-specify in three moves
|
|
9
|
-
|
|
10
|
-
1. **Diverge** — surface the decision space: the 2–3 genuine framings + the open questions you'd otherwise guess. Invite the user to add, kill, redirect. (Conversational — no new file; at prototype/poc, one sentence.)
|
|
11
|
-
2. **Converge** — draft §1 answering the §0 GROUND **Issues/Risks**, then RANK where your confidence is lowest (below).
|
|
12
|
-
3. **Validate** — present the ranked uncertainty first; the user confirms, corrects, or sends back.
|
|
13
|
-
|
|
14
|
-
**Identity is direction, not default (UDD).** Brand color, palette, typeface are human-owned — surface them during Diverge, never assume. For a UI feature with a screen, run the design-definition loop in `design.md`.
|
|
15
|
-
|
|
16
|
-
## Produce (in TASK.md §1)
|
|
17
|
-
|
|
18
|
-
<output_format>
|
|
19
|
-
- **Framings weighed** — one-line trace: `X (chosen) · Y · Z`.
|
|
20
|
-
- **Must** — each required behavior.
|
|
21
|
-
- **Reject** — each refused input/situation, paired with a **named error code** (`amount <= 0 -> "amount_invalid"`, never "handle bad input").
|
|
22
|
-
- **After** — the state that is true once it succeeds.
|
|
23
|
-
- **Assumptions — lowest-confidence first** — ranked most-likely-wrong → least. The top 1–2 carry a `⚠` flag: `⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>`. Keep the ranking visible — a flat list of equal `[x]` ticks gets approved without reading.
|
|
24
|
-
</output_format>
|
|
25
|
-
|
|
26
|
-
## The lowest-confidence flag is bundle-wide
|
|
27
|
-
|
|
28
|
-
The single approval is at the contract freeze, over the whole bundle — so your §1 ranking feeds the bundle-level flag the user reads there (`run.md`): *"of all I'm asking you to freeze, these 1–2 are most likely wrong."*
|
|
29
|
-
|
|
30
|
-
## AI prompt
|
|
31
|
-
|
|
32
|
-
<prompt>
|
|
33
|
-
Role: a domain analyst who brainstorms, then asks rather than assumes.
|
|
34
|
-
Read first: CONVENTIONS · GLOSSARY · §0 GROUND Issues/Risks · the user's raw input.
|
|
35
|
-
Objective: fill §1 SPECIFY with zero ambiguity left for the AI to resolve by guessing.
|
|
36
|
-
Steps:
|
|
37
|
-
1. Surface 2–3 framings + the open questions; let the user react before you draft.
|
|
38
|
-
2. Produce §1 — Framings weighed, every Must, every Reject with a named error code, the
|
|
39
|
-
After state, and the Assumptions RANKED lowest-confidence first.
|
|
40
|
-
3. Flag the 1–2 where your confidence is lowest, each with why + cost.
|
|
41
|
-
Never: resolve an ambiguity by guessing.
|
|
42
|
-
</prompt>
|
|
43
|
-
|
|
44
|
-
## Exit gate
|
|
45
|
-
|
|
46
|
-
<exit_gate>
|
|
47
|
-
- [ ] Framings weighed noted; every required behavior stated.
|
|
48
|
-
- [ ] Every rejection has a named error code; success state-change described.
|
|
49
|
-
- [ ] Assumptions ordered lowest-confidence first; the 1–2 `⚠` flags carry why + cost — or an honest
|
|
50
|
-
"none material" that still names the single biggest risk (never a blank "none").
|
|
51
|
-
</exit_gate>
|
|
52
|
-
|
|
53
|
-
> **Persona** — load the fit `.add/personas/<slug>.md`; its `## Critical Rules` shape §1 (advisory; never lowers a gate).
|
|
54
|
-
> **Advisor · Confidence** — for an unfamiliar domain, spawn a researcher (advisor.md); self-score the spec and let the lowest dimension aim your ⚠ flag (confidence.md).
|
|
55
|
-
|
|
56
|
-
## Next
|
|
57
|
-
|
|
58
|
-
`python3 .add/tooling/add.py advance` → read `phases/2-scenarios.md`.
|
|
59
|
-
Book: `docs/03-step-1-specify.md`. (UI feature? also sketch flows + every screen
|
|
60
|
-
state: loading/empty/error/success; name it in the parent MILESTONE.md's Scope-hint
|
|
61
|
-
vocabulary, not generic prose.)
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Phase 2 — Scenarios (pass/fail cases)
|
|
2
|
-
|
|
3
|
-
Goal: rewrite each rule as a concrete Given/When/Then that is readable by people and checkable by machines. Fill **§2 SCENARIOS** in TASK.md.
|
|
4
|
-
|
|
5
|
-
## Produce (in TASK.md §2)
|
|
6
|
-
|
|
7
|
-
<output_format>
|
|
8
|
-
```gherkin
|
|
9
|
-
Scenario: <short name>
|
|
10
|
-
Given <starting situation>
|
|
11
|
-
When <action>
|
|
12
|
-
Then <observable result>
|
|
13
|
-
And <what must remain unchanged> # REQUIRED for every rejection
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
The `And ... unchanged` clause catches corrupting partial failures (e.g. a balance
|
|
17
|
-
deducted before a check fails). Include it on every rejection.
|
|
18
|
-
</output_format>
|
|
19
|
-
|
|
20
|
-
## AI prompt
|
|
21
|
-
|
|
22
|
-
<prompt>
|
|
23
|
-
Role: a specification tester.
|
|
24
|
-
Read first: §1 · GLOSSARY.
|
|
25
|
-
Objective: one scenario per Must and per Reject rule, each result specific and observable.
|
|
26
|
-
Steps:
|
|
27
|
-
1. Write one scenario per Must rule and one per Reject rule.
|
|
28
|
-
2. For every rejection add an And-clause asserting what must NOT change.
|
|
29
|
-
3. Sweep for the edge cases the spec omits — boundary, duplicate, partial failure, concurrency, malformed input — add one per case that applies, or rule it out on purpose.
|
|
30
|
-
Never: settle for a vague result ("then it works") — results must be specific and observable.
|
|
31
|
-
</prompt>
|
|
32
|
-
|
|
33
|
-
## Exit gate
|
|
34
|
-
|
|
35
|
-
<exit_gate>
|
|
36
|
-
- [ ] One scenario per Must rule.
|
|
37
|
-
- [ ] One scenario per Reject rule.
|
|
38
|
-
- [ ] Edge cases the spec omits are covered (boundary · duplicate · partial failure · …) or ruled out on purpose.
|
|
39
|
-
- [ ] Each result is a specific, observable fact.
|
|
40
|
-
- [ ] Every rejection asserts what stays unchanged.
|
|
41
|
-
</exit_gate>
|
|
42
|
-
|
|
43
|
-
> **Advisor · Confidence** — delegate a wide scenario sweep when the surface is large (advisor.md); score Edge cases honestly — a missing case surfaces there first (confidence.md).
|
|
44
|
-
|
|
45
|
-
## Next
|
|
46
|
-
|
|
47
|
-
`python3 .add/tooling/add.py advance` → read `phases/3-contract.md`.
|
|
48
|
-
Book: `docs/04-step-2-scenarios.md`.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Phase 3 — Contract (freeze the shape)
|
|
2
|
-
|
|
3
|
-
Goal: fix the external shape — interfaces, data, names, error cases — and FREEZE it. The decision point that makes the AI-led build safe: below it code is disposable; above it the shape does not move. Fill **§3 CONTRACT** in TASK.md.
|
|
4
|
-
|
|
5
|
-
## Produce (in TASK.md §3)
|
|
6
|
-
|
|
7
|
-
<output_format>
|
|
8
|
-
- Interfaces (endpoints/functions/messages) with inputs/outputs.
|
|
9
|
-
- Request/response shapes + persistent schema (note transactional needs).
|
|
10
|
-
- Names drawn from `GLOSSARY.md` (same concept = same name everywhere).
|
|
11
|
-
- A response for **every** Reject error code from §1.
|
|
12
|
-
|
|
13
|
-
Then mark `Status: FROZEN @ v1`. Generate a mock + contract tests so dependent
|
|
14
|
-
work can start before the real code exists.
|
|
15
|
-
</output_format>
|
|
16
|
-
|
|
17
|
-
**The freeze is the one approval.** Present the bundle **lowest-confidence first**: the 1–2 points most likely wrong (`⚠ [spec|scenario|contract|test] … — because …; if wrong: …`). Open with the ARC per `report-template.md`, rendering SHAPE then the freeze APPROVE as a guided choice (recommended pick + alternatives) — **render before `FROZEN`, then record `Reported: yes` in §3; never on a timeout.** See `run.md`. The approval also freezes §5 **Scope (may touch)** + Strategy.
|
|
18
|
-
|
|
19
|
-
## The freeze review checklist
|
|
20
|
-
|
|
21
|
-
The human's one minute, aimed. Walk these seven before saying yes:
|
|
22
|
-
|
|
23
|
-
- **⚠ flags first** — read the lowest-confidence flags; accept each knowing its cost if wrong. The engine refuses an unflagged freeze before build (`unflagged_freeze`); `audit` re-checks it on every record that crossed.
|
|
24
|
-
- **Intent** — does §1 say what you actually want built?
|
|
25
|
-
- **Cases** — does every Must and Reject have an observable §2 scenario?
|
|
26
|
-
- **Shape** — glossary names, error codes, additive vs breaking: is THIS the shape to freeze?
|
|
27
|
-
- **Grounded** — does §3 cite anchors that exist in the §0 GROUND map? `status`/`check` surface this.
|
|
28
|
-
- **Risk** — high-risk or method-defining? Require `risk: high · autonomy: conservative` in the TASK.md header.
|
|
29
|
-
- **Tests** — will §4 go red for the right reason, asserting behavior rather than internals?
|
|
30
|
-
|
|
31
|
-
Reject any line and the bundle goes back to draft; the freeze stays the only gate.
|
|
32
|
-
|
|
33
|
-
## AI prompt
|
|
34
|
-
|
|
35
|
-
<prompt>
|
|
36
|
-
Role: an interface architect; frozen contracts are immutable.
|
|
37
|
-
Read first: §1 · §2 · GLOSSARY.
|
|
38
|
-
Objective: produce §3 — the frozen external shape, nothing more.
|
|
39
|
-
Steps:
|
|
40
|
-
1. Define interfaces, shapes, and schema named from the glossary, with a response for every Reject code.
|
|
41
|
-
2. Generate a mock returning the contracted shapes and contract tests pinning them.
|
|
42
|
-
3. Mark FROZEN. No business logic.
|
|
43
|
-
Never: change a frozen contract — a change reopens Specify.
|
|
44
|
-
</prompt>
|
|
45
|
-
|
|
46
|
-
## Exit gate
|
|
47
|
-
|
|
48
|
-
<exit_gate>
|
|
49
|
-
- [ ] Versioned and marked `FROZEN`.
|
|
50
|
-
- [ ] Contract tests pass against the mock.
|
|
51
|
-
- [ ] Every name matches the glossary.
|
|
52
|
-
- [ ] Every spec rejection has a contracted response.
|
|
53
|
-
</exit_gate>
|
|
54
|
-
|
|
55
|
-
> **Advisor · Confidence** — a second opinion on a risky shape is worth a spawn (advisor.md); a low self-score is your cue to lower autonomy before you freeze (confidence.md).
|
|
56
|
-
|
|
57
|
-
## Next
|
|
58
|
-
|
|
59
|
-
`python3 .add/tooling/add.py advance` → read `phases/4-tests.md`.
|
|
60
|
-
Book: `docs/05-step-3-contract.md`.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Phase 4 — Tests (failing-first suite)
|
|
2
|
-
|
|
3
|
-
Goal: tests from scenarios + contract that FAIL before any code exists. Fill **§4 TESTS**; the suite lives in `.add/tasks/<slug>/tests/`.
|
|
4
|
-
|
|
5
|
-
## The must-fail principle
|
|
6
|
-
|
|
7
|
-
Run the suite now, with no implementation — **red for the right reason**
|
|
8
|
-
(missing implementation, not a broken harness). A test green before code
|
|
9
|
-
exists is testing nothing.
|
|
10
|
-
|
|
11
|
-
**A test is any machine-checkable assertion**, not only xUnit code —
|
|
12
|
-
a metric threshold (ML/data), a reconciliation query (data integrity),
|
|
13
|
-
a plan-diff (infra/IaC), a rendered-screen diff (UI). Red-first holds
|
|
14
|
-
for each: the assertion must FAIL before the change exists.
|
|
15
|
-
|
|
16
|
-
## Produce
|
|
17
|
-
|
|
18
|
-
<output_format>
|
|
19
|
-
- One executable test per scenario (§2), asserting **behavior, not internals**.
|
|
20
|
-
- Contract-conformance tests (shapes + error responses from §3).
|
|
21
|
-
- Side-effect assertions on rejection paths (`assert balance unchanged`).
|
|
22
|
-
- A recorded coverage target in §4.
|
|
23
|
-
- §6 **Build expectations** filled now, BEFORE build — observable outcomes from §2 + §3.
|
|
24
|
-
</output_format>
|
|
25
|
-
|
|
26
|
-
## Declaring where tests live
|
|
27
|
-
|
|
28
|
-
§4's `Tests live in:` line is machine-read: with no local `tests/`, `add.py report`
|
|
29
|
-
counts test functions at the declared backticked paths (FIRST such line only).
|
|
30
|
-
`./…` → this task dir · a token with `/` → the project root · a bare name → a
|
|
31
|
-
sibling of the previous token's dir. A directory counts its `*.py` files
|
|
32
|
-
(non-recursive); a `.py` file counts itself. Resolved files dedupe; declared counts
|
|
33
|
-
marked `†`. Paths are confined: outside the project root counts 0 — `..` traversal,
|
|
34
|
-
absolute paths, and symlink escapes are never read.
|
|
35
|
-
|
|
36
|
-
## AI prompt
|
|
37
|
-
|
|
38
|
-
<prompt>
|
|
39
|
-
Role: a test author who writes tests before code.
|
|
40
|
-
Read first: §2 · §3.
|
|
41
|
-
Steps: turn each scenario into an executable test; add contract-conformance and
|
|
42
|
-
edge cases; run the suite red for the right reason; record a coverage target.
|
|
43
|
-
Never: implement the feature, or assert on internals.
|
|
44
|
-
</prompt>
|
|
45
|
-
|
|
46
|
-
## Exit gate
|
|
47
|
-
|
|
48
|
-
<exit_gate>
|
|
49
|
-
- [ ] One test per scenario.
|
|
50
|
-
- [ ] Suite runs and is **red for the right reason**.
|
|
51
|
-
- [ ] Tests assert observable behavior.
|
|
52
|
-
- [ ] Coverage target recorded.
|
|
53
|
-
</exit_gate>
|
|
54
|
-
|
|
55
|
-
> **Persona** — let the fit persona's `## Success Metrics` shape the red suite (advisory).
|
|
56
|
-
> **Advisor · Confidence** — spawn a test-author for a broad red suite (advisor.md); score Completeness honestly (confidence.md).
|
|
57
|
-
|
|
58
|
-
## Next
|
|
59
|
-
|
|
60
|
-
`python3 .add/tooling/add.py advance` → read `phases/5-build.md`.
|
|
61
|
-
Book: `docs/06-step-4-tests.md`.
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Phase 5 — Build (AI writes the code)
|
|
2
|
-
|
|
3
|
-
Goal: implement the feature so EVERY failing test passes — without changing any
|
|
4
|
-
test or the contract. This is the only phase the AI leads; §1–§4 removed all
|
|
5
|
-
ambiguity. Write code into `.add/tasks/<slug>/src/`.
|
|
6
|
-
|
|
7
|
-
## Work in small batches
|
|
8
|
-
|
|
9
|
-
Pick ONE task-sized slice, restate its tests, implement, iterate to green.
|
|
10
|
-
Keep each batch small enough to review in full.
|
|
11
|
-
|
|
12
|
-
## Declaring the scope of impact (Scope + Strategy)
|
|
13
|
-
|
|
14
|
-
§5 opens with two declarations, drafted with the bundle and frozen by the §3 approval — never invented mid-build:
|
|
15
|
-
|
|
16
|
-
- **Scope (may touch)** — the allowlist of files the build may write (backticked tokens). A file outside it is a **STOP → change request** back to Specify, never improvisation.
|
|
17
|
-
- **Strategy (ordered batches)** — the planned build order; guidance, not enforced.
|
|
18
|
-
|
|
19
|
-
Enforced: a completing verify gate refuses an out-of-scope build (`scope_violation` → self-heal).
|
|
20
|
-
|
|
21
|
-
## Persona overlay (optional)
|
|
22
|
-
|
|
23
|
-
You may load the active `.add/personas/<slug>.md` as a domain **overlay** atop `SOUL.md` (SOUL = voice/trust; persona = domain **stance**) — name it in §5. SOUL.md is **human-owned**: the overlay never rewrites it (`soul.md`). Advisory — it never lowers a gate; security still **HARD-STOPs**.
|
|
24
|
-
|
|
25
|
-
## The cardinal rule
|
|
26
|
-
|
|
27
|
-
**Never weaken or delete a test to make it pass, and never edit the frozen
|
|
28
|
-
contract.** A genuine need to change either is a change request back to Specify. Honor the §5 safety rule (e.g. atomic balance update).
|
|
29
|
-
|
|
30
|
-
## AI prompt
|
|
31
|
-
|
|
32
|
-
<prompt>
|
|
33
|
-
Role: implement the feature so EVERY failing test passes — the build phase.
|
|
34
|
-
Read first: §1 · §3 · §4 · CONVENTIONS.
|
|
35
|
-
Objective: every §4 test green, one small batch at a time.
|
|
36
|
-
Steps:
|
|
37
|
-
1. Make EVERY failing test pass, honoring the §5 safety rule.
|
|
38
|
-
2. Report which tests pass and exactly what changed.
|
|
39
|
-
Never: change a test or the contract; use a package off the allow-list; or push past unclear instead of asking.
|
|
40
|
-
</prompt>
|
|
41
|
-
|
|
42
|
-
## Exit gate
|
|
43
|
-
|
|
44
|
-
<exit_gate>
|
|
45
|
-
- [ ] All tests pass.
|
|
46
|
-
- [ ] Coverage did not decrease.
|
|
47
|
-
- [ ] No test and no contract modified by the AI.
|
|
48
|
-
- [ ] No dependency outside the allow-list.
|
|
49
|
-
- [ ] No file outside the declared §5 Scope was touched.
|
|
50
|
-
- [ ] Change small enough to review in full.
|
|
51
|
-
</exit_gate>
|
|
52
|
-
|
|
53
|
-
> **Advisor · Confidence** — delegate a well-scoped batch (advisor.md); self-score before presenting green, refine while cheap (confidence.md).
|
|
54
|
-
|
|
55
|
-
## Next
|
|
56
|
-
|
|
57
|
-
`python3 .add/tooling/add.py advance` → read `phases/6-verify.md`.
|
|
58
|
-
Book: `docs/07-step-5-build.md`.
|
|
59
|
-
|
|
60
|
-
> Under `autonomy: auto` Build and Verify run together as one evidence-auto-gated run. See `run.md`.
|
|
61
|
-
>
|
|
62
|
-
> **Honest redo.** A confirmed cheat returns the task HERE — revert the tampered file or de-overfit src, then advance again (the bounded self-heal loop, `run.md`; capped, then HARD-STOPs to the human). Never weaken a test or edit the frozen contract to pass.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Phase 6 — Verify (evidence + non-functional review)
|
|
2
|
-
|
|
3
|
-
Goal: establish trust and record an outcome. Passing tests are necessary, not
|
|
4
|
-
sufficient. Fill **§6** in TASK.md including the GATE RECORD.
|
|
5
|
-
|
|
6
|
-
> **Who resolves this gate depends on the `autonomy:` header.** Under `autonomy: auto` (the default)
|
|
7
|
-
> a run auto-PASSes on complete evidence with **no residue** (security · concurrency · architecture),
|
|
8
|
-
> recorded *auto-resolved* with the named run as owner;
|
|
9
|
-
> **security is always a HARD-STOP and is never auto-passed**. Under `conservative`, or whenever
|
|
10
|
-
> residue is found, this phase is **human-led** (auto-PASS conditions: `run.md`).
|
|
11
|
-
|
|
12
|
-
## Before you build — declare the build expectations
|
|
13
|
-
|
|
14
|
-
Fill the §6 **Build expectations** block BEFORE Build: OBSERVABLE outcomes derived from §2 + §3. At this gate, confirm each against real evidence (the `confirmed by` column) — one with no evidence isn't yet verified.
|
|
15
|
-
|
|
16
|
-
## Part one — confirm the evidence
|
|
17
|
-
|
|
18
|
-
- [ ] All tests pass.
|
|
19
|
-
- [ ] Coverage did not decrease.
|
|
20
|
-
- [ ] No test or contract was altered during build.
|
|
21
|
-
- [ ] Every §6 Build expectation is confirmed by real evidence (not just a green test).
|
|
22
|
-
- [ ] §1 rules trace to §2/§4 — an untraced rule is a coverage gap (`add.py audit`'s `rule_coverage_gap`; `check` has detail).
|
|
23
|
-
- [ ] every §3-cited symbol still resolves in the CURRENT tree, not just Ground SHA (§6 Live-verify evidence catches a stale/moved anchor here, not later).
|
|
24
|
-
|
|
25
|
-
If any is false, stop and return to Build.
|
|
26
|
-
|
|
27
|
-
## Part two — check what tests miss
|
|
28
|
-
|
|
29
|
-
- **Concurrency/timing** — correct when two run at once? (Tests run serially and miss races.)
|
|
30
|
-
- **Security** — exposed secrets, injection openings, unexpected dependencies. A security finding is always `HARD-STOP`, never a waiver. ANY note here escalates to the human — start it with `NOTE` or `⚠` so `add.py audit` can see it (`unescalated_security_note`). **But that check sees only what you wrote down:** it fires on a *marked* note auto-gated to PASS — a finding you never marked is **invisible**, escalated to no one. Under `auto`, a human **spot-audit** (reading the diff) is the only backstop for a *missed* security finding.
|
|
31
|
-
- **Architecture** — respects layering/dependency rules in CONVENTIONS.md?
|
|
32
|
-
|
|
33
|
-
Run the three lenses in order — a Security `HARD-STOP` ends the checklist (leave the rest blank). Record in §6 `### Advisor 3-lens verdict` (Verdict · Residue · Binding): `sensitivity: mechanical` → Binding `yes` (engine reads it for `advisor-gate-relax`), every other class → Binding `advisory`. `add.py audit` flags an unfilled block `advisor_verdict_unrecorded`, a companion to `refute_unrecorded`.
|
|
34
|
-
|
|
35
|
-
## Part three — the deep check (do not skim)
|
|
36
|
-
|
|
37
|
-
If the task produced code, record that every new symbol is referenced (wiring) and that no new dead/unused code was introduced. If it produced prose or non-code, record a semantic read — what you read in full and what it confirmed. The resolver judges which path; the engine never classifies.
|
|
38
|
-
|
|
39
|
-
Record in the §6 **Deep checks** block — an unfilled one is a **shallow verify**, not a PASS.
|
|
40
|
-
|
|
41
|
-
## Part four — was the green earned?
|
|
42
|
-
|
|
43
|
-
A green suite proves tests pass — not that the build EARNED them. Three judgment cheats pass the unchanged suite: src overfit to the test fixtures (special-cased to literal inputs), vacuous asserts (green against an empty implementation), and real logic stubbed away — all invisible to the mechanical tamper tripwire. Score them with an adversarial refute-read: an independent reviewer — the engine never spawns one — prompted to argue the green was NOT earned. A confirmed earned-green failure is HARD-STOP-class: never auto-passed, never RISK-ACCEPTED — a first cheat enters the bounded self-heal loop (run.md). Under `auto`, **record the verdict** in §6's `### Refute-read verdict` block — `add.py audit` flags an unrecorded `refute_unrecorded`, one of three measure-not-block shape lints it surfaces (also `shallow_deep_check` + `risk_unset`).
|
|
44
|
-
|
|
45
|
-
## Record exactly one outcome (no silent pass)
|
|
46
|
-
|
|
47
|
-
Present this gate via `report-template.md`'s ARC, render APPROVE, and reconcile FLAGS with `add.py report --decide`'s open-item count. **Human-led: render before `gate` and record `Reported: yes` in §6, never self-stamp.**
|
|
48
|
-
|
|
49
|
-
| Outcome | When |
|
|
50
|
-
|---------|------|
|
|
51
|
-
| `PASS` | all checks met |
|
|
52
|
-
| `RISK-ACCEPTED` | a **non-security** gap, with signed owner + ticket + expiry |
|
|
53
|
-
| `HARD-STOP` | any failing test or any security finding |
|
|
54
|
-
|
|
55
|
-
## Exit gate / Next
|
|
56
|
-
|
|
57
|
-
<exit_gate>
|
|
58
|
-
- [ ] Evidence confirmed, non-functional risks checked, outcome recorded — a person approved, or
|
|
59
|
-
(under `autonomy: auto`, no residue) the run auto-resolved as accountable owner.
|
|
60
|
-
</exit_gate>
|
|
61
|
-
|
|
62
|
-
> **Persona** — run the refute-read under the fit persona / Code-Reviewer lens (advisory; security still HARD-STOPs).
|
|
63
|
-
> **Advisor · Confidence** — the earned-green refute-read is the canonical adversarial spawn (advisor.md); score it before recording the gate (confidence.md).
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
python3 .add/tooling/add.py gate PASS # marks the task done
|
|
67
|
-
# or: add.py gate RISK-ACCEPTED | add.py gate HARD-STOP (return to Build)
|
|
68
|
-
```
|
|
69
|
-
Then read `phases/7-observe.md`. Book: `docs/08-step-6-verify.md`.
|