@houseofwolvesllc/claude-scrum-skill 1.6.0 → 1.7.1
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 +84 -16
- package/package.json +4 -1
- package/skills/project-orchestrate/SKILL.md +54 -10
- package/skills/project-scaffold/SKILL.md +352 -6
- package/skills/shared/config.json +6 -1
- package/skills/shared/references/CONVENTIONS.md +44 -0
- package/skills/shared/templates/ADR-template.md +36 -0
- package/skills/shared/templates/CONTEXT-template.md +96 -0
package/README.md
CHANGED
|
@@ -60,7 +60,23 @@ PRD (optional) --> /project-orchestrate
|
|
|
60
60
|
|
|
61
61
|
## Installation
|
|
62
62
|
|
|
63
|
-
###
|
|
63
|
+
### npm (recommended)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Global install — available in all projects
|
|
67
|
+
npm install -g @houseofwolvesllc/claude-scrum-skill
|
|
68
|
+
|
|
69
|
+
# Local install — this project only
|
|
70
|
+
npm install @houseofwolvesllc/claude-scrum-skill
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Global install copies skills to `~/.claude/skills/`. Local install copies them to `<project>/.claude/skills/` and adds `.claude-scrum-skill` to your `.gitignore`.
|
|
74
|
+
|
|
75
|
+
Skills surface in Claude Code with their plain names: `/project-scaffold`, `/project-orchestrate`, `/sprint-plan`, etc.
|
|
76
|
+
|
|
77
|
+
> **Heads-up on re-installs:** the postinstall script overwrites every file under `<install-dir>/skills/` with the package's shipped version. If you've customized `<install-dir>/skills/shared/config.json` (e.g., changed `paths.specs` or `paths.adr`), back it up before re-running `npm install` and restore your values afterward. Skill files outside the shipped set are left alone — only files that exist in the package are overwritten.
|
|
78
|
+
|
|
79
|
+
### Claude Code Plugin (alternative)
|
|
64
80
|
|
|
65
81
|
```
|
|
66
82
|
/plugin marketplace add houseofwolvesllc/claudescrumskill
|
|
@@ -73,22 +89,14 @@ This installs all skills as a native Claude Code plugin with automatic updates.
|
|
|
73
89
|
/plugin marketplace update
|
|
74
90
|
```
|
|
75
91
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# Global install — available in all projects
|
|
80
|
-
npm install -g @houseofwolvesllc/claude-scrum-skill
|
|
81
|
-
|
|
82
|
-
# Local install — this project only
|
|
83
|
-
npm install @houseofwolvesllc/claude-scrum-skill
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Global install copies skills to `~/.claude/skills/`. Local install copies them to `<project>/.claude/skills/` and adds `.claude-scrum-skill` to your `.gitignore`.
|
|
92
|
+
> **Important difference from npm install:** Claude Code namespaces plugin-installed skills with the marketplace identifier to prevent collisions between plugins. Skills surface as `/@houseofwolvesllc/project-scaffold`, `/@houseofwolvesllc/project-orchestrate`, etc. — **not** as `/project-scaffold` and `/project-orchestrate`. If you prefer the plain names, use the npm install path above; if you prefer the marketplace UI for discovery and updates, use this path and live with the namespace.
|
|
87
93
|
|
|
88
94
|
### Manual
|
|
89
95
|
|
|
90
96
|
Clone the repo and copy the `skills/` contents into `~/.claude/skills/` (global) or `<project>/.claude/skills/` (per-project). All skill directories must be siblings under the same parent, with `shared/` alongside them — skills reference `../shared/references/` via relative paths.
|
|
91
97
|
|
|
98
|
+
The manual path produces the same plain-name UX as npm install (both bypass the plugin layer's namespacing), but you forfeit automatic updates.
|
|
99
|
+
|
|
92
100
|
> **Note:** After installing, restart Claude Code for the skills to become available.
|
|
93
101
|
|
|
94
102
|
---
|
|
@@ -103,7 +111,12 @@ All configuration lives in `skills/shared/config.json`:
|
|
|
103
111
|
"paths": {
|
|
104
112
|
"specs": ".claude-scrum-skill/specs",
|
|
105
113
|
"adr": ".claude-scrum-skill/adr",
|
|
106
|
-
"backlog": ".claude-scrum-skill/backlog"
|
|
114
|
+
"backlog": ".claude-scrum-skill/backlog",
|
|
115
|
+
"context": ".claude-scrum-skill/context"
|
|
116
|
+
},
|
|
117
|
+
"scaffold": {
|
|
118
|
+
"two_pass_threshold_words": 5000,
|
|
119
|
+
"design_spike_enabled": true
|
|
107
120
|
},
|
|
108
121
|
"jira": {
|
|
109
122
|
"project_key": ""
|
|
@@ -123,6 +136,40 @@ All configuration lives in `skills/shared/config.json`:
|
|
|
123
136
|
| `jira` | Jira Cloud issues, epics, and sprints | Env vars |
|
|
124
137
|
| `trello` | Trello boards, lists, and cards | Env vars |
|
|
125
138
|
|
|
139
|
+
### Two-Pass Mode
|
|
140
|
+
|
|
141
|
+
For large PRDs, `/project-scaffold` automatically switches from single-pass to **two-pass** scaffolding. Pass 1 extracts only the epic skeleton (one agent reads the whole PRD); Pass 2 spawns one focused subagent per epic to elaborate that epic's stories. Per-epic context stays tight regardless of PRD size, so the last epic's stories are as well-specified as the first.
|
|
142
|
+
|
|
143
|
+
**Triggers** (first match wins):
|
|
144
|
+
|
|
145
|
+
1. PRD frontmatter `scaffold_mode: single-pass | two-pass` (explicit override)
|
|
146
|
+
2. CLI flag `--mode single-pass | two-pass`
|
|
147
|
+
3. PRD word count exceeds `scaffold.two_pass_threshold_words` (default `5000`)
|
|
148
|
+
|
|
149
|
+
If Pass 1 finds ≤ 2 epics, scaffolding auto-downgrades to single-pass elaboration since the two-pass overhead isn't justified at that scale. Failures retry once and degrade gracefully — Pass 1 falls back to single-pass; Pass 2 marks the affected epic's stories `needs-context` and lets sibling subagents continue.
|
|
150
|
+
|
|
151
|
+
The chosen mode and reasoning are announced before scaffolding begins, so you always know why a given path was taken.
|
|
152
|
+
|
|
153
|
+
### Design-Spike Epic
|
|
154
|
+
|
|
155
|
+
When `/project-scaffold` runs two-pass on a multi-epic PRD, it auto-injects a research-driven **design-spike epic** at the head of the project. This epic's stories (all `persona: research`) produce:
|
|
156
|
+
|
|
157
|
+
- One foundational **ADR** at `<paths.adr>/NNNN-<slug>.md`
|
|
158
|
+
- One per-implementation-epic **CONTEXT.md** at `<paths.context>/<epic-slug>/CONTEXT.md`
|
|
159
|
+
|
|
160
|
+
Implementation epics are gated on the design-spike epic via the existing `blocked_by` mechanism, so no implementation story enters a sprint until its CONTEXT.md exists. During execution, `/project-orchestrate` subagents read `CONTEXT.md` in addition to `CLAUDE.md` before writing code — its naming, file layout, types, and patterns sections override generic CLAUDE.md conventions for that epic. This gives every parallel subagent a shared anchor, eliminating the cross-story drift that otherwise compounds before the sprint review gate.
|
|
161
|
+
|
|
162
|
+
**Triggers** (first match wins):
|
|
163
|
+
|
|
164
|
+
1. PRD frontmatter `design_spike: true | false`
|
|
165
|
+
2. CLI flag `--design-spike | --no-design-spike`
|
|
166
|
+
3. `scaffold.design_spike_enabled` config (default `true`)
|
|
167
|
+
4. Auto-trigger: two-pass mode + > 1 implementation epic
|
|
168
|
+
|
|
169
|
+
Artifacts are committed to the `development` branch via the filesystem in **all** backends — git is the universal substrate. Remote backends may surface links via milestone/epic descriptions but the committed files are the single source of truth.
|
|
170
|
+
|
|
171
|
+
Detection signal is the `type:design-spike` label (GitHub/Trello/Jira) or `epic_type: design-spike` frontmatter field (local). The default epic title is "Architecture & Design" but the title is not load-bearing.
|
|
172
|
+
|
|
126
173
|
### Configurable Paths
|
|
127
174
|
|
|
128
175
|
| Path | Default | Purpose |
|
|
@@ -130,9 +177,17 @@ All configuration lives in `skills/shared/config.json`:
|
|
|
130
177
|
| `paths.specs` | `.claude-scrum-skill/specs` | Spec documents from `/spec` |
|
|
131
178
|
| `paths.adr` | `.claude-scrum-skill/adr` | Architecture Decision Records |
|
|
132
179
|
| `paths.backlog` | `.claude-scrum-skill/backlog` | Local backlog files (local mode only) |
|
|
180
|
+
| `paths.context` | `.claude-scrum-skill/context` | Per-epic CONTEXT.md files produced by the design-spike epic |
|
|
133
181
|
|
|
134
182
|
To check these files into version control (e.g., `docs/adr`), change the path and it won't be covered by the `.gitignore` entry for `.claude-scrum-skill`.
|
|
135
183
|
|
|
184
|
+
### Scaffolding Behavior
|
|
185
|
+
|
|
186
|
+
| Key | Default | Purpose |
|
|
187
|
+
|-----|---------|---------|
|
|
188
|
+
| `scaffold.two_pass_threshold_words` | `5000` | PRD word count above which two-pass scaffolding auto-triggers |
|
|
189
|
+
| `scaffold.design_spike_enabled` | `true` | Global enable switch for the design-spike pre-epic |
|
|
190
|
+
|
|
136
191
|
---
|
|
137
192
|
|
|
138
193
|
## Quick Start
|
|
@@ -141,6 +196,18 @@ To check these files into version control (e.g., `docs/adr`), change the path an
|
|
|
141
196
|
|
|
142
197
|
1. **Write a PRD** — Create a markdown file describing your project, epics, and stories.
|
|
143
198
|
|
|
199
|
+
Optionally include YAML frontmatter to override the auto-detected scaffolding behavior:
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
---
|
|
203
|
+
title: My Project
|
|
204
|
+
scaffold_mode: two-pass # force two-pass even for a small PRD
|
|
205
|
+
design_spike: false # suppress the design-spike epic even when triggered
|
|
206
|
+
---
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Both fields are optional — omit them to use the word-count heuristic and the auto-injection rules described in [Two-Pass Mode](#two-pass-mode) and [Design-Spike Epic](#design-spike-epic).
|
|
210
|
+
|
|
144
211
|
2. **Scaffold the project:**
|
|
145
212
|
```
|
|
146
213
|
/project-scaffold path/to/prd.md
|
|
@@ -320,9 +387,9 @@ During sprint planning, personas are assigned automatically based on story label
|
|
|
320
387
|
|
|
321
388
|
### Phase 1 — Epic Completion Loop
|
|
322
389
|
|
|
323
|
-
1. Scaffolds the PRD (if provided) or reads existing backlog
|
|
324
|
-
2. Plans sprints via `/sprint-plan`
|
|
325
|
-
3. Executes `executor:claude` stories in parallel via subagents with persona routing
|
|
390
|
+
1. Scaffolds the PRD (if provided) or reads existing backlog. On large or multi-epic PRDs, scaffolding runs in [two-pass mode](#two-pass-mode) and auto-injects a [design-spike epic](#design-spike-epic) at position 0
|
|
391
|
+
2. Plans sprints via `/sprint-plan` — the design-spike epic (when present) executes first, producing the ADR and per-epic `CONTEXT.md` files that seed the implementation epics
|
|
392
|
+
3. Executes `executor:claude` stories in parallel via subagents with persona routing — implementation subagents read their epic's `CONTEXT.md` in addition to `CLAUDE.md` before writing code
|
|
326
393
|
4. Releases via `/sprint-release`
|
|
327
394
|
5. Runs automated review gate (using the `review` persona)
|
|
328
395
|
6. Merges to `development` and cleans up branches
|
|
@@ -404,6 +471,7 @@ skills/shared/
|
|
|
404
471
|
- **Run `/project-cleanup --fix` after major changes** to enforce build/lint cleanliness and test coverage.
|
|
405
472
|
- **Chunk large epics** into multiple sprints for natural review gates.
|
|
406
473
|
- **Jira/Trello users:** If no project key or board ID is configured, `/project-scaffold` creates one automatically (Scrum template for Jira).
|
|
474
|
+
- **Author large PRDs with explicit architectural intent.** Sections describing shared types, naming conventions, file layout boundaries, and cross-cutting patterns give the [design-spike epic](#design-spike-epic) concrete material to lift into the project's foundational ADR and per-epic `CONTEXT.md` files — the better your PRD spells these out, the more consistent your parallel implementation subagents will be.
|
|
407
475
|
|
|
408
476
|
---
|
|
409
477
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@houseofwolvesllc/claude-scrum-skill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Claude Code skills for scrum project management — PRD to production release pipeline with project scaffolding, sprint planning, status tracking, sprint releases, full-project emulation testing, autonomous orchestration, and project cleanup.",
|
|
5
5
|
"bin": {},
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
6
9
|
"scripts": {
|
|
7
10
|
"postinstall": "node bin/install.js"
|
|
8
11
|
},
|
|
@@ -11,8 +11,8 @@ Fully autonomous project lifecycle driver. Plans sprints, executes stories via p
|
|
|
11
11
|
|
|
12
12
|
## Before You Start
|
|
13
13
|
|
|
14
|
-
1. Read `../shared/references/CONVENTIONS.md` for all project management standards. Follow these conventions exactly.
|
|
15
|
-
2. Read `../shared/config.json` to determine the scaffolding mode (`scaffolding` key: `"local"`, `"github"`, `"jira"`, or `"trello"`, default: `"local"`). If `"local"`, also read the `paths.backlog`
|
|
14
|
+
1. Read `../shared/references/CONVENTIONS.md` for all project management standards. Follow these conventions exactly. Pay particular attention to **Epic Structure → Design-Spike Epic** — orchestration honors the design-spike epic's gating, so implementation work in a scoped run does not begin until the design-spike epic completes.
|
|
15
|
+
2. Read `../shared/config.json` to determine the scaffolding mode (`scaffolding` key: `"local"`, `"github"`, `"jira"`, or `"trello"`, default: `"local"`). If `"local"`, also read the `paths.backlog` and `paths.context` values (`paths.context` defaults to `.claude-scrum-skill/context` and is where Step 3 subagents look for per-epic CONTEXT.md files). Read `../shared/references/PROVIDERS.md` for provider-specific API commands when using a remote provider.
|
|
16
16
|
3. Read the project's `CLAUDE.md` (if it exists) for project-specific rules. **All subagents you spawn must also read and follow `CLAUDE.md`** — include this instruction explicitly in every subagent prompt.
|
|
17
17
|
4. Read `../shared/references/PERSONAS.md` for role preambles. When spawning
|
|
18
18
|
subagents, select the persona matching each story's `persona:*` label (GitHub mode)
|
|
@@ -40,6 +40,24 @@ The following actions are NEVER authorized:
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
+
## Default Operating Mode
|
|
44
|
+
|
|
45
|
+
Run autonomously on invocation. Standing Authorizations cover the normal lifecycle — proceed under them without asking.
|
|
46
|
+
|
|
47
|
+
**No pre-flight audits.** Don't list concerns and present a menu of options before starting. Pick the spec's literal intent and go. Surface defects in execution output as you encounter them, not as pre-execution gates. Asking "which option do you want?" before executing is itself a violation of autonomous mode.
|
|
48
|
+
|
|
49
|
+
**Phase 2 (Emulation) and Phase 3 (Cleanup) always run.** Mandatory on every orchestration regardless of how small or clean the Phase 1 change set looks. For projects with no traditional toolchain (e.g., a markdown-only repo), Phase 3 reports SKIP/PASS — that is the correct outcome, not a reason to omit the phase.
|
|
50
|
+
|
|
51
|
+
**State file is automatic.** `Status: running` or `paused` → resume from the recorded position. `Status: completed` → rename to `orchestration-state.previous.md` and start a fresh run. Missing → initialize a new file. Never prompt.
|
|
52
|
+
|
|
53
|
+
**Scaffolding decisions fire per their own trigger logic.** Two-pass mode and design-spike epic injection live in `project-scaffold/SKILL.md` (Mode Detection, Design-Spike Epic). The orchestrator does NOT add a separate confirmation prompt on top of those triggers.
|
|
54
|
+
|
|
55
|
+
**Pause only on four real safety issues:** unresolvable merge conflict (Step 5c, Error Handling → Merge Conflicts); critical review/emulation finding (Step 5b, `block`/`revert` recommendation); 3rd consecutive hardening run still dirty (Step 13 safety valve); rate-limit exhaustion (Error Handling → Rate Limiting). Nothing else.
|
|
56
|
+
|
|
57
|
+
**Per-invocation overrides are honored** when the user explicitly asks for interactive mode for the current run ("pause between phases", "let me approve each sprint", etc.). The default remains autonomous.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
43
61
|
## Input
|
|
44
62
|
|
|
45
63
|
`$ARGUMENTS` can be:
|
|
@@ -112,11 +130,12 @@ Orchestration state is persisted to `.claude-scrum-skill/orchestration-state.md`
|
|
|
112
130
|
|
|
113
131
|
### State Operations
|
|
114
132
|
|
|
115
|
-
**On startup**, check for an existing `.claude-scrum-skill/orchestration-state.md
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
133
|
+
**On startup**, check for an existing `.claude-scrum-skill/orchestration-state.md`. The autonomous default handles all four cases without prompting the user — see Default Operating Mode → State file handling for the full decision table. Briefly:
|
|
134
|
+
|
|
135
|
+
- `Status: running` → resume from the recorded position.
|
|
136
|
+
- `Status: paused` → resume from the recorded position (the pause cause should already be addressed; if not, the run will pause again on the same issue).
|
|
137
|
+
- `Status: completed` → rename to `orchestration-state.previous.md` and start fresh.
|
|
138
|
+
- No file → initialize a new state file.
|
|
120
139
|
|
|
121
140
|
**During execution**, update the state file:
|
|
122
141
|
- After every sprint plan, story completion, release, and phase transition
|
|
@@ -197,6 +216,14 @@ Invoke the `/sprint-plan` skill:
|
|
|
197
216
|
|
|
198
217
|
**If PRD-scoped:** Ensure the sprint plan only pulls from the scoped stories (recorded in the state file). If `/sprint-plan` proposes stories outside the scope, exclude them — they belong to other work and should not be mixed into this orchestration run.
|
|
199
218
|
|
|
219
|
+
**Blocked-by gate:** Before selecting stories for the sprint, exclude any
|
|
220
|
+
story whose `blocked_by` list contains an open (not yet `done`) story. This
|
|
221
|
+
naturally gates implementation epics on the design-spike epic when one
|
|
222
|
+
exists: implementation stories list the design-spike CONTEXT.md story as a
|
|
223
|
+
blocker, so they cannot enter a sprint until that story completes. The
|
|
224
|
+
existing dependency mechanism in `/sprint-plan` already honors this; this
|
|
225
|
+
note is an explicit affirmation, not a new requirement.
|
|
226
|
+
|
|
200
227
|
Since this is autonomous mode, accept the default sprint plan without waiting for user confirmation — the skill's proposed sprint based on priority ordering and velocity target is the plan.
|
|
201
228
|
|
|
202
229
|
After planning completes, update the state file with the sprint stories and their dependency map.
|
|
@@ -231,6 +258,14 @@ You are executing story #<number> for repo <owner/repo>.
|
|
|
231
258
|
follow all instructions in it. CLAUDE.md is authoritative for stack,
|
|
232
259
|
patterns, and style — it overrides any general guidance in this preamble.
|
|
233
260
|
|
|
261
|
+
**IMPORTANT:** Before writing any code, if `<paths.context>/<epic-slug>/CONTEXT.md`
|
|
262
|
+
exists, read it in full. Treat its Naming Conventions, File Layout, Shared
|
|
263
|
+
Types & Interfaces, Patterns to Follow, and Patterns to Avoid sections as
|
|
264
|
+
binding for this epic — they override generic conventions in CLAUDE.md when
|
|
265
|
+
in conflict, and you should follow them even when CLAUDE.md is silent. The
|
|
266
|
+
`<paths.context>` and `<epic-slug>` values are substituted from the resolved
|
|
267
|
+
config and the story's epic at spawn time.
|
|
268
|
+
|
|
234
269
|
**Story:** <title>
|
|
235
270
|
**Acceptance criteria:** <from issue body or story file>
|
|
236
271
|
**Branch strategy:** Create branch `story/<number>-<slug>` from
|
|
@@ -477,6 +512,8 @@ Transitioning to Phase 2 — Emulation Hardening.
|
|
|
477
512
|
|
|
478
513
|
Validate the **entire codebase** through emulation, fix discovered issues, and repeat until clean. This phase always covers the full project regardless of whether Phase 1 was PRD-scoped — new code must integrate cleanly with the existing codebase.
|
|
479
514
|
|
|
515
|
+
**Phase 2 is mandatory.** Do not skip it under any circumstance, even when Phase 1 produced a small or clean change set. The emulation pass is the quality gate that catches integration drift, layer contract mismatches, and cross-story inconsistency that per-story review cannot. Skipping it defeats the orchestration's quality model. See Default Operating Mode.
|
|
516
|
+
|
|
480
517
|
### Step 8: Run Emulation
|
|
481
518
|
|
|
482
519
|
Invoke the project emulation skill:
|
|
@@ -588,6 +625,8 @@ Options:
|
|
|
588
625
|
|
|
589
626
|
After emulation hardening is clean (or accepted), run a final mechanical hygiene pass to ensure the codebase builds, lints, and tests cleanly.
|
|
590
627
|
|
|
628
|
+
**Phase 3 is mandatory.** Like Phase 2, it always runs at the tail of every orchestration even when the codebase appears clean. For projects with no traditional toolchain (e.g., a markdown skill suite), `project-cleanup` reports SKIP for the non-applicable phases — that is the correct outcome, not a reason to omit the phase. See Default Operating Mode.
|
|
629
|
+
|
|
591
630
|
### Step 14: Run Project Cleanup
|
|
592
631
|
|
|
593
632
|
Invoke the cleanup skill in fix mode:
|
|
@@ -671,15 +710,20 @@ Read the ADR output path from `../shared/config.json` (key: `paths.adr`,
|
|
|
671
710
|
default: `.claude-scrum-skill/adr`).
|
|
672
711
|
|
|
673
712
|
1. Read all existing ADRs in the configured ADR directory to understand what's
|
|
674
|
-
already documented and the numbering/format convention in use.
|
|
713
|
+
already documented and the numbering/format convention in use. Compute
|
|
714
|
+
the next sequential ADR number as `max(existing_numbers) + 1`. This
|
|
715
|
+
shared numbering pool applies regardless of whether prior ADRs were
|
|
716
|
+
created by a design-spike epic in this run, by a previous orchestration
|
|
717
|
+
run, or hand-authored — they all share one sequence.
|
|
675
718
|
2. Review the epics completed, hardening fixes applied, and any significant
|
|
676
719
|
technical choices made during orchestration (e.g., new libraries adopted,
|
|
677
720
|
patterns introduced, infrastructure changes, security model decisions).
|
|
678
721
|
3. For each decision that is **non-obvious, hard to reverse, or would
|
|
679
722
|
surprise a future contributor**, create a new ADR following the existing
|
|
680
723
|
format and numbering sequence.
|
|
681
|
-
4. Skip decisions that are already covered by an existing ADR
|
|
682
|
-
|
|
724
|
+
4. Skip decisions that are already covered by an existing ADR (including
|
|
725
|
+
any ADR produced by a design-spike epic earlier in this run) or that
|
|
726
|
+
are trivial/self-evident from the code.
|
|
683
727
|
|
|
684
728
|
Print a summary:
|
|
685
729
|
|
|
@@ -10,7 +10,10 @@ Scaffold a complete GitHub Project from one or more PRD or spec documents, or ad
|
|
|
10
10
|
## Before You Start
|
|
11
11
|
|
|
12
12
|
1. Read `../shared/references/CONVENTIONS.md` for all project management standards including label taxonomy, branch strategy, issue templates, custom fields, and executor assignment guidelines. Follow these conventions exactly.
|
|
13
|
-
2. Read `../shared/config.json` to determine the scaffolding mode (`scaffolding` key: `"local"`, `"github"`, `"jira"`, or `"trello"`, default: `"local"`). If `"local"`, also read the `paths.backlog` value (default: `.claude-scrum-skill/backlog`).
|
|
13
|
+
2. Read `../shared/config.json` to determine the scaffolding mode (`scaffolding` key: `"local"`, `"github"`, `"jira"`, or `"trello"`, default: `"local"`). If `"local"`, also read the `paths.backlog` value (default: `.claude-scrum-skill/backlog`). Also read these scaffolding-control keys (fall back to defaults silently if missing):
|
|
14
|
+
- `scaffold.two_pass_threshold_words` (default `5000`) — PRD word count above which two-pass mode auto-triggers. See Mode Detection.
|
|
15
|
+
- `scaffold.design_spike_enabled` (default `true`) — global enable switch for the design-spike pre-epic. See Design-Spike Epic.
|
|
16
|
+
- `paths.context` (default `.claude-scrum-skill/context`) — where per-epic CONTEXT.md files written by the design-spike epic live.
|
|
14
17
|
3. Read `../shared/references/PROVIDERS.md` for provider-specific API commands when operating in remote mode (GitHub, Jira, or Trello).
|
|
15
18
|
4. **Terminology:** Always refer to milestones as **"epics"** in all user-facing text, summaries, and conversational output. The word "milestone" should only appear in API commands and code — never in communication with the user.
|
|
16
19
|
5. **If `scaffolding: "github"`:** Confirm the `gh` CLI is authenticated by running `gh auth status`. Identify the target repository. If the user doesn't specify, ask which repo to use.
|
|
@@ -24,6 +27,333 @@ The user provides `$ARGUMENTS` which should be one or more file paths to PRD or
|
|
|
24
27
|
|
|
25
28
|
Read all provided documents thoroughly before proceeding.
|
|
26
29
|
|
|
30
|
+
### PRD Frontmatter Overrides
|
|
31
|
+
|
|
32
|
+
PRD authors can preempt the auto-detected scaffolding behavior via YAML
|
|
33
|
+
frontmatter at the top of the PRD document:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
---
|
|
37
|
+
title: My Project
|
|
38
|
+
scaffold_mode: two-pass # force two-pass even for a small PRD
|
|
39
|
+
design_spike: false # suppress the design-spike epic even when triggered
|
|
40
|
+
---
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Allowed values:
|
|
44
|
+
|
|
45
|
+
- `scaffold_mode`: `single-pass` | `two-pass` (omit to use the word-count
|
|
46
|
+
heuristic in Mode Detection)
|
|
47
|
+
- `design_spike`: `true` | `false` (omit to use the auto-injection rules
|
|
48
|
+
in Design-Spike Epic)
|
|
49
|
+
|
|
50
|
+
### CLI Flags
|
|
51
|
+
|
|
52
|
+
Equivalent flags can be passed alongside the PRD path:
|
|
53
|
+
|
|
54
|
+
- `--mode single-pass` / `--mode two-pass` — overrides any frontmatter or
|
|
55
|
+
word-count heuristic for the scaffolding mode.
|
|
56
|
+
- `--design-spike` / `--no-design-spike` — overrides any frontmatter or
|
|
57
|
+
auto-injection rule for the design-spike epic.
|
|
58
|
+
|
|
59
|
+
There is no formal CLI argument parser — Claude Code skills receive a
|
|
60
|
+
single free-text `$ARGUMENTS` string. The executing agent scans
|
|
61
|
+
`$ARGUMENTS` for these flag strings (exact match) and treats each
|
|
62
|
+
recognized flag as a trigger source at the precedence noted below.
|
|
63
|
+
Invalid or empty flag values (e.g., `--mode` with no value, or
|
|
64
|
+
`--mode three-pass`) are ignored, and the next trigger source in
|
|
65
|
+
precedence applies.
|
|
66
|
+
|
|
67
|
+
Trigger precedence (highest first): CLI flag → PRD frontmatter → config /
|
|
68
|
+
heuristic. Whatever wins is announced before scaffolding begins so the
|
|
69
|
+
user understands why a given path was taken.
|
|
70
|
+
|
|
71
|
+
## Mode Detection
|
|
72
|
+
|
|
73
|
+
Before invoking any per-backend procedure, decide whether to run scaffolding
|
|
74
|
+
in **single-pass** mode (the original behavior — one agent reads the whole
|
|
75
|
+
PRD and produces all epics + stories) or **two-pass** mode (skeleton
|
|
76
|
+
extraction followed by per-epic elaboration subagents). Two-pass mode keeps
|
|
77
|
+
per-epic context tight on large PRDs, so the last epic's stories are as
|
|
78
|
+
well-specified as the first.
|
|
79
|
+
|
|
80
|
+
### Trigger Evaluation (in order, first match wins)
|
|
81
|
+
|
|
82
|
+
1. **CLI flag:**
|
|
83
|
+
- `--mode single-pass` → force single-pass
|
|
84
|
+
- `--mode two-pass` → force two-pass
|
|
85
|
+
2. **PRD frontmatter override:**
|
|
86
|
+
- `scaffold_mode: single-pass` → force single-pass
|
|
87
|
+
- `scaffold_mode: two-pass` → force two-pass
|
|
88
|
+
3. **Word count heuristic:**
|
|
89
|
+
- Count words in the PRD body (whitespace-delimited; exclude frontmatter).
|
|
90
|
+
- Read `scaffold.two_pass_threshold_words` from `../shared/config.json`
|
|
91
|
+
(default `5000`; if the key is missing, use the default silently).
|
|
92
|
+
- If word count exceeds the threshold → two-pass.
|
|
93
|
+
- Otherwise → single-pass.
|
|
94
|
+
|
|
95
|
+
### Announce the Decision
|
|
96
|
+
|
|
97
|
+
Before proceeding to any procedure, announce the mode and the trigger
|
|
98
|
+
reason so the user understands why the heuristic chose what it chose:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
PRD analysis:
|
|
102
|
+
Word count: 8,420 (threshold: 5000) → triggering two-pass mode
|
|
103
|
+
|
|
104
|
+
Pass 1: extracting epic skeleton...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
If an override forced the decision, mention that explicitly:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
PRD analysis:
|
|
111
|
+
Frontmatter override: scaffold_mode: single-pass → forcing single-pass
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Routing
|
|
115
|
+
|
|
116
|
+
- **Single-pass** → continue to the per-backend procedure (Local / Jira /
|
|
117
|
+
Trello / GitHub) and run its existing Parse the PRD step against the
|
|
118
|
+
whole PRD.
|
|
119
|
+
- **Two-pass** → run the Two-Pass Procedure (below) first, then continue
|
|
120
|
+
to the per-backend procedure with the assembled story list.
|
|
121
|
+
|
|
122
|
+
## Two-Pass Procedure
|
|
123
|
+
|
|
124
|
+
When Mode Detection selects two-pass, run this procedure before the
|
|
125
|
+
per-backend creation steps. The output is the same shape as a single-pass
|
|
126
|
+
parse would produce: an assembled list of epics + their stories, ready for
|
|
127
|
+
the backend to create issues/files. Backends consume the same shape, so the
|
|
128
|
+
per-backend creation logic does not change.
|
|
129
|
+
|
|
130
|
+
### Pass 1 — Skeleton Extraction
|
|
131
|
+
|
|
132
|
+
A single agent reads the whole PRD and produces a structured manifest. The
|
|
133
|
+
manifest is held in orchestrator context — it is NOT persisted to disk.
|
|
134
|
+
|
|
135
|
+
**Manifest shape (YAML):**
|
|
136
|
+
|
|
137
|
+
```yaml
|
|
138
|
+
project:
|
|
139
|
+
name: <string>
|
|
140
|
+
description: <string>
|
|
141
|
+
global_preamble: |
|
|
142
|
+
<multi-line markdown excerpt — project overview, glossary,
|
|
143
|
+
cross-cutting non-functional requirements that every epic should know>
|
|
144
|
+
non_functional_requirements: [<string>]
|
|
145
|
+
epics:
|
|
146
|
+
- name: <string>
|
|
147
|
+
slug: <kebab-case string>
|
|
148
|
+
description: <one-paragraph string>
|
|
149
|
+
slice:
|
|
150
|
+
start_line: <int>
|
|
151
|
+
end_line: <int>
|
|
152
|
+
depends_on: [<epic-slug>]
|
|
153
|
+
shared_design_concerns:
|
|
154
|
+
- <string describing naming/layout/type/pattern this epic introduces
|
|
155
|
+
that other epics may consume>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Pass 1 produces NO story-level detail. Its job is structural — identify
|
|
159
|
+
epic boundaries, capture inter-epic dependencies, and extract the shared
|
|
160
|
+
global context that every Pass 2 subagent will need. The
|
|
161
|
+
`shared_design_concerns` list feeds the Design-Spike Epic procedure when
|
|
162
|
+
that is triggered.
|
|
163
|
+
|
|
164
|
+
### Auto-Downgrade
|
|
165
|
+
|
|
166
|
+
After Pass 1 completes, evaluate the epic count:
|
|
167
|
+
|
|
168
|
+
- **≤ 2 epics** → downgrade to single-pass elaboration: spawn one Pass 2
|
|
169
|
+
subagent that handles all epics together. The two-pass overhead is not
|
|
170
|
+
justified at this scale, and inter-epic coordination is easier in a
|
|
171
|
+
single context. Announce the downgrade.
|
|
172
|
+
- **> 2 epics** → proceed to per-epic Pass 2 spawning.
|
|
173
|
+
|
|
174
|
+
### Pass 2 — Per-Epic Elaboration
|
|
175
|
+
|
|
176
|
+
Spawn one subagent per epic. Each subagent receives a focused context:
|
|
177
|
+
|
|
178
|
+
- The **global preamble** from Pass 1 (project overview, glossary, NFRs)
|
|
179
|
+
- Its **assigned epic's PRD slice**, extracted using `slice.start_line`
|
|
180
|
+
and `slice.end_line` from the manifest
|
|
181
|
+
- A **skeleton summary** of sibling epics (name, slug, one-paragraph
|
|
182
|
+
description, dependencies) — for cross-epic dependency awareness, NOT
|
|
183
|
+
for elaboration
|
|
184
|
+
|
|
185
|
+
Each Pass 2 subagent produces the complete story list for its epic:
|
|
186
|
+
|
|
187
|
+
- Story titles
|
|
188
|
+
- Acceptance criteria
|
|
189
|
+
- Technical context
|
|
190
|
+
- Story points (per CONVENTIONS.md guidelines)
|
|
191
|
+
- Executor assignment (per CONVENTIONS.md guidelines)
|
|
192
|
+
- Persona designation (local mode: the `persona` frontmatter field; GitHub/Jira/Trello modes: a `persona:*` label — see CONVENTIONS.md "Persona Labels" and PERSONAS.md for the canonical set)
|
|
193
|
+
- Dependency declarations (`blocked_by`, `blocks`)
|
|
194
|
+
- All other required frontmatter fields
|
|
195
|
+
|
|
196
|
+
**Concurrency cap:** Up to 3 Pass 2 subagents in parallel (matches
|
|
197
|
+
`/project-orchestrate` Step 3 convention). Additional epics queue and
|
|
198
|
+
start as earlier ones complete.
|
|
199
|
+
|
|
200
|
+
### Story Assembly
|
|
201
|
+
|
|
202
|
+
After all Pass 2 subagents return, assemble their outputs into a single
|
|
203
|
+
backlog before handing off to the per-backend creation logic:
|
|
204
|
+
|
|
205
|
+
1. **Collect** every story from every Pass 2 output, preserving each
|
|
206
|
+
story's epic association.
|
|
207
|
+
2. **Detect slug collisions** by exact string match across all stories.
|
|
208
|
+
If two or more stories share a slug, rename all-but-the-first by
|
|
209
|
+
prepending the epic slug: `<epic-slug>-<original-slug>`. Log every
|
|
210
|
+
rename so the user sees the resolution.
|
|
211
|
+
3. **Resolve cross-epic dependencies** declared in story `blocked_by`
|
|
212
|
+
and `blocks` fields. If a dependency references a slug that was
|
|
213
|
+
renamed in step 2, update the reference.
|
|
214
|
+
4. **Emit the assembled list** in the same shape a single-pass parse
|
|
215
|
+
would have produced. The per-backend creation logic consumes this
|
|
216
|
+
shape unchanged.
|
|
217
|
+
|
|
218
|
+
### Failure Handling
|
|
219
|
+
|
|
220
|
+
Scaffolding must degrade gracefully — it must never abort on a Pass 1 or
|
|
221
|
+
Pass 2 failure.
|
|
222
|
+
|
|
223
|
+
**Pass 1 failure:**
|
|
224
|
+
|
|
225
|
+
1. Retry once with identical input.
|
|
226
|
+
2. If the second attempt fails, log the failure and fall back to
|
|
227
|
+
single-pass scaffolding: run the per-backend procedure's Parse the PRD
|
|
228
|
+
step against the whole PRD as if two-pass had never been triggered.
|
|
229
|
+
3. Announce the fallback clearly:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
Pass 1 failed twice; falling back to single-pass scaffolding for this PRD.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Pass 2 subagent failure:**
|
|
236
|
+
|
|
237
|
+
1. Retry the failed subagent once with the original prompt plus the failure
|
|
238
|
+
context appended.
|
|
239
|
+
2. If the second attempt fails, do NOT abort the whole scaffold:
|
|
240
|
+
- Write the affected epic's epic-level metadata (`_epic.md` in local
|
|
241
|
+
mode, milestone in remote modes) using the Pass 1 skeleton data.
|
|
242
|
+
- Generate placeholder stories for the affected epic with
|
|
243
|
+
`status: needs-context` and a note explaining the Pass 2 failure.
|
|
244
|
+
Use the existing `needs-context` status signal label from
|
|
245
|
+
CONVENTIONS.md.
|
|
246
|
+
- Sibling Pass 2 subagents continue unaffected.
|
|
247
|
+
3. Surface every retry attempt and final outcome (success / fallback /
|
|
248
|
+
needs-context) in the skill's user-facing output so the user knows what
|
|
249
|
+
landed cleanly versus what needs hand-completion.
|
|
250
|
+
|
|
251
|
+
## Design-Spike Epic
|
|
252
|
+
|
|
253
|
+
A **design-spike epic** is a research-driven pre-epic that produces written
|
|
254
|
+
design artifacts (an ADR + per-implementation-epic CONTEXT.md files) before
|
|
255
|
+
any implementation work begins. It auto-injects at position 0 of the
|
|
256
|
+
scaffold when triggered, giving every subsequent implementation subagent a
|
|
257
|
+
shared anchor for naming, file layout, types, and patterns. See
|
|
258
|
+
CONVENTIONS.md → Epic Structure → Design-Spike Epic for the broader rationale.
|
|
259
|
+
|
|
260
|
+
### Trigger Evaluation (in order, first match wins)
|
|
261
|
+
|
|
262
|
+
1. **CLI flag:**
|
|
263
|
+
- `--no-design-spike` → suppress.
|
|
264
|
+
- `--design-spike` → force.
|
|
265
|
+
2. **PRD frontmatter override:**
|
|
266
|
+
- `design_spike: false` → suppress the design-spike epic.
|
|
267
|
+
- `design_spike: true` → force it.
|
|
268
|
+
3. **Global enable switch:**
|
|
269
|
+
- Read `scaffold.design_spike_enabled` from `../shared/config.json`
|
|
270
|
+
(default `true`; missing key falls back to default silently).
|
|
271
|
+
- If `false` globally, skip the design-spike regardless of remaining
|
|
272
|
+
signals (the CLI flag and frontmatter overrides above already won
|
|
273
|
+
before reaching this rule if either was set).
|
|
274
|
+
4. **Auto-trigger:**
|
|
275
|
+
- Two-pass mode was selected AND Pass 1 produced more than one
|
|
276
|
+
implementation epic → auto-inject.
|
|
277
|
+
|
|
278
|
+
If none of the above fire, skip the design-spike epic.
|
|
279
|
+
|
|
280
|
+
### Idempotency Check
|
|
281
|
+
|
|
282
|
+
Before injecting, check whether a design-spike epic already exists in the
|
|
283
|
+
target project. Detection is by canonical signal (label/field), not by
|
|
284
|
+
title — the title is configurable but the signal is fixed.
|
|
285
|
+
|
|
286
|
+
- **Local mode:** Scan `<paths.backlog>/*/[_]epic.md` frontmatter for
|
|
287
|
+
`epic_type: design-spike`.
|
|
288
|
+
- **GitHub mode:** Query open milestones whose issues carry the
|
|
289
|
+
`type:design-spike` label.
|
|
290
|
+
- **Jira mode:** Query Epic-type issues labeled `type:design-spike`.
|
|
291
|
+
- **Trello mode:** Query lists whose cards carry the `type:design-spike`
|
|
292
|
+
label.
|
|
293
|
+
|
|
294
|
+
If an existing design-spike epic is found, skip injection and reuse it
|
|
295
|
+
for `blocked_by` references on the new implementation stories.
|
|
296
|
+
|
|
297
|
+
### Skeleton Augmentation
|
|
298
|
+
|
|
299
|
+
When the design-spike epic is to be injected, modify the skeleton produced
|
|
300
|
+
by Pass 1 (or, in single-pass mode, the parsed epic list) before per-epic
|
|
301
|
+
elaboration runs:
|
|
302
|
+
|
|
303
|
+
1. **Prepend a new epic at position 0** with:
|
|
304
|
+
- Default title: `Architecture & Design` (overridable; not load-bearing).
|
|
305
|
+
- Detection signal: label `type:design-spike` (remote backends) and
|
|
306
|
+
`epic_type: design-spike` in `_epic.md` frontmatter (local mode).
|
|
307
|
+
- Description sourced from the project description + the union of all
|
|
308
|
+
implementation epics' `shared_design_concerns` (from the Pass 1
|
|
309
|
+
manifest).
|
|
310
|
+
2. **Generate the design-spike stories** to be elaborated by a Pass 2
|
|
311
|
+
subagent with `persona: research`:
|
|
312
|
+
- One **ADR-authoring story** producing the project's foundational ADR
|
|
313
|
+
at `<paths.adr>/NNNN-<slug>.md`. The ADR number is the next available
|
|
314
|
+
in the existing ADR sequence (see `/project-orchestrate` Step 16 for
|
|
315
|
+
the shared numbering pool).
|
|
316
|
+
- One **CONTEXT.md-authoring story per implementation epic**, each
|
|
317
|
+
producing `<paths.context>/<epic-slug>/CONTEXT.md` from the template
|
|
318
|
+
at `shared/templates/CONTEXT-template.md`. The story body lists the
|
|
319
|
+
`shared_design_concerns` for that epic so the research subagent has
|
|
320
|
+
concrete inputs.
|
|
321
|
+
3. **Wire `blocked_by` references** on every implementation story:
|
|
322
|
+
- Each implementation story gets `blocked_by` references to the
|
|
323
|
+
design-spike story that produces its epic's CONTEXT.md.
|
|
324
|
+
- Sprint planning then naturally excludes implementation stories until
|
|
325
|
+
their CONTEXT.md exists — no additional gate logic required.
|
|
326
|
+
|
|
327
|
+
### Artifact Storage
|
|
328
|
+
|
|
329
|
+
ADR and CONTEXT.md files are committed to the `development` branch via
|
|
330
|
+
the filesystem in ALL four backends. Git is the universal substrate; this
|
|
331
|
+
keeps the artifact location uniform regardless of which backend the
|
|
332
|
+
backlog lives in.
|
|
333
|
+
|
|
334
|
+
- ADR location: `<paths.adr>/NNNN-<slug>.md`
|
|
335
|
+
- CONTEXT.md location: `<paths.context>/<epic-slug>/CONTEXT.md`
|
|
336
|
+
|
|
337
|
+
Remote backends (GitHub, Jira, Trello) MAY additionally surface links to
|
|
338
|
+
these files via milestone/epic descriptions for discoverability — but the
|
|
339
|
+
committed files are the single source of truth. If the description link
|
|
340
|
+
becomes stale (e.g., file renamed), the filesystem path wins.
|
|
341
|
+
|
|
342
|
+
### Auto-Injection of References
|
|
343
|
+
|
|
344
|
+
When the design-spike epic is part of the scaffold, every implementation
|
|
345
|
+
story's Technical Context section receives an appended line referencing
|
|
346
|
+
the artifacts that will be produced:
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
See [<paths.context>/<epic-slug>/CONTEXT.md] and [<paths.adr>/NNNN-<slug>.md] for shared architectural decisions.
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
The paths use the resolved `paths.context` and `paths.adr` config values
|
|
353
|
+
(not hardcoded strings) and the ADR number assigned during skeleton
|
|
354
|
+
augmentation. Auto-injection happens during Story Assembly, after Pass 2
|
|
355
|
+
produces stories but before per-backend creation runs.
|
|
356
|
+
|
|
27
357
|
## Scaffold Procedure
|
|
28
358
|
|
|
29
359
|
Read `../shared/config.json` to determine mode. If `scaffolding` is `"local"`,
|
|
@@ -39,8 +369,13 @@ instead of GitHub issues, milestones, and project boards.
|
|
|
39
369
|
|
|
40
370
|
### Local Step 1: Parse the PRD
|
|
41
371
|
|
|
42
|
-
|
|
43
|
-
|
|
372
|
+
**If two-pass mode was selected** (see Mode Detection), the Two-Pass
|
|
373
|
+
Procedure has already produced the assembled epic + story list. Skip this
|
|
374
|
+
step's parsing work and proceed to Step 2 with the assembled list as input.
|
|
375
|
+
|
|
376
|
+
**If single-pass mode was selected**, do this step as before: extract
|
|
377
|
+
project name, epics, stories, dependencies, and technical context. Present
|
|
378
|
+
the summary and ask the user to confirm.
|
|
44
379
|
|
|
45
380
|
### Local Step 2: Detect Existing Backlog
|
|
46
381
|
|
|
@@ -187,7 +522,10 @@ and sprints. Refer to `../shared/references/PROVIDERS.md` for all API calls.
|
|
|
187
522
|
|
|
188
523
|
### Jira Step 1: Parse the PRD
|
|
189
524
|
|
|
190
|
-
Same as Local Step 1
|
|
525
|
+
Same routing as Local Step 1: if two-pass mode was selected, the Two-Pass
|
|
526
|
+
Procedure has already produced the assembled list — proceed to Step 2 with
|
|
527
|
+
that list. If single-pass mode, parse the PRD inline as in Local Step 1 /
|
|
528
|
+
GitHub Step 1.
|
|
191
529
|
|
|
192
530
|
### Jira Step 2: Ensure Project Exists
|
|
193
531
|
|
|
@@ -290,7 +628,10 @@ all API calls.
|
|
|
290
628
|
|
|
291
629
|
### Trello Step 1: Parse the PRD
|
|
292
630
|
|
|
293
|
-
Same as Local Step 1
|
|
631
|
+
Same routing as Local Step 1: if two-pass mode was selected, the Two-Pass
|
|
632
|
+
Procedure has already produced the assembled list — proceed to Step 2 with
|
|
633
|
+
that list. If single-pass mode, parse the PRD inline as in Local Step 1 /
|
|
634
|
+
GitHub Step 1.
|
|
294
635
|
|
|
295
636
|
### Trello Step 2: Ensure Board Exists
|
|
296
637
|
|
|
@@ -418,7 +759,12 @@ Ask the user to choose and, if option 2 or 3, which epic(s) to target.
|
|
|
418
759
|
|
|
419
760
|
### Step 1: Parse the PRD
|
|
420
761
|
|
|
421
|
-
|
|
762
|
+
**If two-pass mode was selected** (see Mode Detection), the Two-Pass
|
|
763
|
+
Procedure has already produced the assembled epic + story list. Skip the
|
|
764
|
+
inline parsing below and proceed to Step 2 with that list as input.
|
|
765
|
+
|
|
766
|
+
**If single-pass mode was selected**, extract the following from the PRD
|
|
767
|
+
document(s):
|
|
422
768
|
|
|
423
769
|
- **Project name** — used for the GitHub Project title (if creating new)
|
|
424
770
|
- **Epics** — major bodies of work; each becomes a milestone (unless mapped to an existing one)
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
"paths": {
|
|
4
4
|
"specs": ".claude-scrum-skill/specs",
|
|
5
5
|
"adr": ".claude-scrum-skill/adr",
|
|
6
|
-
"backlog": ".claude-scrum-skill/backlog"
|
|
6
|
+
"backlog": ".claude-scrum-skill/backlog",
|
|
7
|
+
"context": ".claude-scrum-skill/context"
|
|
8
|
+
},
|
|
9
|
+
"scaffold": {
|
|
10
|
+
"two_pass_threshold_words": 5000,
|
|
11
|
+
"design_spike_enabled": true
|
|
7
12
|
},
|
|
8
13
|
"jira": {
|
|
9
14
|
"project_key": ""
|
|
@@ -58,6 +58,7 @@ Create these views on every project board:
|
|
|
58
58
|
- `type:spike` — Research/exploration task with defined timebox
|
|
59
59
|
- `type:infra` — Infrastructure, CI/CD, tooling, DevOps
|
|
60
60
|
- `type:chore` — Maintenance, cleanup, refactoring, documentation
|
|
61
|
+
- `type:design-spike` — Research-driven epic that produces design artifacts (ADR + per-implementation-epic CONTEXT.md files) consumed by implementation epics. Auto-injected by `/project-scaffold` for large/multi-epic PRDs; see Epic Structure → Design-Spike Epic.
|
|
61
62
|
|
|
62
63
|
### Priority Labels
|
|
63
64
|
|
|
@@ -197,6 +198,49 @@ Both are set at issue creation time. The label is what scrum teams see day-to-da
|
|
|
197
198
|
|
|
198
199
|
**Backward compatibility:** Existing milestones named `Phase N: <Name>` are treated as epics without renaming. If an existing project has no `epic:*` labels, the skills create them when adding new stories.
|
|
199
200
|
|
|
201
|
+
### Design-Spike Epic
|
|
202
|
+
|
|
203
|
+
A **design-spike epic** is a research-driven pre-epic that produces written design artifacts before any implementation work begins. It auto-injects at the head of the project when triggered, giving every subsequent implementation subagent a shared anchor for naming, file layout, types, and patterns.
|
|
204
|
+
|
|
205
|
+
**When it auto-injects:**
|
|
206
|
+
|
|
207
|
+
- Two-pass scaffolding was triggered AND the resulting skeleton has more than one implementation epic, OR
|
|
208
|
+
- PRD frontmatter contains `design_spike: true`, OR
|
|
209
|
+
- User explicitly passes `--design-spike` to `/project-scaffold`.
|
|
210
|
+
|
|
211
|
+
`design_spike: false` in PRD frontmatter suppresses the epic even when other triggers fire. The global enable switch is `scaffold.design_spike_enabled` in `config.json` (default `true`).
|
|
212
|
+
|
|
213
|
+
**What it contains:**
|
|
214
|
+
|
|
215
|
+
- One ADR-authoring story (`persona: research`, `executor: claude`) producing the project's foundational ADR at `<paths.adr>/NNNN-<slug>.md`.
|
|
216
|
+
- One CONTEXT.md-authoring story per implementation epic (`persona: research`, `executor: claude`) producing `<paths.context>/<epic-slug>/CONTEXT.md` from the shared template at `skills/shared/templates/CONTEXT-template.md`.
|
|
217
|
+
|
|
218
|
+
**How it gates implementation:**
|
|
219
|
+
|
|
220
|
+
Every implementation story receives a `blocked_by` reference to the design-spike story that produces its epic's CONTEXT.md. Sprint planning then naturally excludes implementation stories until the design-spike epic completes — no special gate logic required, the existing dependency mechanism handles it.
|
|
221
|
+
|
|
222
|
+
**Where artifacts live:**
|
|
223
|
+
|
|
224
|
+
ADR and CONTEXT.md files are committed to the `development` branch via the filesystem in ALL four backends (local, GitHub, Jira, Trello). Git is the universal substrate; remote backends additionally surface links via milestone/epic descriptions but the committed files are the single source of truth.
|
|
225
|
+
|
|
226
|
+
**Detection signal:**
|
|
227
|
+
|
|
228
|
+
The canonical signal that an epic is a design-spike is the `type:design-spike` label (GitHub/Trello) or `epic_type: design-spike` frontmatter field (local). The default epic title is "Architecture & Design" but the title is not load-bearing — detection always uses the label/field, never the title.
|
|
229
|
+
|
|
230
|
+
## Frontmatter Fields (Local Mode)
|
|
231
|
+
|
|
232
|
+
In local-mode backlogs (`scaffolding: "local"`), epic and story files use YAML frontmatter for metadata. Beyond the per-file fields documented in their respective templates, these fields apply to the epic-level `_epic.md`:
|
|
233
|
+
|
|
234
|
+
| Field | Type | Allowed Values | Purpose |
|
|
235
|
+
|-------|------|----------------|---------|
|
|
236
|
+
| `title` | string | any | Display name of the epic |
|
|
237
|
+
| `slug` | string | kebab-case | Directory name and ID |
|
|
238
|
+
| `status` | string | `open`, `closed` | Epic completion state |
|
|
239
|
+
| `created` | string | ISO timestamp | Creation time |
|
|
240
|
+
| `epic_type` | string | `design-spike` (omit for implementation epics) | Marks the epic as the design-spike pre-epic for detection by orchestration |
|
|
241
|
+
|
|
242
|
+
Absence of `epic_type` means a standard implementation epic — this preserves backward compatibility with existing `_epic.md` files.
|
|
243
|
+
|
|
200
244
|
## Sprint Cadence
|
|
201
245
|
|
|
202
246
|
- Default sprint length: **2 weeks** (configurable per project)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR-NNNN: <Short Title of the Decision>
|
|
2
|
+
|
|
3
|
+
- **Status:** Proposed | Accepted | Deprecated | Superseded by ADR-NNNN
|
|
4
|
+
- **Date:** YYYY-MM-DD
|
|
5
|
+
- **Deciders:** <names or roles>
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
<What is the issue motivating this decision? What forces are at play? What constraints apply?>
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
|
|
13
|
+
<What did we decide to do, in active voice and present tense.>
|
|
14
|
+
|
|
15
|
+
## Consequences
|
|
16
|
+
|
|
17
|
+
### Positive
|
|
18
|
+
- <Good thing that follows from this decision>
|
|
19
|
+
|
|
20
|
+
### Negative
|
|
21
|
+
- <Trade-off or cost being accepted>
|
|
22
|
+
|
|
23
|
+
### Neutral
|
|
24
|
+
- <Side-effect that is neither clearly good nor bad>
|
|
25
|
+
|
|
26
|
+
## Alternatives Considered
|
|
27
|
+
|
|
28
|
+
### <Alternative 1>
|
|
29
|
+
<What it was and why it was rejected>
|
|
30
|
+
|
|
31
|
+
### <Alternative 2>
|
|
32
|
+
<What it was and why it was rejected>
|
|
33
|
+
|
|
34
|
+
## References
|
|
35
|
+
|
|
36
|
+
- <Links to related ADRs, specs, issues, docs>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# <Epic Name> — Shared Context
|
|
2
|
+
|
|
3
|
+
> Authored once per implementation epic by a `persona: research` subagent during the design-spike epic. Every implementation subagent for this epic reads this file in full before writing code. Sections below are required — keep them present even if briefly populated.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
<1–2 sentence summary of what this epic builds and how its stories fit together.>
|
|
8
|
+
|
|
9
|
+
Example: "Implements the authentication subsystem. Each story adds one piece — credential storage, session issuance, middleware, refresh flow — and they compose into a single auth pipeline consumed by every protected route."
|
|
10
|
+
|
|
11
|
+
## Naming Conventions
|
|
12
|
+
|
|
13
|
+
<Domain terms, prefixes, suffixes, casing rules specific to this epic. These override generic conventions in CLAUDE.md when in conflict.>
|
|
14
|
+
|
|
15
|
+
Example:
|
|
16
|
+
- All endpoint handler functions prefix with `handle_` (e.g., `handle_login`, `handle_refresh`)
|
|
17
|
+
- Event names use past tense (`UserCreated`, `SessionExpired` — never `CreateUser`, `ExpireSession`)
|
|
18
|
+
- Database column names use `snake_case`; corresponding TypeScript fields use `camelCase`
|
|
19
|
+
- Repository methods that return one row use singular nouns (`findUser`); those that return many use plural (`findUsers`)
|
|
20
|
+
|
|
21
|
+
## File Layout
|
|
22
|
+
|
|
23
|
+
<Where new files for this epic's stories live. Include full paths.>
|
|
24
|
+
|
|
25
|
+
Example:
|
|
26
|
+
- Repository implementations: `src/data/<entity>/postgres_<entity>_repository.ts`
|
|
27
|
+
- API controllers: `src/api/<entity>/<entity>_controller.ts`
|
|
28
|
+
- Domain types: `src/core/<entity>/types.ts`
|
|
29
|
+
- Tests colocated with source: `<file>.test.ts` next to `<file>.ts`
|
|
30
|
+
- Migrations: `migrations/NNNN_<description>.sql` (numbered sequentially)
|
|
31
|
+
|
|
32
|
+
## Shared Types & Interfaces
|
|
33
|
+
|
|
34
|
+
<Code blocks with type/interface/struct definitions stories must IMPORT rather than redefine. If two stories need the same type, define it here and reference the location.>
|
|
35
|
+
|
|
36
|
+
Example:
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
// src/core/auth/types.ts
|
|
40
|
+
export type SessionId = string & { readonly __brand: "SessionId" };
|
|
41
|
+
|
|
42
|
+
export interface Credentials {
|
|
43
|
+
email: string;
|
|
44
|
+
password: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface Session {
|
|
48
|
+
id: SessionId;
|
|
49
|
+
userId: UserId;
|
|
50
|
+
expiresAt: Date;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Stories MUST import these from the canonical location, not re-declare structurally identical types.
|
|
55
|
+
|
|
56
|
+
## Patterns to Follow
|
|
57
|
+
|
|
58
|
+
<Code-level patterns with concrete examples. Cover error handling, logging, pagination, validation, transaction boundaries, etc. Each pattern should include a one-line "why" so reviewers can judge edge cases.>
|
|
59
|
+
|
|
60
|
+
Example:
|
|
61
|
+
|
|
62
|
+
**Error handling at controller boundaries:**
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
try {
|
|
66
|
+
const result = await service.doThing(input);
|
|
67
|
+
return ok(result);
|
|
68
|
+
} catch (e) {
|
|
69
|
+
if (e instanceof DomainError) return badRequest(e.message);
|
|
70
|
+
logger.error("unexpected", { e });
|
|
71
|
+
return internalServerError();
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Why: Domain errors are caller-visible; unknown errors must not leak internals.
|
|
76
|
+
|
|
77
|
+
**Pagination:** Cursor-based, never offset. Use `{ cursor, limit }` query params; return `{ items, nextCursor }`. Why: stable ordering across concurrent writes.
|
|
78
|
+
|
|
79
|
+
## Patterns to Avoid
|
|
80
|
+
|
|
81
|
+
<Anti-patterns specific to this epic with rationale. These are NOT a generic "best practices" list — they are concrete things that have caused problems or that violate the epic's design.>
|
|
82
|
+
|
|
83
|
+
Example:
|
|
84
|
+
|
|
85
|
+
- **Don't share a database client between modules.** Each repository constructs its own. Why: makes mocking and per-test isolation trivial.
|
|
86
|
+
- **Don't catch generic `Error` in middleware.** Catch specific subtypes only. Why: a broad catch swallows programmer errors that should crash loudly in dev.
|
|
87
|
+
- **Don't add new auth-related env vars without updating `src/config/env_schema.ts`.** Why: the schema is the validation layer — env vars not in it are silently undefined.
|
|
88
|
+
|
|
89
|
+
## External References
|
|
90
|
+
|
|
91
|
+
<Links to upstream docs, related ADRs, CLAUDE.md sections this epic depends on.>
|
|
92
|
+
|
|
93
|
+
- ADR: `<paths.adr>/NNNN-<slug>.md`
|
|
94
|
+
- CLAUDE.md sections: `Architecture`, `Code Quality`, `Testing`
|
|
95
|
+
- Upstream docs: `<url to library/framework docs if any>`
|
|
96
|
+
- Related epics: `<epic-slug>` (consumes the types defined here)
|