@houseofwolvesllc/claude-scrum-skill 1.7.0 → 1.8.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 +51 -12
- package/package.json +1 -1
- package/skills/project-orchestrate/SKILL.md +372 -24
- package/skills/shared/references/CONVENTIONS.md +23 -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
|
---
|
|
@@ -377,6 +385,36 @@ During sprint planning, personas are assigned automatically based on story label
|
|
|
377
385
|
|
|
378
386
|
`/project-orchestrate` chains all skills into a fully autonomous pipeline.
|
|
379
387
|
|
|
388
|
+
### Invocation Patterns
|
|
389
|
+
|
|
390
|
+
| Form | Behavior |
|
|
391
|
+
|------|----------|
|
|
392
|
+
| `/project-orchestrate` | Orchestrates all open epics in the existing backlog. |
|
|
393
|
+
| `/project-orchestrate spec.md` | Single-spec orchestration. Scaffolds the spec, runs the full lifecycle. |
|
|
394
|
+
| `/project-orchestrate spec-1.md spec-2.md spec-3.md` | **Sequential multi-path mode.** Each spec receives its own complete orchestration (Phase 1 → Phase 2 → Phase 3 → ADR → state cleanup) end-to-end before the next begins. Each spec gets its own design-spike (if triggered), emulation pass, cleanup, and ADR. |
|
|
395
|
+
| `/project-orchestrate owner/repo` | GitHub mode — orchestrates the named repo's open epics. |
|
|
396
|
+
| `/project-orchestrate spec.md owner/repo` | GitHub mode — scaffolds the spec into the named repo, then orchestrates only that PRD's epics. |
|
|
397
|
+
| `/project-orchestrate --merged spec-1.md spec-2.md` | Opt-in merged mode. Treats inputs as one combined project with best-effort legacy behavior. Emits a warning that formal merged semantics are deferred to a follow-up spec — prefer the sequential default unless you need merged. |
|
|
398
|
+
|
|
399
|
+
#### Multi-Path Flags
|
|
400
|
+
|
|
401
|
+
- **`--skip-on-pause`** (default off) — when a spec's orchestration pauses on a safety gate, mark it skipped and advance to the next spec instead of pausing the queue. Use with caution; safety gates exist for a reason.
|
|
402
|
+
- **`--merged`** (default off) — see the table above; opts into the legacy unified-multi-spec behavior.
|
|
403
|
+
|
|
404
|
+
#### Inter-Spec Dependencies
|
|
405
|
+
|
|
406
|
+
PRD documents can declare optional `depends_on` frontmatter to override the default argument-order execution:
|
|
407
|
+
|
|
408
|
+
```yaml
|
|
409
|
+
---
|
|
410
|
+
title: Spec B
|
|
411
|
+
depends_on:
|
|
412
|
+
- spec-a.md # ensure spec-a runs before this one
|
|
413
|
+
---
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
`/project-orchestrate` resolves the dependency graph at run start (topological sort, ties broken by argument order) and aborts before any spec executes if a cycle or missing dependency is detected. See `CONVENTIONS.md` → Frontmatter Fields → PRD Document Frontmatter for the full convention.
|
|
417
|
+
|
|
380
418
|
### Phase 1 — Epic Completion Loop
|
|
381
419
|
|
|
382
420
|
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
|
|
@@ -464,6 +502,7 @@ skills/shared/
|
|
|
464
502
|
- **Chunk large epics** into multiple sprints for natural review gates.
|
|
465
503
|
- **Jira/Trello users:** If no project key or board ID is configured, `/project-scaffold` creates one automatically (Scrum template for Jira).
|
|
466
504
|
- **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.
|
|
505
|
+
- **For related specs, declare `depends_on` in PRD frontmatter** rather than relying on argument order. `/project-orchestrate` will topologically sort the queue and abort on cycles or missing deps before any spec runs — catches ordering mistakes up front instead of mid-orchestration.
|
|
467
506
|
|
|
468
507
|
---
|
|
469
508
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@houseofwolvesllc/claude-scrum-skill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
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
6
|
"publishConfig": {
|
|
@@ -11,7 +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. 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.
|
|
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. Also note **Frontmatter Fields → PRD Document Frontmatter** — the `depends_on` field controls inter-spec execution order in sequential multi-path mode.
|
|
15
|
+
1a. **Multi-path mode and new flags:** when invoked with 2+ existing-file paths, `/project-orchestrate` runs in sequential multi-path mode (each spec receives its own complete orchestration end-to-end). Two new flags are accepted: `--skip-on-pause` (default off; advance the queue when a spec hits a safety gate instead of pausing) and `--merged` (default off; treat multi-path inputs as one combined legacy multi-spec project with a deprecation warning). See **Input Parsing and Mode Detection** for the full classification and **Sequential Multi-Path Mode** for execution details.
|
|
15
16
|
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
17
|
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
18
|
4. Read `../shared/references/PERSONAS.md` for role preambles. When spawning
|
|
@@ -42,33 +43,19 @@ The following actions are NEVER authorized:
|
|
|
42
43
|
|
|
43
44
|
## Default Operating Mode
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
Run autonomously on invocation. Standing Authorizations cover the normal lifecycle — proceed under them without asking.
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
**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
|
|
|
49
|
-
|
|
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.
|
|
50
|
+
**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.
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
**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.
|
|
59
53
|
|
|
60
|
-
|
|
54
|
+
**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.
|
|
61
55
|
|
|
62
|
-
|
|
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.
|
|
56
|
+
**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.
|
|
66
57
|
|
|
67
|
-
|
|
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.
|
|
58
|
+
**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.
|
|
72
59
|
|
|
73
60
|
---
|
|
74
61
|
|
|
@@ -80,8 +67,7 @@ If the user explicitly requests interactive mode for the current run (e.g., "let
|
|
|
80
67
|
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
68
|
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
69
|
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.
|
|
83
|
-
|
|
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).
|
|
70
|
+
5. **Multiple PRD paths** (e.g., `spec-1.md spec-2.md spec-3.md`) — sequential per-spec orchestration. Each spec receives its own complete orchestration (Phase 1 → Phase 2 → Phase 3 → ADR → state cleanup) end-to-end before the next begins. See **Input Parsing and Mode Detection** below.
|
|
85
71
|
|
|
86
72
|
### Scope Rules
|
|
87
73
|
|
|
@@ -90,6 +76,157 @@ If the user explicitly requests interactive mode for the current run (e.g., "let
|
|
|
90
76
|
|
|
91
77
|
---
|
|
92
78
|
|
|
79
|
+
## Input Parsing and Mode Detection
|
|
80
|
+
|
|
81
|
+
Before any orchestration work begins, classify the invocation into one of the modes below and announce the decision. The classification depends on how many tokens are in `$ARGUMENTS` and how many of them resolve to existing files on disk.
|
|
82
|
+
|
|
83
|
+
### Mode Classification
|
|
84
|
+
|
|
85
|
+
**Pre-classification step:** Before applying the table below, separate **flag tokens** (those starting with `--`, e.g., `--skip-on-pause`, `--merged`) from **argument tokens**. Count and classify only the argument tokens. Flags are validated and consumed separately by the Flag Parsing subsection below; they do not contribute to the token count or the file/non-file determination.
|
|
86
|
+
|
|
87
|
+
Apply these rules in order; the first match wins.
|
|
88
|
+
|
|
89
|
+
| Argument token count | All resolve to files? | Mixed? | Mode |
|
|
90
|
+
|----------------------|----------------------|--------|------|
|
|
91
|
+
| 0 | — | — | **No-arg mode** (existing v1.7.1) — orchestrate open epics in the backlog. |
|
|
92
|
+
| 1 | yes | — | **Single-spec mode** (existing v1.7.1) — scaffold + orchestrate this one PRD. |
|
|
93
|
+
| 1 | no | — | **Repo-identifier mode** (existing v1.7.1, GitHub only) — orchestrate the repo's open epics. |
|
|
94
|
+
| Exactly 2 | exactly one is a file, the other is not | — | **Single-spec + repo mode** (existing v1.7.1, GitHub only) — scaffold the PRD into the named repo, orchestrate only that PRD's epics. |
|
|
95
|
+
| 2+ | yes (all tokens are paths to existing files) | — | **Sequential multi-path mode** (new) — see "Sequential Multi-Path Mode" section. |
|
|
96
|
+
| 2+ | no (all tokens are non-files) | — | **ERROR.** Multi-repo invocation is unsupported. Abort with a message listing the repo identifiers offered and noting that exactly one repo identifier is permitted per invocation. |
|
|
97
|
+
| 2+ | mixed (some files, some non-files, AND not the exactly-2 single-spec+repo case above) | yes | **ERROR.** Abort with a clear message listing which tokens are paths and which are not. Mixed argument lists outside the single-spec+repo shape are unsupported. |
|
|
98
|
+
|
|
99
|
+
### Flag Parsing
|
|
100
|
+
|
|
101
|
+
`/project-orchestrate` accepts the following flags. They may appear in any position within `$ARGUMENTS`:
|
|
102
|
+
|
|
103
|
+
- **`--skip-on-pause`** (default off) — in sequential multi-path mode, a spec whose orchestration pauses on a safety gate is marked `skipped`, its in-progress state file is archived with `.skipped.md` suffix, and the queue advances to the next spec. Without this flag (the default), the queue pauses and waits for the user to resolve the gate before re-invocation.
|
|
104
|
+
- **`--merged`** (default off) — when set with 2+ PRD paths, treat the inputs as one combined multi-spec project using legacy best-effort behavior. Emits a deprecation warning that formal merged semantics are not yet specified. Prefer the sequential default unless merged behavior is explicitly required.
|
|
105
|
+
|
|
106
|
+
The flags are orthogonal: pass either, both, or neither.
|
|
107
|
+
|
|
108
|
+
Unknown flags or invalid flag values MUST cause the skill to abort with an error BEFORE starting any orchestration work. Example: `--mode=fast` is unknown; abort and list the supported flags.
|
|
109
|
+
|
|
110
|
+
### Glob Expansion
|
|
111
|
+
|
|
112
|
+
Modern shells expand globs (e.g., `docs/specs/*.md`) before passing to Claude Code, so the skill typically sees pre-expanded paths. If `$ARGUMENTS` arrives with literal glob characters (`*`, `?`, `[...]`) still present, the skill MUST expand the glob itself BEFORE applying mode classification.
|
|
113
|
+
|
|
114
|
+
### Announcement (Mandatory)
|
|
115
|
+
|
|
116
|
+
Before any orchestration work begins, announce the chosen mode and the count of specs (for multi-path) so the user understands what's about to happen:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Multi-path orchestration mode: 3 specs detected.
|
|
120
|
+
|
|
121
|
+
Dependency graph: no depends_on declarations — using argument order.
|
|
122
|
+
Execution order:
|
|
123
|
+
1. spec-1.md
|
|
124
|
+
2. spec-2.md
|
|
125
|
+
3. spec-3.md
|
|
126
|
+
|
|
127
|
+
Flags: none.
|
|
128
|
+
|
|
129
|
+
Starting Spec 1/3 — spec-1.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
For single-spec, repo-identifier, or no-arg modes, the announcement is the existing v1.7.1 startup summary; no new format required.
|
|
133
|
+
|
|
134
|
+
### Routing
|
|
135
|
+
|
|
136
|
+
- **Sequential multi-path mode** → run Dependency Resolution (next subsection), then invoke the per-spec wrapper documented in **Sequential Multi-Path Mode**.
|
|
137
|
+
- **Merged mode** (with `--merged`) → see **Sequential Multi-Path Mode → Merged Mode (Opt-In)**.
|
|
138
|
+
- **All other modes** → continue with the existing State Management and Phase 1 sections unchanged.
|
|
139
|
+
|
|
140
|
+
### Dependency Resolution
|
|
141
|
+
|
|
142
|
+
Applies only to sequential multi-path mode (and merged mode if dependencies need to inform internal ordering). Runs after Mode Classification but BEFORE any spec executes.
|
|
143
|
+
|
|
144
|
+
#### `depends_on` Frontmatter
|
|
145
|
+
|
|
146
|
+
Each PRD/spec MAY declare an optional `depends_on` field in its YAML frontmatter. The value is a YAML list of paths or basenames. See `CONVENTIONS.md` → Frontmatter Fields → PRD Document Frontmatter for the full convention.
|
|
147
|
+
|
|
148
|
+
```yaml
|
|
149
|
+
---
|
|
150
|
+
title: My Spec
|
|
151
|
+
depends_on:
|
|
152
|
+
- other-spec.md # basename match against other args
|
|
153
|
+
- subdir/another-spec.md # path match relative to this spec's directory
|
|
154
|
+
---
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Path Resolution
|
|
158
|
+
|
|
159
|
+
For each entry in a spec's `depends_on` list:
|
|
160
|
+
|
|
161
|
+
1. Try interpreting the entry as a path relative to the declaring spec's own directory. If it canonicalizes to one of the specs in the current invocation's argument list (compared by canonical absolute path), the dependency resolves.
|
|
162
|
+
2. If step 1 fails, try interpreting the entry as a basename match against the basenames (filename without directory) of the argument-list specs. If exactly one spec in the list has a matching basename, the dependency resolves.
|
|
163
|
+
3. If neither step 1 nor step 2 resolves to a spec in the current invocation's argument list, ABORT the run with a clear error message naming the unresolved entry. Do NOT start any spec. Silent ignoring of unresolved dependencies would lead to subtle wrong-order execution.
|
|
164
|
+
|
|
165
|
+
#### Dependency Graph Construction
|
|
166
|
+
|
|
167
|
+
After resolving every spec's `depends_on` entries, build a directed acyclic graph (DAG):
|
|
168
|
+
|
|
169
|
+
- Nodes: each spec in the argument list.
|
|
170
|
+
- Edges: from depended-upon spec → dependent spec. (If spec-B has `depends_on: [spec-A.md]`, the edge is `spec-A → spec-B`, meaning A must complete before B.)
|
|
171
|
+
|
|
172
|
+
#### Cycle Detection
|
|
173
|
+
|
|
174
|
+
Detect cycles using the standard algorithm (e.g., DFS with a visiting-set). A cycle includes:
|
|
175
|
+
|
|
176
|
+
- Two-node cycles: `A → B → A`.
|
|
177
|
+
- Longer cycles: `A → B → C → A`.
|
|
178
|
+
- Self-loops: a spec declaring `depends_on: [itself.md]`.
|
|
179
|
+
|
|
180
|
+
If any cycle is detected, ABORT with the following error format BEFORE starting any spec:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
ERROR: Dependency cycle detected. No specs were started.
|
|
184
|
+
|
|
185
|
+
Cycle members:
|
|
186
|
+
spec-a.md → depends_on: spec-b.md
|
|
187
|
+
spec-b.md → depends_on: spec-a.md
|
|
188
|
+
|
|
189
|
+
Resolve the cycle (remove one of the declarations) and re-run.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Missing-Dependency Detection
|
|
193
|
+
|
|
194
|
+
If any `depends_on` entry references a path that does not appear in the current invocation's argument list (after path resolution per the rules above), ABORT with the following error format BEFORE starting any spec:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
ERROR: Dependency not in argument list. No specs were started.
|
|
198
|
+
|
|
199
|
+
Missing dependency:
|
|
200
|
+
spec-b.md declares depends_on: [spec-a.md]
|
|
201
|
+
spec-a.md is not present in this invocation.
|
|
202
|
+
|
|
203
|
+
Either add spec-a.md to the invocation, or remove the depends_on declaration in spec-b.md.
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### Topological Sort with Stable Tie-Break
|
|
207
|
+
|
|
208
|
+
Once the graph passes cycle and missing-dependency checks, topologically sort the specs. Tie-break: when two specs have no dependency relationship between them, the one appearing earlier in the original `$ARGUMENTS` order executes first. The sort MUST be stable.
|
|
209
|
+
|
|
210
|
+
#### No-`depends_on` Fallback
|
|
211
|
+
|
|
212
|
+
If NO spec declares `depends_on`, execution order is simply the order tokens appear in `$ARGUMENTS`. No graph construction or topological sort is performed (or, equivalently, an empty graph topo-sorts to the input order).
|
|
213
|
+
|
|
214
|
+
#### Pre-Execution Validation Order
|
|
215
|
+
|
|
216
|
+
All validation runs BEFORE any spec's orchestration begins (NFR-3):
|
|
217
|
+
|
|
218
|
+
1. Mixed-argument detection (per Mode Classification).
|
|
219
|
+
2. Flag validation (unknown flags abort).
|
|
220
|
+
3. Glob expansion (if needed).
|
|
221
|
+
4. `depends_on` parsing and path resolution.
|
|
222
|
+
5. Cycle detection.
|
|
223
|
+
6. Missing-dependency detection.
|
|
224
|
+
7. Topological sort.
|
|
225
|
+
|
|
226
|
+
Only after all of these pass does the per-spec wrapper start invoking the per-spec orchestration.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
93
230
|
## State Management
|
|
94
231
|
|
|
95
232
|
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.
|
|
@@ -759,6 +896,217 @@ run starts with a clean slate:
|
|
|
759
896
|
rm -f .claude-scrum-skill/orchestration-state.md
|
|
760
897
|
```
|
|
761
898
|
|
|
899
|
+
**In multi-path mode, Step 17 is suppressed.** The multi-path wrapper handles per-spec state file archival with a slug-suffixed name instead — see Sequential Multi-Path Mode → Per-Spec State File Lifecycle.
|
|
900
|
+
|
|
901
|
+
---
|
|
902
|
+
|
|
903
|
+
## Sequential Multi-Path Mode
|
|
904
|
+
|
|
905
|
+
Applies when Mode Classification selected sequential multi-path mode (2+ tokens, all paths to existing files, `--merged` not set). This section is the wrapper that invokes the existing single-spec orchestration (Phases 1-3 + Step 16 + Step 17, as documented above) once per spec, in the order determined by Dependency Resolution.
|
|
906
|
+
|
|
907
|
+
### Per-Spec Loop
|
|
908
|
+
|
|
909
|
+
For each spec in the topologically-sorted execution order:
|
|
910
|
+
|
|
911
|
+
1. Update the queue state file (see below): mark this spec's row as `in-progress`, record `Started` timestamp.
|
|
912
|
+
2. Invoke the full single-spec orchestration against this spec. This is the existing v1.7.1 flow — Phase 1 (Epic Completion Loop, including scaffolding via `/project-scaffold`), Phase 2 (Emulation Hardening Loop), Phase 3 (Project Cleanup), Step 16 (ADR Update). Step 17 (state file cleanup) is **suppressed** in multi-path mode; the wrapper handles archival instead.
|
|
913
|
+
3. On the spec's natural completion: archive `.claude-scrum-skill/orchestration-state.md` to `.claude-scrum-skill/orchestration-state-<spec-slug>.previous.md` BEFORE the next spec begins. Update the queue state file: mark this spec's row as `completed`, record `Completed` timestamp, update aggregate stats.
|
|
914
|
+
4. On the spec's safety-gate pause:
|
|
915
|
+
- **Without `--skip-on-pause`** (default): the per-spec state file remains at `.claude-scrum-skill/orchestration-state.md` with `Status: paused`. Update the queue state file: mark this spec's row as `paused`, set queue `Status: paused`. Exit the wrapper. The remaining specs in the queue are NOT started. The user resolves the gate, re-invokes `/project-orchestrate` with the same arguments, and the queue resumes from this spec.
|
|
916
|
+
- **With `--skip-on-pause`**: archive `.claude-scrum-skill/orchestration-state.md` to `.claude-scrum-skill/orchestration-state-<spec-slug>.skipped.md`. Update the queue state file: mark this spec's row as `skipped`, record the pause reason. Continue to the next spec.
|
|
917
|
+
5. Per-spec orchestration runs to completion (or pause) before the next spec begins — no interleaving of sprints, no concurrent execution.
|
|
918
|
+
|
|
919
|
+
### Spec Slug Derivation
|
|
920
|
+
|
|
921
|
+
A spec's slug is derived from its filename: `basename(path, ".md")`.
|
|
922
|
+
|
|
923
|
+
- `docs/specs/20260527_215752_multi_spec_sequential_orchestration.md` → `20260527_215752_multi_spec_sequential_orchestration`
|
|
924
|
+
- `spec-a.md` → `spec-a`
|
|
925
|
+
|
|
926
|
+
If two specs in the same invocation produce the same slug (e.g., one is `foo/spec.md`, another is `bar/spec.md`), ABORT before starting any spec — slug collisions would clobber each other's archived state files. Error format:
|
|
927
|
+
|
|
928
|
+
```
|
|
929
|
+
ERROR: Spec slug collision. No specs were started.
|
|
930
|
+
|
|
931
|
+
Colliding specs:
|
|
932
|
+
foo/spec.md → slug "spec"
|
|
933
|
+
bar/spec.md → slug "spec"
|
|
934
|
+
|
|
935
|
+
Rename one of the specs so basenames differ, then re-run.
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
### Per-Spec State File Lifecycle
|
|
939
|
+
|
|
940
|
+
| Event | State file action |
|
|
941
|
+
|-------|-------------------|
|
|
942
|
+
| Spec starts | Per-spec orchestration creates `.claude-scrum-skill/orchestration-state.md` (existing v1.7.1 behavior). |
|
|
943
|
+
| Spec completes naturally | Wrapper renames to `.claude-scrum-skill/orchestration-state-<slug>.previous.md`. |
|
|
944
|
+
| Spec pauses, no `--skip-on-pause` | File remains at canonical location with `Status: paused`. Queue exits. |
|
|
945
|
+
| Spec pauses, with `--skip-on-pause` | Wrapper renames to `.claude-scrum-skill/orchestration-state-<slug>.skipped.md`. Queue advances. |
|
|
946
|
+
| Resume from paused state | Per-spec orchestration reads `.claude-scrum-skill/orchestration-state.md` and resumes (existing v1.7.1 behavior). The wrapper resumes the queue from this spec's position based on the queue state file. |
|
|
947
|
+
|
|
948
|
+
Single-spec mode state file lifecycle is unchanged from v1.7.1 — no slug suffix, no queue file. Step 17's `rm -f` runs as it always did. Only multi-path mode uses the slug-suffix archival and suppresses Step 17.
|
|
949
|
+
|
|
950
|
+
### Queue State File
|
|
951
|
+
|
|
952
|
+
Multi-path mode maintains a queue state file at `.claude-scrum-skill/orchestration-queue-state.md` tracking the entire run. The file is human-readable markdown.
|
|
953
|
+
|
|
954
|
+
**Structure:**
|
|
955
|
+
|
|
956
|
+
```markdown
|
|
957
|
+
# Orchestration Queue State
|
|
958
|
+
|
|
959
|
+
## Meta
|
|
960
|
+
- **Mode:** sequential | merged
|
|
961
|
+
- **Status:** running | paused | completed
|
|
962
|
+
- **Started:** <ISO timestamp>
|
|
963
|
+
- **Last Updated:** <ISO timestamp>
|
|
964
|
+
- **Flags:** --skip-on-pause=<true|false>, --merged=<true|false>
|
|
965
|
+
|
|
966
|
+
## Specs (resolved execution order)
|
|
967
|
+
| # | Spec Path | Slug | Status | Started | Completed | State File Archive |
|
|
968
|
+
|---|-----------|------|--------|---------|-----------|--------------------|
|
|
969
|
+
| 1 | docs/specs/spec-a.md | spec-a | completed | <ts> | <ts> | orchestration-state-spec-a.previous.md |
|
|
970
|
+
| 2 | docs/specs/spec-b.md | spec-b | in-progress | <ts> | — | orchestration-state.md (live) |
|
|
971
|
+
| 3 | docs/specs/spec-c.md | spec-c | pending | — | — | — |
|
|
972
|
+
|
|
973
|
+
## Dependency Graph
|
|
974
|
+
- spec-c depends_on spec-a
|
|
975
|
+
- spec-b depends_on spec-a
|
|
976
|
+
(or "no dependencies declared" if empty)
|
|
977
|
+
|
|
978
|
+
## Aggregate (updated as specs complete)
|
|
979
|
+
- **Total specs:** N
|
|
980
|
+
- **Completed:** N
|
|
981
|
+
- **Paused:** N (current: <spec-slug>, if any)
|
|
982
|
+
- **Skipped:** N
|
|
983
|
+
- **Pending:** N
|
|
984
|
+
- **Total stories delivered (across completed specs):** N
|
|
985
|
+
- **Total sprints executed:** N
|
|
986
|
+
- **Total ADRs created:** N
|
|
987
|
+
|
|
988
|
+
## Log
|
|
989
|
+
- [<ts>] Multi-path run started — 3 specs in scope
|
|
990
|
+
- [<ts>] Dependency graph resolved — execution order: spec-a, spec-b, spec-c
|
|
991
|
+
- [<ts>] Spec 1/3 (spec-a) started
|
|
992
|
+
- [<ts>] Spec 1/3 (spec-a) completed — 12 stories, 3 sprints
|
|
993
|
+
- [<ts>] Spec 2/3 (spec-b) started
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
**Lifecycle:**
|
|
997
|
+
|
|
998
|
+
- Created at multi-path mode start (after Mode Classification, Flag Parsing, Glob Expansion, and Dependency Resolution all pass).
|
|
999
|
+
- Updated after every spec status transition: pending → in-progress → completed | paused | skipped.
|
|
1000
|
+
- On clean completion (all specs `completed` or `skipped`, none `paused`): renamed to `orchestration-queue-state.previous.md`. The wrapper emits the Cumulative Summary.
|
|
1001
|
+
- On paused run: remains in place with `Status: paused` and the paused spec identified. Resume continues from the paused spec.
|
|
1002
|
+
|
|
1003
|
+
**On startup**, check for an existing `.claude-scrum-skill/orchestration-queue-state.md`:
|
|
1004
|
+
|
|
1005
|
+
- `Status: running` → resume from the recorded position (autonomous default).
|
|
1006
|
+
- `Status: paused` → resume from the recorded position. The paused spec's per-spec state file is read by its own resume logic.
|
|
1007
|
+
- `Status: completed` → rename to `orchestration-queue-state.previous.md` and start a fresh run.
|
|
1008
|
+
- No file → initialize a new queue state file.
|
|
1009
|
+
|
|
1010
|
+
Never prompt. Same autonomous-default discipline as the single-spec state file (see Default Operating Mode).
|
|
1011
|
+
|
|
1012
|
+
### Safety-Gate Pause Announcements
|
|
1013
|
+
|
|
1014
|
+
**Default (without `--skip-on-pause`):**
|
|
1015
|
+
|
|
1016
|
+
```
|
|
1017
|
+
[Spec 2/3] spec-b.md — paused on safety gate.
|
|
1018
|
+
|
|
1019
|
+
Pause reason: 3rd consecutive hardening run produced 2 critical findings
|
|
1020
|
+
(see .claude-scrum-skill/reports/emulation-report/ISSUES.md).
|
|
1021
|
+
|
|
1022
|
+
Remaining specs (1) are not started. Queue state preserved at
|
|
1023
|
+
.claude-scrum-skill/orchestration-queue-state.md.
|
|
1024
|
+
|
|
1025
|
+
Resolve the findings and re-invoke /project-orchestrate with the same
|
|
1026
|
+
arguments to resume. The queue picks up at spec-b.md.
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
**With `--skip-on-pause`:**
|
|
1030
|
+
|
|
1031
|
+
```
|
|
1032
|
+
[Spec 2/3] spec-b.md — paused on safety gate. --skip-on-pause set; marking skipped.
|
|
1033
|
+
|
|
1034
|
+
Skipped reason: 3rd consecutive hardening run produced 2 critical findings.
|
|
1035
|
+
State archived to .claude-scrum-skill/orchestration-state-spec-b.skipped.md.
|
|
1036
|
+
|
|
1037
|
+
Continuing to Spec 3/3 — spec-c.md
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
### Resume Semantics
|
|
1041
|
+
|
|
1042
|
+
A multi-path run paused on a safety gate is resumed by re-invoking `/project-orchestrate` with the same argument list. The queue state file's recorded execution order takes precedence — even if a spec's `depends_on` frontmatter changed between attempts, the resumed run uses the order recorded at the original run's start. This prevents subtle ordering shifts mid-run.
|
|
1043
|
+
|
|
1044
|
+
Completed specs are NOT re-executed on resume. The wrapper skips entries marked `completed` and `skipped`, resumes the entry marked `paused` (handing off to the per-spec orchestration's own resume logic), and continues with `pending` entries afterward.
|
|
1045
|
+
|
|
1046
|
+
### Cumulative Summary
|
|
1047
|
+
|
|
1048
|
+
At the end of a multi-path run (all specs `completed` or `skipped`, none `paused`), emit a cumulative summary mirroring the existing single-spec completion summary structure, with a per-spec section plus an aggregate header.
|
|
1049
|
+
|
|
1050
|
+
Format:
|
|
1051
|
+
|
|
1052
|
+
```
|
|
1053
|
+
## Multi-Spec Orchestration Complete
|
|
1054
|
+
|
|
1055
|
+
### Aggregate
|
|
1056
|
+
- Specs in queue: 3
|
|
1057
|
+
- Completed: 2 (spec-a, spec-c)
|
|
1058
|
+
- Skipped: 1 (spec-b, paused on 3rd hardening run; archived)
|
|
1059
|
+
- Total stories delivered: 27 (44 story points)
|
|
1060
|
+
- Total sprints: 7
|
|
1061
|
+
- Total ADRs created: 3
|
|
1062
|
+
- Total duration: 4h 12m
|
|
1063
|
+
|
|
1064
|
+
### Per-Spec
|
|
1065
|
+
|
|
1066
|
+
#### spec-a.md ✅ Completed
|
|
1067
|
+
- 3 sprints, 12 stories, 18 points
|
|
1068
|
+
- Design-spike: yes (ADR-0007, 2 CONTEXT.md files)
|
|
1069
|
+
- Emulation runs: 1 (clean)
|
|
1070
|
+
- Cleanup: PASS
|
|
1071
|
+
- State archive: orchestration-state-spec-a.previous.md
|
|
1072
|
+
- ADR: docs/adrs/0007-spec-a-architecture.md
|
|
1073
|
+
|
|
1074
|
+
#### spec-b.md ⚠️ Skipped (paused, --skip-on-pause)
|
|
1075
|
+
- 2 sprints, 8 stories, 13 points completed before pause
|
|
1076
|
+
- Pause reason: 3rd hardening run produced 2 critical findings
|
|
1077
|
+
- State archive: orchestration-state-spec-b.skipped.md
|
|
1078
|
+
- Report: .claude-scrum-skill/reports/emulation-report/ISSUES.md
|
|
1079
|
+
|
|
1080
|
+
#### spec-c.md ✅ Completed
|
|
1081
|
+
- 4 sprints, 15 stories, 26 points
|
|
1082
|
+
- Design-spike: no (single epic)
|
|
1083
|
+
- Emulation runs: 2 (clean after hardening)
|
|
1084
|
+
- Cleanup: PASS
|
|
1085
|
+
- State archive: orchestration-state-spec-c.previous.md
|
|
1086
|
+
- ADR: docs/adrs/0008-spec-c-architecture.md
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
After emitting the summary, mark the queue `Status: completed` and rename `orchestration-queue-state.md` → `orchestration-queue-state.previous.md`.
|
|
1090
|
+
|
|
1091
|
+
### Merged Mode (Opt-In)
|
|
1092
|
+
|
|
1093
|
+
When `--merged` is set alongside 2+ PRD paths, the skill treats the inputs as one combined multi-spec project using legacy best-effort behavior — the pre-v1.8.0 path where the agent improvises merge policy at runtime (one combined scaffold call, one merged design-spike, one combined sprint cycle, one emulation, one cleanup, one ADR pass).
|
|
1094
|
+
|
|
1095
|
+
Emit the following deprecation-style warning BEFORE proceeding:
|
|
1096
|
+
|
|
1097
|
+
```
|
|
1098
|
+
WARNING: --merged is set. Multi-path inputs will be treated as one combined
|
|
1099
|
+
project with best-effort merge semantics. Formal merged behavior is not
|
|
1100
|
+
yet specified (deferred to a follow-up spec); results may be inconsistent
|
|
1101
|
+
run-to-run.
|
|
1102
|
+
|
|
1103
|
+
If you want predictable per-spec isolation, drop --merged and re-run.
|
|
1104
|
+
|
|
1105
|
+
Proceeding with merged mode...
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
Then run the legacy unified-multi-spec flow. The queue state file is still created (with `Mode: merged` in Meta) but tracks the merged invocation as a single combined orchestration rather than per-spec entries. Formal merged semantics — shared design-spike strategy, cross-spec dependency resolution, unified state file vs queue file — are deferred to a follow-up spec.
|
|
1109
|
+
|
|
762
1110
|
---
|
|
763
1111
|
|
|
764
1112
|
## Communication Pattern
|
|
@@ -241,6 +241,29 @@ In local-mode backlogs (`scaffolding: "local"`), epic and story files use YAML f
|
|
|
241
241
|
|
|
242
242
|
Absence of `epic_type` means a standard implementation epic — this preserves backward compatibility with existing `_epic.md` files.
|
|
243
243
|
|
|
244
|
+
### PRD Document Frontmatter
|
|
245
|
+
|
|
246
|
+
PRD/spec documents (passed to `/project-scaffold` or `/project-orchestrate`) may declare an optional `depends_on` field at the top of the document. The field is consumed by `/project-orchestrate` when running in sequential multi-path mode to determine inter-spec execution order — see `project-orchestrate/SKILL.md` → Input Parsing and Mode Detection → Dependency Resolution for the full algorithm.
|
|
247
|
+
|
|
248
|
+
| Field | Type | Purpose |
|
|
249
|
+
|-------|------|---------|
|
|
250
|
+
| `depends_on` | list of strings | Other specs in the same multi-path invocation that must complete before this one. Each entry is either a path (relative to this spec's directory) or a basename matching another spec in the argument list. Absence of the field means no inter-spec constraint — execution falls back to argument order. |
|
|
251
|
+
|
|
252
|
+
Example:
|
|
253
|
+
|
|
254
|
+
```yaml
|
|
255
|
+
---
|
|
256
|
+
title: My Spec
|
|
257
|
+
depends_on:
|
|
258
|
+
- other-spec.md # basename match against other args
|
|
259
|
+
- subdir/another-spec.md # path match relative to this spec's directory
|
|
260
|
+
---
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
`depends_on` is parallel in spirit to the story-level `blocked_by` field, but operates at the spec level. `/project-orchestrate` resolves the dependency graph at run start (topological sort, stable tie-break on argument order) and aborts the run BEFORE any spec executes if a cycle or missing dependency is detected. Cycles include self-references (`depends_on: [this-spec.md]`).
|
|
264
|
+
|
|
265
|
+
The field is ignored in single-path orchestrate invocations and in `/project-scaffold` invocations — it only takes effect when 2+ existing-file paths are passed to `/project-orchestrate`.
|
|
266
|
+
|
|
244
267
|
## Sprint Cadence
|
|
245
268
|
|
|
246
269
|
- Default sprint length: **2 weeks** (configurable per project)
|