claude-raid 0.2.5 → 0.2.7
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 +208 -179
- package/bin/cli.js +43 -9
- package/package.json +1 -1
- package/src/descriptions.js +1 -0
- package/src/init.js +1 -1
- package/src/remove.js +1 -1
- package/src/setup.js +1 -1
- package/src/ui.js +23 -19
- package/template/.claude/dungeon-master-rules.md +14 -8
- package/template/.claude/party-rules.md +6 -3
- package/template/.claude/skills/raid-browser/SKILL.md +1 -1
- package/template/.claude/skills/raid-browser-chrome/SKILL.md +1 -1
- package/template/.claude/skills/raid-canonical-design/SKILL.md +25 -32
- package/template/.claude/skills/raid-canonical-implementation/SKILL.md +5 -2
- package/template/.claude/skills/raid-canonical-implementation-plan/SKILL.md +6 -3
- package/template/.claude/skills/raid-canonical-prd/SKILL.md +32 -12
- package/template/.claude/skills/raid-canonical-protocol/SKILL.md +9 -9
- package/template/.claude/skills/raid-canonical-review/SKILL.md +5 -2
- package/template/.claude/skills/raid-init/SKILL.md +16 -28
- package/template/.claude/skills/raid-teambuff/SKILL.md +299 -0
- package/template/.claude/skills/raid-wrap-up/SKILL.md +7 -4
package/package.json
CHANGED
package/src/descriptions.js
CHANGED
package/src/init.js
CHANGED
|
@@ -189,7 +189,7 @@ async function run() {
|
|
|
189
189
|
console.log(' ' + header('Agents') + dim(` ${result.counts.agents} files`));
|
|
190
190
|
console.log(' Copied wizard.md, warrior.md, archer.md, rogue.md');
|
|
191
191
|
console.log(dim(' Each agent gets its own tmux pane. Start with:'));
|
|
192
|
-
console.log(dim('
|
|
192
|
+
console.log(dim(' claude-raid start'));
|
|
193
193
|
|
|
194
194
|
// Hooks
|
|
195
195
|
console.log('');
|
package/src/remove.js
CHANGED
|
@@ -10,7 +10,7 @@ const RAID_SKILLS = [
|
|
|
10
10
|
'raid-init', 'raid-canonical-protocol', 'raid-canonical-prd', 'raid-canonical-design',
|
|
11
11
|
'raid-canonical-implementation-plan', 'raid-canonical-implementation', 'raid-canonical-review',
|
|
12
12
|
'raid-wrap-up', 'raid-tdd', 'raid-debugging', 'raid-verification',
|
|
13
|
-
'raid-browser', 'raid-browser-chrome',
|
|
13
|
+
'raid-browser', 'raid-browser-chrome', 'raid-teambuff',
|
|
14
14
|
// Legacy (v0.1.x)
|
|
15
15
|
'raid-protocol', 'raid-design', 'raid-implementation-plan', 'raid-implementation',
|
|
16
16
|
'raid-review', 'raid-prd', 'raid-finishing', 'raid-browser-playwright', 'raid-git-worktrees',
|
package/src/setup.js
CHANGED
|
@@ -396,7 +396,7 @@ async function runSetup(opts = {}) {
|
|
|
396
396
|
|
|
397
397
|
if (checks.every(c => c.ok)) {
|
|
398
398
|
stdout.write('\n ' + colors.green('The party is assembled.') + ' Your quest awaits.\n');
|
|
399
|
-
stdout.write('\n claude
|
|
399
|
+
stdout.write('\n ' + colors.bold('claude-raid start') + '\n');
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
return { checks, allOk, actions };
|
package/src/ui.js
CHANGED
|
@@ -119,19 +119,18 @@ function header(text) {
|
|
|
119
119
|
|
|
120
120
|
function referenceCard() {
|
|
121
121
|
const howItWorks = box('How It Works', [
|
|
122
|
-
' You describe a task. The Wizard
|
|
123
|
-
'
|
|
122
|
+
' You describe a task. The Wizard spawns the full team:',
|
|
123
|
+
' Warrior, Archer, and Rogue — each attacking from a',
|
|
124
|
+
' different angle.',
|
|
124
125
|
'',
|
|
125
|
-
'
|
|
126
|
-
' ' + colors.bold('Skirmish') + ' 2 agents, lighter process',
|
|
127
|
-
' ' + colors.bold('Scout') + ' 1 agent + Wizard review',
|
|
126
|
+
' The Canonical Quest flows through 6 phases:',
|
|
128
127
|
'',
|
|
129
|
-
'
|
|
130
|
-
'',
|
|
131
|
-
'
|
|
132
|
-
'
|
|
133
|
-
'
|
|
134
|
-
'
|
|
128
|
+
' 1. ' + colors.bold('PRD') + ' Product requirements ' + colors.dim('(optional)'),
|
|
129
|
+
' 2. ' + colors.bold('Design') + ' Agents explore and challenge the approach',
|
|
130
|
+
' 3. ' + colors.bold('Plan') + ' Agents decompose into testable tasks',
|
|
131
|
+
' 4. ' + colors.bold('Implement') + ' One builds (TDD), others attack',
|
|
132
|
+
' 5. ' + colors.bold('Review') + ' Independent reviews, fight over findings',
|
|
133
|
+
' 6. ' + colors.bold('Wrap Up') + ' Storyboard, PR, vault archive',
|
|
135
134
|
'',
|
|
136
135
|
' Hooks enforce discipline automatically:',
|
|
137
136
|
' ' + colors.dim('\u2022') + ' No implementation without a design doc',
|
|
@@ -147,10 +146,11 @@ function referenceCard() {
|
|
|
147
146
|
]);
|
|
148
147
|
|
|
149
148
|
const nextStep = box('Next Step', [
|
|
150
|
-
' ' + colors.bold('
|
|
151
|
-
'
|
|
149
|
+
' ' + colors.bold('claude-raid start'),
|
|
150
|
+
'',
|
|
151
|
+
' ' + colors.dim('That\'s it. One command opens a tmux session with mouse'),
|
|
152
|
+
' ' + colors.dim('support and launches the Wizard inside it.'),
|
|
152
153
|
'',
|
|
153
|
-
' ' + colors.dim('Start tmux first, then the Wizard inside it.'),
|
|
154
154
|
' ' + colors.dim('Each agent gets its own tmux pane automatically.'),
|
|
155
155
|
' ' + colors.dim('Click any pane to talk to that agent directly.'),
|
|
156
156
|
'',
|
|
@@ -160,15 +160,19 @@ function referenceCard() {
|
|
|
160
160
|
' ' + colors.bold('Controls') + ' ' + colors.dim('(tmux)'),
|
|
161
161
|
' Click pane Switch to an agent',
|
|
162
162
|
' Ctrl+B + arrow Navigate between panes',
|
|
163
|
-
'',
|
|
164
|
-
' ' + colors.bold('Controls') + ' ' + colors.dim('(in-process, no tmux)'),
|
|
165
|
-
' Shift+Down Cycle through teammates',
|
|
166
|
-
' Ctrl+T Toggle the shared task list',
|
|
163
|
+
' Scroll Mouse wheel (mouse mode enabled)',
|
|
167
164
|
'',
|
|
168
165
|
' Review this anytime: ' + colors.bold('claude-raid heal'),
|
|
169
166
|
]);
|
|
170
167
|
|
|
171
|
-
|
|
168
|
+
const beta = box('Beta', [
|
|
169
|
+
' ' + colors.amber('This project is in active development.'),
|
|
170
|
+
' Multi-agent sessions are ' + colors.bold('token-usage intensive') + ' \u2014',
|
|
171
|
+
' a full quest consumes significantly more tokens than a',
|
|
172
|
+
' single-agent workflow. Monitor your usage and start small.',
|
|
173
|
+
]);
|
|
174
|
+
|
|
175
|
+
return howItWorks + '\n' + nextStep + '\n' + beta;
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
module.exports = { colors, banner, box, header, stripAnsi, referenceCard };
|
|
@@ -116,19 +116,25 @@ When agents disagree: good. That is the mechanism. Let the truth emerge from fri
|
|
|
116
116
|
|
|
117
117
|
When you judge the phase objective is met — not on a timer, not when agents say so — you close:
|
|
118
118
|
|
|
119
|
-
1.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
1. **Broadcast HOLD** — before synthesizing or presenting to the human, halt all agents. No agent work should be in flight while you are making decisions or presenting to the human.
|
|
120
|
+
```
|
|
121
|
+
SendMessage(to="warrior", message="HOLD. Phase closing. Stand by.")
|
|
122
|
+
SendMessage(to="archer", message="HOLD. Phase closing. Stand by.")
|
|
123
|
+
SendMessage(to="rogue", message="HOLD. Phase closing. Stand by.")
|
|
124
|
+
```
|
|
125
|
+
2. Review the phase file — Discoveries, Resolved battles, Shared Knowledge.
|
|
126
|
+
3. Synthesize the final decision from evidence.
|
|
127
|
+
4. Wrap up the phase document — fill gaps, ensure coherence.
|
|
128
|
+
5. State the ruling once. Clearly. With rationale.
|
|
129
|
+
6. Broadcast the ruling to all agents:
|
|
124
130
|
```
|
|
125
131
|
SendMessage(to="warrior", message="RULING: [decision]. No appeals.")
|
|
126
132
|
SendMessage(to="archer", message="RULING: [decision]. No appeals.")
|
|
127
133
|
SendMessage(to="rogue", message="RULING: [decision]. No appeals.")
|
|
128
134
|
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
7. Send phase report to human: what was accomplished, key decisions, what's next.
|
|
136
|
+
8. Commit: `docs(quest-{slug}): phase N {name} — {summary}` (or `feat`/`fix` for implementation/review)
|
|
137
|
+
9. Create fresh phase file for next phase (or proceed to wrap-up).
|
|
132
138
|
|
|
133
139
|
## The Dungeon
|
|
134
140
|
|
|
@@ -31,10 +31,12 @@ Seven pillars. Non-negotiable. Every agent, every phase, every interaction.
|
|
|
31
31
|
## Pillar 4: Round-Based Interaction
|
|
32
32
|
|
|
33
33
|
- **Turn-based, not real-time.** When assigned a task, work independently. No mid-thinking interruptions to other agents.
|
|
34
|
-
- **Flag completion.** When done, signal `ROUND_COMPLETE:` to the Wizard.
|
|
35
|
-
- **
|
|
34
|
+
- **Flag completion.** When done, signal `ROUND_COMPLETE:` to the Wizard.
|
|
35
|
+
- **STOP after ROUND_COMPLETE.** After signaling `ROUND_COMPLETE:`, **stop all work**. No cross-verification, no building, no challenging, no "while I wait" tasks. You are done until the Wizard dispatches your next action. If the Wizard wants cross-testing, they will dispatch it explicitly in the next round.
|
|
36
|
+
- **Cross-test only on dispatch.** Pick up teammates' work for review ONLY when the Wizard assigns it. Never self-initiate cross-testing.
|
|
36
37
|
- **Limited interactions.** Converge in 2-3 exchanges per finding. If stuck after 3, escalate to Wizard.
|
|
37
38
|
- **Party is silent during phase transitions.** When the Wizard opens/closes a phase, agents wait.
|
|
39
|
+
- **HOLD means freeze.** When the Wizard broadcasts `HOLD`, all agents stop immediately. No work in flight while the Wizard is presenting decisions to the human.
|
|
38
40
|
- **Exception: only the Wizard can interrupt** an agent mid-work.
|
|
39
41
|
|
|
40
42
|
## Pillar 5: Question Chain
|
|
@@ -113,7 +115,8 @@ Lead with the conclusion, follow with the evidence.
|
|
|
113
115
|
- `CONCEDE:` — you were wrong, moving on
|
|
114
116
|
- `DUNGEON:` — pinning a finding that survived challenge from at least two agents
|
|
115
117
|
- `WIZARD:` — you need project-level context or are genuinely stuck
|
|
116
|
-
- `ROUND_COMPLETE:` — finished assigned task
|
|
118
|
+
- `ROUND_COMPLETE:` — finished assigned task. **Stop all work. Wait for Wizard dispatch.**
|
|
119
|
+
- `HOLD` — (from Wizard only) freeze immediately. No work in flight.
|
|
117
120
|
- `BLACKCARD:` — high-concern finding that breaks the architecture
|
|
118
121
|
|
|
119
122
|
### Team Communication
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-browser
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when browser testing infrastructure is needed — startup discovery, boot/cleanup lifecycle, port isolation, pre-flight checks. Required before raid-browser-chrome or Playwright browser tasks."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Browser — Core Orchestration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-browser-chrome
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when live Chrome browser inspection is needed during Phase 5 review or ad-hoc browser verification."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Browser Chrome — Live Adversarial Inspection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-design
|
|
3
|
-
description: "Phase 2
|
|
3
|
+
description: "Use when Phase 2 (Design) begins in a Canonical Quest, after PRD is approved or skipped."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Design — Phase 2
|
|
@@ -60,45 +60,35 @@ Complete in order:
|
|
|
60
60
|
3. **Explore project context** — files, docs, recent commits, dependencies, conventions, patterns
|
|
61
61
|
4. **Research dependencies** — API surface, versioning, compatibility, known issues. Read docs COMPLETELY.
|
|
62
62
|
5. **Ask clarifying questions** — one at a time to the human, eliminate every ambiguity
|
|
63
|
-
6. **Open the Dungeon** — create `{questDir}/phase-2-design.md` with Phase 2 header, quest, mode. Read
|
|
63
|
+
6. **Open the Dungeon** — create `{questDir}/phase-2-design.md` (scoreboard) with Phase 2 header, quest, mode. Read `{questDir}/prd.md` if it exists.
|
|
64
64
|
7. **Dispatch with angles** — send each agent their angle via SendMessage, then go silent:
|
|
65
65
|
```
|
|
66
66
|
SendMessage(to="warrior", message="DISPATCH: [quest]. Your angle: [X]...")
|
|
67
67
|
SendMessage(to="archer", message="DISPATCH: [quest]. Your angle: [Y]...")
|
|
68
68
|
SendMessage(to="rogue", message="DISPATCH: [quest]. Your angle: [Z]...")
|
|
69
69
|
```
|
|
70
|
-
8. **
|
|
71
|
-
9. **
|
|
72
|
-
10. **
|
|
73
|
-
11. **
|
|
74
|
-
12. **
|
|
75
|
-
13. **
|
|
76
|
-
14. **
|
|
77
|
-
15. **
|
|
78
|
-
16. **
|
|
79
|
-
17. **
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
8. **Round 1: Research** — agents explore their angles independently in their own panes. Pin findings to Dungeon. Signal `ROUND_COMPLETE:`. **Stop.** Agents do NOT self-initiate cross-testing. You receive messages automatically. Intervene only on protocol violations.
|
|
71
|
+
9. **Round 2: Cross-testing** — when ALL agents have flagged `ROUND_COMPLETE:`, dispatch explicit cross-verification assignments. Each agent challenges specific findings from the others. Signal `ROUND_COMPLETE:` when done. **Stop.**
|
|
72
|
+
10. **Repeat if needed** — if more exploration is needed, dispatch a new research round with refined angles
|
|
73
|
+
11. **Close the phase** — broadcast `HOLD`. Close when Dungeon has sufficient verified findings to form 2-3 approaches
|
|
74
|
+
12. **Synthesize approaches** — propose 2-3 approaches from Dungeon evidence, with trade-offs and recommendation
|
|
75
|
+
13. **Present design section by section** — scale each section to its complexity (a few sentences if straightforward, up to 200-300 words if nuanced). Ask the human after each section: "Does this look right so far?" Be ready to revise before moving on. Cover: architecture, components, data flow, error handling, testing.
|
|
76
|
+
14. **Write design doc** — save to `{questDir}/design.md` (separate from the phase scoreboard). May also create `{questDir}/design-diagrams.md` for mermaid charts.
|
|
77
|
+
15. **Adversarial spec review** — agents attack the written spec directly, challenging each other
|
|
78
|
+
16. **Spec self-review** — fix issues inline (see checklist below)
|
|
79
|
+
17. **Human reviews written spec** — human approves before proceeding
|
|
80
|
+
18. **Commit** — `docs(quest-{slug}): phase 2 design — {summary}`
|
|
81
|
+
19. **Transition** — invoke `raid-canonical-implementation-plan`
|
|
82
|
+
|
|
83
|
+
## Opening the Dungeon (Phase Scoreboard)
|
|
84
|
+
|
|
85
|
+
Create `{questDir}/phase-2-design.md` — this is the **dungeon scoreboard**, not the deliverable. It tracks discoveries, battles, and shared knowledge from agent exploration. Every line in Discoveries/Active Battles must use a recognized prefix (`DUNGEON:`, `UNRESOLVED:`, `BLACKCARD:`, `RESOLVED:`, `TASK:`). Freeform content is only allowed in Resolved, Shared Knowledge, and Escalations sections.
|
|
84
86
|
|
|
85
87
|
```markdown
|
|
86
88
|
# Phase 2: Design
|
|
87
89
|
## Quest: <task description from human>
|
|
88
90
|
## Mode: <Full Raid | Skirmish>
|
|
89
|
-
## PRD: <link to
|
|
90
|
-
|
|
91
|
-
### Architecture Overview
|
|
92
|
-
|
|
93
|
-
### Data Flow
|
|
94
|
-
|
|
95
|
-
### Component Design
|
|
96
|
-
|
|
97
|
-
### API Contracts
|
|
98
|
-
|
|
99
|
-
### Edge Cases & Error Handling
|
|
100
|
-
|
|
101
|
-
### Trade-offs & Decisions
|
|
91
|
+
## PRD: <link to prd.md if it exists>
|
|
102
92
|
|
|
103
93
|
### Discoveries
|
|
104
94
|
|
|
@@ -197,9 +187,9 @@ After writing the design doc, the Wizard reviews with fresh eyes:
|
|
|
197
187
|
|
|
198
188
|
Fix issues inline.
|
|
199
189
|
|
|
200
|
-
## Design Document Structure
|
|
190
|
+
## Design Document Structure (Phase Deliverable)
|
|
201
191
|
|
|
202
|
-
|
|
192
|
+
The actual design doc is a **separate file**: `{questDir}/design.md`. This file is not validated by the dungeon hook and can contain freeform markdown. Write it when closing the phase — synthesize from scoreboard findings and agent exploration.
|
|
203
193
|
|
|
204
194
|
```markdown
|
|
205
195
|
# [Feature Name] Design Specification
|
|
@@ -251,7 +241,10 @@ If the team is stuck on a fundamental design choice after genuine direct debate:
|
|
|
251
241
|
|
|
252
242
|
When the design is approved and committed:
|
|
253
243
|
|
|
254
|
-
1. Update `.claude/raid-session` phase
|
|
244
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
245
|
+
```bash
|
|
246
|
+
jq '.phase="plan"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
247
|
+
```
|
|
255
248
|
2. **Commit:** `docs(quest-{slug}): phase 2 design — {summary}`
|
|
256
249
|
3. **Send phase report to human:** summarize key design decisions, trade-offs resolved, what's next
|
|
257
250
|
4. **Load the `raid-canonical-implementation-plan` skill now and begin Phase 3.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-implementation
|
|
3
|
-
description: "Phase 4
|
|
3
|
+
description: "Use when Phase 4 (Implementation) begins in a Canonical Quest, after the plan is approved and committed."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Implementation — Phase 4
|
|
@@ -215,7 +215,10 @@ STOP implementing immediately when:
|
|
|
215
215
|
|
|
216
216
|
When all tasks are approved and committed:
|
|
217
217
|
|
|
218
|
-
1. Update `.claude/raid-session` phase
|
|
218
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
219
|
+
```bash
|
|
220
|
+
jq '.phase="review"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
221
|
+
```
|
|
219
222
|
2. **Commit**: `feat(quest-{slug}): phase 4 implementation — {summary}`
|
|
220
223
|
3. **Send phase report to human**: what was built, test coverage, any concerns
|
|
221
224
|
4. **Ask human**: "Shall we inspect the treasure? (Review phase) Or proceed directly to wrap-up?"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-implementation-plan
|
|
3
|
-
description: "Phase 3
|
|
3
|
+
description: "Use when Phase 3 (Plan) begins in a Canonical Quest, after the design doc is approved and committed."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Implementation Plan — Phase 3
|
|
@@ -41,7 +41,7 @@ digraph plan {
|
|
|
41
41
|
## Wizard Checklist
|
|
42
42
|
|
|
43
43
|
1. **Read the approved design doc** — every requirement, every constraint
|
|
44
|
-
2. **Read the Phase 2 design doc** — carry forward verified knowledge from `{questDir}/phase-2-design.md`
|
|
44
|
+
2. **Read the Phase 2 design doc** — carry forward verified knowledge from `{questDir}/design.md` (the deliverable) and `{questDir}/phase-2-design.md` (the scoreboard)
|
|
45
45
|
3. **Open the Dungeon** — create `{questDir}/phase-3-plan.md` with Phase 3 header
|
|
46
46
|
4. **Dispatch decomposition** — all agents decompose independently with different angles, then interact directly (round-based)
|
|
47
47
|
5. **Observe the fight** — agents test each other's plans, argue ordering, coverage, naming. Intervene only on triggers.
|
|
@@ -218,7 +218,10 @@ Fix issues inline. If a spec requirement has no task, add the task.
|
|
|
218
218
|
|
|
219
219
|
When the plan is approved and committed:
|
|
220
220
|
|
|
221
|
-
1. Update `.claude/raid-session` phase
|
|
221
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
222
|
+
```bash
|
|
223
|
+
jq '.phase="implementation"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
224
|
+
```
|
|
222
225
|
2. **Commit**: `docs(quest-{slug}): phase 3 plan — {N} tasks, {summary}`
|
|
223
226
|
3. **Send phase report to human**: task count, dependency graph, estimated scope
|
|
224
227
|
4. **Load the `raid-canonical-implementation` skill now and begin Phase 4.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-prd
|
|
3
|
-
description: "Phase 1
|
|
3
|
+
description: "Use when Phase 1 (PRD) begins in a Canonical Quest. The human chose to forge a PRD rather than skip to Design."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid PRD — Phase 1 (Optional)
|
|
@@ -39,27 +39,49 @@ digraph prd {
|
|
|
39
39
|
|
|
40
40
|
## Wizard Checklist
|
|
41
41
|
|
|
42
|
-
1. **Update raid-session**
|
|
42
|
+
1. **Update raid-session** via Bash (write gate blocks Write/Edit on this file):
|
|
43
|
+
```bash
|
|
44
|
+
jq '.phase="prd"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
45
|
+
```
|
|
43
46
|
2. **Create phase file** — `{questDir}/phase-1-prd.md` with boilerplate sections
|
|
44
47
|
3. **Digest the human's request** — understand intent, identify gaps, map the problem space
|
|
45
48
|
4. **Dispatch party with research angles** via SendMessage:
|
|
46
49
|
- **@Warrior**: Explore the technical stack. What infrastructure exists? What APIs are available? What technical constraints apply? What precedents exist in the codebase?
|
|
47
50
|
- **@Archer**: Explore the patterns. How does this fit existing architecture? What conventions apply? What similar features exist? What naming and structure patterns should we follow?
|
|
48
51
|
- **@Rogue**: Explore the edge cases. What could go wrong? What assumptions are we making? What requirements are we missing? What will users actually do vs what we think they'll do?
|
|
49
|
-
5. **
|
|
52
|
+
5. **Round 1: Research** — agents research in parallel. Each investigates their angle independently. Pin findings. Signal `ROUND_COMPLETE:`. **Stop.** Agents do NOT self-initiate cross-testing. Go silent and observe.
|
|
50
53
|
6. **Mediate questions** — agents ask Wizard, Wizard reasons, Wizard asks human only if unsure
|
|
51
|
-
7. **
|
|
52
|
-
8. **
|
|
54
|
+
7. **Round 2: Cross-testing** — when ALL agents have flagged `ROUND_COMPLETE:`, dispatch explicit cross-verification assignments. Each agent challenges specific findings from the others. Agents signal `ROUND_COMPLETE:` when done. **Stop.**
|
|
55
|
+
8. **Repeat if needed** — if more research is needed, dispatch a new research round with refined angles
|
|
56
|
+
9. **Close phase** — broadcast `HOLD`, wrap up PRD, send report, commit
|
|
53
57
|
|
|
54
|
-
## Phase File
|
|
58
|
+
## Phase File (Dungeon Scoreboard)
|
|
55
59
|
|
|
56
|
-
Create `{questDir}/phase-1-prd.md
|
|
60
|
+
Create `{questDir}/phase-1-prd.md` — this is the **dungeon scoreboard**, not the deliverable. It tracks discoveries, battles, and shared knowledge from agent research. Every line in Discoveries/Active Battles must use a recognized prefix (`DUNGEON:`, `UNRESOLVED:`, `BLACKCARD:`, `RESOLVED:`, `TASK:`). Freeform content is only allowed in Resolved, Shared Knowledge, and Escalations sections.
|
|
57
61
|
|
|
58
62
|
```markdown
|
|
59
63
|
# Phase 1: PRD — Product Requirements Document
|
|
60
64
|
## Quest: <task description>
|
|
61
65
|
## Mode: <Full Raid | Skirmish | Scout>
|
|
62
66
|
|
|
67
|
+
### Discoveries
|
|
68
|
+
|
|
69
|
+
### Active Battles
|
|
70
|
+
|
|
71
|
+
### Resolved
|
|
72
|
+
|
|
73
|
+
### Shared Knowledge
|
|
74
|
+
|
|
75
|
+
### Escalations
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Phase Deliverable (PRD Document)
|
|
79
|
+
|
|
80
|
+
The actual PRD is a **separate file**: `{questDir}/prd.md`. This file is not validated by the dungeon hook and can contain freeform markdown. Write it when closing the phase — synthesize from the scoreboard findings.
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
# <Feature Name> — Product Requirements Document
|
|
84
|
+
|
|
63
85
|
### Problem Statement
|
|
64
86
|
|
|
65
87
|
### Goals & Non-Goals
|
|
@@ -81,10 +103,6 @@ Create `{questDir}/phase-1-prd.md`:
|
|
|
81
103
|
### Success Criteria
|
|
82
104
|
|
|
83
105
|
### Open Questions
|
|
84
|
-
|
|
85
|
-
### Discoveries
|
|
86
|
-
|
|
87
|
-
### Shared Knowledge
|
|
88
106
|
```
|
|
89
107
|
|
|
90
108
|
## Research Angles
|
|
@@ -130,4 +148,6 @@ When the PRD is complete (all sections filled, open questions resolved):
|
|
|
130
148
|
|
|
131
149
|
## Phase Spoils
|
|
132
150
|
|
|
133
|
-
**
|
|
151
|
+
**Two outputs**:
|
|
152
|
+
- `{questDir}/phase-1-prd.md` — Dungeon scoreboard with pinned discoveries, resolved battles, and shared knowledge from agent research
|
|
153
|
+
- `{questDir}/prd.md` — Complete Product Requirements Document with all sections filled, synthesized from scoreboard findings
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-protocol
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use at the start of any Canonical Quest. Reference for phase lifecycle, round-based interaction rules, communication signals, and phase transition gates."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Canonical Quest Protocol
|
|
@@ -111,14 +111,14 @@ Agents → Wizard → Human. Agents NEVER ask the human directly.
|
|
|
111
111
|
|
|
112
112
|
Every phase MUST produce at least one detailed markdown artifact:
|
|
113
113
|
|
|
114
|
-
| Phase |
|
|
115
|
-
|
|
116
|
-
| PRD | `{questDir}/phase-1-prd.md` |
|
|
117
|
-
| Design | `{questDir}/phase-2-design.md` |
|
|
118
|
-
| Plan | `{questDir}/phase-3-plan.md`
|
|
119
|
-
| Implementation | `{questDir}/phase-4-implementation.md` |
|
|
120
|
-
| Review | `{questDir}/phase-5-review.md` |
|
|
121
|
-
| Wrap Up | `{questDir}/phase-6-wrap-up.md` |
|
|
114
|
+
| Phase | Scoreboard (phase file) | Deliverable |
|
|
115
|
+
|-------|--------------------------|-------------|
|
|
116
|
+
| PRD | `{questDir}/phase-1-prd.md` | `{questDir}/prd.md` |
|
|
117
|
+
| Design | `{questDir}/phase-2-design.md` | `{questDir}/design.md` |
|
|
118
|
+
| Plan | `{questDir}/phase-3-plan.md` | task files (`phase-3-plan-task-NN.md`) |
|
|
119
|
+
| Implementation | `{questDir}/phase-4-implementation.md` | code changes |
|
|
120
|
+
| Review | `{questDir}/phase-5-review.md` | fixes |
|
|
121
|
+
| Wrap Up | `{questDir}/phase-6-wrap-up.md` | PR + storyboard |
|
|
122
122
|
|
|
123
123
|
## Communication Signals
|
|
124
124
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-review
|
|
3
|
-
description: "Phase 5
|
|
3
|
+
description: "Use when Phase 5 (Review) begins in a Canonical Quest, after implementation is complete and the human opts in."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Review — Phase 5 (Optional)
|
|
@@ -225,7 +225,10 @@ The Wizard closes when agents have exhausted their findings and the review board
|
|
|
225
225
|
|
|
226
226
|
When the RULING is APPROVED FOR MERGE:
|
|
227
227
|
|
|
228
|
-
1. Update `.claude/raid-session` phase
|
|
228
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
229
|
+
```bash
|
|
230
|
+
jq '.phase="wrap-up"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
231
|
+
```
|
|
229
232
|
2. **Commit**: `fix(quest-{slug}): phase 5 review — {N} findings resolved`
|
|
230
233
|
3. **Send phase report to human**: findings count, fixes applied, any black cards
|
|
231
234
|
4. **Load the `raid-wrap-up` skill now and begin Phase 6.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-init
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when starting a new Raid session or resuming an existing quest. Loaded first by the Wizard before any phase begins."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Init — Quest Selection & Session Setup
|
|
@@ -25,11 +25,8 @@ digraph init {
|
|
|
25
25
|
"Canonical Quest?" -> "Coming soon message" [label="B/D/E/F"];
|
|
26
26
|
"Coming soon message" -> "Present quest menu";
|
|
27
27
|
"Ask: PRD needed?" -> "Human describes task";
|
|
28
|
-
"Human describes task" -> "
|
|
29
|
-
"
|
|
30
|
-
"Human approves mode?" -> "Spawn team + create quest dir" [label="yes"];
|
|
31
|
-
"Human approves mode?" -> "Assess complexity + recommend mode" [label="override"];
|
|
32
|
-
"Spawn team + create quest dir" -> "Begin first phase" [shape=doublecircle];
|
|
28
|
+
"Human describes task" -> "Spawn full team + create quest dir";
|
|
29
|
+
"Spawn full team + create quest dir" -> "Begin first phase" [shape=doublecircle];
|
|
33
30
|
}
|
|
34
31
|
```
|
|
35
32
|
|
|
@@ -91,35 +88,26 @@ Loop back to the menu.
|
|
|
91
88
|
|
|
92
89
|
Ask the human to describe the task/feature they want to build. Listen carefully. Read 3 times internally.
|
|
93
90
|
|
|
94
|
-
### 4c.
|
|
91
|
+
### 4c. Spawn Team & Setup
|
|
95
92
|
|
|
96
|
-
|
|
93
|
+
The Canonical Quest always runs as Full Raid (Warrior, Archer, Rogue). Do NOT ask the human to confirm the mode — it is implicit.
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
Present recommendation. Wait for human to approve or override.
|
|
105
|
-
|
|
106
|
-
### 4d. Spawn Team & Setup
|
|
107
|
-
|
|
108
|
-
1. Update raid-session with:
|
|
109
|
-
- `questType`: `"canonical"`
|
|
110
|
-
- `questId`: slugified from task description (e.g., `"auth-redesign"`)
|
|
111
|
-
- `questDir`: `.claude/dungeon/{questId}`
|
|
112
|
-
- `phase`: `""` (will be set by first phase skill)
|
|
95
|
+
1. Update `.claude/raid-session` (created by the session-start hook) via **Bash with jq** — the write gate blocks Write/Edit on this file, so always use Bash:
|
|
96
|
+
```bash
|
|
97
|
+
jq --arg qt "canonical" --arg qid "{questId}" --arg qdir ".claude/dungeon/{questId}" \
|
|
98
|
+
'.questType=$qt | .questId=$qid | .questDir=$qdir | .mode="full"' \
|
|
99
|
+
.claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
100
|
+
```
|
|
113
101
|
2. Create quest directory if not already created by hook:
|
|
114
102
|
```
|
|
115
103
|
mkdir -p {questDir}
|
|
116
104
|
```
|
|
117
|
-
3. Spawn team:
|
|
105
|
+
3. Spawn the full team:
|
|
118
106
|
```
|
|
119
|
-
TeamCreate(team_name="raid-
|
|
107
|
+
TeamCreate(team_name="raid-full-{questId}")
|
|
120
108
|
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
121
|
-
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
122
|
-
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
109
|
+
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
110
|
+
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
123
111
|
```
|
|
124
112
|
|
|
125
113
|
## Step 5: Begin First Phase
|
|
@@ -135,6 +123,6 @@ Present recommendation. Wait for human to approve or override.
|
|
|
135
123
|
| Thought | Reality |
|
|
136
124
|
|---------|---------|
|
|
137
125
|
| "Skip the greeting, get to work" | The greeting sets the tone. It takes 5 seconds. Do it. |
|
|
138
|
-
| "
|
|
126
|
+
| "Let me ask which mode to use" | Canonical Quest = Full Raid. Always. Don't ask. |
|
|
139
127
|
| "Let me start exploring the codebase" | You are the Wizard. You don't explore. You dispatch. |
|
|
140
128
|
| "I'll figure out the quest type later" | Quest type determines the phase flow. Choose now. |
|