@pilotspace/add 2.0.0 → 2.2.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 +71 -0
- package/README.md +104 -196
- package/agents/add-advisor.md +84 -0
- package/agents/add-worker.md +104 -0
- package/bin/cli.js +3 -1
- package/package.json +1 -1
- package/skill/add/SKILL.md +62 -72
- package/skill/add/beyond.md +5 -4
- 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 +7 -6
- package/skill/add/phases/direction.md +75 -13
- package/skill/add/phases/verify.md +9 -8
- package/skill/add/run.md +5 -0
- package/tooling/add.py +43 -2
- package/tooling/add_engine/constants.py +18 -17
- package/tooling/add_engine/guidelines.py +5 -4
- package/tooling/add_engine/io_state.py +3 -3
- package/tooling/templates/PLAN.md.tmpl +4 -3
- package/agents/add.md +0 -68
- package/tooling/templates/personas/_template.md.tmpl +0 -86
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# The ADD persona contract
|
|
2
|
+
|
|
3
|
+
What the ADD engine reads and validates. Miss the required parts and the persona fails
|
|
4
|
+
`add.py check`; miss the recommended frontmatter and no apply-surface loads it. This is the
|
|
5
|
+
hard schema — `references/patterns.md` is the judgment that fills it well.
|
|
6
|
+
|
|
7
|
+
## File
|
|
8
|
+
|
|
9
|
+
- Path: `.add/personas/<slug>.md` — `<slug>` is kebab-case (e.g. `payments-api-engineer`).
|
|
10
|
+
- **Never overwrite** an existing persona file; author a new slug or fold into the named one.
|
|
11
|
+
- **Never** name a persona `_`-prefixed — the engine treats `_`-prefixed files as scaffolds and
|
|
12
|
+
skips them (they are excluded from the roster, emptiness checks, and quality WARNs).
|
|
13
|
+
|
|
14
|
+
## Frontmatter
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
---
|
|
18
|
+
name: <persona name — e.g. Payments API Engineer> # REQUIRED
|
|
19
|
+
vibe: <one-line essence — what this persona keeps true> # REQUIRED
|
|
20
|
+
flow: <design | build | advisor | verify> # RECOMMENDED — comma-separate if >1
|
|
21
|
+
task-kinds: <from the closed taxonomy, comma-separated> # RECOMMENDED
|
|
22
|
+
use-when: <pushy should-select line — enumerate triggers> # RECOMMENDED
|
|
23
|
+
not-when: <the near-miss that belongs to a named sibling> # RECOMMENDED
|
|
24
|
+
folded: <consolidation history, newest first> # OPTIONAL
|
|
25
|
+
source: <teacher file(s) distilled from> # OPTIONAL
|
|
26
|
+
---
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- **`name` · `vibe`** — REQUIRED. Absence fails the schema check.
|
|
30
|
+
- **`flow`** — the apply-surfaces this lens loads at. The ONLY valid values are
|
|
31
|
+
`design` · `build` · `advisor` · `verify` (single-sourced as `constants.PERSONA_FLOW_VALUES`).
|
|
32
|
+
Any other value is a typo that no surface loads — `add.py check` emits a `persona_quality` WARN
|
|
33
|
+
naming it. Surfaces: **design** = the UDD requirements lens · **build** = the domain-identity
|
|
34
|
+
overlay on SOUL.md · **advisor** = the subagent/streams delegation lens · **verify** = the
|
|
35
|
+
evidence-judging lens (earned-green refute-read + gate record).
|
|
36
|
+
- **`task-kinds`** — the persona's SCOREBOARD KEY, from the closed taxonomy:
|
|
37
|
+
`feature · refactor · test · docs · ui · security · data · infra · release · integration`.
|
|
38
|
+
Route-outcome traces join a task's `kind:` header to this claim, so performance is measurable
|
|
39
|
+
per kind. A value outside the taxonomy scores as nothing.
|
|
40
|
+
- **`use-when` / `not-when`** — the selection boundary. Selectors under-trigger on essence lines,
|
|
41
|
+
so `use-when` ENUMERATES the concrete contexts that should pick THIS persona; `not-when` names
|
|
42
|
+
the sibling that owns the near-miss (e.g. `CI permissions → security-gatekeeper`).
|
|
43
|
+
|
|
44
|
+
## Sections
|
|
45
|
+
|
|
46
|
+
**REQUIRED (engine-checked, presence-based):**
|
|
47
|
+
|
|
48
|
+
- `## Identity`
|
|
49
|
+
- `## Critical Rules`
|
|
50
|
+
- `## Default Requirement`
|
|
51
|
+
- `## Success Metrics`
|
|
52
|
+
|
|
53
|
+
**RECOMMENDED (a surface can't fully use the lens without them):**
|
|
54
|
+
|
|
55
|
+
- `## Abilities`
|
|
56
|
+
|
|
57
|
+
**OPTIONAL (absence is conformant):**
|
|
58
|
+
|
|
59
|
+
- `## Anti-patterns`
|
|
60
|
+
- `## Playbook`
|
|
61
|
+
|
|
62
|
+
## Quality WARNs `add.py check` surfaces (non-blocking, measure-not-block)
|
|
63
|
+
|
|
64
|
+
- **flow typo** — a `flow:` value outside the four is named in the finding (loaded by no surface).
|
|
65
|
+
- **bare placeholder** — a `<…>` token left outside backtick spans and HTML comments (a half-filled
|
|
66
|
+
copy). Backticked (`` `<slug>` ``) and commented (`<!-- <x> -->`) angle brackets are content, not
|
|
67
|
+
placeholders. Sweep every real `<…>` before you finish.
|
|
68
|
+
|
|
69
|
+
These are WARNs, never failures — but a roster-ready persona clears all of them.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# The judgment layer — distilled from strong subagent design
|
|
2
|
+
|
|
3
|
+
Eleven patterns that separate an expert lens from an undifferentiated keyword list. Each is drawn
|
|
4
|
+
from an apple-to-apple read of strong agent files (senior-rust/-java engineers, python-expert,
|
|
5
|
+
module-doc-generator, component-tracer, ux-design-architect, and peers) plus a diagnosis of the
|
|
6
|
+
vendored teacher corpus, and cast for an ADD persona. Contract (which section) →
|
|
7
|
+
`references/contract.md`; this file is *how to fill it well*.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
1. Earned-perspective Identity
|
|
11
|
+
2. Bold-lead Critical Rules
|
|
12
|
+
3. The qualification gate
|
|
13
|
+
4. Read-before-you-assert
|
|
14
|
+
5. Failure-mode-aware Success Metrics
|
|
15
|
+
6. ORIENT-first Abilities
|
|
16
|
+
7. Design-for-failure (conditional)
|
|
17
|
+
8. Guilty-until-proven Anti-patterns
|
|
18
|
+
9. Numbers you'd defend
|
|
19
|
+
10. Per-flow stance
|
|
20
|
+
11. Deliberate exclusions — what NOT to put in a persona
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. Earned-perspective Identity
|
|
25
|
+
Every strong agent opens not with a title but with *what it has seen*. State the domain depth AND
|
|
26
|
+
the scar that shapes its judgement.
|
|
27
|
+
- ✗ "You are a senior payments engineer with expertise in APIs."
|
|
28
|
+
- ✓ "…has shipped reconciliation systems where a single un-idempotent retry double-charged a
|
|
29
|
+
customer, so it treats every write as replayable until proven otherwise."
|
|
30
|
+
The scar is what makes the later Anti-patterns feel inevitable rather than arbitrary.
|
|
31
|
+
|
|
32
|
+
## 2. Bold-lead Critical Rules
|
|
33
|
+
Lead each rule with a **bold clause**, then the why. Scannable beats prose. Keep it to what the
|
|
34
|
+
persona would actually *refuse to wave through* — not a wish list.
|
|
35
|
+
- ✗ "Always make sure to handle errors properly and think about idempotency."
|
|
36
|
+
- ✓ "**Every write is idempotent** — a retried request must not double-apply; key it or reject it."
|
|
37
|
+
When a rule is subtle, one ✗/✓ contrast pair teaches more than a paragraph — "follow best
|
|
38
|
+
practices" is useless; "wrap MobX components in `observer()` (see `RoleSkillCard.tsx:15`)" acts.
|
|
39
|
+
|
|
40
|
+
## 3. The qualification gate
|
|
41
|
+
The single sharpest transferable stance. Before elaborating, name the simplest baseline that meets
|
|
42
|
+
the contract; if it wins, take it and STOP. Cleverness is a tax the project pays forever.
|
|
43
|
+
- ✓ Critical Rule: "**Simplest baseline first** — if a plain table + unique index meets the
|
|
44
|
+
contract, ship that; an event-sourced ledger earns its keep or it's a tax."
|
|
45
|
+
Its sibling move covers contradictory requirements ("minimal but feature-rich"): name the tension
|
|
46
|
+
and propose the balance with its cost — never silently satisfy one half. And perspective proves
|
|
47
|
+
itself by naming the losing option: *why this, not that — and why that loses*.
|
|
48
|
+
|
|
49
|
+
## 4. Read-before-you-assert
|
|
50
|
+
The reporting agents (module-doc, component-tracer) make this a hard rule: never cite a file,
|
|
51
|
+
symbol, or line you have not opened. In an ADD persona it is an Anti-pattern:
|
|
52
|
+
- ✓ "a claim resting on a file/symbol not opened → open it or cut the claim."
|
|
53
|
+
It binds outputs too: every path or example the persona's own deliverable cites must exist at the
|
|
54
|
+
named place — a placeholder that survives into the deliverable is the same defect. This mirrors
|
|
55
|
+
the add-worker floor ("never invent a file you have not opened") as a domain instinct.
|
|
56
|
+
|
|
57
|
+
## 5. Failure-mode-aware Success Metrics
|
|
58
|
+
A metric is only expertise if it names the way of being wrong it catches. State each as an
|
|
59
|
+
INVARIANT (true as the project grows), paired with its failure mode.
|
|
60
|
+
- ✗ "High test coverage; good performance."
|
|
61
|
+
- ✓ "**No double-post under retry** — a replayed request leaves the ledger byte-identical (catches
|
|
62
|
+
the un-idempotent write); **p95 < 150 ms at 100 rps** (catches the N+1 that only shows under load)."
|
|
63
|
+
Each bar must be checkable IN-SESSION by the agent holding the lens — a behaviour it can observe
|
|
64
|
+
or a test it can run. An invented outcome statistic ("engagement +40%") sounds measured and never
|
|
65
|
+
was; it is the signature rot of weak persona corpora.
|
|
66
|
+
|
|
67
|
+
## 6. ORIENT-first Abilities
|
|
68
|
+
Lead the ability list with the 1–3 commands the lens RUNS on load before acting — `add.py status`,
|
|
69
|
+
the domain's suite, the diff to judge. Acting on ground truth beats re-deriving it. State every
|
|
70
|
+
other ability as something doable *now*, anchored to a real file/tool/command — not an aspiration.
|
|
71
|
+
- ✓ "can diff two response fixtures byte-for-byte to prove passthrough" (checkable)
|
|
72
|
+
- ✗ "understands API design deeply" (unfalsifiable)
|
|
73
|
+
|
|
74
|
+
## 7. Design-for-failure (conditional)
|
|
75
|
+
Any persona that owns I/O, network, or infra carries a design-for-failure ability: it can name the
|
|
76
|
+
**timeout · retry · circuit-breaker · rollback** for every external call. An unbounded await or a
|
|
77
|
+
silent half-write is a defect, never "expected". Omit this for pure design/docs lenses — forcing it
|
|
78
|
+
on a lens that touches no I/O is noise. Match the pattern to the persona's real surface.
|
|
79
|
+
|
|
80
|
+
## 8. Guilty-until-proven Anti-patterns
|
|
81
|
+
Distinct from Critical Rules (always-do): these are the smells the lens treats as *guilty until
|
|
82
|
+
proven innocent*, each with its default reaction. The sharpest are the instincts the Identity's
|
|
83
|
+
scars produced — and the strongest attach the COST to the smell:
|
|
84
|
+
- ✓ "'0 issues found' on a first pass → look harder."
|
|
85
|
+
- ✓ "an abstraction with no second caller → cut it."
|
|
86
|
+
- ✓ "PIL in production preprocessing → 3× slower than cv2; reach for cv2 first."
|
|
87
|
+
A smell with its price is an argument; a bare smell is a style opinion.
|
|
88
|
+
|
|
89
|
+
## 9. Numbers you'd defend
|
|
90
|
+
The cheapest bytes-per-judgment in strong agents: a named budget beats an adjective. "Optimize
|
|
91
|
+
performance" buys nothing; "p95 < 200 ms at the declared load", "44×44 px touch targets", "batch
|
|
92
|
+
wait ≤ 10 ms" anchor the lens to a bar it can hold a build to. Two conditions, or the number is
|
|
93
|
+
cosplay: the expert could defend WHY that number (name what breaks past it), and the lens can
|
|
94
|
+
check it in-session (see 5). Fake precision reads as measured and teaches the agent to invent —
|
|
95
|
+
worse than no number at all.
|
|
96
|
+
|
|
97
|
+
## 10. Per-flow stance
|
|
98
|
+
The strongest agents split behaviour by mode and bind a bookend to each — *reviewing opens with
|
|
99
|
+
the defect sweep; reimplementing opens with the qualification gate; explaining closes with failure
|
|
100
|
+
modes*. A persona claiming more than one `flow:` does the same in one or two lines: what it LEADS
|
|
101
|
+
with at build, what it REFUSES at verify. A verify stance carries the default verdict — NEEDS-WORK
|
|
102
|
+
until the evidence cites the actual run — plus its automatic-fail triggers. A lens whose rules
|
|
103
|
+
read identically at every flow hasn't decided what each surface is for.
|
|
104
|
+
|
|
105
|
+
## 11. Deliberate exclusions — what NOT to put in a persona
|
|
106
|
+
A persona is a layer in a stack; keep the other layers' work OUT of it.
|
|
107
|
+
- **No tone/voice** — that is SOUL.md's. A persona that prescribes phrasing is duplicating it.
|
|
108
|
+
- **No self-score / confidence rubric** — the agent (add-worker) owns the six-dimension score.
|
|
109
|
+
- **No output skeleton** — the deliverable's shape is the agent's Return contract, not the lens's.
|
|
110
|
+
- **No stakes/CoT priming** ("take a deep breath", "$500 tip") — motivation is the agent's; the
|
|
111
|
+
persona supplies judgment, not pep talk.
|
|
112
|
+
- **No keyword taxonomy** — a page of noun-phrase bullets ("saga pattern, composite indexes, …")
|
|
113
|
+
buys no behaviour; the model knows the words. Every bullet carries an opinion or it goes.
|
|
114
|
+
- **No tutorial code dumps** — framework boilerplate rots fast; a snippet earns its place only
|
|
115
|
+
when it encodes a rule the prose can't.
|
|
116
|
+
- **No invented metrics or fabricated telemetry** — "+40% engagement", "47 pipelines deployed":
|
|
117
|
+
numbers that sound measured train the lens to hallucinate finished-ness.
|
|
118
|
+
- **No adverb-padded checklists** — "documented thoroughly", "monitored comprehensively" are
|
|
119
|
+
unverifiable filler wearing a checklist's clothes.
|
|
120
|
+
- **No other project's paths** — a persona anchors to THIS project's real files and commands;
|
|
121
|
+
an inherited path from a seed source is contamination, not context.
|
|
122
|
+
Every line you cut from these categories makes the judgment that remains sharper.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Seeding a persona from an existing source
|
|
2
|
+
|
|
3
|
+
Authoring from a blank page is the slowest path and the one most likely to miss the judgment
|
|
4
|
+
layer. When a near-fit source exists, **seed from it, then distil** — never copy it wholesale. Two
|
|
5
|
+
sources are always worth checking first, in this order:
|
|
6
|
+
|
|
7
|
+
1. **The teacher library** — `.add/personas-teacher/**/*.md`, grouped by division folder
|
|
8
|
+
(`design/`, `sales/`, `paid-media/`, …). A vetted, domain-organised corpus. Prefer this.
|
|
9
|
+
2. **A sample subagent** — a `~/.claude/agents/*.md` file (e.g. `senior-rust-engineer.md`) when the
|
|
10
|
+
teacher library has no near-fit for a technical domain.
|
|
11
|
+
|
|
12
|
+
A source is a **head-start on structure**, not a finished lens. The mechanical parts map straight
|
|
13
|
+
across; the judgment parts you must *distil* (compress a verbose body into a few sharp clauses);
|
|
14
|
+
and a few parts the source will **never** carry — you add those yourself. That last column is the
|
|
15
|
+
whole point: a seed that skips it is just a reformatted résumé.
|
|
16
|
+
|
|
17
|
+
## Teacher file → ADD persona
|
|
18
|
+
|
|
19
|
+
A teacher file: frontmatter `name · vibe · description · color · emoji`, division from its folder,
|
|
20
|
+
and a verbose motivational body (`## 🧠 Identity & Memory`, `## 🎯 Core Mission`, …).
|
|
21
|
+
|
|
22
|
+
| ADD schema | Seed from the teacher | Action |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `name:` | frontmatter `name` | carry across |
|
|
25
|
+
| `vibe:` | frontmatter `vibe` | carry across (tighten to one line) |
|
|
26
|
+
| `flow:` | the division folder — `design/` → `design`; a review/audit persona → `verify`/`advisor` | **infer, then confirm** against the closed values |
|
|
27
|
+
| `task-kinds:` | the domain (a `design/` lens → `ui`; a data persona → `data`) | **you pick** from the closed taxonomy |
|
|
28
|
+
| `use-when:` / `not-when:` | frontmatter `description` seeds `use-when`; the sibling it's most confused with seeds `not-when` | distil + **add `not-when`** (the source has none) |
|
|
29
|
+
| `## Identity` | the body's identity/experience paragraph ("You've seen developers struggle with…") | **distil to earned perspective** — scars, not the résumé |
|
|
30
|
+
| `## Critical Rules` | any `**Default requirement**:` / non-negotiable lines in the body | distil to bold-lead rules; **add** the two default stances (surface-tradeoffs · qualification-gate) |
|
|
31
|
+
| `## Default Requirement` | the one `Default requirement:` line if present | carry or write |
|
|
32
|
+
| `## Success Metrics` | *(the teacher rarely has measurable metrics)* | **ADD — this is the judgment.** MEASURABLE invariants, each sharpened by the failure it guards |
|
|
33
|
+
| `## Abilities` | the `Core Mission` bullets | distil to concrete, anchored, checkable actions; lead with the ORIENT commands |
|
|
34
|
+
| `## Anti-patterns` | the instincts implied by the "you've seen X fail" lines | name them guilty-until-proven; **always add** read-before-you-assert |
|
|
35
|
+
|
|
36
|
+
## Subagent md (`~/.claude/agents/*.md`) → ADD persona
|
|
37
|
+
|
|
38
|
+
A subagent file: frontmatter `name · description · model · color`, the `description` embeds a
|
|
39
|
+
`Use when: …` clause and `<example>` blocks, and the body leads with `## Core Principles
|
|
40
|
+
(Non-Negotiable)`.
|
|
41
|
+
|
|
42
|
+
| ADD schema | Seed from the subagent | Action |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `name:` / `vibe:` | frontmatter `name`; **vibe has no source** | carry name; **write a one-line vibe** |
|
|
45
|
+
| `flow:` / `task-kinds:` | the `<example>` Contexts name the work (review → `verify`; build → `build`) | infer flow + kinds, confirm against the closed sets |
|
|
46
|
+
| `use-when:` / `not-when:` | the `Use when: …` clause in `description`; each `<commentary>` names a core capability | carry `use-when`; **add `not-when`** |
|
|
47
|
+
| `## Identity` | the opening `You are a **…**` paragraph | distil to earned perspective |
|
|
48
|
+
| `## Critical Rules` | the `## Core Principles (Non-Negotiable)` list | distil to bold-lead rules (keep 1–2 signatures); **add** the two default stances |
|
|
49
|
+
| `## Abilities` | the capabilities in the `<commentary>` tags + the body's numbered principles | make each doable *now*, anchored to a file/tool/command; an I/O lens **adds** design-for-failure |
|
|
50
|
+
| `## Success Metrics` | *(subagents state principles, not measurable bars)* | **ADD — measurable, failure-aware invariants** |
|
|
51
|
+
| `## Anti-patterns` | the "only when genuinely required" / "avoid" hedges | name them guilty-until-proven; **always add** read-before-you-assert |
|
|
52
|
+
|
|
53
|
+
## What to mine, what to refuse
|
|
54
|
+
|
|
55
|
+
Both source families carry gold the mapping tables can't express — and a signature rot that must
|
|
56
|
+
not survive the seed:
|
|
57
|
+
|
|
58
|
+
- **Teacher gold** — the one-line `Default requirement:` floor · the "You've seen…" scar sentence
|
|
59
|
+
(feeds Identity) · behaviour-paired metric rows ("100% warm transfers — never a cold handoff")
|
|
60
|
+
· a named methodology with its verbatim moves and why-they-work (feeds a Playbook) · the rare
|
|
61
|
+
"when NOT to use" lines (feed `not-when:` as *symptom → sibling*) · a reviewer's default-verdict
|
|
62
|
+
stance with automatic-fail triggers (feeds a verify-flow stance).
|
|
63
|
+
- **Teacher rot — refuse** — deliverable code dumps (CSS/config skeletons), emoji-header chrome,
|
|
64
|
+
invented outcome statistics ("+40% engagement" no one measured), motivational closers and
|
|
65
|
+
"instructions reference" footers that point at nothing.
|
|
66
|
+
- **Subagent gold** — review-mode checklists (feed the verify side of a per-flow stance) ·
|
|
67
|
+
pitfalls with the cost attached ("PIL in prod preprocessing → 3× slower than cv2" — feeds
|
|
68
|
+
Anti-patterns) · budgets the author would defend ("p95 < 200 ms", "44×44 px" — feed
|
|
69
|
+
Rules/Metrics) · mode bookends ("reviewing opens with the defect sweep").
|
|
70
|
+
- **Subagent rot — refuse** — keyword-taxonomy pages (nouns buy no behaviour), tip bribes and
|
|
71
|
+
self-score rubrics, tutorial code blocks, and another project's hard-coded paths — a persona
|
|
72
|
+
anchors to THIS project's real files only.
|
|
73
|
+
|
|
74
|
+
## After the seed
|
|
75
|
+
|
|
76
|
+
Record provenance honestly: add a `source:` frontmatter line naming the seed — the teacher slug,
|
|
77
|
+
or `agents/<file>` — (the contract lists `source` as an optional field). Then run the **Workflow** in `SKILL.md` over the
|
|
78
|
+
seeded draft — every section still faces its judgment bar — and `add.py check` until green. A seed
|
|
79
|
+
that never had the Success-Metrics and Anti-patterns columns filled is not done.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Build — AI writes the code (the beat you drive to green)
|
|
2
2
|
|
|
3
|
-
Objective: implement the feature so EVERY failing test
|
|
4
|
-
test or the contract. This is the only phase the
|
|
5
|
-
ambiguity. Write code into `.add/tasks/<slug>/src
|
|
3
|
+
Objective: implement the feature so EVERY failing test — or, for a non-coding task, every §4
|
|
4
|
+
acceptance check — passes, without changing any test or the contract. This is the only phase the
|
|
5
|
+
AI leads; §1–§4 removed all ambiguity. Write code into `.add/tasks/<slug>/src/` (a non-coding
|
|
6
|
+
task writes its artifact to the path its §5 Scope declares).
|
|
6
7
|
|
|
7
8
|
## Work in small batches
|
|
8
9
|
|
|
@@ -15,7 +16,7 @@ each batch small enough to review in full.
|
|
|
15
16
|
|
|
16
17
|
- **Scope (may touch)** — the allowlist the build may write (backticked tokens); a file outside it is a **STOP → change request** back to Specify.
|
|
17
18
|
- **Strategy (ordered batches)** — the planned build order; guidance, not enforced.
|
|
18
|
-
- **Strategy facets** — Approach (domain strategy) · Data strategy · Pattern · Optimization stance: the domain HOW, anchored upstream (§1 Framings · §3 Schema · CONVENTIONS.md Honors), drafted at tests->build in the Persona's domain vocabulary; ⚠-mark the facet you trust least (risk: high →
|
|
19
|
+
- **Strategy facets** — Approach (domain strategy) · Data strategy · Pattern · Optimization stance: the domain HOW, anchored upstream (§1 Framings · §3 Schema · CONVENTIONS.md Honors), drafted at tests->build in the Persona's domain vocabulary; ⚠-mark the facet you trust least (risk: high → spawn `add-advisor`, advise-midflight mode). Advisory, never a gate.
|
|
19
20
|
|
|
20
21
|
Enforced: a completing verify gate refuses an out-of-scope build (`scope_violation` → self-heal).
|
|
21
22
|
|
|
@@ -39,7 +40,7 @@ contract.** A genuine need to change either is a change request back to Specify.
|
|
|
39
40
|
## Exit gate
|
|
40
41
|
|
|
41
42
|
<exit_gate>
|
|
42
|
-
- [ ] All tests pass.
|
|
43
|
+
- [ ] All tests (or §4 acceptance checks) pass.
|
|
43
44
|
- [ ] Coverage did not decrease.
|
|
44
45
|
- [ ] No test and no contract modified by the AI.
|
|
45
46
|
- [ ] No dependency outside the allow-list.
|
|
@@ -75,4 +76,4 @@ verify residue → a SPEC delta.
|
|
|
75
76
|
Routing: `ddd`→domain · `sdd`→system · `udd`→experience · `tdd`→quality · `add`→method — each
|
|
76
77
|
lands in-flight in its living spec via `add.py delta-append <dd>` (grammar: `deltas.md`). A
|
|
77
78
|
HOW-an-agent-behaves lesson → a persona, not the shared pile. Deltas prepend newest-first;
|
|
78
|
-
the spec diff is the receipt. Self-score before emitting (the confidence six dimensions;
|
|
79
|
+
the spec diff is the receipt. Self-score before emitting (the confidence six dimensions; name the weakest, refine).
|
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
# Direction — the whole specification bundle (setup · rules · plan · red suite) to the ONE freeze
|
|
2
2
|
|
|
3
|
-
Every task
|
|
4
|
-
|
|
3
|
+
Every task COMPOSES §1–§3 + §5-scope in ONE silent draft — a single write, no "moving on to §N"
|
|
4
|
+
narration — then §4 runs red and ONE human approval crosses it into build:
|
|
5
|
+
`add.py freeze --by <name> --cross`. The only mandatory breaks in the draft are running the §4 red
|
|
6
|
+
suite (a tool action, not prose) and the freeze. This file is the reference depth for that span —
|
|
5
7
|
SKILL.md carries the loop; read the section you're stuck in, not the file.
|
|
6
8
|
|
|
9
|
+
## The reasoning discipline (the lens for the sections below)
|
|
10
|
+
|
|
11
|
+
**Fluent ≠ true.** A draft's polish tracks its token count, not its evidence; every check in this
|
|
12
|
+
file forces a fresh derivation from THIS task over a plausible template. It is Rule 2 (trust
|
|
13
|
+
evidence, not inspection) turned inward — on your own reasoning, not just the build. Distilled from
|
|
14
|
+
the fable-thinking protocol; each move maps to where the loop already applies it.
|
|
15
|
+
|
|
16
|
+
**Five moves, one arc per beat:**
|
|
17
|
+
- **FRAME** — restate the real question + the load-bearing facts. → §1 co-specify.
|
|
18
|
+
- **GROUND** — verify by observation, not memory; a recalled file/flag/symbol/lesson is `[PRIOR]`
|
|
19
|
+
until re-confirmed against the live tree THIS session; a live read outranks memory. → §3 Grounding.
|
|
20
|
+
- **REASON** — hold more than one hypothesis; demand a mechanism ("because…"), not a correlation;
|
|
21
|
+
simulate with concrete values before committing. → the persona plan · the advisor's propose-plan.
|
|
22
|
+
- **ATTACK** — switch to reviewer, run the cheap kill-test; its output is a concrete falsifying input
|
|
23
|
+
(file · line · values), not a verdict. → advisor `refute` · verify earned-green (security = HARD-STOP).
|
|
24
|
+
- **DELIVER** — lead with the outcome, expose the weakness, recommend don't survey. → the gate report, lowest-confidence-first.
|
|
25
|
+
|
|
26
|
+
**Two pre-answer checks the fluent draft skips** (applied at the freeze — checklist below): the
|
|
27
|
+
**Floor** — restate the **Goal** in the human's world (not the wording), then sweep the
|
|
28
|
+
**Leftovers** (every supplied invariant / the BARE runtime encoded or waived) — and the
|
|
29
|
+
**constraint loop** for mechanically-checkable output shape (§3 tag census · §5 scope tokens · §4
|
|
30
|
+
`covers:` keys · REDS): expand → verify mechanically (grep/count, not a re-read) → repair → then freeze.
|
|
31
|
+
|
|
32
|
+
**Claim grammar** — tag each factual assertion by how you know it: `[OBSERVED]` (checked live this
|
|
33
|
+
session) · `[DERIVED]` (follows from an observation) · `[PRIOR]` (memory, may be stale) · `[ASSUMED]`
|
|
34
|
+
(unverified but required). A bare claim reads as OBSERVED — never leave a guess untagged; it is the
|
|
35
|
+
advisor's §6 Return discipline.
|
|
36
|
+
|
|
7
37
|
---
|
|
8
38
|
|
|
9
39
|
## Setup — first session only (autonomous draft → one baseline lock)
|
|
@@ -81,7 +111,7 @@ stamp its §3 `Status: FROZEN @ v1`, build is open.
|
|
|
81
111
|
<exit_gate>
|
|
82
112
|
- [ ] `.add/state.json` exists; setup seeded unlocked (`--await-lock`) then locked.
|
|
83
113
|
- [ ] Seed lines filled; untouched sections carry the living marker (brownfield: evidence-grounded from code).
|
|
84
|
-
- [ ] First task created; §1–§4 drafted — the red suite runs RED before build opens; `.add/SETUP-REVIEW.md` written lowest-confidence-first.
|
|
114
|
+
- [ ] First task created; §1–§4 drafted — the red suite (or §4 acceptance checks) runs RED before build opens; `.add/SETUP-REVIEW.md` written lowest-confidence-first.
|
|
85
115
|
- [ ] Human confirmed the baseline approval and `add.py lock --by` ran with their name.
|
|
86
116
|
</exit_gate>
|
|
87
117
|
|
|
@@ -141,7 +171,8 @@ the design-definition loop (`design.md`).
|
|
|
141
171
|
`⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>`.
|
|
142
172
|
</output_format>
|
|
143
173
|
|
|
144
|
-
|
|
174
|
+
Every Must and Reject must be checkable — canonically as a §4 test (its `covers:` tag); §2 gherkin is
|
|
175
|
+
an OPTIONAL readable projection, added only when a human needs prose cases at the freeze, never as ceremony:
|
|
145
176
|
|
|
146
177
|
```gherkin
|
|
147
178
|
Scenario: <short name>
|
|
@@ -159,8 +190,8 @@ one per applicable case, or rule it out on purpose. Every Then is specific and o
|
|
|
159
190
|
- [ ] Framings weighed noted; every required behavior stated; every rejection has a named error code.
|
|
160
191
|
- [ ] Assumptions ordered lowest-confidence first; the 1–2 `⚠` flags carry why + cost — or an honest
|
|
161
192
|
"none material" that still names the single biggest risk (never a blank "none").
|
|
162
|
-
- [ ]
|
|
163
|
-
cases covered or ruled out on purpose.
|
|
193
|
+
- [ ] Every Must and Reject is encoded — a §4 test (canonical) or an optional §2 gherkin scenario;
|
|
194
|
+
every rejection asserts what stays unchanged; edge cases covered or ruled out on purpose.
|
|
164
195
|
</exit_gate>
|
|
165
196
|
|
|
166
197
|
---
|
|
@@ -173,7 +204,10 @@ above it the Contract does not move.
|
|
|
173
204
|
### Grounding — reason it in-context (don't write an essay — `PLAN.md.tmpl`: persist the interface, not prose)
|
|
174
205
|
Project from the milestone `## Ground`, then deepen only where THIS task lands. Never invent a
|
|
175
206
|
file/symbol you have not opened; cite the **symbol**, not a bare line number (`l.NNN` rots; symbols
|
|
176
|
-
survive), via code-navigation tools, not memory.
|
|
207
|
+
survive), via code-navigation tools, not memory. A recalled fact — a file, a flag, a symbol, or a
|
|
208
|
+
prior lesson (even one carried in from memory) — is **PRIOR until re-confirmed** against the live
|
|
209
|
+
tree THIS session; a live read outranks memory, and a safety-grep counts only once you have
|
|
210
|
+
confirmed it actually matched (a `for x in $VAR` that ran vacuous proves nothing). **Persist only what the contract needs**: the
|
|
177
211
|
**Anchors** it may cite (the specific symbols §3 names — it may cite ONLY these) and, optionally, a
|
|
178
212
|
**Ground SHA** (the commit grounded against — the engine stamps it when the line is present).
|
|
179
213
|
Everything else — what it **Touches**, the **Honors**/seams consulted, the **Issues/Risks**, the
|
|
@@ -212,12 +246,27 @@ line the freeze records it (audit-only — `route_unrecorded` is measured, never
|
|
|
212
246
|
|
|
213
247
|
## The freeze review checklist
|
|
214
248
|
|
|
215
|
-
The human's one minute, aimed.
|
|
216
|
-
|
|
249
|
+
The human's one minute, aimed. **Fluent ≠ true** — a bundle's polish tracks its token count, not its
|
|
250
|
+
evidence, so these checks force a fresh read of THIS task over a plausible template. Run the **Floor**
|
|
251
|
+
first, then walk the rest before saying yes:
|
|
252
|
+
|
|
253
|
+
- **Floor (before you read the shape)** — the pre-answer check the fluent draft skips. (1) Restate the
|
|
254
|
+
**Goal**: the end-state the human actually wants, in their world, not the ticket's wording — a bundle
|
|
255
|
+
that satisfies the words but misses the goal is the most expensive miss. (2) Check the **Leftovers**:
|
|
256
|
+
every supplied constraint — each PROJECT.md `invariant:`, the BARE declared runtime, every ⚠ the
|
|
257
|
+
interview surfaced — is either encoded in §1–§4 or explicitly waived. An unused constraint is a trap,
|
|
258
|
+
not noise: the artifact must hold under the BARE runtime, so a leftover invariant is a defect already
|
|
259
|
+
waiting at verify.
|
|
217
260
|
- **⚠ flags first** — read the lowest-confidence flags; accept each knowing its cost if wrong. The engine refuses an unflagged freeze before build (`unflagged_freeze`).
|
|
218
261
|
- **Intent** — does §1 say what you actually want built?
|
|
219
262
|
- **Cases** — does every Must and Reject have an observable §2 scenario?
|
|
220
263
|
- **Shape** — glossary names, error codes, additive vs breaking: is THIS the shape to freeze?
|
|
264
|
+
- **Shape self-verify (the constraint loop)** — for the mechanically-checkable output-shape rules — the
|
|
265
|
+
frozen §3 tag census (the closed XML vocabulary), the §5 Scope path tokens, each §4 `covers:` key, any
|
|
266
|
+
REDS / dangling refs — don't eyeball them: expand the rule, self-verify the draft **mechanically**
|
|
267
|
+
(grep/count in reasoning space, not a re-read), repair, THEN freeze. This is where the freeze-parser
|
|
268
|
+
self-breaks get caught before the engine does — a bare `<word>` colliding with the tag census, a
|
|
269
|
+
`./src/` scope token tripping `scope_violation`.
|
|
221
270
|
- **Grounded** — does the Contract cite anchors that exist in the Grounding map? `status`/`check` surface this.
|
|
222
271
|
- **Risk** — high-risk or method-defining? Require `risk: high · autonomy: conservative` in the PLAN.md header.
|
|
223
272
|
- **Tests** — will §4 go red for the right reason, asserting behavior rather than internals?
|
|
@@ -236,10 +285,19 @@ scenario asserting **behavior, not internals** · contract-conformance tests (sh
|
|
|
236
285
|
responses) · side-effect assertions on rejection paths (`assert balance unchanged`) · a recorded
|
|
237
286
|
coverage target.
|
|
238
287
|
|
|
288
|
+
**Non-coding task?** For `kind: docs · release · infra` (or a wholly non-coding project) the
|
|
289
|
+
check need not be a script: §4 is a failing-first **acceptance check** — verifiable pass/fail
|
|
290
|
+
evidence (renders · every internal link resolves · `§X covers A/B/C` · a command exits 0), red
|
|
291
|
+
before the artifact exists and green after. Declare `Tests live in: evidence`. Red→green still
|
|
292
|
+
binds; only the must-be-executable-code requirement is lifted (the human may declare acceptance
|
|
293
|
+
mode on any task). Coding kinds keep the executable red suite above.
|
|
294
|
+
|
|
239
295
|
## Declaring where tests live
|
|
240
296
|
|
|
241
297
|
§4's `Tests live in:` line is machine-read — declare paths as backticked tokens on that line: with
|
|
242
298
|
no local `tests/`, `add.py report` counts test functions at the declared paths (FIRST such line only).
|
|
299
|
+
REPLACE the template's `./tests/` placeholder in place — never append a SECOND `Tests live in:` line:
|
|
300
|
+
the report reads the FIRST, so a stale default left above your real path silently wins.
|
|
243
301
|
`./…` → this task dir · a token with `/` → the project root · a bare name → a
|
|
244
302
|
sibling of the previous token's dir. A directory counts its `*.py` files
|
|
245
303
|
(non-recursive); a `.py` file counts itself. Resolved files dedupe; declared counts
|
|
@@ -254,7 +312,7 @@ moves. Ground §3 on each parent edge's frozen §3 — the PLAN.md itself, never
|
|
|
254
312
|
built code.
|
|
255
313
|
|
|
256
314
|
<exit_gate>
|
|
257
|
-
- [ ] One test per scenario, red for the right reason, asserting observable behavior; coverage target recorded.
|
|
315
|
+
- [ ] One test (or acceptance check, for a non-coding kind) per scenario, red for the right reason, asserting observable behavior; coverage target recorded.
|
|
258
316
|
</exit_gate>
|
|
259
317
|
|
|
260
318
|
> **Persona / Advisor / Confidence** — load the domain-fit `.add/personas/<slug>.md` (its Critical
|
|
@@ -271,9 +329,13 @@ it 0–1 on six dimensions: **Completeness** (every rule/scenario/rejection cove
|
|
|
271
329
|
(understood without you in the room?) · **Practicality** (implementable against the real code?) ·
|
|
272
330
|
**Optimization** (correctness/simplicity/cost balanced — no gold-plating, no corner cut?) ·
|
|
273
331
|
**Edge cases** (failure modes, concurrency, empty/oversized inputs named?) · **Self-evaluation**
|
|
274
|
-
(does it carry its own refine step?).
|
|
275
|
-
|
|
276
|
-
|
|
332
|
+
(does it carry its own refine step?). Rank the six worst→best (a model ranks far more reliably than
|
|
333
|
+
it calibrates an absolute), then NAME the one concrete deficiency in your weakest dimension — a
|
|
334
|
+
missing scenario, an unhandled input, not a number — and fix THAT before presenting; re-rank after.
|
|
335
|
+
The lowest dimension is what you surface ⚠-first at the freeze; persistently low on risky scope →
|
|
336
|
+
*recommend* lowering autonomy (the level stays the human's call). The self-score is a **weak signal**:
|
|
337
|
+
the load-bearing correctness check is the adversarial refute-read (`phases/verify.md`) — the
|
|
338
|
+
plausible-but-wrong a self-score waves through is exactly what the refute exists to catch.
|
|
277
339
|
The hard rule: **advisory, never a gate** — it never auto-passes a verify, never substitutes for evidence or the
|
|
278
340
|
human decision, and a self-asserted score is never recorded as something the human "agreed to".
|
|
279
341
|
|
|
@@ -11,7 +11,7 @@ sufficient. Fill **§6** in PLAN.md including the GATE RECORD.
|
|
|
11
11
|
|
|
12
12
|
## Part one — confirm the evidence
|
|
13
13
|
|
|
14
|
-
- [ ] All tests pass.
|
|
14
|
+
- [ ] All tests pass — or, for a non-coding task, every §4 acceptance check is green (the evidence it names is real).
|
|
15
15
|
- [ ] Coverage did not decrease.
|
|
16
16
|
- [ ] No test or contract was altered during build.
|
|
17
17
|
- [ ] The §3 Target (measurable) is hit — including any declared outcome tests can't show, confirmed by real evidence.
|
|
@@ -36,7 +36,7 @@ Record in the §6 **Deep checks** block — an unfilled one is a **shallow verif
|
|
|
36
36
|
|
|
37
37
|
## Part four — was the green earned?
|
|
38
38
|
|
|
39
|
-
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 — an unrecorded verdict leaves the auto-PASS untraceable (the human spot-audit is the backstop).
|
|
39
|
+
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. Its PRIMARY output is a concrete falsifying input — the fixture value, interleaving, or caller that makes the green wrong (file · line · values), not a verdict; a "looks fine" with no attempted repro is not a refute, and if a real attempt finds none it concedes the green holds and says so. 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 — an unrecorded verdict leaves the auto-PASS untraceable (the human spot-audit is the backstop).
|
|
40
40
|
|
|
41
41
|
## Record exactly one outcome (no silent pass)
|
|
42
42
|
|
|
@@ -44,13 +44,13 @@ Render this gate from the card: banner → ARC → SUMMARY → FLAGS → EVIDENC
|
|
|
44
44
|
(`gate-udd.md` = the full template + examples, read at most once per session), and reconcile FLAGS
|
|
45
45
|
with `add.py report --decide`'s open-item count. Right-size the render to the risk: `sensitivity: mechanical`
|
|
46
46
|
tasks use the compact form — banner → SUMMARY → EVIDENCE → APPROVE; `security` / `data` /
|
|
47
|
-
`architecture` always get the full card. **Human-led: render before `gate` and record `Reported: yes` in §6, never self-stamp.**
|
|
47
|
+
`architecture` always get the full card. Audience by mode: under `conservative` the card renders to the human before the gate; under `autonomy: auto` (no reachable human) you WRITE it to the §6/trace record as the accountable artifact and proceed — you render, you don't wait. **Human-led: render before `gate` and record `Reported: yes` in §6, never self-stamp.**
|
|
48
48
|
|
|
49
49
|
| Outcome | When |
|
|
50
50
|
|---------|------|
|
|
51
51
|
| `PASS` | all checks met |
|
|
52
52
|
| `RISK-ACCEPTED` | a **non-security** gap, with signed owner + ticket + expiry |
|
|
53
|
-
| `HARD-STOP` | any failing test or any security finding |
|
|
53
|
+
| `HARD-STOP` | any failing test or acceptance check, or any security finding |
|
|
54
54
|
|
|
55
55
|
## Exit gate / Next
|
|
56
56
|
|
|
@@ -95,10 +95,11 @@ Spawn a *single* subagent for one well-scoped piece of your plan (many-task pipe
|
|
|
95
95
|
stream-orchestrator persona); the engine never spawns — your call per step. Spawn when the piece
|
|
96
96
|
is separable and worth the round-trip: a broad sweep, an independent adversarial review (the
|
|
97
97
|
refute-read — fresh context, never author-graded), a batch, a context-offload; not for narrow
|
|
98
|
-
cheap work — in doubt, do it in-context. **Prefer the named roster**:
|
|
99
|
-
spawn names the mode
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
cheap work — in doubt, do it in-context. **Prefer the named roster**: `add-worker` for an execution
|
|
99
|
+
piece (the spawn names the mode: direction · build · verify · persona) and `add-advisor` for an
|
|
100
|
+
advisory one (propose-plan · refute · advise-midflight) — over an ad-hoc spawn; each carries its
|
|
101
|
+
roster contract and loads the beat guide + best-fit persona itself. Tier: **mid** ordinary, **top**
|
|
102
|
+
complex/cross-cutting (the roster contract in `agents/*.md` maps tiers to
|
|
102
103
|
models); a stronger model never buys back a gate. **Refute-read persona** — a **Code-Reviewer**;
|
|
103
104
|
findings carry severity: 🔴 blocker · 🟡 concern · 💭 note. A persona is advisory: it never
|
|
104
105
|
lowers a gate (a security finding still HARD-STOPs).
|
package/skill/add/run.md
CHANGED
|
@@ -89,6 +89,11 @@ Two findings enter the loop:
|
|
|
89
89
|
|
|
90
90
|
Either way: ≤3 honest redos, then escalate. A gamed green never ships.
|
|
91
91
|
|
|
92
|
+
**Every return trip is a visible round** (round-visible-runs): any verify→build return —
|
|
93
|
+
a plain `add.py phase build [--note "finding"]` or a heal — increments the task's
|
|
94
|
+
uncapped, observational `rounds` record; `status` names `round N` and the route trace
|
|
95
|
+
carries it. Heal stays the cheat-classed, capped subset; rounds are the honest whole.
|
|
96
|
+
|
|
92
97
|
## Emitting deltas — feeding the foundation back
|
|
93
98
|
|
|
94
99
|
Every gap the completeness-critic finds becomes an **`open` lesson learned** in the task's OBSERVE
|