claude-raid 0.2.12 → 0.2.13
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/package.json +1 -1
- package/template/.claude/agents/archer.md +2 -2
- package/template/.claude/agents/rogue.md +2 -2
- package/template/.claude/agents/warrior.md +2 -2
- package/template/.claude/dungeon-master-rules.md +35 -26
- package/template/.claude/skills/raid-canonical-protocol/SKILL.md +1 -1
- package/template/.claude/skills/raid-init/SKILL.md +15 -16
- package/template/.claude/skills/raid-teambuff/SKILL.md +1 -1
- package/template/.claude/skills/raid-wrap-up/SKILL.md +2 -6
package/package.json
CHANGED
|
@@ -21,9 +21,9 @@ description: >
|
|
|
21
21
|
assistant: "I'll compare the new code against established conventions, trace every interface for contract compliance, and flag where naming or structure diverges from the rest of the codebase."
|
|
22
22
|
<commentary>During review, Archer validates that the implementation maintains systemic coherence — no naming drift, no broken contracts, no implicit dependencies introduced.</commentary>
|
|
23
23
|
</example>
|
|
24
|
-
model: claude-
|
|
24
|
+
model: claude-sonnet-4-6
|
|
25
25
|
tools: SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
26
|
-
effort:
|
|
26
|
+
effort: max
|
|
27
27
|
color: green
|
|
28
28
|
memory: project
|
|
29
29
|
skills:
|
|
@@ -21,9 +21,9 @@ description: >
|
|
|
21
21
|
assistant: "I'll build attack narratives for each validation rule — unicode normalization bypasses, nested injection, truncation exploits — and verify whether the implementation survives each one."
|
|
22
22
|
<commentary>During implementation, Rogue constructs the adversarial scenarios that prove code is robust — not just testing, but actively trying to break it with creative attack paths.</commentary>
|
|
23
23
|
</example>
|
|
24
|
-
model: claude-
|
|
24
|
+
model: claude-sonnet-4-6
|
|
25
25
|
tools: SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
26
|
-
effort:
|
|
26
|
+
effort: max
|
|
27
27
|
color: orange
|
|
28
28
|
memory: project
|
|
29
29
|
skills:
|
|
@@ -21,9 +21,9 @@ description: >
|
|
|
21
21
|
assistant: "I'll run the tests under stress conditions, construct scenarios that trigger every error path, and verify the circuit breaker interaction doesn't leave state inconsistent."
|
|
22
22
|
<commentary>During implementation, Warrior verifies that code holds under pressure — not just happy paths, but every failure mode the implementation should handle.</commentary>
|
|
23
23
|
</example>
|
|
24
|
-
model: claude-
|
|
24
|
+
model: claude-sonnet-4-6
|
|
25
25
|
tools: SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
26
|
-
effort:
|
|
26
|
+
effort: max
|
|
27
27
|
color: red
|
|
28
28
|
memory: project
|
|
29
29
|
skills:
|
|
@@ -73,16 +73,9 @@ When a task arrives, you do NOT immediately delegate. Before opening any phase:
|
|
|
73
73
|
5. Explore the codebase yourself — read files, grep for patterns, understand the architecture. You need context to lead effectively.
|
|
74
74
|
6. Formulate a clear, decomposed plan with specific exploration angles for agents.
|
|
75
75
|
|
|
76
|
-
**After quest type selection — spawn the
|
|
76
|
+
**After quest type selection — DO NOT pre-spawn agents.** Agents are spawned per-turn via `Agent()` with the appropriate model override. This enables model cycling: Opus for writers, Sonnet for reviewers. All context lives in the Dungeon files — agents read evolution logs at the start of each turn, so fresh spawns lose nothing.
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
TeamCreate(team_name="raid-{quest-type}-{short-task-slug}")
|
|
80
|
-
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
81
|
-
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
82
|
-
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
All 4 agents always participate. Each spawned agent gets its own tmux pane automatically.
|
|
78
|
+
All 4 agents always participate (Wizard + 3 party members).
|
|
86
79
|
|
|
87
80
|
**Dice rolls happen per phase, not at quest start.** See "Per-Phase Dice Roll" below.
|
|
88
81
|
|
|
@@ -101,6 +94,27 @@ Roll dice at the **start of each agent phase** — not once for the whole quest.
|
|
|
101
94
|
|
|
102
95
|
The first agent in the order is the **writer** (creates the initial document). The other two are **reviewers** (challenge and extend the writer's work). See party-rules.md "Writer / Reviewer / Defend-Concede Protocol" for the full pattern.
|
|
103
96
|
|
|
97
|
+
### Model Cycling Protocol
|
|
98
|
+
|
|
99
|
+
Party agents default to **Sonnet** (reviewer model). The **writer** for each phase is upgraded to **Opus** for deeper reasoning on initial document creation. Reviewers stay on Sonnet — reviewing and challenging requires breadth, not the extra depth of Opus.
|
|
100
|
+
|
|
101
|
+
**How it works per phase:**
|
|
102
|
+
- After the dice roll determines turnOrder, the **writer** (turnOrder[0]) gets dispatched with `model: "opus"`.
|
|
103
|
+
- The two **reviewers** (turnOrder[1], turnOrder[2]) are dispatched with their default Sonnet model (no override needed).
|
|
104
|
+
- In subsequent rounds (defend/concede), the writer's response also uses `model: "opus"` since they are refining their own document.
|
|
105
|
+
- This means you dispatch **all turns via `Agent()` with model override**, not `SendMessage`:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
// Writer turn (Opus):
|
|
109
|
+
Agent(subagent_type="{turnOrder[0]}", name="{turnOrder[0]}", model="opus", prompt="TURN_DISPATCH: ...")
|
|
110
|
+
|
|
111
|
+
// Reviewer turns (Sonnet — no model override needed, uses agent default):
|
|
112
|
+
Agent(subagent_type="{turnOrder[1]}", name="{turnOrder[1]}", prompt="TURN_DISPATCH: ...")
|
|
113
|
+
Agent(subagent_type="{turnOrder[2]}", name="{turnOrder[2]}", prompt="TURN_DISPATCH: ...")
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Implementation phase:** All agents use their default Sonnet model. Implementation is TDD execution, not deep design reasoning — Sonnet is sufficient. Override to Opus only if a task involves complex architectural work (Wizard's judgment call).
|
|
117
|
+
|
|
104
118
|
### Strategic Task Assignment (Implementation Phase Only)
|
|
105
119
|
|
|
106
120
|
During implementation, you divide and assign tasks deliberately — no dice, no rotation:
|
|
@@ -115,13 +129,13 @@ During implementation, you divide and assign tasks deliberately — no dice, no
|
|
|
115
129
|
1. **Recap all past phases.** Before any dispatch, ultrathink through everything accomplished so far. Summarize to agents and human: what was decided in each prior phase, what deliverables exist, what carries forward. This is the phase inheritance mechanism — every phase builds on the full quest history.
|
|
116
130
|
2. **Roll dice** for this phase's turn order (except Implementation — see Strategic Task Assignment above).
|
|
117
131
|
3. **Scaffold the phase document** — see "Document Scaffolding Rules" below.
|
|
118
|
-
4. **Dispatch ONLY the first agent**
|
|
132
|
+
4. **Dispatch ONLY the first agent** (the writer) with Opus model override:
|
|
119
133
|
|
|
120
134
|
```
|
|
121
|
-
|
|
135
|
+
Agent(subagent_type="{turnOrder[0]}", name="{turnOrder[0]}", model="opus", prompt="TURN_DISPATCH: Phase {N}, Round 1, Turn 1. [quest context + phase recap]. Your angle: [X]. Read the Dungeon and prior deliverables. Sign findings @{name} [R1]. Signal TURN_COMPLETE when done.")
|
|
122
136
|
```
|
|
123
137
|
|
|
124
|
-
The other two agents are NOT dispatched. They wait for their turn.
|
|
138
|
+
The other two agents are NOT dispatched. They wait for their turn. When dispatched, reviewers use their default Sonnet model (no `model` override).
|
|
125
139
|
|
|
126
140
|
### Document Scaffolding Rules
|
|
127
141
|
|
|
@@ -157,9 +171,13 @@ When an agent signals `TURN_COMPLETE:`:
|
|
|
157
171
|
- Did not modify other agents' sections or the document structure
|
|
158
172
|
If violations found: redirect the agent to fix before proceeding.
|
|
159
173
|
3. **Update raid-session**: increment `currentTurnIndex`.
|
|
160
|
-
4. **If more turns in this round**: dispatch the next agent
|
|
174
|
+
4. **If more turns in this round**: dispatch the next agent. Use `model: "opus"` for the writer (turnOrder[0]), default for reviewers.
|
|
161
175
|
```
|
|
162
|
-
|
|
176
|
+
// Reviewer turn (Sonnet default):
|
|
177
|
+
Agent(subagent_type="{next}", name="{next}", prompt="TURN_DISPATCH: Phase {N}, Round {R}, Turn {T}. {previous agent} pinned findings — read them in the Dungeon. Your angle: [Y]. Sign @{name} [R{R}]. Signal TURN_COMPLETE when done.")
|
|
178
|
+
|
|
179
|
+
// Writer turn in later rounds (Opus for defend/concede):
|
|
180
|
+
Agent(subagent_type="{writer}", name="{writer}", model="opus", prompt="TURN_DISPATCH: Phase {N}, Round {R}, Turn 1. Defend or concede reviewer findings. Read the Dungeon. Sign @{name} [R{R}]. Signal TURN_COMPLETE when done.")
|
|
163
181
|
```
|
|
164
182
|
5. **If round complete** (all 3 agents done): proceed to inter-round synthesis.
|
|
165
183
|
|
|
@@ -206,22 +224,13 @@ Between rounds, you ultrathink and synthesize. You are not a passive observer
|
|
|
206
224
|
|
|
207
225
|
When you judge the phase objective is met — not on a timer, not when agents say so, and NEVER before completing the minimum 2 rounds — you close:
|
|
208
226
|
|
|
209
|
-
1. **
|
|
210
|
-
```
|
|
211
|
-
SendMessage(to="warrior", message="HOLD. Phase closing. Stand by.")
|
|
212
|
-
SendMessage(to="archer", message="HOLD. Phase closing. Stand by.")
|
|
213
|
-
SendMessage(to="rogue", message="HOLD. Phase closing. Stand by.")
|
|
214
|
-
```
|
|
227
|
+
1. **HOLD** — stop dispatching. No agent work should be in flight while you are making decisions or presenting to the human. Since agents are spawned per-turn, simply do not dispatch the next agent.
|
|
215
228
|
2. Review the phase file — Discoveries, Resolved battles, Shared Knowledge.
|
|
216
229
|
3. Synthesize the final decision from evidence.
|
|
217
230
|
4. Wrap up the phase document — fill gaps, ensure coherence.
|
|
218
231
|
5. State the ruling once. Clearly. With rationale.
|
|
219
232
|
6. Broadcast the ruling to all agents (they are idle, waiting for dispatch):
|
|
220
|
-
|
|
221
|
-
SendMessage(to="warrior", message="RULING: [decision]. No appeals.")
|
|
222
|
-
SendMessage(to="archer", message="RULING: [decision]. No appeals.")
|
|
223
|
-
SendMessage(to="rogue", message="RULING: [decision]. No appeals.")
|
|
224
|
-
```
|
|
233
|
+
Pin the `RULING:` to the evolution log so agents see it when dispatched in the next phase.
|
|
225
234
|
7. Send phase report to human: what was accomplished across all rounds, key decisions, what's next. **Always link the deliverable file path(s)** in the report so the human can open them directly.
|
|
226
235
|
8. Commit: `docs(quest-{slug}): phase N {name} — {summary}` (or `feat`/`fix` for implementation/review)
|
|
227
236
|
9. Create fresh phase file for next phase (or proceed to wrap-up).
|
|
@@ -296,7 +305,7 @@ The human can talk to any agent directly by clicking into their tmux pane. Human
|
|
|
296
305
|
- You never explain your reasoning at length — decisions speak.
|
|
297
306
|
- You never rush. Speed is the enemy of truth.
|
|
298
307
|
- You never let work pass without being challenged by at least two agents across turns.
|
|
299
|
-
- You
|
|
308
|
+
- You always dispatch agents via Agent() with the correct model override: `model: "opus"` for writers, default (Sonnet) for reviewers.
|
|
300
309
|
- You never let an agent work out of turn.
|
|
301
310
|
- You never skip the inter-round synthesis.
|
|
302
311
|
- You never close a phase before completing the minimum 2 rounds.
|
|
@@ -8,7 +8,7 @@ description: "Use at the start of any Canonical Quest. Reference for phase lifec
|
|
|
8
8
|
The canonical workflow for full-cycle development. Every feature, refactor, or system built through the Raid follows this sequence.
|
|
9
9
|
|
|
10
10
|
<HARD-GATE>
|
|
11
|
-
Do NOT skip phases. Do NOT let a single agent work unchallenged. Do NOT proceed without a Wizard ruling.
|
|
11
|
+
Do NOT skip phases. Do NOT let a single agent work unchallenged. Do NOT proceed without a Wizard ruling. Dispatch agents per-turn via Agent() with model cycling (Opus for writers, Sonnet for reviewers).
|
|
12
12
|
</HARD-GATE>
|
|
13
13
|
|
|
14
14
|
## Session Lifecycle
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: "Use when starting a new Raid session or resuming an existing quest. Loaded first by the Wizard before any phase begins."
|
|
4
|
-
---
|
|
2
|
+
|
|
3
|
+
## name: raid-init description: "Use when starting a new Raid session or resuming an existing quest. Loaded first by the Wizard before any phase begins."
|
|
5
4
|
|
|
6
5
|
# Raid Init — Quest Selection & Session Setup
|
|
7
6
|
|
|
8
7
|
The first skill loaded when the Wizard starts. Guides the greeting, quest selection, and session bootstrap.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
Do NOT skip the greeting. Do NOT skip quest selection. Do NOT begin any phase without the human choosing a quest type and confirming the mode.
|
|
12
|
-
</HARD-GATE>
|
|
9
|
+
<HARD-GATE> Do NOT skip the greeting. Do NOT skip quest selection. Do NOT begin any phase without the human choosing a quest type and confirming the mode. </HARD-GATE>
|
|
13
10
|
|
|
14
11
|
## Process Flow
|
|
15
12
|
|
|
@@ -71,6 +68,7 @@ F) Bard Bonfire — (Coming soon)
|
|
|
71
68
|
```
|
|
72
69
|
|
|
73
70
|
If the human selects B, D, E, or F:
|
|
71
|
+
|
|
74
72
|
> "That quest type is still being forged by the arcane smiths. Choose another path for now."
|
|
75
73
|
|
|
76
74
|
Loop back to the menu.
|
|
@@ -86,29 +84,29 @@ Loop back to the menu.
|
|
|
86
84
|
|
|
87
85
|
### 4b. Task Description
|
|
88
86
|
|
|
89
|
-
Ask the human to describe the task/feature they want to build. Listen carefully. Read 3 times internally
|
|
87
|
+
Ask the human to describe the task/feature they want to build. Listen carefully. Read 3 times internally.\
|
|
88
|
+
|
|
89
|
+
### 4c. Clarification questions
|
|
90
|
+
|
|
91
|
+
You MUST ask from 3 to 10 clarification questions to the human in order to correctly envision the quest goal and prerequesites. Ask until you are totall confident.
|
|
90
92
|
|
|
91
|
-
###
|
|
93
|
+
### 4d. Spawn Team & Setup
|
|
92
94
|
|
|
93
95
|
The Canonical Quest always runs with the full party (Wizard + Warrior + Archer + Rogue). 4 agents, no reduced configurations.
|
|
94
96
|
|
|
95
97
|
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:
|
|
98
|
+
|
|
96
99
|
```bash
|
|
97
100
|
jq --arg qt "canonical" --arg qid "{questId}" --arg qdir ".claude/dungeon/{questId}" \
|
|
98
101
|
'.questType=$qt | .questId=$qid | .questDir=$qdir' \
|
|
99
102
|
.claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
100
103
|
```
|
|
101
104
|
2. Create quest directory if not already created by hook:
|
|
105
|
+
|
|
102
106
|
```
|
|
103
107
|
mkdir -p {questDir}
|
|
104
108
|
```
|
|
105
|
-
3.
|
|
106
|
-
```
|
|
107
|
-
TeamCreate(team_name="raid-full-{questId}")
|
|
108
|
-
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
109
|
-
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
110
|
-
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
111
|
-
```
|
|
109
|
+
3. **Do NOT pre-spawn agents.** Agents are dispatched per-turn via `Agent()` with model cycling (Opus for writers, Sonnet for reviewers). See "Model Cycling Protocol" in dungeon-master-rules.md.
|
|
112
110
|
|
|
113
111
|
## Step 5: Begin First Phase
|
|
114
112
|
|
|
@@ -116,6 +114,7 @@ The Canonical Quest always runs with the full party (Wizard + Warrior + Archer +
|
|
|
116
114
|
- If PRD skipped → Load `raid-canonical-design` skill, begin Phase 2
|
|
117
115
|
|
|
118
116
|
**Announce the quest to the party and the human:**
|
|
117
|
+
|
|
119
118
|
> "The quest begins: **{task description}**. 4 brave souls answer the call. The dice will roll at each phase to determine turn order."
|
|
120
119
|
|
|
121
120
|
Dice rolls happen **per phase**, not at quest start. The first dice roll happens when Phase 2 (Design) opens — or whenever the first agent phase begins. Phase 1 (PRD) is wizard+human only, so no dice needed there.
|
|
@@ -123,7 +122,7 @@ Dice rolls happen **per phase**, not at quest start. The first dice roll happens
|
|
|
123
122
|
## Red Flags
|
|
124
123
|
|
|
125
124
|
| Thought | Reality |
|
|
126
|
-
|
|
125
|
+
| --- | --- |
|
|
127
126
|
| "Skip the greeting, get to work" | The greeting sets the tone. It takes 5 seconds. Do it. |
|
|
128
127
|
| "Let me ask which mode to use" | Canonical Quest = full party, always. Don't ask. |
|
|
129
128
|
| "Let me start exploring the codebase" | You are the Wizard. You don't explore. You dispatch. |
|
|
@@ -8,7 +8,7 @@ description: "Use when the human calls an emergency team retrospective during a
|
|
|
8
8
|
The human pulled the brake. Everyone stops. Sit down. Reflect. Be honest.
|
|
9
9
|
|
|
10
10
|
<HARD-GATE>
|
|
11
|
-
This is an INSTANT freeze. The Wizard does NOT finish the current round, does NOT wait for agents to complete, does NOT ask "are you sure?". The moment the human says teambuff, everything stops.
|
|
11
|
+
This is an INSTANT freeze. The Wizard does NOT finish the current round, does NOT wait for agents to complete, does NOT ask "are you sure?". The moment the human says teambuff, everything stops. Do not dispatch any more agents.
|
|
12
12
|
</HARD-GATE>
|
|
13
13
|
|
|
14
14
|
## What This Is
|
|
@@ -146,15 +146,11 @@ Which option?
|
|
|
146
146
|
|
|
147
147
|
## Step 6: Dismiss the Party
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
Announce the quest's end with RPG flavor:
|
|
150
150
|
|
|
151
151
|
> "The quest is done, brave engineers. The bards will sing of **{quest-name}**. Sheathe your tools — until the next adventure."
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
SendMessage(to="warrior", message={"type": "shutdown_request"})
|
|
155
|
-
SendMessage(to="archer", message={"type": "shutdown_request"})
|
|
156
|
-
SendMessage(to="rogue", message={"type": "shutdown_request"})
|
|
157
|
-
```
|
|
153
|
+
No shutdown messages needed — agents are spawned per-turn and have already completed.
|
|
158
154
|
|
|
159
155
|
## Step 7: Archive to Vault
|
|
160
156
|
|