@houseofwolvesllc/claude-scrum-skill 1.5.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +331 -230
- package/bin/install.js +31 -0
- package/package.json +4 -1
- package/skills/project-cleanup/SKILL.md +2 -2
- package/skills/project-emulate/SKILL.md +1 -1
- package/skills/project-orchestrate/SKILL.md +317 -60
- package/skills/project-scaffold/SKILL.md +711 -5
- package/skills/project-spec/SKILL.md +60 -0
- package/skills/project-spec/templates/spec-template.md +63 -0
- package/skills/shared/config.json +19 -0
- package/skills/{project-scaffold → shared}/references/CONVENTIONS.md +60 -0
- package/skills/shared/references/PERSONAS.md +270 -0
- package/skills/shared/references/PROVIDERS.md +471 -0
- package/skills/shared/templates/ADR-template.md +36 -0
- package/skills/shared/templates/CONTEXT-template.md +96 -0
- package/skills/sprint-plan/SKILL.md +124 -6
- package/skills/sprint-release/SKILL.md +118 -6
- package/skills/sprint-status/SKILL.md +60 -6
|
@@ -11,25 +11,64 @@ Fully autonomous project lifecycle driver. Plans sprints, executes stories via p
|
|
|
11
11
|
|
|
12
12
|
## Before You Start
|
|
13
13
|
|
|
14
|
-
1. Read `../
|
|
15
|
-
2. Read the
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
18
|
-
|
|
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
|
+
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
|
+
4. Read `../shared/references/PERSONAS.md` for role preambles. When spawning
|
|
18
|
+
subagents, select the persona matching each story's `persona:*` label (GitHub mode)
|
|
19
|
+
or `persona` frontmatter field (local mode). If no persona exists, use `impl` (the default).
|
|
20
|
+
5. **Terminology:** Always refer to milestones as **"epics"** in all user-facing text, summaries, and conversational output. The word "milestone" should only appear in GitHub API commands and code — never in communication with the user.
|
|
21
|
+
6. **If `scaffolding: "github"`:** Confirm the `gh` CLI is authenticated by running `gh auth status`. Identify the target repository. If the user doesn't specify, detect from the current git remote or ask.
|
|
22
|
+
7. **If `scaffolding: "jira"`:** Verify `JIRA_SITE`, `JIRA_EMAIL`, and `JIRA_API_TOKEN` env vars are set. Read `jira.project_key` from config.json.
|
|
23
|
+
8. **If `scaffolding: "trello"`:** Verify `TRELLO_API_KEY` and `TRELLO_TOKEN` env vars are set. Read `trello.board_id` from config.json.
|
|
24
|
+
9. **If `scaffolding: "local"`:** Skip authentication. Stories are tracked in local backlog files. Git operations (branches, commits, merges) still apply.
|
|
19
25
|
|
|
20
26
|
### Standing Authorizations
|
|
21
27
|
|
|
22
28
|
The following actions are pre-authorized and do NOT require user confirmation during orchestration:
|
|
23
29
|
|
|
24
|
-
- **Merge release
|
|
30
|
+
- **Merge release branches to `development`** — via PR (GitHub) or direct merge (local), after CI passes
|
|
25
31
|
- **Delete merged story and release branches** — standard cleanup after merge
|
|
26
32
|
- **Create and switch between feature/release branches** — normal git workflow
|
|
33
|
+
- **Update story file frontmatter** (local mode only) — status, sprint, persona fields
|
|
27
34
|
|
|
28
35
|
The following actions are NEVER authorized:
|
|
29
36
|
|
|
30
37
|
- **Merge anything to `main`** — always requires explicit human review
|
|
31
38
|
- **Force push or destructive git operations** — never permitted
|
|
32
|
-
- **Close or delete issues without completing them** — incomplete work rolls over
|
|
39
|
+
- **Close or delete issues/stories without completing them** — incomplete work rolls over
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Default Operating Mode
|
|
44
|
+
|
|
45
|
+
`/project-orchestrate` defaults to **fully autonomous execution**. When invoked with a PRD path or repo identifier, run the full lifecycle — Phase 1 (Epic Completion) → Phase 2 (Emulation Hardening) → Phase 3 (Project Cleanup) → Step 16 (ADR Update) → Step 17 (State Cleanup) — end-to-end without pausing for routine confirmation.
|
|
46
|
+
|
|
47
|
+
### What autonomous means
|
|
48
|
+
|
|
49
|
+
- **No routine confirmation prompts.** Accept the skill's prescribed default at every decision point: sprint plans, story execution order, branch creation, merges to `development`, branch cleanup. The Standing Authorizations above cover the full set; do not re-ask for them.
|
|
50
|
+
- **All phases run.** Phase 2 (Emulation Hardening) and Phase 3 (Project Cleanup) are **mandatory** quality gates — they execute even when Phase 1 produces a small or clean change set. Skipping them defeats the orchestration's quality model.
|
|
51
|
+
- **State file handling is automatic — never prompt the user.**
|
|
52
|
+
- `Status: running` → resume from the recorded position.
|
|
53
|
+
- `Status: paused` → resume from the recorded position. The original pause cause should already be addressed before the user re-invokes; if it isn't, the run will pause again on the same issue and surface it fresh.
|
|
54
|
+
- `Status: completed` → rename the prior file to `orchestration-state.previous.md` and start a fresh run.
|
|
55
|
+
- No file → initialize a new state file.
|
|
56
|
+
- **Scaffolding decisions fire per their own trigger logic.** Two-pass mode and design-spike epic injection are governed by `project-scaffold/SKILL.md` → Mode Detection and Design-Spike Epic. The orchestrator does NOT add a separate confirmation prompt on top of those triggers — if the scaffold spec says inject, the orchestrator lets it inject.
|
|
57
|
+
|
|
58
|
+
### When pausing IS allowed
|
|
59
|
+
|
|
60
|
+
Only the four genuine safety gates pause the run. These exist because they require human judgment that no default can satisfy:
|
|
61
|
+
|
|
62
|
+
1. **Unresolvable merge conflict.** Auto-rebase attempted first; if it fails, pause and surface the conflicting files (per Step 5c and Error Handling → Merge Conflicts).
|
|
63
|
+
2. **Critical findings in the review gate.** The `review` persona's recommendation of `block` / `revert` pauses orchestration so the user can decide how to proceed (per Step 5b).
|
|
64
|
+
3. **3rd consecutive hardening run still produces critical/warning findings.** The safety valve at Step 13 — three rounds of automated hardening without convergence suggests the remaining issues need human triage.
|
|
65
|
+
4. **Rate-limit exhaustion.** After exponential-backoff retries fail (per Error Handling → Rate Limiting), pause rather than burn through quota.
|
|
66
|
+
|
|
67
|
+
All four are infrequent and indicate real problems. None can be defaulted away. Every other pause point in this document — sprint plan confirmation, state file resume confirmation, phase transition confirmation, completion confirmation — is removed by the autonomous default.
|
|
68
|
+
|
|
69
|
+
### Overriding the default
|
|
70
|
+
|
|
71
|
+
If the user explicitly requests interactive mode for the current run (e.g., "let me approve each sprint plan", "pause between phases", "stop after Phase 1"), honor that for the current invocation. The skill's default remains autonomous; the override is per-invocation and does not change the default.
|
|
33
72
|
|
|
34
73
|
---
|
|
35
74
|
|
|
@@ -37,23 +76,23 @@ The following actions are NEVER authorized:
|
|
|
37
76
|
|
|
38
77
|
`$ARGUMENTS` can be:
|
|
39
78
|
|
|
40
|
-
1. **A PRD file path** (e.g., `path/to/prd.md`) — scaffold the PRD first via `/project-scaffold`, then orchestrate **only the epics and stories created from that PRD**.
|
|
41
|
-
2. **A repo identifier** (e.g., `owner/repo
|
|
42
|
-
3. **A PRD file path + repo identifier** (e.g., `path/to/prd.md owner/repo
|
|
43
|
-
4. **Nothing** — detect the repo from the current git remote and orchestrate all open epics/stories.
|
|
79
|
+
1. **A PRD file path** (e.g., `path/to/prd.md`) — scaffold the PRD first via `/project-scaffold`, then orchestrate **only the epics and stories created from that PRD**. In GitHub mode the repo is detected from the current git remote (or ask the user).
|
|
80
|
+
2. **A repo identifier** (e.g., `owner/repo`, GitHub mode only) — orchestrate **all open epics and stories** already on the project board. No scaffolding step.
|
|
81
|
+
3. **A PRD file path + repo identifier** (e.g., `path/to/prd.md owner/repo`, GitHub mode only) — scaffold the PRD into the specified repo, then orchestrate only those epics/stories.
|
|
82
|
+
4. **Nothing** — GitHub mode: detect the repo from the current git remote and orchestrate all open epics/stories. Local mode: orchestrate all open epics/stories in the configured backlog directory.
|
|
44
83
|
|
|
45
|
-
**How to distinguish:** If an argument is a path to an existing file, treat it as a PRD. Otherwise treat it as a repo identifier.
|
|
84
|
+
**How to distinguish:** If an argument is a path to an existing file, treat it as a PRD. Otherwise treat it as a repo identifier (GitHub mode only).
|
|
46
85
|
|
|
47
86
|
### Scope Rules
|
|
48
87
|
|
|
49
|
-
- **Phase 1 (Epic Completion Loop):** When a PRD is provided, only execute epics/stories that were created from that PRD.
|
|
88
|
+
- **Phase 1 (Epic Completion Loop):** When a PRD is provided, only execute epics/stories that were created from that PRD. In GitHub mode, record the milestone numbers and issue numbers. In local mode, record the epic directory names and story file paths. When no PRD is provided, execute all open epics/stories.
|
|
50
89
|
- **Phase 2 (Emulation Hardening Loop):** Always applies to the **entire codebase** regardless of whether a PRD was provided. Emulation validates the whole project, not just the new work.
|
|
51
90
|
|
|
52
91
|
---
|
|
53
92
|
|
|
54
93
|
## State Management
|
|
55
94
|
|
|
56
|
-
Orchestration state is persisted to `.claude/orchestration-state.md` so progress survives context compaction, usage caps, and session restarts. This file is human-readable markdown.
|
|
95
|
+
Orchestration state is persisted to `.claude-scrum-skill/orchestration-state.md` so progress survives context compaction, usage caps, and session restarts. This file is human-readable markdown.
|
|
57
96
|
|
|
58
97
|
### State File Structure
|
|
59
98
|
|
|
@@ -84,11 +123,13 @@ Orchestration state is persisted to `.claude/orchestration-state.md` so progress
|
|
|
84
123
|
| Dashboard | pending | 8 | 0 | 8 |
|
|
85
124
|
|
|
86
125
|
## Current Sprint Stories
|
|
87
|
-
| # | Title | Executor | Status | Subagent |
|
|
88
|
-
|
|
89
|
-
| 12 | Auth endpoint | claude | done | — |
|
|
90
|
-
| 13 | Login UI | claude | in-progress | agent-3 |
|
|
91
|
-
| 14 | API keys | human | skipped | — |
|
|
126
|
+
| # | Title | Executor | Persona | Status | Subagent |
|
|
127
|
+
|---|-------|----------|---------|--------|----------|
|
|
128
|
+
| 12 | Auth endpoint | claude | impl | done | — |
|
|
129
|
+
| 13 | Login UI | claude | impl | in-progress | agent-3 |
|
|
130
|
+
| 14 | API keys | human | — | skipped | — |
|
|
131
|
+
| 15 | CI pipeline | claude | ops | done | — |
|
|
132
|
+
| 16 | Auth ADR | claude | research | done | — |
|
|
92
133
|
|
|
93
134
|
## Dependency Map
|
|
94
135
|
- #15 blocked-by #12 → unblocked (completed)
|
|
@@ -103,11 +144,12 @@ Orchestration state is persisted to `.claude/orchestration-state.md` so progress
|
|
|
103
144
|
|
|
104
145
|
### State Operations
|
|
105
146
|
|
|
106
|
-
**On startup**, check for an existing `.claude/orchestration-state.md
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
147
|
+
**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:
|
|
148
|
+
|
|
149
|
+
- `Status: running` → resume from the recorded position.
|
|
150
|
+
- `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).
|
|
151
|
+
- `Status: completed` → rename to `orchestration-state.previous.md` and start fresh.
|
|
152
|
+
- No file → initialize a new state file.
|
|
111
153
|
|
|
112
154
|
**During execution**, update the state file:
|
|
113
155
|
- After every sprint plan, story completion, release, and phase transition
|
|
@@ -130,10 +172,15 @@ Drive all open epics to completion through iterative sprint cycles.
|
|
|
130
172
|
/project-scaffold <prd-path>
|
|
131
173
|
```
|
|
132
174
|
|
|
133
|
-
After scaffolding completes
|
|
175
|
+
After scaffolding completes:
|
|
176
|
+
- **GitHub mode:** Capture the milestone numbers and issue numbers that were created. Record them in the state file under `Scoped Milestones` and `Scoped Issues`.
|
|
177
|
+
- **Local mode:** Capture the epic directory names and story file paths created. Record them in the state file under `Scoped Epics` and `Scoped Stories`.
|
|
178
|
+
|
|
179
|
+
These define the **orchestration scope** — Phase 1 will only plan and execute sprints for these specific epics and stories.
|
|
134
180
|
|
|
135
181
|
**If no PRD was provided** — detect and assess the existing project state:
|
|
136
182
|
|
|
183
|
+
**GitHub mode:**
|
|
137
184
|
```bash
|
|
138
185
|
# Get open epics (milestones)
|
|
139
186
|
gh api repos/<owner/repo>/milestones --jq '.[] | select(.state=="open") | {number, title, open_issues, closed_issues}'
|
|
@@ -145,6 +192,13 @@ gh issue list --repo <owner/repo> --state open --label "type:story" --json numbe
|
|
|
145
192
|
# Check for any in-progress work
|
|
146
193
|
```
|
|
147
194
|
|
|
195
|
+
**Local mode:**
|
|
196
|
+
```bash
|
|
197
|
+
# Read all epic directories with open status
|
|
198
|
+
# For each <backlog-path>/<epic-slug>/_epic.md, check frontmatter status
|
|
199
|
+
# Read all story files, filter by status != "done"
|
|
200
|
+
```
|
|
201
|
+
|
|
148
202
|
All open epics and stories are in scope for Phase 1.
|
|
149
203
|
|
|
150
204
|
**In both cases**, present a brief overview to the user:
|
|
@@ -169,13 +223,20 @@ Initialize the state file and proceed.
|
|
|
169
223
|
|
|
170
224
|
### Step 2: Sprint Planning
|
|
171
225
|
|
|
172
|
-
Invoke the `/sprint-plan` skill
|
|
226
|
+
Invoke the `/sprint-plan` skill:
|
|
173
227
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
```
|
|
228
|
+
- **GitHub mode:** `/sprint-plan <owner/repo>`
|
|
229
|
+
- **Local mode:** `/sprint-plan` (reads from configured backlog path)
|
|
177
230
|
|
|
178
|
-
**If PRD-scoped:** Ensure the sprint plan only pulls from the scoped
|
|
231
|
+
**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.
|
|
232
|
+
|
|
233
|
+
**Blocked-by gate:** Before selecting stories for the sprint, exclude any
|
|
234
|
+
story whose `blocked_by` list contains an open (not yet `done`) story. This
|
|
235
|
+
naturally gates implementation epics on the design-spike epic when one
|
|
236
|
+
exists: implementation stories list the design-spike CONTEXT.md story as a
|
|
237
|
+
blocker, so they cannot enter a sprint until that story completes. The
|
|
238
|
+
existing dependency mechanism in `/sprint-plan` already honors this; this
|
|
239
|
+
note is an explicit affirmation, not a new requirement.
|
|
179
240
|
|
|
180
241
|
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.
|
|
181
242
|
|
|
@@ -189,21 +250,55 @@ Execute all `executor:claude` stories in the current sprint. Skip `executor:huma
|
|
|
189
250
|
|
|
190
251
|
For stories with no unresolved dependencies, spawn parallel Task subagents (using the `Task` tool with `subagent_type: "Bash"` or `subagent_type: "general-purpose"` as appropriate). Each subagent receives:
|
|
191
252
|
|
|
253
|
+
**Persona resolution:** Before spawning each subagent, resolve its persona:
|
|
254
|
+
|
|
255
|
+
1. **GitHub mode:** Check the story's labels for a `persona:*` label (e.g., `persona:ops`, `persona:research`).
|
|
256
|
+
**Local mode:** Read the `persona` field from the story file's frontmatter.
|
|
257
|
+
2. If found, load the matching preamble from `../shared/references/PERSONAS.md`.
|
|
258
|
+
3. If no persona exists, use the `impl` preamble.
|
|
259
|
+
4. If the persona references a name not defined in `PERSONAS.md`, fall back
|
|
260
|
+
to `impl` and log a warning.
|
|
261
|
+
|
|
262
|
+
**Subagent prompt structure:**
|
|
263
|
+
|
|
192
264
|
```
|
|
265
|
+
<persona preamble from PERSONAS.md>
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
193
269
|
You are executing story #<number> for repo <owner/repo>.
|
|
194
270
|
|
|
195
|
-
**IMPORTANT:** First read the project's CLAUDE.md file if it exists, and
|
|
271
|
+
**IMPORTANT:** First read the project's CLAUDE.md file if it exists, and
|
|
272
|
+
follow all instructions in it. CLAUDE.md is authoritative for stack,
|
|
273
|
+
patterns, and style — it overrides any general guidance in this preamble.
|
|
274
|
+
|
|
275
|
+
**IMPORTANT:** Before writing any code, if `<paths.context>/<epic-slug>/CONTEXT.md`
|
|
276
|
+
exists, read it in full. Treat its Naming Conventions, File Layout, Shared
|
|
277
|
+
Types & Interfaces, Patterns to Follow, and Patterns to Avoid sections as
|
|
278
|
+
binding for this epic — they override generic conventions in CLAUDE.md when
|
|
279
|
+
in conflict, and you should follow them even when CLAUDE.md is silent. The
|
|
280
|
+
`<paths.context>` and `<epic-slug>` values are substituted from the resolved
|
|
281
|
+
config and the story's epic at spawn time.
|
|
196
282
|
|
|
197
283
|
**Story:** <title>
|
|
198
|
-
**Acceptance criteria:** <from issue body>
|
|
199
|
-
**Branch strategy:** Create branch `story/<number>-<slug>` from
|
|
284
|
+
**Acceptance criteria:** <from issue body or story file>
|
|
285
|
+
**Branch strategy:** Create branch `story/<number>-<slug>` from
|
|
286
|
+
`release/<epic-slug>`, implement, commit, push, and open a PR targeting
|
|
287
|
+
`release/<epic-slug>`.
|
|
200
288
|
|
|
201
289
|
After implementation:
|
|
290
|
+
|
|
291
|
+
GitHub mode:
|
|
202
292
|
1. Open a PR with a clear description of changes
|
|
203
293
|
2. Ensure CI passes
|
|
204
294
|
3. The PR should target the release branch, NOT development or main
|
|
295
|
+
4. Do NOT merge the PR — just open it and report back.
|
|
205
296
|
|
|
206
|
-
|
|
297
|
+
Local mode:
|
|
298
|
+
1. Commit all changes to the story branch
|
|
299
|
+
2. Merge the story branch into release/<epic-slug>
|
|
300
|
+
3. Push the release branch
|
|
301
|
+
4. Report back what was implemented.
|
|
207
302
|
```
|
|
208
303
|
|
|
209
304
|
**Execution rules:**
|
|
@@ -212,11 +307,26 @@ Do NOT merge the PR — just open it and report back.
|
|
|
212
307
|
2. **Concurrency limit:** Run up to 3 subagents in parallel to avoid rate limiting.
|
|
213
308
|
3. **Progress tracking:** As each subagent completes, update the state file and check if any blocked stories are now unblocked. Spawn newly unblocked stories immediately.
|
|
214
309
|
4. **Failure handling:** If a subagent fails, retry once with additional context about the failure. If it fails again, mark the story as blocked with a note and continue with remaining stories.
|
|
215
|
-
5. **
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
310
|
+
5. **Story completion:**
|
|
311
|
+
- **GitHub mode:** After a story PR is opened and CI passes, merge it to the release branch:
|
|
312
|
+
```bash
|
|
313
|
+
gh pr merge <pr-number> --repo <owner/repo> --squash --auto
|
|
314
|
+
```
|
|
315
|
+
- **Local mode:** The subagent merges the story branch directly into the release branch. After completion, update the story file's frontmatter to `status: done`.
|
|
219
316
|
6. **Skip human/cowork stories:** Log them as skipped in the state file. They roll over naturally during sprint release.
|
|
317
|
+
7. **Persona routing:** When resolving personas:
|
|
318
|
+
- **GitHub mode:**
|
|
319
|
+
```bash
|
|
320
|
+
persona=$(gh issue view <number> --repo <owner/repo> --json labels \
|
|
321
|
+
--jq '[.labels[].name | select(startswith("persona:"))] | first // empty' \
|
|
322
|
+
| sed 's/persona://')
|
|
323
|
+
persona=${persona:-impl}
|
|
324
|
+
```
|
|
325
|
+
- **Local mode:** Read the `persona` field from the story file's frontmatter. Default to `impl` if not set.
|
|
326
|
+
|
|
327
|
+
Load the corresponding preamble section from `../shared/references/PERSONAS.md`
|
|
328
|
+
and prepend it to the subagent prompt. Log the persona assignment in the
|
|
329
|
+
state file.
|
|
220
330
|
|
|
221
331
|
**Progress updates** — Print a concise progress line every 2-3 story completions:
|
|
222
332
|
|
|
@@ -228,24 +338,111 @@ Sprint 2: 5/8 stories done (13/19 pts) — #21 auth middleware ✓, #22 rate lim
|
|
|
228
338
|
|
|
229
339
|
Once all `executor:claude` stories in the sprint are complete (or retried and marked blocked), invoke the sprint release skill:
|
|
230
340
|
|
|
341
|
+
- **GitHub mode:** `/sprint-release <owner/repo>`
|
|
342
|
+
- **Local mode:** `/sprint-release` (reads from configured backlog path)
|
|
343
|
+
|
|
344
|
+
This closes the sprint, handles rolled-over stories, and merges the release branch to `development` (local mode: direct merge; GitHub mode: opens a release PR).
|
|
345
|
+
|
|
346
|
+
### Step 5: Review and Merge to Development
|
|
347
|
+
|
|
348
|
+
After `/sprint-release` completes, run the automated review gate before
|
|
349
|
+
finalizing.
|
|
350
|
+
|
|
351
|
+
**Step 5a: Automated Review**
|
|
352
|
+
|
|
353
|
+
Spawn a review subagent using the `review` persona from
|
|
354
|
+
`../shared/references/PERSONAS.md`:
|
|
355
|
+
|
|
356
|
+
**GitHub mode:**
|
|
231
357
|
```
|
|
232
|
-
|
|
358
|
+
Task({
|
|
359
|
+
subagent_type: "general-purpose",
|
|
360
|
+
prompt: "<review preamble from PERSONAS.md>
|
|
361
|
+
|
|
362
|
+
Review PR #<pr-number> in <owner/repo>.
|
|
363
|
+
|
|
364
|
+
The PR merges release/<epic-slug> into development and contains all
|
|
365
|
+
stories from Sprint <N>:
|
|
366
|
+
<list story numbers, titles, and their personas>
|
|
367
|
+
|
|
368
|
+
Read the full diff. Post review comments anchored to specific files/lines.
|
|
369
|
+
End with a summary comment: finding counts by severity and a
|
|
370
|
+
recommendation of merge, merge-with-followup-issues, or block.
|
|
371
|
+
|
|
372
|
+
IMPORTANT: Read the project's CLAUDE.md first — review against the
|
|
373
|
+
project's actual conventions, not generic standards."
|
|
374
|
+
})
|
|
233
375
|
```
|
|
234
376
|
|
|
235
|
-
|
|
377
|
+
**Local mode:**
|
|
378
|
+
```
|
|
379
|
+
Task({
|
|
380
|
+
subagent_type: "general-purpose",
|
|
381
|
+
prompt: "<review preamble from PERSONAS.md>
|
|
236
382
|
|
|
237
|
-
|
|
383
|
+
Review the sprint release merge on the development branch.
|
|
238
384
|
|
|
239
|
-
|
|
385
|
+
Run: git diff <pre-merge-sha>..HEAD on the development branch.
|
|
240
386
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
387
|
+
This merge contains all stories from Sprint <N>:
|
|
388
|
+
<list story file paths, titles, and their personas>
|
|
389
|
+
|
|
390
|
+
Read the full diff. Report findings with specific file paths and line
|
|
391
|
+
numbers. End with a summary: finding counts by severity and a
|
|
392
|
+
recommendation of accept, accept-with-followups, or revert.
|
|
393
|
+
|
|
394
|
+
IMPORTANT: Read the project's CLAUDE.md first — review against the
|
|
395
|
+
project's actual conventions, not generic standards."
|
|
396
|
+
})
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Step 5b: Act on Review Findings**
|
|
400
|
+
|
|
401
|
+
- **If recommendation is `block`/`revert`** (any critical findings):
|
|
402
|
+
Pause orchestration. Present the critical findings to the user and ask
|
|
403
|
+
how to proceed. Update state file with `Status: paused`.
|
|
404
|
+
In local mode, the merge already landed — if the user chooses to revert,
|
|
405
|
+
run `git revert <merge-commit>` on development.
|
|
406
|
+
|
|
407
|
+
- **If recommendation is `merge-with-followup-issues`/`accept-with-followups`** (warnings only):
|
|
408
|
+
Create follow-up items for each warning finding:
|
|
409
|
+
- **GitHub mode:**
|
|
410
|
+
```bash
|
|
411
|
+
gh issue create --repo <owner/repo> --title "Follow-up: <finding summary>" \
|
|
412
|
+
--body "<finding detail from review>" \
|
|
413
|
+
--label "type:chore" --label "source:review" --label "executor:claude"
|
|
414
|
+
```
|
|
415
|
+
- **Local mode:** Create a story file in the appropriate epic directory:
|
|
416
|
+
```markdown
|
|
417
|
+
<!-- <backlog-path>/<epic-slug>/NNN-followup-<slug>.md -->
|
|
418
|
+
---
|
|
419
|
+
title: "Follow-up: <finding summary>"
|
|
420
|
+
status: backlog
|
|
421
|
+
executor: claude
|
|
422
|
+
priority: P2-medium
|
|
423
|
+
points: 2
|
|
424
|
+
labels: [type:chore, source:review]
|
|
425
|
+
persona: impl
|
|
426
|
+
---
|
|
427
|
+
<finding detail from review>
|
|
428
|
+
```
|
|
429
|
+
Then proceed.
|
|
430
|
+
|
|
431
|
+
- **If recommendation is `merge`/`accept`** (clean or info-only):
|
|
432
|
+
Proceed.
|
|
244
433
|
|
|
245
|
-
|
|
434
|
+
**Step 5c: Merge (GitHub mode only)**
|
|
435
|
+
|
|
436
|
+
```bash
|
|
246
437
|
gh pr merge <pr-number> --repo <owner/repo> --squash
|
|
247
438
|
```
|
|
248
439
|
|
|
440
|
+
In local mode, `/sprint-release` already merged the release branch to
|
|
441
|
+
development directly — no additional merge step needed.
|
|
442
|
+
|
|
443
|
+
**Skip review:** If the environment variable `ORCHESTRATE_SKIP_REVIEW=1` is
|
|
444
|
+
set, skip Step 5a/5b entirely (original behavior).
|
|
445
|
+
|
|
249
446
|
If merge conflicts exist:
|
|
250
447
|
1. Attempt automatic resolution by rebasing the release branch onto `development`
|
|
251
448
|
2. If auto-resolution fails, **pause orchestration** and escalate to the user:
|
|
@@ -281,22 +478,32 @@ Never delete `main` or `development`.
|
|
|
281
478
|
|
|
282
479
|
After each sprint cycle, check if the current epic is complete:
|
|
283
480
|
|
|
481
|
+
**GitHub mode:**
|
|
284
482
|
```bash
|
|
285
483
|
# Check remaining open issues for this epic
|
|
286
484
|
gh api repos/<owner/repo>/milestones/<milestone-number> --jq '{open_issues, closed_issues}'
|
|
287
485
|
```
|
|
288
486
|
|
|
487
|
+
**Local mode:**
|
|
488
|
+
```bash
|
|
489
|
+
# Count story statuses in the epic directory
|
|
490
|
+
# Read all story files in <backlog-path>/<epic-slug>/, check frontmatter status
|
|
491
|
+
```
|
|
492
|
+
|
|
289
493
|
**If open issues remain** (excluding `executor:human`/`executor:cowork` stories that were skipped):
|
|
290
494
|
- Check if remaining stories are all human/cowork → if yes, the epic's claude-executable work is done, move to next epic
|
|
291
495
|
- Otherwise → loop back to Step 2 for another sprint
|
|
292
496
|
|
|
293
|
-
**If all
|
|
294
|
-
```bash
|
|
295
|
-
# Close the epic
|
|
296
|
-
gh api repos/<owner/repo>/milestones/<milestone-number> -X PATCH -f state="closed"
|
|
297
|
-
```
|
|
497
|
+
**If all stories are complete:**
|
|
298
498
|
|
|
299
|
-
|
|
499
|
+
- **GitHub mode:**
|
|
500
|
+
```bash
|
|
501
|
+
# Close the epic
|
|
502
|
+
gh api repos/<owner/repo>/milestones/<milestone-number> -X PATCH -f state="closed"
|
|
503
|
+
```
|
|
504
|
+
- **Local mode:** Update `_epic.md` frontmatter to `status: closed`.
|
|
505
|
+
|
|
506
|
+
**If more in-scope epics remain** → move to the next epic (by priority) and loop back to Step 2. When PRD-scoped, only consider epics listed in the state file's scoped epics.
|
|
300
507
|
|
|
301
508
|
**If all in-scope epics are complete** → transition to Phase 2.
|
|
302
509
|
|
|
@@ -319,6 +526,8 @@ Transitioning to Phase 2 — Emulation Hardening.
|
|
|
319
526
|
|
|
320
527
|
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.
|
|
321
528
|
|
|
529
|
+
**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.
|
|
530
|
+
|
|
322
531
|
### Step 8: Run Emulation
|
|
323
532
|
|
|
324
533
|
Invoke the project emulation skill:
|
|
@@ -327,11 +536,11 @@ Invoke the project emulation skill:
|
|
|
327
536
|
/project-emulate
|
|
328
537
|
```
|
|
329
538
|
|
|
330
|
-
This produces the full emulation report in `.claude/reports/emulation-report/`, including `ISSUES.md` with categorized findings.
|
|
539
|
+
This produces the full emulation report in `.claude-scrum-skill/reports/emulation-report/`, including `ISSUES.md` with categorized findings.
|
|
331
540
|
|
|
332
541
|
### Step 9: Parse Findings
|
|
333
542
|
|
|
334
|
-
Read and parse `.claude/reports/emulation-report/ISSUES.md`. Extract findings by severity:
|
|
543
|
+
Read and parse `.claude-scrum-skill/reports/emulation-report/ISSUES.md`. Extract findings by severity:
|
|
335
544
|
|
|
336
545
|
- **Critical** — must fix (blocks production readiness)
|
|
337
546
|
- **Warning** — should fix (degrades quality or reliability)
|
|
@@ -353,7 +562,7 @@ Generating hardening PRD for 10 actionable findings.
|
|
|
353
562
|
|
|
354
563
|
### Step 10: Generate Hardening PRD
|
|
355
564
|
|
|
356
|
-
Create a PRD document at `.claude/hardening-prd-run-<N>.md` from the emulation findings. This PRD becomes the input for scaffolding a hardening epic.
|
|
565
|
+
Create a PRD document at `.claude-scrum-skill/hardening-prd-run-<N>.md` from the emulation findings. This PRD becomes the input for scaffolding a hardening epic.
|
|
357
566
|
|
|
358
567
|
Structure the PRD as:
|
|
359
568
|
|
|
@@ -388,7 +597,7 @@ Only include critical and warning findings. Info-level findings are logged but n
|
|
|
388
597
|
Invoke project scaffold with the hardening PRD to create a single "Hardening (Run N)" epic:
|
|
389
598
|
|
|
390
599
|
```
|
|
391
|
-
/project-scaffold .claude/hardening-prd-run-<N>.md
|
|
600
|
+
/project-scaffold .claude-scrum-skill/hardening-prd-run-<N>.md
|
|
392
601
|
```
|
|
393
602
|
|
|
394
603
|
This creates the milestone, issues, labels, and branches for the hardening work.
|
|
@@ -430,6 +639,8 @@ Options:
|
|
|
430
639
|
|
|
431
640
|
After emulation hardening is clean (or accepted), run a final mechanical hygiene pass to ensure the codebase builds, lints, and tests cleanly.
|
|
432
641
|
|
|
642
|
+
**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.
|
|
643
|
+
|
|
433
644
|
### Step 14: Run Project Cleanup
|
|
434
645
|
|
|
435
646
|
Invoke the cleanup skill in fix mode:
|
|
@@ -445,7 +656,7 @@ This runs across the **entire codebase** and automatically fixes:
|
|
|
445
656
|
- Dead and duplicated code (unused exports, files, dependencies, commented-out code)
|
|
446
657
|
- Failing tests and coverage gaps (targets 50% minimum across all metrics)
|
|
447
658
|
|
|
448
|
-
After cleanup completes, read the report at `.claude/reports/cleanup-report/SUMMARY.md`:
|
|
659
|
+
After cleanup completes, read the report at `.claude-scrum-skill/reports/cleanup-report/SUMMARY.md`:
|
|
449
660
|
|
|
450
661
|
- **If all phases PASS** → proceed to Step 15 (Completion Summary)
|
|
451
662
|
- **If any phase FAIL** → review the report, attempt a second cleanup pass. If issues persist after two passes, log remaining issues and proceed to Step 15 with a note
|
|
@@ -489,7 +700,7 @@ Print a comprehensive summary of the entire orchestration run:
|
|
|
489
700
|
- **Project Principles:** ✅ compliant / ⚠️ <N> violations / ⏭️ skipped (no principles in CLAUDE.md)
|
|
490
701
|
- **Dead code:** ✅ none / ⚠️ <N> items remaining
|
|
491
702
|
- **Tests:** ✅ passing (<pct>% coverage) / ⚠️ <N> failing, <pct>% coverage
|
|
492
|
-
- **Full report:** .claude/reports/cleanup-report/SUMMARY.md
|
|
703
|
+
- **Full report:** .claude-scrum-skill/reports/cleanup-report/SUMMARY.md
|
|
493
704
|
|
|
494
705
|
### Timeline
|
|
495
706
|
- Started: <timestamp>
|
|
@@ -504,6 +715,50 @@ Print a comprehensive summary of the entire orchestration run:
|
|
|
504
715
|
|
|
505
716
|
Update the state file with `Status: completed`.
|
|
506
717
|
|
|
718
|
+
### Step 16: ADR Update
|
|
719
|
+
|
|
720
|
+
Review the work completed during this orchestration run and determine if any
|
|
721
|
+
decisions merit an Architecture Decision Record.
|
|
722
|
+
|
|
723
|
+
Read the ADR output path from `../shared/config.json` (key: `paths.adr`,
|
|
724
|
+
default: `.claude-scrum-skill/adr`).
|
|
725
|
+
|
|
726
|
+
1. Read all existing ADRs in the configured ADR directory to understand what's
|
|
727
|
+
already documented and the numbering/format convention in use. Compute
|
|
728
|
+
the next sequential ADR number as `max(existing_numbers) + 1`. This
|
|
729
|
+
shared numbering pool applies regardless of whether prior ADRs were
|
|
730
|
+
created by a design-spike epic in this run, by a previous orchestration
|
|
731
|
+
run, or hand-authored — they all share one sequence.
|
|
732
|
+
2. Review the epics completed, hardening fixes applied, and any significant
|
|
733
|
+
technical choices made during orchestration (e.g., new libraries adopted,
|
|
734
|
+
patterns introduced, infrastructure changes, security model decisions).
|
|
735
|
+
3. For each decision that is **non-obvious, hard to reverse, or would
|
|
736
|
+
surprise a future contributor**, create a new ADR following the existing
|
|
737
|
+
format and numbering sequence.
|
|
738
|
+
4. Skip decisions that are already covered by an existing ADR (including
|
|
739
|
+
any ADR produced by a design-spike epic earlier in this run) or that
|
|
740
|
+
are trivial/self-evident from the code.
|
|
741
|
+
|
|
742
|
+
Print a summary:
|
|
743
|
+
|
|
744
|
+
```
|
|
745
|
+
### ADRs
|
|
746
|
+
- **Existing:** <N> ADRs in .claude-scrum-skill/adr/
|
|
747
|
+
- **Created:** <N> new ADRs
|
|
748
|
+
- ADR-<NNN>: <title>
|
|
749
|
+
- ADR-<NNN>: <title>
|
|
750
|
+
- **Skipped:** No new decisions warranting ADRs (if none created)
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
### Step 17: Clean Up State File
|
|
754
|
+
|
|
755
|
+
Delete `.claude-scrum-skill/orchestration-state.md` so the next orchestration
|
|
756
|
+
run starts with a clean slate:
|
|
757
|
+
|
|
758
|
+
```bash
|
|
759
|
+
rm -f .claude-scrum-skill/orchestration-state.md
|
|
760
|
+
```
|
|
761
|
+
|
|
507
762
|
---
|
|
508
763
|
|
|
509
764
|
## Communication Pattern
|
|
@@ -517,13 +772,15 @@ Keep the user informed without being noisy:
|
|
|
517
772
|
| Every 2-3 stories | Progress line with counts and latest completions |
|
|
518
773
|
| Story failure | Immediate single-line alert with story number and error |
|
|
519
774
|
| Sprint released | Sprint scorecard — 3-4 lines |
|
|
775
|
+
| Review complete | Recommendation + finding counts — 2 lines |
|
|
520
776
|
| Merge to development | Single confirmation line |
|
|
521
777
|
| Epic completed | Epic summary — 3-4 lines |
|
|
522
778
|
| Phase transition | Full phase summary |
|
|
523
779
|
| Hardening run start | Run number and finding counts |
|
|
524
780
|
| Cleanup started | Single line: "Running project cleanup..." |
|
|
525
781
|
| Cleanup complete | Phase 3 summary — 5-6 lines with pass/fail per dimension |
|
|
526
|
-
|
|
|
782
|
+
| ADRs updated | Count of new ADRs + titles — 2-3 lines |
|
|
783
|
+
| Orchestration complete | Full completion summary (Step 17) |
|
|
527
784
|
| Error/pause | Immediate alert with context and options |
|
|
528
785
|
|
|
529
786
|
---
|
|
@@ -541,7 +798,7 @@ Keep the user informed without being noisy:
|
|
|
541
798
|
- Update state file with conflict details for resume
|
|
542
799
|
|
|
543
800
|
### State File Corruption
|
|
544
|
-
- If `.claude/orchestration-state.md` is unreadable or malformed, reconstruct state from GitHub:
|
|
801
|
+
- If `.claude-scrum-skill/orchestration-state.md` is unreadable or malformed, reconstruct state from GitHub:
|
|
545
802
|
```bash
|
|
546
803
|
# Get sprint and story status from the project board
|
|
547
804
|
# Get branch state from git
|