@ericrisco/rsc 3.7.5 → 4.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/README.md +16 -9
- package/manifest.json +46 -39
- package/package.json +1 -1
- package/scripts/lib/domains.js +1 -1
- package/scripts/lib/onboarding-apply.js +1 -1
- package/scripts/lib/onboarding.js +7 -7
- package/scripts/lib/retired-skills.js +4 -0
- package/scripts/lib/review-findings.js +3 -0
- package/scripts/lib/review-ledger.js +185 -0
- package/scripts/lib/risk.js +65 -0
- package/scripts/lib/spec-gate.js +10 -1
- package/scripts/rsc.js +91 -6
- package/skills/analyze/SKILL.md +3 -3
- package/skills/asdd/SKILL.md +159 -0
- package/skills/{sdd → asdd}/evals/README.md +10 -10
- package/skills/{sdd → asdd}/evals/cases.yaml +4 -4
- package/skills/{sdd → asdd}/references/model-routing.md +2 -2
- package/skills/building-agents/SKILL.md +1 -1
- package/skills/clarify/SKILL.md +48 -55
- package/skills/clarify/evals/cases.yaml +6 -7
- package/skills/constitution/SKILL.md +21 -8
- package/skills/constitution/evals/README.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/fastapi/SKILL.md +1 -1
- package/skills/flutter/SKILL.md +1 -1
- package/skills/ftd/SKILL.md +26 -10
- package/skills/ftd/evals/cases.yaml +1 -1
- package/skills/ftd/evals/routing.json +4 -4
- package/skills/go/SKILL.md +1 -1
- package/skills/implement/SKILL.md +126 -113
- package/skills/implement/evals/cases.yaml +4 -2
- package/skills/implement/references/per-task-review.md +19 -26
- package/skills/nextjs/SKILL.md +1 -1
- package/skills/parallel/SKILL.md +1 -1
- package/skills/plan/SKILL.md +2 -2
- package/skills/postgresdb/SKILL.md +1 -1
- package/skills/react/SKILL.md +1 -1
- package/skills/review/SKILL.md +58 -31
- package/skills/sdd-init/SKILL.md +6 -6
- package/skills/ship/SKILL.md +38 -18
- package/skills/specify/SKILL.md +32 -33
- package/skills/specify/evals/cases.yaml +1 -1
- package/skills/specify/references/spec-template.md +27 -5
- package/skills/suggest/SKILL.md +4 -4
- package/skills/tasks/SKILL.md +37 -33
- package/skills/tasks/evals/README.md +1 -1
- package/skills/tasks/evals/cases.yaml +2 -2
- package/skills/verify/SKILL.md +30 -15
- package/skills/verify/evals/README.md +2 -2
- package/skills/verify/evals/cases.yaml +1 -0
- package/skills/worktrees/SKILL.md +1 -1
- package/targets/clone-bootstrap.mjs +1 -1
- package/targets/hook-once.mjs +2 -2
- package/targets/sello.mjs +1 -1
- package/skills/sdd/SKILL.md +0 -250
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement
|
|
3
|
-
description: "Use when an approved plan and task list exist and it is time to turn them into working,
|
|
4
|
-
tags: [sdd, implement, code]
|
|
5
|
-
recommends: [verify]
|
|
3
|
+
description: "Use when an approved plan and task list exist and it is time to turn them into working, reviewed code — ASDD stage 4, the per-task loop after `analyze`: TDD build and self-check, `rsc risk` on the diff, review scaled by tier (0/1/3 reviewers), mandatory controls (tests, build, security, traceability), at most 3 fix rounds, then fix-and-record or park in the decision queue. Progress ledger survives compaction; disjoint tasks fan out via `parallel`. NOT spec writing (that is `specify`), NOT planning (that is `plan`), NOT the closing whole-branch gate (stage 5: `verify` + `review`)."
|
|
4
|
+
tags: [asdd, sdd, implement, code]
|
|
5
|
+
recommends: [verify, review]
|
|
6
6
|
profiles: [core, full]
|
|
7
7
|
origin: risco
|
|
8
8
|
---
|
|
@@ -10,10 +10,11 @@ origin: risco
|
|
|
10
10
|
# implement — turn the task list into tested code
|
|
11
11
|
|
|
12
12
|
You have a spec, a plan, and an ordered task list (from `specify` → `plan` → `tasks`), and the
|
|
13
|
-
`analyze` gate has cleared. This skill
|
|
14
|
-
one
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
`analyze` gate has cleared. This skill is **ASDD stage 4**: it walks the tasks in order and runs each
|
|
14
|
+
one through a build → risk → review → controls → fix → decide loop before the next starts. Review
|
|
15
|
+
lives *inside* the task, not after the branch: tests prove the code works, not that it is what was
|
|
16
|
+
asked, and an unrequested feature caught at one commit is cheap — caught under thousands of green
|
|
17
|
+
tests at the end, it is not.
|
|
17
18
|
|
|
18
19
|
This is a **process skill**. It owns the discipline (red → green → refactor, checkpoints, decision
|
|
19
20
|
logging, constitution adherence). It does **not** own the test tooling — pytest fixtures, `go test`
|
|
@@ -51,9 +52,11 @@ back — you do not write feature code anyway.
|
|
|
51
52
|
6. **Scan the tasks for independence.** Mark which tasks share files/state and which are disjoint.
|
|
52
53
|
Disjoint clusters are candidates for `parallel`; everything else runs in order.
|
|
53
54
|
|
|
54
|
-
## The loop —
|
|
55
|
+
## The loop — seven steps per task
|
|
55
56
|
|
|
56
|
-
For **each task** in the list, in order (or dispatched per the parallel rule below)
|
|
57
|
+
For **each task** in the list, in order (or dispatched per the parallel rule below), run a → g.
|
|
58
|
+
|
|
59
|
+
### a) Build and self-check (TDD)
|
|
57
60
|
|
|
58
61
|
```text
|
|
59
62
|
RED → write the smallest failing test that encodes the task's done-check. Run it. Watch it FAIL
|
|
@@ -63,24 +66,15 @@ GREEN → write the least code that makes that test pass. No extra features,
|
|
|
63
66
|
TRIANGULATE → add the smallest edge-case test that proves the behavior is not hard-coded
|
|
64
67
|
(only when config.testing.strict_tdd is true and the task has meaningful edge cases).
|
|
65
68
|
REFACTOR → with the test green, clean up names/duplication/shape. Re-run; still green. Only now.
|
|
66
|
-
CHECK → re-read the task's done-check. Met? Constitution still honored? Decision worth logging?
|
|
67
|
-
PROGRESS → append task/test/blocker/decision state to 02-DOCS/wiki/sdd/progress/<slug>.md.
|
|
68
69
|
COMMIT → commit this task as one logical unit (authorship = Eric; see ship for the rule).
|
|
69
|
-
REVIEW → dispatch a fresh reviewer subagent over THIS task's commits (see "Per-task review gate").
|
|
70
|
-
Fold its Critical/Important findings back in before you move on; Minor can wait.
|
|
71
|
-
CHECKPOINT → stop and show: what changed, test output, review verdict, the next task. Wait for the user.
|
|
72
70
|
```
|
|
73
71
|
|
|
74
72
|
The order is load-bearing. **Red before green** is not a suggestion — a test you write *after* the
|
|
75
73
|
code tells you nothing about whether it can fail. **Refactor only on green** keeps every cleanup
|
|
76
|
-
reversible against a passing bar.
|
|
77
|
-
reviewable instead of a 2000-line surprise diff.
|
|
74
|
+
reversible against a passing bar. Self-check means evidence: the test output you saw, not "I tested it".
|
|
78
75
|
|
|
79
76
|
### Four things you may never do to reach green
|
|
80
77
|
|
|
81
|
-
The loop only means anything if green cannot be manufactured. These are absolute, and each one is a
|
|
82
|
-
way people reach green without fixing anything:
|
|
83
|
-
|
|
84
78
|
1. **Never weaken a test to make it pass.** Not broadening an assertion, not adding a skip, not
|
|
85
79
|
raising a tolerance, not deleting it. A test that looks wrong is a **spec conversation** — surface
|
|
86
80
|
it, don't bury it.
|
|
@@ -94,12 +88,82 @@ way people reach green without fixing anything:
|
|
|
94
88
|
added to touch lines, with no meaningful assertion, is gaming — and mutation testing exists
|
|
95
89
|
precisely to catch it (`../testing-py/SKILL.md`, `../testing-web/SKILL.md`, `../testing-go/SKILL.md`).
|
|
96
90
|
|
|
97
|
-
|
|
91
|
+
**The done-check is the contract.** The task's done-check **is** your first failing test. Never
|
|
92
|
+
invent a looser one; done means that test is green and the traced acceptance criterion holds.
|
|
93
|
+
|
|
94
|
+
### b) Risk — computed, never chosen
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npx @ericrisco/rsc risk --base <task base sha> --json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
It reads the task's **actual** diff through the sello's path table (sello on or off) and prints the
|
|
101
|
+
tier, the touched classes, `reviewers: 0|1|3` and `human approval: required|not required`. Tier 2 =
|
|
102
|
+
auth, billing, CI workflows, migrations, secrets, harness config. The computed tier wins over the
|
|
103
|
+
task's risk forecast. **The agent never picks or argues down its own tier.**
|
|
104
|
+
|
|
105
|
+
### c) Review scaled by tier — fresh context
|
|
106
|
+
|
|
107
|
+
| Tier | Review |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| 0 | none — the controls (e) still run |
|
|
110
|
+
| 1 | one fresh-context reviewer; frozen brief in `references/per-task-review.md` |
|
|
111
|
+
| 2 | the three refuters (`refuter-correctness` · `refuter-security` · `refuter-tests`) in parallel, as `../review/SKILL.md` runs them |
|
|
112
|
+
|
|
113
|
+
Every reviewer gets the **spec**, the **diff as a file** (`scripts/review-package <BASE> <HEAD>`, BASE
|
|
114
|
+
= the task's *recorded* base sha, never `HEAD~1`), the **surrounding code** at that sha (not just the
|
|
115
|
+
hunk), the task's done-check, its **Interfaces → Produces** and the plan's **§0 Global Constraints**.
|
|
116
|
+
Never your session reasoning. **Anti-pre-judging (hard rule):** the dispatch never says what not to
|
|
117
|
+
flag, pre-rates a severity, or explains why a choice is fine — a stated rationale never downgrades a
|
|
118
|
+
finding.
|
|
119
|
+
|
|
120
|
+
### d) Consolidate, verify, record
|
|
121
|
+
|
|
122
|
+
Exactly as `../review/SKILL.md` → *Consolidate, then verify*: `npx @ericrisco/rsc review consolidate
|
|
123
|
+
<reports…>`, then `finding-verifier` on every finding it marks `verify` (tier 1: on every blocker).
|
|
124
|
+
Then `npx @ericrisco/rsc review ledger record <findings.json>`. A finding the ledger already holds
|
|
125
|
+
comes back `repeat`: **never raise it again**. When a finding closes, record its outcome:
|
|
126
|
+
`review ledger outcome <id> fixed|false|intentional|irrelevant`.
|
|
127
|
+
|
|
128
|
+
### e) Mandatory controls — every tier
|
|
129
|
+
|
|
130
|
+
These are `verify`'s per-task mode (`../verify/SKILL.md`):
|
|
131
|
+
|
|
132
|
+
- **Tests** — the affected suite, not just the new test (`testing.commands.apply`).
|
|
133
|
+
- **Build** — the project compiles and type-checks.
|
|
134
|
+
- **Security** — the stack's audit; `../secure-coding/SKILL.md` when input, authz or secrets are touched.
|
|
135
|
+
- **Traceability** — every new behaviour in the diff traces to a spec acceptance criterion.
|
|
136
|
+
**Untraced behaviour is a finding.** This is the control that catches the unrequested feature: a
|
|
137
|
+
QR nobody asked for passes every test.
|
|
138
|
+
|
|
139
|
+
A control that did not run is reported as **not run**, never as passed — and the task is not done.
|
|
140
|
+
|
|
141
|
+
### f) Fix loop — at most 3 rounds
|
|
98
142
|
|
|
99
|
-
Each
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
143
|
+
Each round opens with `npx @ericrisco/rsc review ledger round <slug>/<task>`. It exits non-zero on the 4th
|
|
144
|
+
round with the action to take; obey it (step g).
|
|
145
|
+
|
|
146
|
+
- **From round 2, re-review only the new diff** (BASE = the previous round's head).
|
|
147
|
+
- **Fix the bug class, not the line**: name the class and fix every instance in the task's scope.
|
|
148
|
+
- **Never repeat a finding** — the ledger marks repeats; drop them.
|
|
149
|
+
- Re-run the controls (e) before the next round.
|
|
150
|
+
|
|
151
|
+
### g) Decide
|
|
152
|
+
|
|
153
|
+
| Situation | Action |
|
|
154
|
+
| --- | --- |
|
|
155
|
+
| Trivial, or no business weight | Fix it and record it in `decisions.md` with the task id |
|
|
156
|
+
| Tier 2, contradicts a decision in `decisions.md`, or no convergence in 3 rounds | Park the task in the **decision queue** and continue with independent tasks |
|
|
157
|
+
|
|
158
|
+
The **decision queue** is a `## Decision queue` section in `02-DOCS/wiki/sdd/progress/<slug>.md`, one
|
|
159
|
+
entry per parked task: task id, tier, the question, the options, your recommendation, the evidence
|
|
160
|
+
path. Tasks that depend on a parked task wait; the rest continue. Only a human empties the queue — an
|
|
161
|
+
agent's approval never counts as human.
|
|
162
|
+
|
|
163
|
+
Then append the progress entry and show the checkpoint (below).
|
|
164
|
+
|
|
165
|
+
**`verify` and `review` run twice.** Per task, inside this loop (steps c–e); and once more at
|
|
166
|
+
**closing** (stage 5), over the whole branch against main.
|
|
103
167
|
|
|
104
168
|
## Delegating the test tooling (do not reinvent it)
|
|
105
169
|
|
|
@@ -118,27 +182,10 @@ stack and pulls that stack's testing reference — you do not mix idioms inside
|
|
|
118
182
|
|
|
119
183
|
## Skill digestion and resolution
|
|
120
184
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Select the smallest set of skills that match the task. Digest each selected skill into 4-5 compact rules that affect this task. A task brief or checkpoint includes:
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
Selected skills: fastapi, postgresdb, implement
|
|
131
|
-
Compact rules:
|
|
132
|
-
- Use the configured apply command from config.yaml.
|
|
133
|
-
- Red test first; verify it fails for the right reason.
|
|
134
|
-
- Keep DB migrations expand-contract when touching production tables.
|
|
135
|
-
Skill resolution:
|
|
136
|
-
- used: [...]
|
|
137
|
-
- missing: [...]
|
|
138
|
-
- fallback: [...]
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
If a skill is referenced but unavailable, say so and record the fallback. Do not silently pretend it was used.
|
|
185
|
+
Select the smallest set of skills from `.rsc/skill-registry.json` that match the task and digest
|
|
186
|
+
each into 4-5 compact rules. Every task brief or checkpoint carries `Selected skills`, `Compact
|
|
187
|
+
rules` and `Skill resolution` (`used` / `missing` / `fallback`). A referenced skill that is
|
|
188
|
+
unavailable is named with its fallback — never silently pretended.
|
|
142
189
|
|
|
143
190
|
## Apply progress
|
|
144
191
|
|
|
@@ -157,8 +204,10 @@ Entry shape:
|
|
|
157
204
|
- green: same test passed
|
|
158
205
|
- triangulation: blank title returns 422
|
|
159
206
|
- files: app/auth.py, tests/auth/test_login.py
|
|
160
|
-
-
|
|
161
|
-
-
|
|
207
|
+
- risk: tier 2 (auth) — 3 refuters
|
|
208
|
+
- review: 5 reported → 2 unique → 1 confirmed (fixed, round 2)
|
|
209
|
+
- controls: tests ✅ build ✅ security ✅ traceability ✅ (AC3)
|
|
210
|
+
- decision: parked in decision queue (tier 2)
|
|
162
211
|
```
|
|
163
212
|
|
|
164
213
|
This file is what makes resumes and archive reliable. Never rewrite old entries; append corrections as new entries.
|
|
@@ -194,7 +243,7 @@ discipline inside each branch.
|
|
|
194
243
|
pinned to the balanced tier (Sonnet by default, chosen at onboarding, never `light`). When you
|
|
195
244
|
delegate a task or fan out via `parallel`, dispatch it to that agent (e.g. Claude Code
|
|
196
245
|
`subagent_type: developer`) so the bulk of TDD execution runs on the cheaper-but-capable model
|
|
197
|
-
while you stay on the session model to orchestrate. Full rationale: `../
|
|
246
|
+
while you stay on the session model to orchestrate. Full rationale: `../asdd/references/model-routing.md`.
|
|
198
247
|
|
|
199
248
|
### The dispatch contract (carriers, statuses, escalation)
|
|
200
249
|
|
|
@@ -220,51 +269,19 @@ each dispatch self-sufficient and make its return machine-checkable:
|
|
|
220
269
|
escalate the tier (balanced → heavy) for a genuinely hard sub-problem. Re-running an identical
|
|
221
270
|
prompt on an identical model is how a loop burns budget without progress.
|
|
222
271
|
|
|
223
|
-
## Per-task review gate
|
|
224
|
-
|
|
225
|
-
After a task is committed and before its checkpoint, run a **small, fresh-eyes review of that task
|
|
226
|
-
alone** — catching over-/under-building while it is one commit cheap to fix, instead of waiting for
|
|
227
|
-
the whole-branch review when it is buried in a large diff. It is a mid-build gate, not the finish
|
|
228
|
-
line (see the boundary below).
|
|
229
|
-
|
|
230
|
-
How to run it:
|
|
231
|
-
|
|
232
|
-
1. **Package the diff as a file, not a paste.** `scripts/review-package <BASE> <HEAD>` where `BASE`
|
|
233
|
-
is the task's *recorded* base sha (never `HEAD~1` — that drops every commit but the last of a
|
|
234
|
-
multi-commit task). It writes the commit list + `--stat` + full diff to one file.
|
|
235
|
-
2. **Dispatch a fresh reviewer subagent** (context-isolated — it must NOT inherit your session
|
|
236
|
-
reasoning). Hand it: the review-package *path*, the task's **done-check**, the task's
|
|
237
|
-
**Interfaces → Produces** contract, and the plan's **§0 Global Constraints**. With routing on,
|
|
238
|
-
balanced is the floor; escalate to heavy for a risky/security-touching task. The frozen brief
|
|
239
|
-
lives in `references/per-task-review.md`.
|
|
240
|
-
3. **It returns two verdicts in one pass:** *spec compliance* (missing / extra / misunderstood vs the
|
|
241
|
-
done-check + Produces) and *code quality* — every finding tagged severity
|
|
242
|
-
(`Critical`/`Important`/`Minor`) with `file:line` evidence.
|
|
243
|
-
4. **Fold `Critical`/`Important` back in now**; `Minor` may wait for the end-of-branch review.
|
|
244
|
-
|
|
245
|
-
**Anti-pre-judging (hard rule).** The dispatch must never tell the reviewer what *not* to flag,
|
|
246
|
-
pre-rate a finding's severity, or explain why a choice is fine ("the plan chose X, treat as Minor").
|
|
247
|
-
A stated rationale never downgrades a finding — that is laundering your own bias through the reviewer.
|
|
248
|
-
Hand it the evidence and the contract; let it judge.
|
|
249
|
-
|
|
250
|
-
**Boundary — this does not replace the end gates.** `verify` still runs the *whole* suite and the
|
|
251
|
-
acceptance criteria once at the end, and `review` still reads the *whole* diff adversarially once
|
|
252
|
-
before `ship`. The per-task gate is the cheap early pass; the broad reviews remain. Skip the per-task
|
|
253
|
-
gate on a genuinely trivial task (a one-line change), like the rest of the chain.
|
|
254
|
-
|
|
255
272
|
## Model tier — `balanced` (opt-in routing)
|
|
256
273
|
|
|
257
|
-
|
|
274
|
+
Default tier **`balanced`** — the bulk of TDD execution. Routing is **off** unless `models.enabled:
|
|
275
|
+
true` in `02-DOCS/wiki/sdd/config.yaml`; when on, resolve and apply it per
|
|
276
|
+
`../asdd/references/model-routing.md` (fan-out on `balanced`, a hard sub-problem escalated to
|
|
277
|
+
`heavy`). Routing off → honor the session model silently.
|
|
258
278
|
|
|
259
279
|
## Checkpoints — what to say
|
|
260
280
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
where the plan
|
|
264
|
-
irreversible.
|
|
265
|
-
|
|
266
|
-
How short you are **never** changes the engineering. TDD, the done-checks, the constitution and
|
|
267
|
-
decision logging hold for every reader.
|
|
281
|
+
In the `orient` voice and the `technical_level` register, show: the task, tier, review verdict
|
|
282
|
+
(reported → unique → confirmed), controls (passed / **not run**), rounds, the *why* of any
|
|
283
|
+
non-obvious choice, and the next task. Ask only where the plan forked; confirm before deviating or
|
|
284
|
+
anything irreversible. In autopilot, log it and continue. Brevity never changes the engineering.
|
|
268
285
|
|
|
269
286
|
## Logging decisions (the 02-DOCS trail)
|
|
270
287
|
|
|
@@ -299,13 +316,14 @@ outranks the plan, and the plan outranks your in-the-moment preference.
|
|
|
299
316
|
| "I'll write the tests after, once the code settles" | Then the test only confirms what you built, not what was asked. Red first, always. |
|
|
300
317
|
| "This task is trivial, skip the failing test" | Trivial code breaks too, and the next task may lean on it. Smallest red test still goes first. |
|
|
301
318
|
| "I'm here anyway, I'll also fix that other thing" | Scope creep buries the diff and breaks the done-check contract. One task, one commit. |
|
|
302
|
-
| "The test passed first try without ever being red" | It tests nothing. Make it fail on purpose, then make it pass. |
|
|
303
319
|
| "I'll batch ten tasks into one big commit to save time" | You just made the work unreviewable and un-resumable. One logical unit per task. |
|
|
304
320
|
| "The constitution's rule doesn't fit here, I'll bend it" | The constitution outranks you. Surface the conflict; don't bend it silently. |
|
|
305
321
|
| "These two tasks touch the same file but I'll parallelize anyway" | Shared file = shared state = merge pain and lost work. Serialize them. |
|
|
306
|
-
| "Refactor now, the test is still red" | Never refactor on red — you can't tell a cleanup from a regression. Get green first. |
|
|
307
322
|
| "I'll mark it done, the code looks correct" | Done = the done-check's test is green and the acceptance criterion holds. Looks ≠ green. |
|
|
308
323
|
| "I'll just write the .env so the integration test runs" | Never. Secrets are the user's; mock/stub the boundary or use a test fixture. |
|
|
324
|
+
| "This diff is obviously low-risk, skip the review" | The tier is `rsc risk`'s, not yours. Run it and obey it. |
|
|
325
|
+
| "The security scan didn't run, but nothing changed there" | Report it **not run**. The task is not done. |
|
|
326
|
+
| "Round 4 will crack it" | The ledger stops at 3. Park the task; continue with independent ones. |
|
|
309
327
|
|
|
310
328
|
## Red flags — stop and re-route
|
|
311
329
|
|
|
@@ -324,16 +342,14 @@ outranks the plan, and the plan outranks your in-the-moment preference.
|
|
|
324
342
|
## Checklist (copy per task)
|
|
325
343
|
|
|
326
344
|
```text
|
|
327
|
-
- [ ]
|
|
328
|
-
- [ ]
|
|
329
|
-
- [ ]
|
|
330
|
-
- [ ]
|
|
331
|
-
- [ ]
|
|
332
|
-
- [ ]
|
|
333
|
-
- [ ]
|
|
334
|
-
- [ ]
|
|
335
|
-
- [ ] Committed as one logical unit (authorship = Eric)
|
|
336
|
-
- [ ] Checkpoint shown in the orient voice; next task named
|
|
345
|
+
- [ ] a) RED for the right reason → GREEN → REFACTOR; committed as one unit (authorship = Eric)
|
|
346
|
+
- [ ] b) `rsc risk` on the task diff; tier recorded
|
|
347
|
+
- [ ] c) review by tier, fresh context, spec + diff + surrounding code, no pre-judging
|
|
348
|
+
- [ ] d) `review consolidate` + `finding-verifier`; `review ledger record`
|
|
349
|
+
- [ ] e) tests, build, security, traceability — each passed or **not run**
|
|
350
|
+
- [ ] f) `review ledger round <slug>/<task>` each round; ≤ 3; class fixed, no repeats
|
|
351
|
+
- [ ] g) fixed + logged in decisions.md, or parked in the decision queue
|
|
352
|
+
- [ ] Progress entry appended; skill resolution recorded; checkpoint shown
|
|
337
353
|
```
|
|
338
354
|
|
|
339
355
|
## Result envelope
|
|
@@ -343,7 +359,7 @@ End every implementation checkpoint or completed batch with:
|
|
|
343
359
|
```json result-envelope
|
|
344
360
|
{
|
|
345
361
|
"status": "complete",
|
|
346
|
-
"executive_summary": "Implemented task(s)
|
|
362
|
+
"executive_summary": "Implemented task(s): red/green evidence, tier, review, controls, decision-queue state.",
|
|
347
363
|
"artifact": "02-DOCS/wiki/sdd/progress/<slug>.md",
|
|
348
364
|
"next_recommended": "implement|verify",
|
|
349
365
|
"risk": "low|medium|high",
|
|
@@ -351,31 +367,28 @@ End every implementation checkpoint or completed batch with:
|
|
|
351
367
|
"used": ["implement"],
|
|
352
368
|
"missing": [],
|
|
353
369
|
"fallback": [],
|
|
354
|
-
"compact_rules": ["
|
|
370
|
+
"compact_rules": ["Tier comes from rsc risk, never the agent.", "Max 3 fix rounds; park, don't loop."]
|
|
355
371
|
},
|
|
356
|
-
"evidence": ["red
|
|
372
|
+
"evidence": ["red/green output", "rsc risk output", "ledger record", "controls", "progress entry path"]
|
|
357
373
|
}
|
|
358
374
|
```
|
|
359
375
|
|
|
360
376
|
## What this skill is NOT
|
|
361
377
|
|
|
362
|
-
- **Not the
|
|
363
|
-
|
|
364
|
-
feature is done here — that claim belongs to `verify`, on evidence.
|
|
378
|
+
- **Not the closing gate.** The per-task controls prove each task; the whole branch against main,
|
|
379
|
+
the rollback plan and the human explanation are stage 5 (`verify` closing mode, `review`, `ship`).
|
|
365
380
|
- **Not spec or plan writing.** If you find the plan is wrong mid-build, stop and amend it via
|
|
366
381
|
`plan`; don't silently re-architect inside a commit.
|
|
367
382
|
- **Not the deep-debug protocol.** When a test fails for a reason you don't understand, switch to
|
|
368
383
|
`debug` (reproduce → isolate → hypothesize → fix → verify) instead of guessing.
|
|
369
384
|
|
|
370
|
-
## Where you are in
|
|
385
|
+
## Where you are in ASDD
|
|
371
386
|
|
|
372
|
-
|
|
373
|
-
`review`
|
|
374
|
-
isolation), `parallel` (independent tasks to fan out).
|
|
387
|
+
Base → Spec → Plan (`plan` · `tasks` · `analyze`) → **Build loop (this skill)** → Close (`verify` ·
|
|
388
|
+
`review` · `ship`) → Learn. On demand: `debug`, `worktrees`, `parallel`. Front door: `../asdd/SKILL.md`.
|
|
375
389
|
|
|
376
|
-
**Next:** when every task
|
|
377
|
-
|
|
378
|
-
the feature done.
|
|
390
|
+
**Next:** when every task is done or parked, go to stage 5 — `verify` in closing mode over the whole
|
|
391
|
+
branch. Parked tasks travel in the decision queue for the human.
|
|
379
392
|
|
|
380
393
|
## Orientación (siempre)
|
|
381
394
|
|
|
@@ -12,7 +12,7 @@ should_trigger:
|
|
|
12
12
|
- prompt: "Take the approved spec and turn it into working, tested code. I want a checkpoint after every task and the design choices written down somewhere."
|
|
13
13
|
why: "Execute spec→code with per-task checkpoints and decision logging to 02-DOCS — exactly this skill's loop and its decisions.md trail."
|
|
14
14
|
- prompt: "The analyze gate passed. Build it. Write each piece test-first and don't let it drift from the plan."
|
|
15
|
-
why: "Post-analyze, pre-verify execution with TDD and plan-adherence — the precise slot this skill fills in
|
|
15
|
+
why: "Post-analyze, pre-verify execution with TDD and plan-adherence — the precise slot this skill fills in ASDD (stage 4)."
|
|
16
16
|
|
|
17
17
|
should_not_trigger:
|
|
18
18
|
- prompt: "The feature's all coded and committed. Run the full lint, type-check, test suite and security audit and tell me if it's actually done."
|
|
@@ -40,4 +40,6 @@ capability:
|
|
|
40
40
|
- "Delegates the test mechanics to the FastAPI testing reference (ASGITransport in-process client + dependency_overrides + transactional rollback fixture) rather than hand-rolling a runner"
|
|
41
41
|
- "Stops at a checkpoint after the task (does not barrel into the next task) and reports the checkpoint briefly (task, tests, next task) in the register from technical_level in 02-DOCS/wiki/harness/user-profile.md"
|
|
42
42
|
- "Commits the task as one logical unit and notes authorship is Eric (no Co-Authored-By Claude)"
|
|
43
|
-
- "Logs any non-obvious choice (e.g. error envelope shape) to 02-DOCS/wiki/sdd/decisions.md, and ties done to the done-check + spec acceptance criterion (not 'looks right'), pointing to verify for the
|
|
43
|
+
- "Logs any non-obvious choice (e.g. error envelope shape) to 02-DOCS/wiki/sdd/decisions.md, and ties done to the done-check + spec acceptance criterion (not 'looks right'), pointing to verify closing mode for the whole-branch gate"
|
|
44
|
+
- "Runs `npx @ericrisco/rsc risk` on the task's actual diff instead of choosing a tier itself, and scales review by the printed tier (0 none, 1 one fresh-context reviewer, 2 the three refuters), handing reviewers spec + diff + surrounding code"
|
|
45
|
+
- "Runs the mandatory controls (tests, build, security, traceability to a spec criterion), reports any that did not execute as 'not run' rather than passed, and caps fixing at 3 rounds via `review ledger round`, parking the task in the decision queue instead of a 4th round"
|
|
@@ -1,46 +1,39 @@
|
|
|
1
|
-
# Per-task review — the reviewer's brief
|
|
1
|
+
# Per-task review — the tier-1 reviewer's brief
|
|
2
2
|
|
|
3
|
-
The frozen brief handed to the fresh-
|
|
4
|
-
`implement`'s
|
|
5
|
-
reasoning. Re-express it in your own
|
|
3
|
+
The frozen brief handed to the one fresh-context reviewer when `rsc risk` puts a task at **tier 1**
|
|
4
|
+
(step c of `implement`'s loop). Tier 2 uses the three refuters as `../../review/SKILL.md` runs them.
|
|
5
|
+
Hand the reviewer **only** the inputs below — never your session reasoning. Re-express it in your own
|
|
6
|
+
words at dispatch; keep the contract identical.
|
|
6
7
|
|
|
7
8
|
## Inputs to hand the reviewer (paths/values, not prose)
|
|
8
9
|
|
|
10
|
+
- **The approved spec** (`02-DOCS/wiki/sdd/specs/<slug>.md`) — what was asked, and what was not.
|
|
9
11
|
- **The diff**, as a file: the path printed by `scripts/review-package <BASE> <HEAD>` (BASE = the
|
|
10
|
-
task's recorded base sha
|
|
11
|
-
context.
|
|
12
|
-
- **The
|
|
13
|
-
- **The task's Interfaces → `Produces
|
|
14
|
-
- **The plan's §0 Global Constraints** (verbatim project-wide rules).
|
|
12
|
+
task's recorded base sha; from fix round 2, the previous round's head). The diff never enters the
|
|
13
|
+
orchestrator's context.
|
|
14
|
+
- **The surrounding code** at HEAD — the reviewer reads the files the diff touches, not just the hunk.
|
|
15
|
+
- **The done-check**, the task's **Interfaces → `Produces`**, and the plan's **§0 Global Constraints**.
|
|
15
16
|
|
|
16
17
|
## What the reviewer returns (two verdicts, one pass)
|
|
17
18
|
|
|
18
|
-
1. **Spec compliance** —
|
|
19
|
+
1. **Spec compliance** — against the spec, the done-check and `Produces`:
|
|
19
20
|
- *Missing* — required behavior not implemented.
|
|
20
|
-
- *Extra* —
|
|
21
|
+
- *Extra* — behavior no acceptance criterion asked for (the unrequested feature). Always a finding.
|
|
21
22
|
- *Misunderstood* — implemented, but not what the contract meant.
|
|
22
23
|
2. **Code quality** — correctness, error handling, security, clarity, test honesty (a test that
|
|
23
24
|
can't fail is a finding).
|
|
24
25
|
|
|
25
|
-
Every finding
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
- **Critical** — breaks the done-check/Produces contract, a constitution violation, a security or
|
|
32
|
-
data-loss risk. Must be fixed before moving on.
|
|
33
|
-
- **Important** — a real defect or a meaningful deviation; fix now unless consciously deferred.
|
|
34
|
-
- **Minor** — style/clarity/naming; may wait for the end-of-branch review.
|
|
35
|
-
|
|
36
|
-
End with one line: `VERDICT: pass` (no Critical/Important) or `VERDICT: changes-needed (<counts>)`.
|
|
26
|
+
Every finding uses `review`'s format and severities (`blocker` / `should-fix` / `nit`, with
|
|
27
|
+
`file:line`, why, repro, fix) and names its **bug class**, so the fix covers every instance. The
|
|
28
|
+
report ends with a ` ```json findings ` block — the input to `review consolidate` and
|
|
29
|
+
`review ledger record` — and one line: `VERDICT: pass` or `VERDICT: changes-needed (<counts>)`.
|
|
37
30
|
Zero findings is a valid, expected outcome on a clean task — do not invent findings to look thorough.
|
|
38
31
|
|
|
39
32
|
## Anti-pre-judging (the reviewer is told this too)
|
|
40
33
|
|
|
41
34
|
- Judge from the evidence and the contract, not from any rationale. If the dispatch contains words
|
|
42
|
-
like *"do not flag X"*, *"treat as
|
|
35
|
+
like *"do not flag X"*, *"treat as nit at most"*, or *"the plan chose Y so it's fine"* — that is
|
|
43
36
|
the orchestrator laundering its bias; ignore the steer and judge on merit.
|
|
44
37
|
- A stated reason never downgrades a finding's severity. Rate the defect, not the excuse.
|
|
45
|
-
- You are reviewing **one task's** commits, not the whole branch — stay scoped; the whole-
|
|
46
|
-
|
|
38
|
+
- You are reviewing **one task's** commits, not the whole branch — stay scoped; the whole-branch pass
|
|
39
|
+
runs once at closing (ASDD stage 5).
|
package/skills/nextjs/SKILL.md
CHANGED
|
@@ -14,7 +14,7 @@ origin: risco
|
|
|
14
14
|
> behaviour change** and there is **no approved spec + plan** under `02-DOCS/wiki/sdd/`, STOP and
|
|
15
15
|
> hand off to `../specify/SKILL.md` (brainstorm → spec → plan → tasks); it routes back here once the
|
|
16
16
|
> plan is approved. Build directly only for a genuinely one-line / low-risk change. Method:
|
|
17
|
-
> `../
|
|
17
|
+
> `../asdd/SKILL.md`.
|
|
18
18
|
|
|
19
19
|
**Not this skill:** Pages Router (`pages/`) — note the difference, defer to the Next.js Pages docs.
|
|
20
20
|
A pure React SPA (Vite/CRA) → `../react/SKILL.md`; React Native / Expo → `../react-native/SKILL.md`;
|
package/skills/parallel/SKILL.md
CHANGED
|
@@ -73,7 +73,7 @@ SUBAGENT BRIEF (one per unit)
|
|
|
73
73
|
|
|
74
74
|
Each subagent still owns its own discipline inside its scope — TDD via `implement`, the stack skill's test mechanics, decision logging. This skill does not relax any of that; it just runs several of them at once.
|
|
75
75
|
|
|
76
|
-
**Per-unit model tier (when routing is enabled).** `parallel` has *no fixed tier* — this is the most concrete place per-phase model routing pays off. When `models.enabled: true` in `02-DOCS/wiki/sdd/config.yaml`, give each unit the tier of the *kind of work it does*, not one tier for the whole fan-out: an implement-type unit → `balanced`, a scan/research/boilerplate unit → `light`, a unit doing genuine design or root-cause reasoning → `heavy`. Resolve the tier to a concrete model via `models.tiers` and **dispatch that subagent on that model** (e.g. Claude Code's `model` field on the Task/subagent) — real routing, independent of the session model. If routing is off or no profile exists, dispatch on the session model and say nothing. Full protocol: `../
|
|
76
|
+
**Per-unit model tier (when routing is enabled).** `parallel` has *no fixed tier* — this is the most concrete place per-phase model routing pays off. When `models.enabled: true` in `02-DOCS/wiki/sdd/config.yaml`, give each unit the tier of the *kind of work it does*, not one tier for the whole fan-out: an implement-type unit → `balanced`, a scan/research/boilerplate unit → `light`, a unit doing genuine design or root-cause reasoning → `heavy`. Resolve the tier to a concrete model via `models.tiers` and **dispatch that subagent on that model** (e.g. Claude Code's `model` field on the Task/subagent) — real routing, independent of the session model. If routing is off or no profile exists, dispatch on the session model and say nothing. Full protocol: `../asdd/references/model-routing.md`.
|
|
77
77
|
|
|
78
78
|
**Set the model on every dispatch — an omitted model silently inherits the session's, usually the most expensive one, and that is how a fan-out's cost quietly explodes.** rsc installs a `developer` subagent pinned to the **balanced** tier (Sonnet by default; the user's onboarding choice in `.rsc/developer.json`, never `light`). For implement-type units, **dispatch to the `developer` agent** (e.g. Claude Code `subagent_type: developer`) — that's the deliberate cost cap the user asked for. Only escalate a genuinely heavy unit (real design / root-cause) to a heavy model, and only when routing is enabled; otherwise balanced is the floor and the ceiling. If you dispatch a raw subagent instead, name its tier explicitly.
|
|
79
79
|
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -93,7 +93,7 @@ this slug already exists, update it in place and note what changed — never for
|
|
|
93
93
|
Architecture, interfaces, data flow and risk are the heaviest reasoning in the chain, so this
|
|
94
94
|
phase's default tier is **`heavy`**. Routing is off unless `models.enabled: true` in
|
|
95
95
|
`02-DOCS/wiki/sdd/config.yaml`; the resolution order, the announce rule and the model table live in
|
|
96
|
-
`../
|
|
96
|
+
`../asdd/references/model-routing.md`. Routing off or no profile → session model, silently.
|
|
97
97
|
|
|
98
98
|
## Talking about the plan
|
|
99
99
|
|
|
@@ -140,7 +140,7 @@ regardless. (`implement` re-checks this as a hard gate before its first commit.)
|
|
|
140
140
|
## Result envelope
|
|
141
141
|
|
|
142
142
|
End with the parseable block every SDD phase shares, so the dispatcher can chain without
|
|
143
|
-
interpreting prose (contract: `../
|
|
143
|
+
interpreting prose (contract: `../asdd/SKILL.md`):
|
|
144
144
|
|
|
145
145
|
```json result-envelope
|
|
146
146
|
{
|
|
@@ -13,7 +13,7 @@ fix slow SQL, run zero-downtime migrations, and operate/secure the database. Too
|
|
|
13
13
|
example is runnable.
|
|
14
14
|
|
|
15
15
|
New, non-trivial feature with no approved spec + plan under `02-DOCS/wiki/sdd/`? Hand off to
|
|
16
|
-
[`specify`](../specify/SKILL.md) before writing feature code (method: [`
|
|
16
|
+
[`specify`](../specify/SKILL.md) before writing feature code (method: [`asdd`](../asdd/SKILL.md)); build
|
|
17
17
|
straight from here only for a genuinely one-line, low-risk change.
|
|
18
18
|
|
|
19
19
|
Deep dives: [schema-and-indexing](references/schema-and-indexing.md) (types, constraints, every index
|
package/skills/react/SKILL.md
CHANGED
|
@@ -17,7 +17,7 @@ or screen, and its motion layer, is `../design/SKILL.md`'s.
|
|
|
17
17
|
|
|
18
18
|
> Build or review a fast, typed, correctly-architected **client-side** React single-page app bundled by Vite. No server runtime, no RSC tree, no framework router. Server-rendered React (App Router, server actions, SSR/SSG) is not this skill — that is `../nextjs/SKILL.md`.
|
|
19
19
|
|
|
20
|
-
**SDD gate — before writing feature code.** If this skill fired on a **new, non-trivial feature or behaviour change** and there is **no approved spec + plan** under `02-DOCS/wiki/sdd/`, stop and hand off to `../specify/SKILL.md`: it runs brainstorm → spec → plan → tasks, then routes back here once the plan is approved. Build directly only for a genuinely one-line / low-risk change. Method: `../
|
|
20
|
+
**SDD gate — before writing feature code.** If this skill fired on a **new, non-trivial feature or behaviour change** and there is **no approved spec + plan** under `02-DOCS/wiki/sdd/`, stop and hand off to `../specify/SKILL.md`: it runs brainstorm → spec → plan → tasks, then routes back here once the plan is approved. Build directly only for a genuinely one-line / low-risk change. Method: `../asdd/SKILL.md`.
|
|
21
21
|
|
|
22
22
|
## First: confirm it's a Vite SPA, not a framework
|
|
23
23
|
|