@pilotspace/add 1.16.1 → 2.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.
- package/CHANGELOG.md +227 -0
- package/GETTING-STARTED.md +20 -64
- package/README.md +128 -56
- package/agents/add.md +68 -0
- package/bin/cli.js +229 -29
- package/package.json +2 -3
- package/personas-teacher/VENDOR.md +6 -0
- package/skill/add/SKILL.md +100 -134
- package/skill/add/adopt.md +28 -0
- package/skill/add/beyond.md +36 -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 -37
- package/skill/add/intake.md +65 -29
- package/skill/add/loop.md +35 -23
- package/skill/add/phases/build.md +78 -0
- package/skill/add/phases/direction.md +280 -0
- package/skill/add/phases/verify.md +160 -0
- package/skill/add/run.md +13 -30
- package/skill/add/terms.md +18 -0
- package/tooling/add.py +2520 -2933
- package/tooling/add_engine/autonomy.py +2 -37
- package/tooling/add_engine/components.py +4 -87
- package/tooling/add_engine/constants.py +153 -87
- package/tooling/add_engine/guidelines.py +9 -11
- package/tooling/add_engine/io_state.py +82 -2
- 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 +128 -0
- package/tooling/templates/PROJECT.md.tmpl +6 -1
- package/tooling/templates/PROMPT.persona.md.tmpl +17 -21
- package/tooling/templates/personas/_template.md.tmpl +35 -29
- 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-advisor.md +0 -31
- package/agents/add-build.md +0 -29
- package/agents/add-design.md +0 -32
- package/agents/add-persona.md +0 -31
- package/agents/add-verify.md +0 -34
- 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 -80
- 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 -59
- 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 -47
- package/skill/add/phases/fast-lane.md +0 -31
- package/skill/add/release.md +0 -61
- package/skill/add/scope.md +0 -72
- 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 -268
- package/tooling/add_engine/release.py +0 -86
- package/tooling/templates/TASK.fast.md.tmpl +0 -77
- package/tooling/templates/TASK.md.tmpl +0 -216
package/skill/add/advisor.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Advisor — spawning one subagent to follow your plan
|
|
2
|
-
|
|
3
|
-
The **advisor** strategy: spawn a *single* subagent to execute one piece of your plan, then merge
|
|
4
|
-
its verdict back. It is the single-subagent companion to `streams.md` (which pipelines *many* tasks
|
|
5
|
-
in parallel worktrees) — you delegate *one* well-scoped piece and stay in the loop. The engine never
|
|
6
|
-
spawns; this is your call per step.
|
|
7
|
-
|
|
8
|
-
## When to spawn — and when not
|
|
9
|
-
|
|
10
|
-
Spawn when the piece is **separable and worth the round-trip**: a broad sweep; an independent adversarial review (the `6-verify` refute-read — fresh context, not graded by the author); a well-scoped batch; or context-offload to a small verdict.
|
|
11
|
-
|
|
12
|
-
Do **not** spawn for narrow, cheap work — pay the round-trip only when the piece is big or independent enough. When in doubt, do it in-context.
|
|
13
|
-
|
|
14
|
-
**Prefer the named roster.** Check first whether the piece fits one of ADD's five phase specialists — `add-design` (setup–contract) · `add-build` (tests·build) · `add-verify` (verify·observe) · `add-persona` (fit-persona selection) · `add-advisor` (a consultative second opinion) — before an ad-hoc spawn; each already carries the worker contract below.
|
|
15
|
-
|
|
16
|
-
## The 3-lens sequential checklist at verify
|
|
17
|
-
|
|
18
|
-
At Verify, sweep security → concurrency → architecture in order. **Security HARD-STOP ends the checklist** (leave the rest blank). Each lens returns: **CLEAR** · **HARD-STOP** (security only) · **RESIDUE** (concurrency/architecture).
|
|
19
|
-
|
|
20
|
-
Record it in §6 `### Advisor 3-lens verdict`: **Verdict** (PASS/HARD-STOP) · **Residue** (none or brief) · **Binding** (`yes` for `sensitivity: mechanical` — the engine reads it for `advisor-gate-relax`; `advisory` otherwise).
|
|
21
|
-
|
|
22
|
-
**Persona for the refute-read.** When the piece is the earned-green refute-read, select a **Code-Reviewer** persona; its findings carry severity markers — 🔴 blocker · 🟡 concern · 💭 note. A persona is advisory: it never lowers a gate (a security finding still HARD-STOPs).
|
|
23
|
-
|
|
24
|
-
## The plan-following prompt template
|
|
25
|
-
|
|
26
|
-
Give the subagent the *piece it owns* and a fixed return shape. This reuses `streams.md`'s
|
|
27
|
-
worker-contract tags — identical on any runner; only the spawn adapter (see `streams.md`) changes.
|
|
28
|
-
The `<strategy>` block mirrors the task's §5 as the subagent's PREFERRED path — it self-improves on that plan and reports the strategy it actually used.
|
|
29
|
-
|
|
30
|
-
```xml
|
|
31
|
-
<objective>
|
|
32
|
-
Execute THIS piece of the orchestrator's plan: {{PIECE}}. You own only this piece — not the
|
|
33
|
-
surrounding decisions. Return a verdict; do not record state.
|
|
34
|
-
</objective>
|
|
35
|
-
|
|
36
|
-
<persona>
|
|
37
|
-
SELECT the best-fit project persona for this piece and load `.add/personas/{{PERSONA_SLUG}}.md` —
|
|
38
|
-
Identity→your stance · Critical Rules→constraints · Success Metrics→done-bar (streams.md's worker
|
|
39
|
-
contract). No match → a {{DOMAIN}} engineer, correctness over speed; never blocks.
|
|
40
|
-
Work step by step, following the plan:
|
|
41
|
-
1. Load the context files + the persona; confirm you understand the piece you own.
|
|
42
|
-
2. Do the work in small steps, honoring the orchestrator's plan and constraints.
|
|
43
|
-
3. Self-score your result with confidence.md; if any dimension < 0.9, refine before returning.
|
|
44
|
-
</persona>
|
|
45
|
-
|
|
46
|
-
<strategy>
|
|
47
|
-
The task's §5 plan — the Strategy (ordered batches) order and the Known-problem fixes — is
|
|
48
|
-
your PREFERRED starting path, not a hard rule. Improve on it when a better strategy emerges
|
|
49
|
-
as you build; on done, report the strategy you ACTUALLY used so the orchestrator can update
|
|
50
|
-
§5 for the audit trail.
|
|
51
|
-
</strategy>
|
|
52
|
-
|
|
53
|
-
<context_files>
|
|
54
|
-
the plan / task files the piece needs (read-only unless the piece says otherwise)
|
|
55
|
-
</context_files>
|
|
56
|
-
|
|
57
|
-
<return>
|
|
58
|
-
End with a structured verdict the orchestrator parses and RECORDS:
|
|
59
|
-
{ piece, persona, result, evidence, confidence: {per-dimension 0–1}, open_questions }.
|
|
60
|
-
`persona` names the slug you adopted (or `generic`) — the orchestrator records which persona did the work.
|
|
61
|
-
Do NOT run add.py or write any shared state — you propose, the orchestrator records.
|
|
62
|
-
</return>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Choosing the model — vendor-neutral tiers
|
|
66
|
-
|
|
67
|
-
Pick the tier from `streams.md`: **mid** for an ordinary piece; **top** for a complex/ambiguous/
|
|
68
|
-
cross-cutting one. The tier→model-id mapping + spawn adapter live there. A stronger model never buys
|
|
69
|
-
back a gate: high-risk scope still escalates.
|
|
70
|
-
|
|
71
|
-
## The hard rule — delegate, don't abdicate
|
|
72
|
-
|
|
73
|
-
<constraints>
|
|
74
|
-
The engine never spawns — it's the orchestrating agent's choice. And:
|
|
75
|
-
- the subagent PROPOSES; the orchestrator RECORDS — a worker never runs add.py or writes shared state;
|
|
76
|
-
- delegation never lowers a gate — a SECURITY finding still HARD-STOPs and high-risk scope still escalates, whoever did the work;
|
|
77
|
-
- the subagent returns its confidence.md self-score; a low score means refine or re-spawn, never a pass.
|
|
78
|
-
</constraints>
|
|
79
|
-
|
|
80
|
-
> Used per step: each phase guide's Advisor hook points here (the per-step hooks).
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Foundation compaction — collapse the stable tail
|
|
2
|
-
|
|
3
|
-
`fold.md` PREPENDS new learnings (newest-first); foundation compaction COLLAPSES the stable tail of each foundation spec into a rolled-up settled line — keeping PROJECT.md, CONVENTIONS.md, GLOSSARY.md, and MODEL_REGISTRY.md to one screen as the project grows.
|
|
4
|
-
|
|
5
|
-
You **gather and propose**; the **human confirms**; you then write the settled line. This is a **convention**, not a command — there is no `add.py compact-foundation`. It is DISTINCT from engine `add.py compact <slug>` (the archive recovery-bundle move).
|
|
6
|
-
|
|
7
|
-
## When
|
|
8
|
-
|
|
9
|
-
At **milestone close** (after `fold.md`) or **on demand** when a spec has grown past one screen. Always a SEPARATE step from `fold.md`.
|
|
10
|
-
|
|
11
|
-
## Eligibility
|
|
12
|
-
|
|
13
|
-
An entry is compaction-eligible **IFF** its milestone is **shipped** (done/archived) **AND** it carries **zero open residues**/deltas. Unshipped or open-residue entries are NOT eligible (`open-residue-version`).
|
|
14
|
-
|
|
15
|
-
## The ritual
|
|
16
|
-
|
|
17
|
-
1. **Gather** — collect the stable, shipped, zero-residue tail of the target spec.
|
|
18
|
-
2. **Propose** — draft the per-spec rolled-up settled line and show the human.
|
|
19
|
-
3. **Confirm** — no write happens without confirmation.
|
|
20
|
-
4. **Write** — replace the collapsed tail with ONE settled line at the BOTTOM (newest-first: live records stay on top, settled line anchors at the tail), carrying a git/archive pointer.
|
|
21
|
-
|
|
22
|
-
## Per-spec rolled-line shapes
|
|
23
|
-
|
|
24
|
-
- **PROJECT.md §Spec** — `[folded fv N..M]` bullets → `settled fvN–fvM — <theme> (see git)`.
|
|
25
|
-
- **PROJECT.md §Key-Decisions** — shipped rows → `| settled <dateA>–<dateB> | <N> decisions rolled | … | see git |` at the tail.
|
|
26
|
-
- **CONVENTIONS.md** — `(TAG)` learnings → `- settled conventions <range> — <N> rules (see git)`.
|
|
27
|
-
- **GLOSSARY.md** — verbose stable definition → terse canonical line + `(rationale: see git)`.
|
|
28
|
-
- **MODEL_REGISTRY.md** — superseded model rows → `Prior models: <list> (see git)`.
|
|
29
|
-
|
|
30
|
-
## Preservation
|
|
31
|
-
|
|
32
|
-
- **Never delete** — summarize and point; a settled line is lossy on prose, lossless on traceability.
|
|
33
|
-
- A git/archive pointer is mandatory (`trail-loss` if dropped).
|
|
34
|
-
- OPEN residues stay live.
|
|
35
|
-
|
|
36
|
-
## Reject codes
|
|
37
|
-
|
|
38
|
-
- `open-residue-version` — entry is unshipped or has ≥1 open delta/residue; leave it live.
|
|
39
|
-
- `trail-loss` — the collapse would drop the git/archive pointer or audit summary.
|
|
40
|
-
- `wrong-order` — a record is not newest-first, or the settled line is not at the tail.
|
package/skill/add/components.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Components — monorepo and multi-repo slices
|
|
2
|
-
|
|
3
|
-
Opt-in pillar for a milestone spanning **more than one green bar** — a BE + its
|
|
4
|
-
FE, a shared lib + two apps, services across repos. No components declared =
|
|
5
|
-
byte-identical to a single-codebase project. Full narrative: `17-components.md`.
|
|
6
|
-
|
|
7
|
-
## Declare (never inferred)
|
|
8
|
-
|
|
9
|
-
`.add/components.toml`:
|
|
10
|
-
|
|
11
|
-
```toml
|
|
12
|
-
[component.gateway]
|
|
13
|
-
root = "apps/gateway"
|
|
14
|
-
green_bar = "pytest + pyright"
|
|
15
|
-
[component.dashboard]
|
|
16
|
-
root = "apps/web"
|
|
17
|
-
green_bar = "vitest + a11y"
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
A task binds with a `component: <name>` header → that root joins its §5 Scope,
|
|
21
|
-
and verify holds it to that component's green-bar.
|
|
22
|
-
|
|
23
|
-
## The loop
|
|
24
|
-
|
|
25
|
-
1. **Per-component verify.** A bound task must CITE its green-bar in §6 evidence
|
|
26
|
-
or the gate refuses `component_green_bar_uncited`. The engine never runs the
|
|
27
|
-
suite — it **surfaces** the component's `verify` command (and records it in §6);
|
|
28
|
-
you run it (NO-EXEC). The fast lane carries the same `component:` affordance.
|
|
29
|
-
2. **Freeze a cross-component contract.** Declare `[contract.<id>]`
|
|
30
|
-
(producer + consumers). A task names its role `produces: <id>` / `consumes: <id>`.
|
|
31
|
-
The producer's freeze (contract→tests) writes the immutable snapshot
|
|
32
|
-
`.add/contracts/<id>.json`; the consumer pins its hash. A changed re-freeze
|
|
33
|
-
flags consumers `contract_consumer_stale`; a missing/malformed snapshot
|
|
34
|
-
HARD-STOPS — never build against an unfrozen shape.
|
|
35
|
-
3. **One milestone, full slice.** A `consumes:` task is HELD from advancing
|
|
36
|
-
scenarios→contract (`producer_contract_unfrozen`) until the producer's snapshot
|
|
37
|
-
exists — and `producer_contract_stale` if a live producer re-opened/drifted its
|
|
38
|
-
§3 (freeze-recency). The FE stays downstream of the frozen BE, in one milestone.
|
|
39
|
-
4. **Across repos — federate.** A consumer repo declares `[federation.<id>]`
|
|
40
|
-
(`source` + optional `pin`); `add.py federate pull <id>` validates and lands a
|
|
41
|
-
byte-for-byte copy of the producer's snapshot locally. Fail-loud:
|
|
42
|
-
unknown id / unreadable source / a `source` escaping the repo's allowlist
|
|
43
|
-
(`federation_source_escapes`, confined to a repo-root sibling) / invalid
|
|
44
|
-
snapshot / version mismatch each HARD-STOPS and lands nothing.
|
|
45
|
-
|
|
46
|
-
## Hold the line
|
|
47
|
-
|
|
48
|
-
- **Declared, not inferred** — no scanning `apps/*`.
|
|
49
|
-
- **No central server / no shared mutable state** — federation copies an immutable
|
|
50
|
-
snapshot; each repo keeps its own `state.json`.
|
|
51
|
-
- **No new approval** — engine-enforced gates on the six-step flow, not extra human
|
|
52
|
-
checkpoints. Per-component ownership/autonomy is the identity story (`streams.md`).
|
package/skill/add/confidence.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Confidence — the self-score that aims attention
|
|
2
|
-
|
|
3
|
-
The **confidence self-score** is an *advisory* check an agent runs on its own drafted artifact — a spec, a contract, a build, or a subagent verdict — *before* presenting it. It sharpens the draft and aims the reader's eye at the soft spots; it is never a gate.
|
|
4
|
-
|
|
5
|
-
## The six dimensions
|
|
6
|
-
|
|
7
|
-
Score each 0–1 honestly on the artifact you are about to hand over:
|
|
8
|
-
|
|
9
|
-
- **Completeness** — did it cover every rule, scenario, and rejection the task asked for?
|
|
10
|
-
- **Clarity** — would the next reader understand it without you in the room?
|
|
11
|
-
- **Practicality** — is it feasible and implementable as written, against the real code?
|
|
12
|
-
- **Optimization** — does it balance correctness, simplicity, and cost — no gold-plating, no corner cut?
|
|
13
|
-
- **Edge cases** — did it name the failure modes, the concurrency, the empty/oversized inputs?
|
|
14
|
-
- **Self-evaluation** — does it carry its own refine step — a way to catch its own mistakes?
|
|
15
|
-
|
|
16
|
-
If **any** dimension scores **< 0.9**, refine the artifact before presenting, then re-score.
|
|
17
|
-
|
|
18
|
-
## Where it plugs in
|
|
19
|
-
|
|
20
|
-
- It **feeds the lowest-confidence flag** (run.md · 1-specify.md): the lowest-scoring dimension is what you surface ⚠-first at the contract freeze.
|
|
21
|
-
- A persistently low score on a risky scope is a signal to **recommend** lowering the autonomy level (auto → conservative / manual; run.md) — the level stays the human's call.
|
|
22
|
-
|
|
23
|
-
## The hard rule — advisory, never a gate
|
|
24
|
-
|
|
25
|
-
<constraints>
|
|
26
|
-
The confidence self-score is advisory only — never a gate. It never:
|
|
27
|
-
- auto-pass a verify or block a run — the verify outcome rests on evidence (passing tests, the non-functional review), not a self-assigned number;
|
|
28
|
-
- substitutes for evidence or for the human decision point;
|
|
29
|
-
- is recorded as a score the human "agreed to" — a self-asserted score that gated would only move an unread approval one level up (run.md).
|
|
30
|
-
|
|
31
|
-
What it MAY do: aim the lowest-confidence flag, trigger a refine pass, and recommend an autonomy adjustment. The gate itself stays evidence-based and human-owned.
|
|
32
|
-
</constraints>
|
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 open lessons 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 | transcribed bullet at the top |
|
|
29
|
-
| `UDD` | `PROJECT.md` §Users | transcribed bullet at the top |
|
|
30
|
-
| `TDD` | `CONVENTIONS.md` §Method learnings | transcribed bullet |
|
|
31
|
-
| `ADD` | `CONVENTIONS.md` §Method learnings | transcribed bullet |
|
|
32
|
-
| `persona:<slug>` | `.add/personas/<slug>.md` §Critical Rules / §Success Metrics | 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 `critical-rule` or `success-metric`. 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 parallel + 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 · manual/conservative** | contract freeze **and** every Verify | one task; safest |
|
|
71
|
-
| **parallel · auto** *(default)* | contract freeze **only** — Verify auto-PASSes on evidence | `add.py waves` overlaps independent builds behind frozen contracts |
|
|
72
|
-
|
|
73
|
-
**Propose `parallel + auto`; confirm-to-keep** (or downgrade: `add.py autonomy set conservative --project` + `add.py streams set sequential --project`). 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`.
|