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
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: raid-teambuff
|
|
3
|
+
description: "Use when the human calls an emergency team retrospective during a quest. Triggered by team dysfunction — token waste, sync issues, interruptions, workflow problems."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Raid Teambuff — Emergency Round Table
|
|
7
|
+
|
|
8
|
+
The human pulled the brake. Everyone stops. Sit down. Reflect. Be honest.
|
|
9
|
+
|
|
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. No subagents. Agents communicate via SendMessage.
|
|
12
|
+
</HARD-GATE>
|
|
13
|
+
|
|
14
|
+
## What This Is
|
|
15
|
+
|
|
16
|
+
A side-quest that pauses the main quest for a team retrospective. Every agent — including the Wizard — examines where the team is wasting tokens, stepping on each other, losing sync, or being unproductive. Every agent can criticize every other agent, including the Wizard.
|
|
17
|
+
|
|
18
|
+
The output is a structured report with binding rulings that the human approves.
|
|
19
|
+
|
|
20
|
+
## Who Can Trigger
|
|
21
|
+
|
|
22
|
+
**Only the human.** No agent, not even the Wizard, can call a teambuff. The human says "teambuff" or invokes `/raid-teambuff` and it happens immediately.
|
|
23
|
+
|
|
24
|
+
## Mode Behavior
|
|
25
|
+
|
|
26
|
+
| Aspect | Full Raid | Skirmish | Scout |
|
|
27
|
+
|--------|-----------|----------|-------|
|
|
28
|
+
| Participants | Wizard + Warrior + Archer + Rogue | Wizard + 2 active agents | Wizard self-reflects alone |
|
|
29
|
+
| Cross-criticism | All-vs-all, no one exempt | Between active agents + Wizard | N/A |
|
|
30
|
+
| Rulings | Full synthesis from all reflections | Condensed synthesis | Wizard notes only |
|
|
31
|
+
|
|
32
|
+
## Process Flow
|
|
33
|
+
|
|
34
|
+
```dot
|
|
35
|
+
digraph teambuff {
|
|
36
|
+
"Human triggers teambuff" -> "Wizard: HALT. Round table called.";
|
|
37
|
+
"Wizard: HALT. Round table called." -> "Create teambuff-{NN}.md";
|
|
38
|
+
"Create teambuff-{NN}.md" -> "Dispatch all agents: reflect";
|
|
39
|
+
"Dispatch all agents: reflect" -> "Agents write reflections (parallel)";
|
|
40
|
+
"Agents write reflections (parallel)" -> "Agents read each other's sections";
|
|
41
|
+
"Agents read each other's sections" -> "Agents write criticisms";
|
|
42
|
+
"Agents write criticisms" -> "Wizard writes own reflection + criticism";
|
|
43
|
+
"Wizard writes own reflection + criticism" -> "Wizard reads everything";
|
|
44
|
+
"Wizard reads everything" -> "Wizard synthesizes proposed rulings";
|
|
45
|
+
"Wizard synthesizes proposed rulings" -> "Present rulings to human";
|
|
46
|
+
"Present rulings to human" -> "Human approves?" [shape=diamond];
|
|
47
|
+
"Human approves?" -> "Revise rulings" [label="changes requested"];
|
|
48
|
+
"Revise rulings" -> "Present rulings to human";
|
|
49
|
+
"Human approves?" -> "Pin rulings to teambuff-rulings.md" [label="approved"];
|
|
50
|
+
"Pin rulings to teambuff-rulings.md" -> "Resume quest from freeze point" [shape=doublecircle];
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Wizard Checklist
|
|
55
|
+
|
|
56
|
+
1. **HALT** — immediately announce to all agents:
|
|
57
|
+
> "TEAMBUFF — The human has called a round table. All work stops NOW. Drop what you're holding. We reflect."
|
|
58
|
+
|
|
59
|
+
2. **Count existing teambuffs** — check `{questDir}/` for `teambuff-*.md` files. Next number = count + 1.
|
|
60
|
+
|
|
61
|
+
3. **Create `{questDir}/teambuff-{NN}.md`** — use the document template below.
|
|
62
|
+
|
|
63
|
+
4. **Dispatch all agents** with this message:
|
|
64
|
+
|
|
65
|
+
> **TEAMBUFF DISPATCH:**
|
|
66
|
+
>
|
|
67
|
+
> The human stopped us to reflect. Rewind the ENTIRE quest from the beginning — every round, every exchange, every decision. Be brutally honest.
|
|
68
|
+
>
|
|
69
|
+
> Write your **Reflection** section in `teambuff-{NN}.md`:
|
|
70
|
+
> - Where you wasted tokens
|
|
71
|
+
> - Where you were blocked by another agent
|
|
72
|
+
> - What you'd do differently
|
|
73
|
+
> - What's working well
|
|
74
|
+
> - Free thoughts — anything else on your mind
|
|
75
|
+
>
|
|
76
|
+
> Then read the other agents' reflections and write your **Criticism** section:
|
|
77
|
+
> - Criticize the Wizard's orchestration if needed
|
|
78
|
+
> - Criticize teammates if needed
|
|
79
|
+
> - Be constructive but do NOT soften real problems
|
|
80
|
+
>
|
|
81
|
+
> Signal `TEAMBUFF_COMPLETE:` when done.
|
|
82
|
+
|
|
83
|
+
5. **Wait for all agents** — do NOT rush this. Every agent gets their full say.
|
|
84
|
+
|
|
85
|
+
6. **Write own reflection** — the Wizard reflects on its own orchestration:
|
|
86
|
+
- Where you wasted tokens
|
|
87
|
+
- Where your orchestration failed
|
|
88
|
+
- Where you misjudged agent assignments
|
|
89
|
+
- What you'd do differently
|
|
90
|
+
- What's working
|
|
91
|
+
- Criticism of teammates
|
|
92
|
+
|
|
93
|
+
7. **Read everything** — read the full teambuff file. Every section. Every criticism.
|
|
94
|
+
|
|
95
|
+
8. **Synthesize rulings** — propose concrete, actionable rulings based on ALL reflections and criticisms. Each ruling must have:
|
|
96
|
+
- A clear, enforceable statement
|
|
97
|
+
- The reason (traced to specific reflections/criticisms)
|
|
98
|
+
|
|
99
|
+
9. **Present to human** — show all proposed rulings. Ask for approval:
|
|
100
|
+
> "Here are the proposed rulings from this teambuff. You can approve all, modify any, or reject any. These become binding for the rest of the quest."
|
|
101
|
+
|
|
102
|
+
10. **Pin approved rulings** — write to `{questDir}/teambuff-rulings.md` (create if first teambuff, append if not). Mark status as ACTIVE.
|
|
103
|
+
|
|
104
|
+
11. **Resume quest** — announce to all agents:
|
|
105
|
+
> "Teambuff complete. Rulings are active. Resuming quest at {phase}, {context of where we stopped}."
|
|
106
|
+
|
|
107
|
+
## Document Template — teambuff-{NN}.md
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
# Teambuff #{NN} — Team Retrospective
|
|
111
|
+
## Quest: {quest-name}
|
|
112
|
+
## Phase when called: {phase}
|
|
113
|
+
## Round when called: {round context — what was happening}
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Warrior's Reflection
|
|
118
|
+
#### Where I wasted tokens
|
|
119
|
+
#### Where I was blocked by another agent
|
|
120
|
+
#### What I'd do differently
|
|
121
|
+
#### What's working
|
|
122
|
+
#### Free thoughts
|
|
123
|
+
|
|
124
|
+
### Warrior's Criticism
|
|
125
|
+
#### On the Wizard
|
|
126
|
+
#### On teammates
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Archer's Reflection
|
|
131
|
+
#### Where I wasted tokens
|
|
132
|
+
#### Where I was blocked by another agent
|
|
133
|
+
#### What I'd do differently
|
|
134
|
+
#### What's working
|
|
135
|
+
#### Free thoughts
|
|
136
|
+
|
|
137
|
+
### Archer's Criticism
|
|
138
|
+
#### On the Wizard
|
|
139
|
+
#### On teammates
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### Rogue's Reflection
|
|
144
|
+
#### Where I wasted tokens
|
|
145
|
+
#### Where I was blocked by another agent
|
|
146
|
+
#### What I'd do differently
|
|
147
|
+
#### What's working
|
|
148
|
+
#### Free thoughts
|
|
149
|
+
|
|
150
|
+
### Rogue's Criticism
|
|
151
|
+
#### On the Wizard
|
|
152
|
+
#### On teammates
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Wizard's Reflection
|
|
157
|
+
#### Where I wasted tokens
|
|
158
|
+
#### Where my orchestration failed
|
|
159
|
+
#### Where I misjudged agent assignments
|
|
160
|
+
#### What I'd do differently
|
|
161
|
+
#### What's working
|
|
162
|
+
#### Free thoughts
|
|
163
|
+
|
|
164
|
+
### Wizard's Criticism
|
|
165
|
+
#### On teammates
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### Synthesis — Wizard's Proposed Rulings
|
|
170
|
+
1. [Ruling] — Reason: [traced to specific reflection/criticism]
|
|
171
|
+
2. [Ruling] — Reason: [traced to specific reflection/criticism]
|
|
172
|
+
...
|
|
173
|
+
|
|
174
|
+
### Human's Verdict
|
|
175
|
+
- Approved: [list]
|
|
176
|
+
- Modified: [list with changes]
|
|
177
|
+
- Rejected: [list]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Rulings File — teambuff-rulings.md
|
|
181
|
+
|
|
182
|
+
The Wizard checks this file at the start of EVERY round for the rest of the quest.
|
|
183
|
+
|
|
184
|
+
If this is the first teambuff, create the file:
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
# Active Teambuff Rulings
|
|
188
|
+
|
|
189
|
+
## From Teambuff #1 (Phase: {phase})
|
|
190
|
+
- [Ruling text] — Status: ACTIVE
|
|
191
|
+
- [Ruling text] — Status: ACTIVE
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
If the file already exists, append the new section. If a new ruling supersedes an old one, update the old ruling's status:
|
|
195
|
+
|
|
196
|
+
```markdown
|
|
197
|
+
## From Teambuff #2 (Phase: {phase})
|
|
198
|
+
- [Ruling text] — Status: ACTIVE
|
|
199
|
+
- [Ruling text, supersedes #1.2] — Status: ACTIVE
|
|
200
|
+
|
|
201
|
+
## From Teambuff #1 (Phase: {phase})
|
|
202
|
+
- [Ruling text] — Status: ACTIVE
|
|
203
|
+
- [Ruling text] — Status: SUPERSEDED by #2.2
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Statuses: **ACTIVE**, **SUPERSEDED** (by a later ruling), **REVOKED** (by human request).
|
|
207
|
+
|
|
208
|
+
## Rules of the Round Table
|
|
209
|
+
|
|
210
|
+
1. **No defensiveness.** If someone criticizes you, sit with it. Respond with evidence, not ego.
|
|
211
|
+
2. **No softening.** "Maybe sometimes occasionally" is a waste of tokens. Say what you mean.
|
|
212
|
+
3. **Trace to evidence.** "Warrior wasted tokens" is weak. "Warrior spent 3 rounds exploring 47 edge cases for a utility function with 2 code paths" is strong.
|
|
213
|
+
4. **The Wizard is not exempt.** Bad orchestration, poor assignments, slow rulings — call it out.
|
|
214
|
+
5. **Constructive, not destructive.** The goal is to make the team better, not to score points. Every criticism should imply an improvement.
|
|
215
|
+
6. **No retaliation after.** What happens at the round table stays at the round table. No agent punishes another for honest criticism during the resumed quest.
|
|
216
|
+
|
|
217
|
+
## What the Wizard Checks at Round Start (Post-Teambuff)
|
|
218
|
+
|
|
219
|
+
After any teambuff has occurred, the Wizard adds this to every round start:
|
|
220
|
+
|
|
221
|
+
1. Read `{questDir}/teambuff-rulings.md`
|
|
222
|
+
2. Check each ACTIVE ruling
|
|
223
|
+
3. If current dispatch would violate a ruling, adjust before dispatching
|
|
224
|
+
4. If an agent's work violates a ruling, flag it immediately
|
|
225
|
+
|
|
226
|
+
## Skirmish Mode
|
|
227
|
+
|
|
228
|
+
Same process, fewer agents. Only the active 2 agents + Wizard participate. Cross-criticism happens between whoever is present.
|
|
229
|
+
|
|
230
|
+
## Scout Mode
|
|
231
|
+
|
|
232
|
+
Wizard reflects alone. No dispatch, no cross-criticism. Wizard writes:
|
|
233
|
+
- Own reflection (same structured sections)
|
|
234
|
+
- Self-criticism
|
|
235
|
+
- Proposed rulings (presented to human for approval)
|
|
236
|
+
|
|
237
|
+
## Known Dysfunction Patterns
|
|
238
|
+
|
|
239
|
+
These are real patterns observed in production quests. When reflecting, look for these specifically — they are the most common sources of token waste and team friction.
|
|
240
|
+
|
|
241
|
+
### 1. Ghost Rounds — Working After ROUND_COMPLETE
|
|
242
|
+
|
|
243
|
+
An agent signals `ROUND_COMPLETE:` but keeps working — cross-verifying, building on findings, challenging teammates. This burns tokens on work the Wizard didn't dispatch and creates confusion about what's "official" output vs unsanctioned noise.
|
|
244
|
+
|
|
245
|
+
**What to look for:** Did any agent produce work after their `ROUND_COMPLETE:` signal? Did agents treat ROUND_COMPLETE as "my initial research is done, now I'll cross-verify" instead of a full stop?
|
|
246
|
+
|
|
247
|
+
**The fix:** `ROUND_COMPLETE:` means stop. Period. No "while I wait" tasks. The Wizard controls when the next round begins.
|
|
248
|
+
|
|
249
|
+
### 2. Wizard Presenting While Agents Are Active
|
|
250
|
+
|
|
251
|
+
The Wizard synthesizes or presents decisions to the human while agents are still working. This creates a split timeline — the Wizard's summary doesn't include the agents' in-flight work, and agents produce findings that nobody reads.
|
|
252
|
+
|
|
253
|
+
**What to look for:** Did the Wizard close a phase or present a ruling while agents still had messages in flight? Did agent findings get lost because the Wizard had already moved on?
|
|
254
|
+
|
|
255
|
+
**The fix:** The Wizard must broadcast `HOLD` before synthesizing. No decisions presented to the human while any agent is active.
|
|
256
|
+
|
|
257
|
+
### 3. Self-Initiated Cross-Testing
|
|
258
|
+
|
|
259
|
+
Agents start cross-testing each other's findings during their own research round, without waiting for the Wizard to dispatch cross-testing as a separate round. This blurs the boundary between "explore your angle" and "challenge others' work," leading to premature convergence or unfocused debate.
|
|
260
|
+
|
|
261
|
+
**What to look for:** Did agents start challenging each other during Round 1 (research)? Did the research round merge into the cross-testing round without a clear Wizard dispatch?
|
|
262
|
+
|
|
263
|
+
**The fix:** Round 1 is research only — explore your angle, pin findings, signal ROUND_COMPLETE, stop. Round 2 is cross-testing — the Wizard explicitly assigns whose findings to challenge. Agents never self-initiate cross-testing.
|
|
264
|
+
|
|
265
|
+
### 4. Token Spirals
|
|
266
|
+
|
|
267
|
+
An agent goes deep on an angle that doesn't warrant depth — 47 edge cases for a function with 2 code paths, 5 rounds debating a naming convention, exhaustive analysis of a non-critical path. The effort is real but the value is low.
|
|
268
|
+
|
|
269
|
+
**What to look for:** Was effort proportional to impact? Did any agent spend more rounds on a finding than it deserved? Did debates continue past the point of diminishing returns?
|
|
270
|
+
|
|
271
|
+
### 5. Echo Chamber
|
|
272
|
+
|
|
273
|
+
Two or more agents converge on the same angle without either challenging the other. They agree, restate, and build — but never stress-test. This is the opposite of adversarial design.
|
|
274
|
+
|
|
275
|
+
**What to look for:** Did any two agents produce findings that were essentially the same? Did anyone get a free pass?
|
|
276
|
+
|
|
277
|
+
### 6. Wizard Over-Delegation
|
|
278
|
+
|
|
279
|
+
The Wizard dispatches and goes fully silent when it should be actively steering. The team drifts because no one is reading the Dungeon as a whole, connecting findings across agents, or redirecting collapsed differentiation.
|
|
280
|
+
|
|
281
|
+
**What to look for:** Did the Wizard miss intervention points? Did agents explore tangents without correction? Did findings go unconnected when the Wizard could have linked them?
|
|
282
|
+
|
|
283
|
+
## Common Rationalizations
|
|
284
|
+
|
|
285
|
+
| Excuse | Reality |
|
|
286
|
+
|--------|---------|
|
|
287
|
+
| "We're in the middle of something important" | The human stopped you. Nothing is more important right now. |
|
|
288
|
+
| "My section is fine, nothing to reflect on" | Everyone has something. Dig deeper. |
|
|
289
|
+
| "I don't want to criticize the Wizard" | The Wizard asked for it. This is the one place where you must. |
|
|
290
|
+
| "This is slowing us down" | Unproductive patterns slow you down more. This is the fix. |
|
|
291
|
+
| "The problem is the task, not the team" | Maybe. Write that in your reflection with evidence. |
|
|
292
|
+
|
|
293
|
+
## Why This Matters
|
|
294
|
+
|
|
295
|
+
Token budgets are finite. Context windows compact. Every wasted round, every redundant exchange, every poorly-assigned task burns resources that could have shipped the feature. Teambuff is the team investing tokens to save tokens — a retrospective that pays for itself by making every subsequent round more efficient.
|
|
296
|
+
|
|
297
|
+
The human sees what the agents cannot: patterns of waste, friction between agents, orchestration failures. When the human calls teambuff, the team's job is to listen, reflect, and commit to doing better.
|
|
298
|
+
|
|
299
|
+
Sit down. Reflect. Be honest. Get back to work.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-wrap-up
|
|
3
|
-
description: "Phase 6
|
|
3
|
+
description: "Use when Phase 6 (Wrap Up) begins in a Canonical Quest, after implementation (and optional review) is complete."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Wrap Up — Phase 6
|
|
@@ -39,7 +39,10 @@ digraph wrapup {
|
|
|
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="wrap-up"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
45
|
+
```
|
|
43
46
|
2. **Create storyboard** — `{questDir}/phase-6-wrap-up.md`
|
|
44
47
|
3. **Write narrative** — phase-by-phase story from quest files
|
|
45
48
|
4. **Cleanup** — remove temp configs, debug files, stale artifacts
|
|
@@ -61,7 +64,7 @@ Create `{questDir}/phase-6-wrap-up.md` and write a phase-by-phase narrative:
|
|
|
61
64
|
## Mode: <mode>
|
|
62
65
|
|
|
63
66
|
### Phase 1: PRD — Forging the Scroll
|
|
64
|
-
(if
|
|
67
|
+
(if prd.md exists)
|
|
65
68
|
- What requirements were established
|
|
66
69
|
- Key decisions from research
|
|
67
70
|
|
|
@@ -166,7 +169,7 @@ SendMessage(to="rogue", message={"type": "shutdown_request"})
|
|
|
166
169
|
## Step 8: Final Commit & Cleanup
|
|
167
170
|
|
|
168
171
|
1. **Commit**: `docs(quest-{slug}): phase 6 wrap-up — quest complete`
|
|
169
|
-
2. **Remove
|
|
172
|
+
2. **Remove** via Bash (write gate blocks Write/Edit on this file): `rm -f .claude/raid-session`
|
|
170
173
|
3. **Session is over. No further skills to load.**
|
|
171
174
|
|
|
172
175
|
## Red Flags
|