@pilotspace/add 2.2.0 → 2.4.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 +104 -0
- package/GETTING-STARTED.md +19 -19
- package/agents/add-advisor.md +3 -2
- package/bin/cli.js +45 -149
- package/package.json +1 -1
- package/skill/add/SKILL.md +6 -5
- package/skill/add/beyond.md +4 -0
- package/skill/add/deltas.md +1 -1
- package/skill/add/design.md +1 -1
- package/skill/add/intake.md +17 -0
- package/skill/add/phases/build.md +22 -0
- package/skill/add/phases/direction.md +13 -10
- package/skill/add/phases/verify.md +23 -2
- package/skill/add/strategy.md +54 -0
- package/tooling/add.py +407 -33
- package/tooling/add_engine/constants.py +11 -16
- package/tooling/add_engine/guidelines.py +86 -136
- package/tooling/templates/GLOSSARY.md.tmpl +1 -1
- package/tooling/templates/MILESTONE.md.tmpl +9 -0
- package/tooling/templates/PLAN.md.tmpl +13 -15
|
@@ -153,7 +153,7 @@ Rejects: `not_classified` · `dangling_criterion` · `no_milestone` · `duplicat
|
|
|
153
153
|
|
|
154
154
|
---
|
|
155
155
|
|
|
156
|
-
## Rules (§1)
|
|
156
|
+
## Rules (§1) — co-specification
|
|
157
157
|
|
|
158
158
|
State what the feature MUST do and MUST REJECT — zero ambiguity left to guessing. Co-specify in three moves: **Diverge** (surface the 2–3 genuine framings +
|
|
159
159
|
open questions; let the user react), **Converge** (draft §1 by PROJECTING from the milestone
|
|
@@ -171,8 +171,10 @@ the design-definition loop (`design.md`).
|
|
|
171
171
|
`⚠ <assumption> — lowest confidence because <why>; if wrong: <cost>`.
|
|
172
172
|
</output_format>
|
|
173
173
|
|
|
174
|
-
Every Must and Reject must be checkable — canonically as a §4 test (its `covers:` tag)
|
|
175
|
-
|
|
174
|
+
Every Must and Reject must be checkable — canonically as a §4 test (its `covers:` tag). Cases live
|
|
175
|
+
in §4 · TESTS & SCENARIOS (the old standalone §2 SCENARIOS section is retired). A Given/When/Then
|
|
176
|
+
line is an OPTIONAL readable projection, added inline in §4 only when a human needs prose cases at
|
|
177
|
+
the freeze, never as ceremony:
|
|
176
178
|
|
|
177
179
|
```gherkin
|
|
178
180
|
Scenario: <short name>
|
|
@@ -182,16 +184,17 @@ Scenario: <short name>
|
|
|
182
184
|
And <what must remain unchanged> # REQUIRED for every rejection
|
|
183
185
|
```
|
|
184
186
|
|
|
185
|
-
Then sweep the edge cases — boundary · duplicate · partial failure · concurrency · malformed input
|
|
186
|
-
|
|
187
|
+
Then sweep the edge cases — boundary · duplicate · partial failure · concurrency · malformed input.
|
|
188
|
+
Gate the PRIMARY cases + primary edge cases with a red test each; minor/secondary behaviors are
|
|
189
|
+
DESCRIBED in prose as build-guidance, not a red test. Every Then is specific and observable, never
|
|
187
190
|
"then it works". Your §1 ranking feeds the bundle-level flag the human reads at the freeze.
|
|
188
191
|
|
|
189
192
|
<exit_gate>
|
|
190
193
|
- [ ] Framings weighed noted; every required behavior stated; every rejection has a named error code.
|
|
191
194
|
- [ ] Assumptions ordered lowest-confidence first; the 1–2 `⚠` flags carry why + cost — or an honest
|
|
192
195
|
"none material" that still names the single biggest risk (never a blank "none").
|
|
193
|
-
- [ ] Every Must and Reject is encoded
|
|
194
|
-
|
|
196
|
+
- [ ] Every Must and Reject is encoded as a §4 test (`covers:` tag); every rejection asserts what
|
|
197
|
+
stays unchanged; primary edge cases covered or ruled out on purpose (minor ones may be prose).
|
|
195
198
|
</exit_gate>
|
|
196
199
|
|
|
197
200
|
---
|
|
@@ -259,7 +262,7 @@ first, then walk the rest before saying yes:
|
|
|
259
262
|
waiting at verify.
|
|
260
263
|
- **⚠ flags first** — read the lowest-confidence flags; accept each knowing its cost if wrong. The engine refuses an unflagged freeze before build (`unflagged_freeze`).
|
|
261
264
|
- **Intent** — does §1 say what you actually want built?
|
|
262
|
-
- **Cases** — does every Must and Reject have an observable §
|
|
265
|
+
- **Cases** — does every Must and Reject have an observable §4 test/scenario (`covers:` tag)?
|
|
263
266
|
- **Shape** — glossary names, error codes, additive vs breaking: is THIS the shape to freeze?
|
|
264
267
|
- **Shape self-verify (the constraint loop)** — for the mechanically-checkable output-shape rules — the
|
|
265
268
|
frozen §3 tag census (the closed XML vocabulary), the §5 Scope path tokens, each §4 `covers:` key, any
|
|
@@ -280,8 +283,8 @@ Reject any line → the bundle goes back to draft; the freeze stays the only gat
|
|
|
280
283
|
Run the suite now, with no implementation — **red for the right reason** (missing implementation,
|
|
281
284
|
not a broken harness). A test green before code exists is testing nothing. **A test is any
|
|
282
285
|
machine-checkable assertion**, not only xUnit code — a metric threshold (ML/data), a reconciliation
|
|
283
|
-
query, a plan-diff (infra), a rendered-screen diff (UI). Produce: one executable test per
|
|
284
|
-
scenario asserting **behavior, not internals** · contract-conformance tests (shapes + error
|
|
286
|
+
query, a plan-diff (infra), a rendered-screen diff (UI). Produce: one executable test per PRIMARY
|
|
287
|
+
case/scenario asserting **behavior, not internals** · contract-conformance tests (shapes + error
|
|
285
288
|
responses) · side-effect assertions on rejection paths (`assert balance unchanged`) · a recorded
|
|
286
289
|
coverage target.
|
|
287
290
|
|
|
@@ -9,13 +9,34 @@ sufficient. Fill **§6** in PLAN.md including the GATE RECORD.
|
|
|
9
9
|
> **security is always a HARD-STOP and is never auto-passed**. Under `conservative`, or whenever
|
|
10
10
|
> residue is found, this phase is **human-led** (auto-PASS conditions: `run.md`).
|
|
11
11
|
|
|
12
|
+
## The reasoning discipline — verify's slice of the arc (definitions: `phases/direction.md`)
|
|
13
|
+
|
|
14
|
+
**Fluent ≠ true** holds for verdicts: a verdict's confidence tracks how much evidence prose you
|
|
15
|
+
wrote, not what you checked — a checkbox ticked from memory is a guess wearing a PASS. The arc
|
|
16
|
+
at the gate:
|
|
17
|
+
|
|
18
|
+
- **GROUND** — every Part-one checkbox is a factual claim: tick it only `[OBSERVED]` — you ran
|
|
19
|
+
the suite / read the evidence THIS session; a remembered pass is `[PRIOR]` — re-run it, never
|
|
20
|
+
recall it. A safety-grep counts only once you confirmed it actually matched.
|
|
21
|
+
- **ATTACK** — verify IS the arc's attack beat: the earned-green refute-read (Part four) whose
|
|
22
|
+
primary output is a concrete falsifying input, and the three lenses of Part two. Security
|
|
23
|
+
stays HARD-STOP.
|
|
24
|
+
- **DELIVER** — the gate card leads with the outcome, exposes the residue yourself
|
|
25
|
+
lowest-confidence-first, and tags its claims by evidence basis — never a bare "all green".
|
|
26
|
+
- **Floor Goal check** — before recording PASS, restate the goal in the human's world: a suite
|
|
27
|
+
that satisfies the §4 words but misses what they actually wanted is the most expensive miss,
|
|
28
|
+
and this gate is the last place to catch it.
|
|
29
|
+
- **Constraint loop on the §6 record** — the record blocks (3-lens verdict · Deep checks ·
|
|
30
|
+
Refute-read verdict · `Reported:`) are mechanically checkable: sweep them as a census before
|
|
31
|
+
the gate — an unfilled block is an unrecorded verdict, caught by you, not by the spot-audit.
|
|
32
|
+
|
|
12
33
|
## Part one — confirm the evidence
|
|
13
34
|
|
|
14
35
|
- [ ] All tests pass — or, for a non-coding task, every §4 acceptance check is green (the evidence it names is real).
|
|
15
36
|
- [ ] Coverage did not decrease.
|
|
16
37
|
- [ ] No test or contract was altered during build.
|
|
17
38
|
- [ ] The §3 Target (measurable) is hit — including any declared outcome tests can't show, confirmed by real evidence.
|
|
18
|
-
- [ ] §1 rules trace to §
|
|
39
|
+
- [ ] §1 rules trace to a §4 test (`covers:` tag) — an untraced rule is a coverage gap (`add.py check` warns on it).
|
|
19
40
|
- [ ] every §3-cited symbol still resolves in the CURRENT tree.
|
|
20
41
|
|
|
21
42
|
If any is false, stop and return to Build.
|
|
@@ -73,7 +94,7 @@ python3 .add/tooling/add.py gate PASS # marks the task done
|
|
|
73
94
|
Verify owns the loop's tail since the six-phase merge. After the gate, fill §7:
|
|
74
95
|
|
|
75
96
|
1. **Release behind a scope-of-impact limit** — a flag and/or gradual rollout.
|
|
76
|
-
2. **Reuse scenarios as monitors** — the §
|
|
97
|
+
2. **Reuse scenarios as monitors** — the §4 scenarios/tests that defined "correct" define
|
|
77
98
|
what you alert on: overall error rate, each rejection's rate, latency of the risky op.
|
|
78
99
|
3. **Draft the next spec delta** — every defect, surprise, or new need becomes a change
|
|
79
100
|
that re-enters the flow at Specify (a new task). Emit lessons tagged by the
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Strategy — the persona-framed PM loop that fills the `## Strategy` slot
|
|
2
|
+
|
|
3
|
+
A multi-task or high-uncertainty milestone earns a plan over its tasks *before* they are
|
|
4
|
+
built. This guide drives that plan: a short **DISCUSS → OPTIMIZE → CONVERGE** loop that fills
|
|
5
|
+
the milestone's `## Strategy` slot (`MILESTONE.md`) with a sequenced, optimized task DAG.
|
|
6
|
+
|
|
7
|
+
**Trigger:** a milestone with several tasks or real uncertainty, at intake or when it activates.
|
|
8
|
+
**Skip:** a micro / `--tiny` milestone — a **drafted-blank** slot is valid, run nothing (risk-proportional).
|
|
9
|
+
|
|
10
|
+
The persona already loaded at intake (`intake.md`) **drives** this loop — you don't re-select
|
|
11
|
+
one. It frames the sequencing WITH the project's PM lens; it stays advisory throughout.
|
|
12
|
+
|
|
13
|
+
## Run the loop (with the intake persona)
|
|
14
|
+
|
|
15
|
+
1. **DISCUSS** — surface the task DAG: the dependencies, the shared/risky contracts, the
|
|
16
|
+
tradeoffs. Reflect the milestone goal, name what's in and out. Ask **one load-bearing
|
|
17
|
+
question per live lens** — an interview toward ~95% confidence, not a survey.
|
|
18
|
+
2. **OPTIMIZE** — sequence the DAG. Fill the slot's four facets (defined there, not restated
|
|
19
|
+
here): **approach** (risk-first | dependency-first | first-slice-unblocks — and WHY) ·
|
|
20
|
+
the **freeze-first** contract(s) · the **parallel waves** behind those frozen contracts ·
|
|
21
|
+
the **first unblocking slice**. Name the alternative decompositions you rejected.
|
|
22
|
+
3. **CONVERGE** — before you record, pressure-test the plan. If the milestone is
|
|
23
|
+
**high-uncertainty** (the sequencing is contested, or the self-score won't clear its bar),
|
|
24
|
+
spawn `add-advisor` in **refute** mode to try to **break** the strategy — the approach, the
|
|
25
|
+
freeze-first choice, the wave partition. Fold what survives; concede what holds. A
|
|
26
|
+
low-uncertainty / micro / `--tiny` milestone **skips** the spawn — no forced ceremony.
|
|
27
|
+
Then self-score with the existing six-dimension confidence self-score (`phases/direction.md`);
|
|
28
|
+
refine until it clears its bar (no dimension < 0.9 ≈ ~95% confident). Do **not** invent a
|
|
29
|
+
second threshold — that bar IS convergence. Record the converged plan in the `## Strategy` slot.
|
|
30
|
+
|
|
31
|
+
The refute is **advisory**: the advisor hands back the concrete break — it **cannot block**.
|
|
32
|
+
The human still confirms the strategy at the human decision point, through the persona-owned
|
|
33
|
+
gate (`gate-udd.md`) — the persona decides the report's shape and cadence. Security stays **HARD-STOP**.
|
|
34
|
+
|
|
35
|
+
## It stays SOFT
|
|
36
|
+
|
|
37
|
+
The `## Strategy` slot is the **preferred** plan, exactly like a task's §5 Build-strategy: the
|
|
38
|
+
build loop may deviate and records what it actually did. It is **advisory** — **never a new
|
|
39
|
+
gate**, and it never lowers a floor. Security stays **HARD-STOP** everywhere. A milestone is
|
|
40
|
+
never blocked on reaching a confidence bar; the bar guides the draft, it does not gate the work.
|
|
41
|
+
|
|
42
|
+
## How deep? (risk-proportional)
|
|
43
|
+
|
|
44
|
+
Loop depth scales with the milestone's risk/size — more risk/size, more depth:
|
|
45
|
+
|
|
46
|
+
- **micro / `--tiny`** → skip the loop. A drafted-blank `## Strategy` is valid; the loop runs
|
|
47
|
+
nothing — **zero added per-turn cost**.
|
|
48
|
+
- **multi-task, low-uncertainty** → run DISCUSS → OPTIMIZE → CONVERGE; no advisor.
|
|
49
|
+
- **high-uncertainty** (contested sequencing, or the self-score won't clear its bar) → the full
|
|
50
|
+
loop **plus** the `add-advisor` refute at CONVERGE.
|
|
51
|
+
|
|
52
|
+
This is the skill's judgment, reusing the Trigger / Skip and CONVERGE signals above — **never an
|
|
53
|
+
engine gate** on `## Strategy`. The ladder is **SOFT**: a run may go deeper or shallower and
|
|
54
|
+
records what it did. Security stays **HARD-STOP**.
|