@ericrisco/rsc 0.1.43 → 0.1.45
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 +1 -1
- package/manifest.json +110 -86
- package/package.json +1 -1
- package/scripts/lib/domains.js +1 -1
- package/scripts/skill-migration-brief.md +104 -0
- package/skills/ab-testing/SKILL.md +9 -41
- package/skills/accessibility/SKILL.md +5 -7
- package/skills/ads/SKILL.md +9 -24
- package/skills/agent-eval/SKILL.md +7 -33
- package/skills/agent-safety/SKILL.md +7 -14
- package/skills/ai-media/SKILL.md +4 -20
- package/skills/analytics/SKILL.md +8 -30
- package/skills/analyze/SKILL.md +24 -59
- package/skills/angular/SKILL.md +12 -25
- package/skills/api-connector-builder/SKILL.md +10 -27
- package/skills/api-design/SKILL.md +7 -14
- package/skills/article-writing/SKILL.md +1 -18
- package/skills/astro/SKILL.md +36 -54
- package/skills/author-skill/SKILL.md +41 -74
- package/skills/author-skill/evals/README.md +5 -5
- package/skills/author-skill/evals/cases.yaml +8 -8
- package/skills/author-skill/references/description-recipe.md +25 -26
- package/skills/author-skill/references/eval-authoring.md +1 -1
- package/skills/author-skill/references/rsc-conventions.md +1 -1
- package/skills/automation-flows/SKILL.md +6 -16
- package/skills/automation-strategy/SKILL.md +1 -9
- package/skills/aws-essentials/SKILL.md +6 -23
- package/skills/backups/SKILL.md +1 -7
- package/skills/bash-scripting/SKILL.md +5 -9
- package/skills/bookkeeping/SKILL.md +2 -10
- package/skills/brand-identity/SKILL.md +18 -44
- package/skills/brand-voice/SKILL.md +4 -31
- package/skills/building-agents/SKILL.md +20 -103
- package/skills/business-intelligence/SKILL.md +9 -23
- package/skills/calendar-scheduling/SKILL.md +11 -27
- package/skills/case-studies/SKILL.md +3 -8
- package/skills/chatbot/SKILL.md +6 -23
- package/skills/chrome-extension/SKILL.md +2 -2
- package/skills/clarify/SKILL.md +31 -72
- package/skills/clickhouse-analytics/SKILL.md +2 -8
- package/skills/client-onboarding/SKILL.md +17 -19
- package/skills/cloudflare/SKILL.md +3 -8
- package/skills/code-review/SKILL.md +10 -23
- package/skills/codebase-onboarding/SKILL.md +2 -7
- package/skills/cold-outreach/SKILL.md +9 -30
- package/skills/community/SKILL.md +4 -31
- package/skills/competitor-watch/SKILL.md +20 -35
- package/skills/compliance/SKILL.md +10 -37
- package/skills/compose-multiplatform/SKILL.md +1 -1
- package/skills/constitution/SKILL.md +8 -35
- package/skills/content-engine/SKILL.md +4 -16
- package/skills/context-budget/SKILL.md +3 -21
- package/skills/continuous-learning/SKILL.md +10 -40
- package/skills/contracts/SKILL.md +6 -17
- package/skills/coolify/SKILL.md +8 -14
- package/skills/cost-tracking/SKILL.md +3 -11
- package/skills/course-builder/SKILL.md +17 -45
- package/skills/course-storytelling/SKILL.md +26 -94
- package/skills/cpp/SKILL.md +26 -71
- package/skills/csharp-dotnet/SKILL.md +19 -38
- package/skills/customer-support/SKILL.md +14 -37
- package/skills/dashboard/SKILL.md +6 -26
- package/skills/data-cleaning/SKILL.md +37 -63
- package/skills/data-policy/SKILL.md +8 -21
- package/skills/data-scraper/SKILL.md +1 -7
- package/skills/debug/SKILL.md +10 -49
- package/skills/deployment/SKILL.md +38 -101
- package/skills/design/SKILL.md +34 -116
- package/skills/fable-operator/SKILL.md +1 -4
- package/skills/fastapi/SKILL.md +50 -82
- package/skills/flutter/SKILL.md +41 -89
- package/skills/go/SKILL.md +57 -105
- package/skills/harness/SKILL.md +52 -68
- package/skills/implement/SKILL.md +1 -1
- package/skills/init/SKILL.md +152 -168
- package/skills/marketing/SKILL.md +30 -80
- package/skills/nextjs/SKILL.md +42 -116
- package/skills/orient/SKILL.md +25 -20
- package/skills/parallel/SKILL.md +9 -75
- package/skills/plan/SKILL.md +92 -165
- package/skills/postgresdb/SKILL.md +52 -72
- package/skills/presentations/SKILL.md +49 -87
- package/skills/python/SKILL.md +23 -72
- package/skills/react/SKILL.md +19 -67
- package/skills/review/SKILL.md +22 -52
- package/skills/rust/SKILL.md +40 -115
- package/skills/sdd-init/SKILL.md +9 -14
- package/skills/secure-coding/SKILL.md +80 -109
- package/skills/ship/SKILL.md +25 -55
- package/skills/tasks/SKILL.md +37 -61
- package/skills/typescript/SKILL.md +22 -55
- package/skills/verify/SKILL.md +8 -32
- package/skills/viral-score/SKILL.md +122 -0
- package/skills/viral-score/evals/README.md +16 -0
- package/skills/viral-score/evals/cases.yaml +50 -0
- package/skills/vue-nuxt/SKILL.md +45 -106
- package/skills/worktrees/SKILL.md +24 -69
package/skills/parallel/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: parallel
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when two or more pieces of work are genuinely independent — disjoint files, no shared state, no ordering edge — and should fan out across subagents, then be gathered and reconciled under a combined test suite. Decides WHAT can run concurrently; NOT the isolation it runs in (that is `worktrees`), NOT the per-unit TDD loop (that is `implement`)."
|
|
4
4
|
tags: [parallel, subagents, fanout]
|
|
5
5
|
recommends: []
|
|
6
6
|
profiles: [core, full]
|
|
@@ -11,7 +11,7 @@ origin: risco
|
|
|
11
11
|
|
|
12
12
|
*Parallelism is a property of the work, not a wish. Prove the pieces are disjoint, dispatch one subagent per piece with a self-contained brief, then gather and reconcile before anyone calls it done.*
|
|
13
13
|
|
|
14
|
-
This is an **on-demand process skill** in the SDD chain. You reach it from `implement` (or any phase) when the work in front of you splits into pieces that could each be handed to a different person who never talks to the others. It owns one discipline: **partition → dispatch → gather → reconcile**. It does *not* own the work inside each piece — a subagent building a module still runs its own red → green → refactor loop from `implement`; this skill only orchestrates the fan-out.
|
|
14
|
+
This is an **on-demand process skill** in the SDD chain. You reach it from `implement` (or any phase) when the work in front of you splits into pieces that could each be handed to a different person who never talks to the others. It owns one discipline: **partition → dispatch → gather → reconcile**. It does *not* own the work inside each piece — a subagent building a module still runs its own red → green → refactor loop from `implement`; this skill only orchestrates the fan-out. It also does not own the *place* the work runs: a clean branch or checkout to work in is `worktrees`. `parallel` decides **what can run at the same time**; `worktrees` provides **the isolation it runs in**.
|
|
15
15
|
|
|
16
16
|
The whole value is in the gate at the front. Run work in parallel only when it is *actually* independent. Forcing parallelism onto coupled work does not make it faster — it makes it a merge disaster, and the time you save dispatching you lose tenfold reconciling. Most of this skill is about earning the right to parallelize.
|
|
17
17
|
|
|
@@ -75,12 +75,7 @@ Each subagent still owns its own discipline inside its scope — TDD via `implem
|
|
|
75
75
|
|
|
76
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: `../sdd/references/model-routing.md`.
|
|
77
77
|
|
|
78
|
-
**
|
|
79
|
-
|
|
80
|
-
**Model is REQUIRED on every dispatch.** Set each subagent's model explicitly. An omitted model
|
|
81
|
-
silently inherits the session's model — usually the most expensive one — and that is how a fan-out's
|
|
82
|
-
cost quietly explodes. The `developer` agent already pins balanced; if you dispatch a raw subagent,
|
|
83
|
-
name its tier.
|
|
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.
|
|
84
79
|
|
|
85
80
|
### The unit report contract (statuses & escalation)
|
|
86
81
|
|
|
@@ -96,9 +91,7 @@ change something first: add the missing interface/constraint, fix the dependency
|
|
|
96
91
|
tier for a genuinely hard unit. An identical re-run burns budget without progress. A `BLOCKED` unit
|
|
97
92
|
is a partition signal too: if it blocked on another unit, the two were not independent — re-partition.
|
|
98
93
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
Every subagent result must report:
|
|
94
|
+
Every subagent result must also report:
|
|
102
95
|
|
|
103
96
|
```yaml
|
|
104
97
|
skill_resolution:
|
|
@@ -114,15 +107,7 @@ The orchestrator folds these into the final parallel result. If a unit claims it
|
|
|
114
107
|
|
|
115
108
|
Wait for **all** units to report. Collect each one's diff, test output, and any decisions. Do not start merging the fast ones while slow ones are still running — partial merges create the exact shared-state races you partitioned to avoid. Check each result against its brief's done-check *before* it touches the integration branch: a unit that came back not-actually-done gets sent back, not merged hopefully.
|
|
116
109
|
|
|
117
|
-
**Per-unit review gate (before merge).** For each non-trivial unit, run
|
|
118
|
-
unit's diff alone* before it joins the integration branch — the same gate `implement` runs per task
|
|
119
|
-
(full brief: `../implement/references/per-task-review.md`). Package the unit's diff as a file
|
|
120
|
-
(`../implement/scripts/review-package <BASE> <HEAD>`), dispatch a fresh reviewer (NOT the unit's own
|
|
121
|
-
implementer) with the diff path + the unit's done-check + its frozen interface, and fold
|
|
122
|
-
`Critical`/`Important` findings back before merging. **Anti-pre-judging:** never tell the reviewer
|
|
123
|
-
what not to flag or pre-rate severity. This is the cheap per-unit pass; the *combined* adversarial
|
|
124
|
-
review over the whole merged diff is still `review`'s job at the end (RECONCILE only proves the seam
|
|
125
|
-
compiles and tests green).
|
|
110
|
+
**Per-unit review gate (before merge).** For each non-trivial unit, run the same fresh-eyes review `implement` runs per task, over *that unit's diff alone* — package it with `../implement/scripts/review-package <BASE> <HEAD>` and dispatch a reviewer that is **not** the unit's own implementer, given the diff path, the unit's done-check, and its frozen interface; never pre-rate severity or tell it what to skip. Fold `Critical`/`Important` findings back before merging. Full protocol: `../implement/references/per-task-review.md`. This is the cheap per-unit pass; the *combined* adversarial review over the whole merged diff is still `review`'s job at the end (RECONCILE only proves the seam compiles and tests green).
|
|
126
111
|
|
|
127
112
|
### 4. RECONCILE — merge, then prove the seam holds
|
|
128
113
|
|
|
@@ -135,28 +120,7 @@ This is where parallel work is actually finished. In order:
|
|
|
135
120
|
|
|
136
121
|
Only after the combined suite is green is the parallel batch done. Hand the merged, green result back to the phase that called you (usually `implement`, heading for `verify`).
|
|
137
122
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
Read the level from `02-DOCS/wiki/harness/user-profile.md` and match it. The dial changes how much you narrate the orchestration; it never changes the independence test or the reconcile gate.
|
|
141
|
-
|
|
142
|
-
| Level | While dispatching/reconciling you show… | Questions you ask |
|
|
143
|
-
| --- | --- | --- |
|
|
144
|
-
| **L0** terse | the partition (batches + spine) in one block, then "merged, combined suite green" | none unless a unit fails its done-check or a contract needs freezing |
|
|
145
|
-
| **L1** brief | the partition + one line of *why these are independent* | confirm the partition only where independence is borderline |
|
|
146
|
-
| **L2** decisions | the partition, the frozen contracts, and each reconcile conflict with its fix | confirm before freezing a contract that constrains multiple units |
|
|
147
|
-
| **L3** full | the full independence reasoning per pair, the briefs, the gather, the seam check, narrated | ask to validate the partition before dispatch; teach why the seam is the risk |
|
|
148
|
-
|
|
149
|
-
L0 still runs the independence test and the combined-suite gate — silently, but completely. Terse is about words, not about skipping the gate.
|
|
150
|
-
|
|
151
|
-
## When parallel is the wrong tool
|
|
152
|
-
|
|
153
|
-
Be honest about this — most task lists are *mostly* serial with a few disjoint pockets, not the other way around.
|
|
154
|
-
|
|
155
|
-
- **The pieces share a file or a contract.** Serialize, or freeze the contract first then fan out the rest. Do not parallelize across a live shared edit.
|
|
156
|
-
- **One piece needs another's output.** That is a dependency edge, by definition sequential. Order them.
|
|
157
|
-
- **There are only two tiny tasks.** Orchestration overhead (writing briefs, gathering, reconciling) can cost more than just doing them in a row. Parallelize when the units are substantial and many, not to look busy.
|
|
158
|
-
- **You can't write a self-contained brief for a unit.** If you cannot describe it without referring to a sibling unit, it is not independent yet. Fix the partition or serialize.
|
|
159
|
-
- **You only need isolation, not concurrency.** Wanting a clean branch/worktree to work in is `worktrees`, not this. This skill is about doing several things *at once*; isolation is about doing one thing *cleanly*.
|
|
123
|
+
**How loud.** Match the accompaniment level in `02-DOCS/wiki/harness/user-profile.md`: it sets how much of the independence reasoning, the frozen contracts, the briefs and the seam check you narrate, and nothing else. At the tersest level you still run the independence test and the combined-suite gate in full — silently, but completely.
|
|
160
124
|
|
|
161
125
|
## Anti-patterns → STOP
|
|
162
126
|
|
|
@@ -169,33 +133,10 @@ Be honest about this — most task lists are *mostly* serial with a few disjoint
|
|
|
169
133
|
| "I'll merge the fast unit now and the slow one when it lands." | Partial merges reintroduce the races you partitioned away. Gather all, then reconcile once. |
|
|
170
134
|
| "It's only two small tasks, but parallel sounds efficient." | Orchestration overhead > the work. Just do them in a row. |
|
|
171
135
|
| "The brief says 'see the other agent's output' — close enough." | That's a dependency, not independence. Serialize, or freeze the output first. |
|
|
172
|
-
| "Combined suite is red, probably the slower unit — I'll tweak it." | Don't guess at the seam. Reproduce and isolate with debug
|
|
173
|
-
| "I just want an isolated branch, so I'll use parallel." | That's isolation, not concurrency. Use worktrees
|
|
136
|
+
| "Combined suite is red, probably the slower unit — I'll tweak it." | Don't guess at the seam. Reproduce and isolate with `debug`. |
|
|
137
|
+
| "I just want an isolated branch, so I'll use parallel." | That's isolation, not concurrency. Use `worktrees`. |
|
|
174
138
|
| "Routing's on, so I'll run the whole fan-out on one tier." | `parallel` has no fixed tier — give each unit the tier of its own work (scan→light, build→balanced, design→heavy). |
|
|
175
139
|
|
|
176
|
-
## Red flags — stop and re-plan the partition
|
|
177
|
-
|
|
178
|
-
- A subagent brief can't be written without referencing another unit → not independent; re-partition.
|
|
179
|
-
- Two units both need to edit the same file / migration / barrel / type → collapse them into one serial unit.
|
|
180
|
-
- Subagents are asking to "sync up" mid-run → the contract wasn't frozen; stop, freeze it, re-dispatch.
|
|
181
|
-
- The combined suite is red after merge → the seam leaked; `debug` before continuing, don't checkpoint as done.
|
|
182
|
-
- More open subagents than you can actually review → over-fanned; reduce the degree of parallelism.
|
|
183
|
-
|
|
184
|
-
## Checklist (copy per fan-out)
|
|
185
|
-
|
|
186
|
-
```text
|
|
187
|
-
- [ ] PARTITION: independence test passed for every pair; batches + serial spine written down
|
|
188
|
-
- [ ] Shared contracts/types/schemas FROZEN in the serial spine before dispatch
|
|
189
|
-
- [ ] DISPATCH: one self-contained brief per unit (scope, goal, done-check, constraints, report-back)
|
|
190
|
-
- [ ] Each brief includes selected skills, compact rules, and fallback behavior from registry
|
|
191
|
-
- [ ] Each unit honors the constitution + its stack skill; TDD stays inside the unit
|
|
192
|
-
- [ ] GATHER: all units reported; each checked against its done-check BEFORE merge
|
|
193
|
-
- [ ] GATHER: each unit returned skill_resolution (used/missing/fallback/compact_rules)
|
|
194
|
-
- [ ] RECONCILE: merged, conflicts resolved by hand, decision logs folded into 02-DOCS
|
|
195
|
-
- [ ] Combined suite run across the merged result and GREEN (not just green-in-isolation)
|
|
196
|
-
- [ ] Result handed back to the calling phase (usually implement → verify)
|
|
197
|
-
```
|
|
198
|
-
|
|
199
140
|
## Result envelope
|
|
200
141
|
|
|
201
142
|
End with:
|
|
@@ -218,17 +159,10 @@ End with:
|
|
|
218
159
|
}
|
|
219
160
|
```
|
|
220
161
|
|
|
221
|
-
## What this skill is NOT
|
|
222
|
-
|
|
223
|
-
- **Not the TDD loop.** Each unit's red → green → refactor stays inside `implement`. This skill runs several of those at once; it does not replace the discipline within one.
|
|
224
|
-
- **Not git isolation.** Creating a branch or worktree to work cleanly is `worktrees`. This skill is concurrency across disjoint work, not a clean room for one stream.
|
|
225
|
-
- **Not the task breakdown.** Producing the ordered task list with done-checks is `tasks`; `parallel` consumes that list and decides which pieces can run together.
|
|
226
|
-
- **Not the debugger.** When the combined suite goes red at the seam, switch to `debug` — don't guess which unit to blame.
|
|
227
|
-
|
|
228
162
|
## Where you are in the chain
|
|
229
163
|
|
|
230
164
|
`parallel` is on-demand, callable from any phase but most often from `implement`:
|
|
231
165
|
|
|
232
166
|
`constitution` → `specify` → `clarify` → `plan` → `tasks` → `analyze` → **implement** → `verify` → `review` → `ship`, with `debug` · `worktrees` · **parallel** callable on demand.
|
|
233
167
|
|
|
234
|
-
**Next:** when the fan-out is reconciled and the combined suite is green, return to the phase that called you — usually `../implement/SKILL.md`, continuing the task list toward `../verify/SKILL.md`. If the seam is red, go to `debug` first. If
|
|
168
|
+
**Next:** when the fan-out is reconciled and the combined suite is green, return to the phase that called you — usually `../implement/SKILL.md`, continuing the task list toward `../verify/SKILL.md`. If the seam is red, go to `debug` first. If the ordered task list with done-checks does not exist yet, that is `tasks`, not this. If what you actually needed was an isolated branch rather than concurrency, that's `worktrees`.
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when an approved, clarified spec must become a technical blueprint before any code — the SDD phase between clarify and tasks: architecture, contracts, data flow, testing strategy, sequencing and risks, at structure altitude, never framework syntax. NOT the what/why spec (that is `specify`), NOT the ambiguity sweep (that is `clarify`), NOT the task breakdown (that is `tasks`), NOT the code (that is `implement`)."
|
|
4
4
|
tags: [sdd, plan, design]
|
|
5
5
|
recommends: [tasks]
|
|
6
6
|
profiles: [core, full]
|
|
@@ -9,213 +9,140 @@ origin: risco
|
|
|
9
9
|
|
|
10
10
|
# Plan — the technical blueprint between spec and tasks
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`plan` sits fourth in the SDD chain:
|
|
12
|
+
The spec says **what** and **why**. `plan` decides **how**: the components, the contracts between
|
|
13
|
+
them, the data that flows, how each claim gets proven, and what is most likely to bite. It reads the
|
|
14
|
+
clarified spec and the constitution, writes ONE artifact — `02-DOCS/wiki/sdd/plans/<slug>.md` — and
|
|
15
|
+
hands off to `tasks`, which slices it into an ordered, independently-verifiable checklist.
|
|
18
16
|
|
|
19
17
|
```text
|
|
20
18
|
constitution → specify → clarify → [ plan ] → tasks → analyze → implement → verify → review → ship
|
|
21
19
|
```
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
`02-DOCS/wiki/sdd/plans/<slug>.md` — and hands off to `tasks`, which slices that plan into an
|
|
25
|
-
ordered, independently-verifiable checklist.
|
|
26
|
-
|
|
27
|
-
## The one rule that defines this phase
|
|
21
|
+
## Decide structure, not syntax
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`reserve(cartId) → Reservation` operation, transactional, idempotent on cartId"*; the stack skill
|
|
35
|
-
later decides whether that's a POST handler with a Pydantic model or a Go method on a struct.
|
|
23
|
+
A plan names components, contracts, shapes and flows. It does not write the framework's route
|
|
24
|
+
decorators, the ORM's session boilerplate or the test runner's flags — those are stack mechanics,
|
|
25
|
+
owned by the stack skill (`../fastapi/SKILL.md`, `../nextjs/SKILL.md`, `../go/SKILL.md`,
|
|
26
|
+
`../flutter/SKILL.md`, `../postgresdb/SKILL.md`) at `implement` time. This altitude is what makes a
|
|
27
|
+
plan reviewable against intent and slice-able by `tasks`; drop it and you get code no one approved.
|
|
36
28
|
|
|
37
|
-
|
|
29
|
+
```text
|
|
30
|
+
reservation.reserve(cartId: CartId) -> Reservation | OutOfStock | CartNotFound
|
|
31
|
+
- idempotent on cartId (calling twice returns the same Reservation)
|
|
32
|
+
- holds stock for 15 min, then auto-releases
|
|
33
|
+
- never partially reserves: all lines or none
|
|
34
|
+
```
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
That is the altitude. The stack skill later decides whether it becomes a POST handler with a
|
|
37
|
+
Pydantic model or a Go method on a struct — it can, because the contract is unambiguous.
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
## Entry gate
|
|
42
40
|
|
|
43
|
-
1. **
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
2. **
|
|
48
|
-
to plan from; route to `../specify/SKILL.md`. If it still carries `[NEEDS CLARIFICATION]` markers
|
|
49
|
-
or open questions, STOP — route to `../clarify/SKILL.md`. **A plan built on an unclarified spec
|
|
50
|
-
is a guess wearing a diagram.**
|
|
51
|
-
3. **Read the constitution.** `02-DOCS/wiki/sdd/constitution.md` holds the project's non-negotiables
|
|
41
|
+
1. **The spec** — `02-DOCS/wiki/sdd/specs/<slug>.md`. Missing → STOP, route to
|
|
42
|
+
`../specify/SKILL.md`. Still carrying `[NEEDS CLARIFICATION]` markers or open questions → STOP,
|
|
43
|
+
route to `../clarify/SKILL.md`. A plan built on an unclarified spec is a guess wearing a diagram,
|
|
44
|
+
and every phase downstream inherits the guess.
|
|
45
|
+
2. **The constitution** — `02-DOCS/wiki/sdd/constitution.md` holds the project's non-negotiables
|
|
52
46
|
(stack canon, quality bars, conventions). Every architectural choice must be consistent with it;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Only when the spec is present and clarified do you plan.
|
|
47
|
+
where the design needs to bend a principle, say so with a reason instead of bending it silently.
|
|
48
|
+
3. **The Knowledge map** — `02-DOCS/wiki/index.md` points at `02-DOCS/wiki/stack/*` and prior
|
|
49
|
+
plans/decisions. Reusing what the project already settled is the difference between a plan and
|
|
50
|
+
scope drift.
|
|
51
|
+
4. **The dial** — `02-DOCS/wiki/harness/user-profile.md` (see below).
|
|
59
52
|
|
|
60
53
|
## What a plan contains
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
The sections of the artifact, in order; fill them top-down, later ones lean on earlier ones. The
|
|
56
|
+
fill-in skeleton with per-section guidance is `references/plan-template.md` — use it verbatim.
|
|
64
57
|
|
|
65
|
-
|
|
|
58
|
+
| § | Section | The question it answers |
|
|
66
59
|
| --- | --- | --- |
|
|
67
|
-
|
|
|
60
|
+
| 0 | Global constraints | Which exact values must every task honor? (verbatim, not paraphrased — a context-isolated implementer and its reviewer see nothing else) |
|
|
61
|
+
| 1 | Context & constraints | Which spec/constitution facts pin this design down? Cite (`spec §Acceptance #3`), don't re-paste |
|
|
68
62
|
| 2 | Architecture | What are the components and how do they fit together? |
|
|
69
|
-
| 3 | Interfaces & contracts | What does each component promise
|
|
63
|
+
| 3 | Interfaces & contracts | What does each component promise the others? |
|
|
70
64
|
| 4 | Data model & flow | What data exists, where it lives, how it moves and changes? |
|
|
71
65
|
| 5 | Testing strategy | How will we *prove* each part does what it claims? |
|
|
72
66
|
| 6 | Sequencing & dependencies | In what order can this be built and verified? |
|
|
73
|
-
| 7 | Risks & open decisions | What is most likely to be wrong, and what
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
| 7 | Risks & open decisions | What is most likely to be wrong, and what is still undecided? |
|
|
68
|
+
|
|
69
|
+
Three of them carry the weight and fail quietly:
|
|
70
|
+
|
|
71
|
+
- **§2 Architecture** — a box-and-arrow diagram, one sentence of single responsibility per
|
|
72
|
+
component, internal vs. external marked (the arrows are the seams you will test and parallelize).
|
|
73
|
+
State the **one** decision that matters most — sync vs. async, split service vs. monolith, read
|
|
74
|
+
model vs. single table — and defend it against a constraint from §1. If two designs are genuinely
|
|
75
|
+
viable, give both, the trade-off, *and* your recommendation; leaving the reader to choose is not a
|
|
76
|
+
plan.
|
|
77
|
+
- **§5 Testing strategy** — per acceptance criterion: the level that proves it (unit / contract /
|
|
78
|
+
integration / e2e), what it asserts, what it fakes to stay fast. Deciding this before code exists
|
|
79
|
+
is what makes `implement`'s TDD possible. You choose the seams; the stack skill owns the tooling.
|
|
80
|
+
- **§7 Risks** — ranked, each with trigger, impact, and the mitigation or spike that retires it. A
|
|
81
|
+
plan claiming zero risk is the riskiest one. Significant decisions taken while planning also get
|
|
82
|
+
appended to `02-DOCS/wiki/sdd/decisions.md`, so later phases can trace the *why*.
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Name the components and draw the relationship — a small box-and-arrow diagram in a fenced block,
|
|
89
|
-
plus a sentence per component stating its single responsibility. Mark each component's boundary:
|
|
90
|
-
what's inside the system you're building vs. an external dependency. Show where the seams are,
|
|
91
|
-
because the seams are where you'll test, mock, and parallelize later.
|
|
92
|
-
|
|
93
|
-
```text
|
|
94
|
-
[ client ] --HTTP--> [ api: orders ] --calls--> [ svc: reservation ]
|
|
95
|
-
| |
|
|
96
|
-
v v
|
|
97
|
-
[ db: orders ] [ external: payments ]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
State the **one** architectural decision that matters most and why you made it (sync vs. async,
|
|
101
|
-
monolith vs. split service, read model vs. single table). One real decision, defended, beats five
|
|
102
|
-
hedged ones. If two designs are genuinely viable, present both with the trade-off and a
|
|
103
|
-
recommendation matched to the constitution — don't leave the reader to guess which you'd ship.
|
|
104
|
-
|
|
105
|
-
### 3. Interfaces & contracts
|
|
106
|
-
|
|
107
|
-
For each seam in the architecture, define the contract at the **shape** level, not the
|
|
108
|
-
implementation: the operation name, its inputs and outputs, its error modes, and its invariants
|
|
109
|
-
(idempotent? transactional? ordered?). This is where most integration bugs are prevented or born.
|
|
110
|
-
|
|
111
|
-
```text
|
|
112
|
-
reservation.reserve(cartId: CartId) -> Reservation | OutOfStock | CartNotFound
|
|
113
|
-
- idempotent on cartId (calling twice returns the same Reservation)
|
|
114
|
-
- holds stock for 15 min, then auto-releases
|
|
115
|
-
- never partially reserves: all lines or none
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Keep it language-neutral. The stack skill turns this into a typed signature, a route, or an
|
|
119
|
-
interface later — and it will, because you gave it an unambiguous contract.
|
|
120
|
-
|
|
121
|
-
### 4. Data model & flow
|
|
122
|
-
|
|
123
|
-
Name the entities, their key fields, and their relationships — again at the model level, not DDL.
|
|
124
|
-
Then trace the **flow**: for the primary scenario in the spec, follow one request from entry to
|
|
125
|
-
persistence and back, naming what reads and writes each store. Call out the consistency boundaries
|
|
126
|
-
(what's transactional together, what's eventually consistent) and the migration impact (new table?
|
|
127
|
-
new column? backfill?). Concrete schema, indexes, and migration mechanics → `../postgresdb/SKILL.md`.
|
|
128
|
-
|
|
129
|
-
### 5. Testing strategy
|
|
130
|
-
|
|
131
|
-
Decide *how each claim in the spec gets proven* before any code exists — this is what makes
|
|
132
|
-
`implement`'s TDD discipline possible. For each acceptance criterion, name the level that proves it
|
|
133
|
-
(unit / contract / integration / e2e), what the test asserts, and what it has to fake to stay fast.
|
|
134
|
-
You are choosing the *strategy* (which seams to test, what to mock, where the e2e line is); the
|
|
135
|
-
stack skill owns the *tooling* (the runner, the fixtures, the assertion library). A plan whose
|
|
136
|
-
testing section is "we'll add tests" has no testing strategy — name the levels and the seams.
|
|
137
|
-
|
|
138
|
-
### 6. Sequencing & dependencies
|
|
139
|
-
|
|
140
|
-
Order the work so each step is independently verifiable and the dependency graph is explicit. Mark
|
|
141
|
-
which steps are independent (candidates for fan-out via the `parallel` phase when it's available)
|
|
142
|
-
and which must be serial. This section is the bridge to `tasks`: a clean sequence here becomes a
|
|
143
|
-
clean task list there.
|
|
144
|
-
|
|
145
|
-
### 7. Risks & open decisions
|
|
84
|
+
## The artifact
|
|
146
85
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
(
|
|
150
|
-
|
|
151
|
-
`02-DOCS/wiki/sdd/decisions.md` (the SDD decisions log), so later phases can trace the *why*.
|
|
86
|
+
Write `02-DOCS/wiki/sdd/plans/<slug>.md`, `<slug>` matching the spec's slug exactly — one plan per
|
|
87
|
+
spec, same name, because that is how `tasks`, `analyze` and `implement` find it. Then index it in
|
|
88
|
+
`02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a pointer). If a plan for
|
|
89
|
+
this slug already exists, update it in place and note what changed — never fork a `-v2`.
|
|
152
90
|
|
|
153
91
|
## Model tier — `heavy` (opt-in routing)
|
|
154
92
|
|
|
155
|
-
|
|
93
|
+
Architecture, interfaces, data flow and risk are the heaviest reasoning in the chain, so this
|
|
94
|
+
phase's default tier is **`heavy`**. Routing is off unless `models.enabled: true` in
|
|
95
|
+
`02-DOCS/wiki/sdd/config.yaml`; the resolution order, the announce rule and the model table live in
|
|
96
|
+
`../sdd/references/model-routing.md`. Routing off or no profile → session model, silently.
|
|
156
97
|
|
|
157
98
|
## Adapting to the dial
|
|
158
99
|
|
|
159
|
-
|
|
100
|
+
The accompaniment level in `02-DOCS/wiki/harness/user-profile.md` (owned by `../init/SKILL.md`)
|
|
101
|
+
changes how much you *say*, never whether a section exists. Even at L0 the plan is complete; it is
|
|
102
|
+
just quiet.
|
|
160
103
|
|
|
161
104
|
| Level | How `plan` behaves |
|
|
162
105
|
| --- | --- |
|
|
163
|
-
| **L0** | Terse plan
|
|
106
|
+
| **L0** | Terse plan, no narration in chat — write the file, point to it. |
|
|
164
107
|
| **L1** | Same artifact, one line of *why* on the top architectural decision. |
|
|
165
|
-
| **L2** | Justify each significant design choice in the artifact; surface trade-offs
|
|
166
|
-
| **L3** |
|
|
167
|
-
|
|
168
|
-
The dial changes how much you *say*, never whether the seven sections exist. Even at L0 the plan is
|
|
169
|
-
complete; it's just quiet.
|
|
170
|
-
|
|
171
|
-
## The artifact
|
|
172
|
-
|
|
173
|
-
Write to `02-DOCS/wiki/sdd/plans/<slug>.md`, where `<slug>` matches the spec's slug exactly (one
|
|
174
|
-
plan per spec, same name — that's how `tasks`, `analyze`, and `implement` find it). Use
|
|
175
|
-
`references/plan-template.md` verbatim as the skeleton. Then index it in `02-DOCS/wiki/index.md`
|
|
176
|
-
(the Knowledge map; root `CLAUDE.md` keeps only a short pointer) pointing at the new plan, so the harness wiki and
|
|
177
|
-
every later phase can find it. If a plan for this slug already exists, update it in place and note
|
|
178
|
-
what changed — don't fork a `-v2`.
|
|
108
|
+
| **L2** | Justify each significant design choice in the artifact; surface the trade-offs weighed. |
|
|
109
|
+
| **L3** | Walk a non-technical user through the architecture in plain language, define terms inline, and ask about constraints you cannot infer — one focused question at a time. |
|
|
179
110
|
|
|
180
|
-
## Anti-patterns
|
|
111
|
+
## Anti-patterns
|
|
181
112
|
|
|
182
|
-
|
|
|
113
|
+
| Anti-pattern | Why it fails / the fix |
|
|
183
114
|
| --- | --- |
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
193
|
-
## When NOT to use
|
|
194
|
-
|
|
195
|
-
- Capturing what to build and why, from a fuzzy idea → `../specify/SKILL.md`.
|
|
196
|
-
- Removing ambiguity / edge cases from an existing spec → `../clarify/SKILL.md`.
|
|
197
|
-
- Slicing an approved plan into an ordered task checklist → `../tasks/SKILL.md`.
|
|
198
|
-
- Concrete framework/ORM/test-runner mechanics → the relevant stack skill
|
|
199
|
-
(`../fastapi/SKILL.md`, `../nextjs/SKILL.md`, `../go/SKILL.md`, `../flutter/SKILL.md`,
|
|
200
|
-
`../postgresdb/SKILL.md`).
|
|
201
|
-
- Project-wide non-negotiables (stack canon, quality bars) → `../constitution/SKILL.md`.
|
|
115
|
+
| Writing the real code in the plan "because it's faster" | You dropped an altitude. Syntax is the stack skill's job at `implement`. Pull back to contracts. |
|
|
116
|
+
| Planning around a spec that is "a bit fuzzy but I get the gist" | A plan on an unclarified spec is a guess. STOP, route to `clarify`, then plan. |
|
|
117
|
+
| Testing strategy = "we'll write tests" | Not a strategy. Name the level per acceptance criterion and what each test fakes. |
|
|
118
|
+
| Keeping risks short because they read negative | The plan that claims no risk is the riskiest. Rank the real ones, give each a mitigation. |
|
|
119
|
+
| Picking the framework, ORM and config here | Stack canon lives in the constitution; mechanics live in the stack skill. Stay above the seam. |
|
|
120
|
+
| Listing two designs and letting the reader choose | Decide. Alternatives ship only with a trade-off and a recommendation matched to the constitution. |
|
|
121
|
+
| One big undifferentiated sequencing step | Then `tasks` cannot slice it and nothing is independently verifiable. Order it into checkable steps. |
|
|
122
|
+
| Starting a fresh plan when one exists for the slug | Forked plans rot and later phases read the wrong one. Update in place, note the change. |
|
|
202
123
|
|
|
203
124
|
## Always propose isolation before the build
|
|
204
125
|
|
|
205
|
-
Once the plan is written, **always propose isolating the work in a git worktree/branch** before
|
|
206
|
-
|
|
126
|
+
Once the plan is written, **always propose isolating the work in a git worktree/branch** before any
|
|
127
|
+
code is implemented — every feature, not just the risky ones. One line, calibrated to the dial:
|
|
207
128
|
|
|
208
129
|
> *"Antes de implementar, ¿aíslo este trabajo en un worktree/rama propia (`../worktrees/SKILL.md`)
|
|
209
130
|
> para no tocar tu rama actual? (recomendado)"*
|
|
210
131
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
132
|
+
Accepted → hand to `../worktrees/SKILL.md` first. Declined → note it and continue. Already on the
|
|
133
|
+
default branch (`main`/`master`) → isolation is **not** optional: say so and route to `worktrees`
|
|
134
|
+
regardless. (`implement` re-checks this as a hard gate before its first commit.)
|
|
135
|
+
|
|
136
|
+
## When NOT to use
|
|
137
|
+
|
|
138
|
+
- Fuzzy idea, no spec yet → `../specify/SKILL.md`; ambiguity in an existing spec →
|
|
139
|
+
`../clarify/SKILL.md`; project-wide non-negotiables → `../constitution/SKILL.md`.
|
|
140
|
+
- Slicing an approved plan into an ordered checklist → `../tasks/SKILL.md`.
|
|
141
|
+
- Concrete framework/ORM/test-runner mechanics → the stack skill (`../fastapi/SKILL.md`,
|
|
142
|
+
`../nextjs/SKILL.md`, `../go/SKILL.md`, `../flutter/SKILL.md`, `../postgresdb/SKILL.md`).
|
|
215
143
|
|
|
216
144
|
## Next in the chain
|
|
217
145
|
|
|
218
146
|
Plan written, indexed, decisions logged → propose isolation (above), then hand off to
|
|
219
|
-
**`../tasks/SKILL.md`**, which turns
|
|
220
|
-
|
|
221
|
-
loop back to **`../clarify/SKILL.md`** before tasking.
|
|
147
|
+
**`../tasks/SKILL.md`**, which turns §6 into an ordered task list with a done-check per task. If
|
|
148
|
+
planning surfaced an ambiguity the spec never resolved, loop back to **`../clarify/SKILL.md`** first.
|