@rayburst/cc 1.0.24 → 1.0.26
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/commands/rb/implement.md +107 -321
- package/package.json +1 -1
package/commands/rb/implement.md
CHANGED
|
@@ -5,8 +5,7 @@ allowed-tools:
|
|
|
5
5
|
- Glob
|
|
6
6
|
- Grep
|
|
7
7
|
- Bash
|
|
8
|
-
-
|
|
9
|
-
- ExitPlanMode
|
|
8
|
+
- Agent
|
|
10
9
|
- mcp__playwright__browser_navigate
|
|
11
10
|
- mcp__playwright__browser_snapshot
|
|
12
11
|
- mcp__playwright__browser_click
|
|
@@ -24,7 +23,7 @@ allowed-tools:
|
|
|
24
23
|
|
|
25
24
|
# rb:implement — Card Implementation
|
|
26
25
|
|
|
27
|
-
Implement a Rayburst board card: load the card
|
|
26
|
+
Implement a Rayburst board card end-to-end: load the card + linked features, plan with a subagent, execute with a subagent, then move to `validation`. Works like `/gsd:quick` — spawns a planner agent then an executor agent with no interactive plan approval pause.
|
|
28
27
|
|
|
29
28
|
## Reference Data
|
|
30
29
|
|
|
@@ -48,22 +47,7 @@ Examples:
|
|
|
48
47
|
|
|
49
48
|
## Workflow
|
|
50
49
|
|
|
51
|
-
### Step
|
|
52
|
-
|
|
53
|
-
Before anything else, check if a previous `rb:implement` session was interrupted:
|
|
54
|
-
|
|
55
|
-
1. Run `ls .claude/rb-sessions/*.md 2>/dev/null` (via Bash).
|
|
56
|
-
2. **If a `cardId` was passed as input**, check for `.claude/rb-sessions/<cardId>.md` specifically:
|
|
57
|
-
- If it exists, read it and follow the `## Resume Instructions` section exactly.
|
|
58
|
-
- If it does not exist but other session files are present, proceed normally from Step 1 (start fresh for this card).
|
|
59
|
-
3. **If no `cardId` was passed** and session files exist:
|
|
60
|
-
- If exactly one file: read it and follow its `## Resume Instructions` exactly.
|
|
61
|
-
- If multiple files: read each to get `sessionTitle` and `cardId`, list them to the user, and ask which to resume.
|
|
62
|
-
4. If no session files exist, proceed normally from Step 1.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
### Step 0b: Resolve MCP Prefix
|
|
50
|
+
### Step 1: Resolve MCP Prefix
|
|
67
51
|
|
|
68
52
|
Read `.claude/rb-config.md` and parse the `## MCP Role Assignments` table. Find the row where `Role` is `engineer` and read its `MCP Server Name`.
|
|
69
53
|
|
|
@@ -73,25 +57,25 @@ Read `.claude/rb-config.md` and parse the `## MCP Role Assignments` table. Find
|
|
|
73
57
|
```
|
|
74
58
|
Example: if the server name is `rayburst-rb-engineer-780086`, then `MCP_PREFIX = mcp__rayburst-rb-engineer-780086__`.
|
|
75
59
|
|
|
76
|
-
- If `.claude/rb-config.md` does not exist or the role is `unassigned`, set `MCP_PREFIX = ""` and use the curl fallback for all MCP calls (see "MCP Curl Fallback" section
|
|
60
|
+
- If `.claude/rb-config.md` does not exist or the role is `unassigned`, set `MCP_PREFIX = ""` and use the curl fallback for all MCP calls (see "MCP Curl Fallback" section). Read the API key from `.mcp.json` under the first HTTP MCP server entry.
|
|
77
61
|
|
|
78
62
|
All MCP tool calls below use `<MCP_PREFIX>` as a stand-in for the resolved prefix.
|
|
79
63
|
|
|
80
64
|
---
|
|
81
65
|
|
|
82
|
-
### Step
|
|
66
|
+
### Step 2: Verify MCP Connection
|
|
83
67
|
|
|
84
68
|
```
|
|
85
69
|
<MCP_PREFIX>ping()
|
|
86
70
|
```
|
|
87
71
|
|
|
88
|
-
|
|
72
|
+
If ping fails (tool not found), fall back to curl JSON-RPC for the entire workflow. If ping via curl also fails, stop and report the error.
|
|
89
73
|
|
|
90
|
-
|
|
74
|
+
---
|
|
91
75
|
|
|
92
|
-
### Step
|
|
76
|
+
### Step 3: Resolve the Card
|
|
93
77
|
|
|
94
|
-
**If the input looks like a UUID
|
|
78
|
+
**If the input looks like a UUID:**
|
|
95
79
|
|
|
96
80
|
```
|
|
97
81
|
<MCP_PREFIX>get_card({ cardId: "<input>" })
|
|
@@ -103,329 +87,160 @@ If ping via curl also fails (network error), stop and report the error.
|
|
|
103
87
|
<MCP_PREFIX>list_cards({ boardId: "23578fa2-49c1-475c-b398-6d7080a676bc" })
|
|
104
88
|
```
|
|
105
89
|
|
|
106
|
-
Find the
|
|
90
|
+
Find the closest title match, then call `get_card` on it.
|
|
107
91
|
|
|
108
|
-
|
|
109
|
-
<MCP_PREFIX>get_card({ cardId: "<resolved-id>" })
|
|
110
|
-
```
|
|
92
|
+
Collect: `card.id`, `card.title`, `card.description`, `card.status`, `card.todos[]`.
|
|
111
93
|
|
|
112
|
-
|
|
113
|
-
- `card.id`, `card.title`, `card.description`, `card.status`
|
|
114
|
-
- `card.todos[]` — implementation checklist items
|
|
115
|
-
- `card.columnId` / current board context
|
|
116
|
-
|
|
117
|
-
**If card status is not `ready` or `in-progress`**, warn the user:
|
|
94
|
+
**If card status is not `ready` or `in-progress`**, warn and ask:
|
|
118
95
|
```
|
|
119
|
-
⚠️ Card "<title>" is currently
|
|
120
|
-
Proceed anyway? (yes / no)
|
|
96
|
+
⚠️ Card "<title>" is currently "<status>". Expected "ready". Proceed anyway? (yes / no)
|
|
121
97
|
```
|
|
122
98
|
Stop if the user says no.
|
|
123
99
|
|
|
124
|
-
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### Step 4: Load Linked Features & Criteria
|
|
125
103
|
|
|
126
104
|
```
|
|
127
105
|
<MCP_PREFIX>list_card_features({ cardId: "<cardId>" })
|
|
128
106
|
```
|
|
129
107
|
|
|
130
|
-
For each linked feature
|
|
131
|
-
|
|
108
|
+
For each linked feature:
|
|
132
109
|
```
|
|
133
110
|
<MCP_PREFIX>get_feature({ featureId: "<featureId>" })
|
|
134
111
|
```
|
|
135
112
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Also fetch prior validation reports for this card:
|
|
139
|
-
|
|
113
|
+
Also load prior validation reports:
|
|
140
114
|
```
|
|
141
115
|
<MCP_PREFIX>list_validations({ cardId: "<cardId>" })
|
|
142
116
|
```
|
|
143
117
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
If no features are linked, warn the user:
|
|
147
|
-
```
|
|
148
|
-
⚠️ No features are linked to this card. Implementation will proceed without acceptance criteria.
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
#### Step 3b: Load Prior Validation Context (if card was returned from validation)
|
|
152
|
-
|
|
153
|
-
If the card's current status is `in-progress` (indicating it may have been returned from validation after a QA failure), fetch prior failure context:
|
|
154
|
-
|
|
118
|
+
If the card is `in-progress` (possible QA return), also check for prior failures:
|
|
155
119
|
```
|
|
156
120
|
<MCP_PREFIX>list_comments({ cardId: "<cardId>" })
|
|
157
|
-
<MCP_PREFIX>list_validations({ cardId: "<cardId>" })
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Inspect the comments for a recent QA failure comment (look for "QA: Validation Failed" in the content). Inspect the latest validation report for criteria with status `"fail"`.
|
|
161
|
-
|
|
162
|
-
If a prior failure is detected, display it prominently before proceeding:
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
## Prior QA Failure Detected
|
|
166
|
-
|
|
167
|
-
The card was previously returned from validation with the following failures:
|
|
168
|
-
|
|
169
|
-
<QA failure comment content>
|
|
170
|
-
|
|
171
|
-
The implementation plan will specifically address these failing criteria.
|
|
172
121
|
```
|
|
122
|
+
Look for a "QA: Validation Failed" comment and note any failing criteria — these get extra attention in the plan.
|
|
173
123
|
|
|
174
|
-
|
|
124
|
+
If no features are linked, warn the user but continue.
|
|
175
125
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Step 4: Move Card to `in-progress` and Write Early Session File
|
|
126
|
+
---
|
|
179
127
|
|
|
180
|
-
|
|
128
|
+
### Step 5: Move Card to `in-progress`
|
|
181
129
|
|
|
182
130
|
```
|
|
183
131
|
<MCP_PREFIX>move_card({ cardId: "<cardId>", status: "in-progress" })
|
|
184
132
|
```
|
|
185
133
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
mkdir -p .claude/rb-sessions
|
|
190
|
-
cat > .claude/rb-sessions/<cardId>.md << 'RBEOF'
|
|
191
|
-
# rb:implement Session
|
|
192
|
-
|
|
193
|
-
## Session Info
|
|
194
|
-
- **sessionTitle:** rb:implement — <card title>
|
|
195
|
-
- **cardId:** <cardId>
|
|
196
|
-
- **cardTitle:** <card title>
|
|
197
|
-
- **startedAt:** <ISO timestamp>
|
|
198
|
-
- **currentPhase:** Plan mode — plan not yet approved; re-enter plan mode and present it to the user
|
|
199
|
-
|
|
200
|
-
## MCP Prefix
|
|
201
|
-
`<MCP_PREFIX>`
|
|
202
|
-
|
|
203
|
-
## Acceptance Criteria
|
|
204
|
-
<list each criterion: - [criterionId] title — description>
|
|
205
|
-
|
|
206
|
-
## Implementation Todos (in order)
|
|
207
|
-
<list each todo item from the card's todo list, with checkbox: - [ ] todo text>
|
|
134
|
+
---
|
|
208
135
|
|
|
209
|
-
|
|
136
|
+
### Step 6: Spawn Planner Agent
|
|
210
137
|
|
|
211
|
-
|
|
138
|
+
Spawn a `Plan` subagent to design the implementation. Pass it all the card context you've collected (title, description, todos, criteria, prior failures if any). The planner writes the plan as output — it does NOT write files.
|
|
212
139
|
|
|
213
|
-
1. Re-read the acceptance criteria and todos listed above.
|
|
214
|
-
2. Enter plan mode (`EnterPlanMode`) and present the implementation plan to the user for approval.
|
|
215
|
-
3. After user approves, post the plan as a card comment, then implement all todos in order.
|
|
216
|
-
4. After ALL todos are complete and code is written, run:
|
|
217
|
-
`<MCP_PREFIX>move_card({ cardId: "<cardId>", status: "validation" })`
|
|
218
|
-
5. Post an implementation summary comment:
|
|
219
|
-
`<MCP_PREFIX>add_comment({ cardId: "<cardId>", content: "## Implementation Complete\n\nReady for QA validation.\n\n### What was built\n<brief summary>\n\n### Files changed\n- <file>\n\n### Criteria coverage\n- <criterion>: satisfied via <explanation>" })`
|
|
220
|
-
6. Delete this session file: `rm .claude/rb-sessions/<cardId>.md`
|
|
221
|
-
7. Print: "## Implementation Complete: <card title>\n\nCard ID: <cardId>\nStatus: → validation\n\nRun /rb:validate-card <cardId> to run QA validation."
|
|
222
|
-
RBEOF
|
|
223
140
|
```
|
|
141
|
+
Agent(
|
|
142
|
+
subagent_type="Plan",
|
|
143
|
+
prompt="
|
|
144
|
+
You are planning the implementation of a Rayburst board card.
|
|
224
145
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
146
|
+
## Card
|
|
147
|
+
Title: <card title>
|
|
148
|
+
Description: <card description>
|
|
149
|
+
Status: in-progress
|
|
150
|
+
Card ID: <cardId>
|
|
228
151
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
1. Read the card title, description, and linked feature titles to understand the scope of change (which files, components, routes, API endpoints will be touched)
|
|
232
|
-
2. Use `Glob` and `Grep` to identify which source files will need to change
|
|
233
|
-
3. Load the full feature atlas:
|
|
234
|
-
```
|
|
235
|
-
<MCP_PREFIX>list_features({ limit: 100 })
|
|
236
|
-
```
|
|
237
|
-
4. For each *other* active feature (status `active`, not linked to this card), check if its criteria describe behavior in the same files/components/routes the implementation will touch
|
|
238
|
-
5. Assess risk level: HIGH if the same component/route is directly modified, MEDIUM if a shared utility is changed, LOW if only indirect overlap
|
|
239
|
-
|
|
240
|
-
**If conflicts are found**, STOP and prompt the user before proceeding:
|
|
152
|
+
## Acceptance Criteria
|
|
153
|
+
<list all criteria from linked features, with criterionId and Given/When/Then description>
|
|
241
154
|
|
|
242
|
-
|
|
243
|
-
|
|
155
|
+
## Todo List (implement in this order)
|
|
156
|
+
<list card todos in order>
|
|
244
157
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
- <file or component>
|
|
158
|
+
## Prior QA Failures (if any)
|
|
159
|
+
<list any criteria that previously failed — these must be fixed>
|
|
248
160
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
161
|
+
## Codebase Context
|
|
162
|
+
App URL: http://www.rayburst.app
|
|
163
|
+
Frontend: rayburst/ (React, TanStack Router, Tailwind v4)
|
|
164
|
+
Backend: rayburst-api/ (Hono, Drizzle ORM, PostgreSQL)
|
|
253
165
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
166
|
+
## Your Task
|
|
167
|
+
Produce a complete implementation plan:
|
|
168
|
+
1. List every file to create or modify (exact paths)
|
|
169
|
+
2. Describe the approach for each acceptance criterion
|
|
170
|
+
3. Cover any DB migrations, API changes, env vars needed
|
|
171
|
+
4. Note edge cases and error handling
|
|
172
|
+
5. If prior QA failures exist, add a 'Fixing QA Failures' section at the top
|
|
258
173
|
|
|
259
|
-
|
|
174
|
+
Output the plan as structured markdown. Be specific — the executor will follow this plan without asking questions.
|
|
175
|
+
",
|
|
176
|
+
description="Plan: <card title>"
|
|
177
|
+
)
|
|
260
178
|
```
|
|
261
179
|
|
|
262
|
-
|
|
263
|
-
- **Option 2 (Adjust)**: Include criteria preservation in the plan requirements, continue to Step 6
|
|
264
|
-
- **Option 3 (Cancel)**: Move the card back to `ready`:
|
|
265
|
-
```
|
|
266
|
-
<MCP_PREFIX>move_card({ cardId: "<cardId>", status: "ready" })
|
|
267
|
-
```
|
|
268
|
-
Then stop.
|
|
269
|
-
|
|
270
|
-
If no conflicts are found, proceed directly to Step 6.
|
|
271
|
-
|
|
272
|
-
### Step 6: Enter Plan Mode
|
|
273
|
-
|
|
274
|
-
Enter plan mode (`EnterPlanMode`) to design the full implementation approach.
|
|
275
|
-
|
|
276
|
-
The plan must cover:
|
|
277
|
-
- Files to create or modify (with exact paths)
|
|
278
|
-
- Implementation approach for each acceptance criterion from the test plan
|
|
279
|
-
- Any database migrations, API changes, or environment variable additions needed
|
|
280
|
-
- Edge cases and error handling
|
|
281
|
-
- How at-risk criteria from Step 5 (if any) will be preserved
|
|
180
|
+
Store the plan output as `$PLAN`.
|
|
282
181
|
|
|
283
|
-
|
|
182
|
+
---
|
|
284
183
|
|
|
285
|
-
### Step 7:
|
|
184
|
+
### Step 7: Post Plan as Card Comment
|
|
286
185
|
|
|
287
|
-
|
|
186
|
+
Post the plan to the card before execution starts:
|
|
288
187
|
|
|
289
188
|
```
|
|
290
189
|
<MCP_PREFIX>add_comment({
|
|
291
190
|
cardId: "<cardId>",
|
|
292
|
-
content: "## Implementation Plan\n\n
|
|
191
|
+
content: "## Implementation Plan\n\n<$PLAN summary — 2-3 sentences>\n\n### Files to Modify\n- <file>\n\n### Approach\n<prose>\n\n### Criteria Coverage\n- <criterion>: <how satisfied>"
|
|
293
192
|
})
|
|
294
193
|
```
|
|
295
194
|
|
|
296
|
-
Keep
|
|
297
|
-
|
|
298
|
-
**Immediately after posting the plan comment**, update the session file — BEFORE writing any code. The early session file from Step 4 already exists; overwrite it now with the post-approval state so the resume instructions reflect that the plan is approved:
|
|
299
|
-
|
|
300
|
-
Overwrite `.claude/rb-sessions/<cardId>.md` with the execution context:
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
cat > .claude/rb-sessions/<cardId>.md << 'RBEOF'
|
|
304
|
-
# rb:implement Session
|
|
305
|
-
|
|
306
|
-
## Session Info
|
|
307
|
-
- **sessionTitle:** rb:implement — <card title>
|
|
308
|
-
- **cardId:** <cardId>
|
|
309
|
-
- **cardTitle:** <card title>
|
|
310
|
-
- **startedAt:** <ISO timestamp>
|
|
311
|
-
- **currentPhase:** Execute Implementation — plan approved, starting first todo item
|
|
312
|
-
|
|
313
|
-
## MCP Prefix
|
|
314
|
-
`<MCP_PREFIX>` (e.g. `mcp__rayburst-rb-engineer-780086__`)
|
|
315
|
-
|
|
316
|
-
## Acceptance Criteria
|
|
317
|
-
<list each criterion: - [criterionId] title — description>
|
|
318
|
-
|
|
319
|
-
## Implementation Todos (in order)
|
|
320
|
-
<list each todo item from the card's todo list, with checkbox: - [ ] todo text>
|
|
321
|
-
|
|
322
|
-
## Resume Instructions
|
|
323
|
-
|
|
324
|
-
IMPORTANT: You are resuming an interrupted `rb:implement` session. The plan was already approved and posted as a card comment. Do NOT re-enter plan mode. Do NOT ask the user what to do. Execute the following steps immediately:
|
|
325
|
-
|
|
326
|
-
1. Run `<MCP_PREFIX>get_card({ cardId: "<cardId>" })` to get current card state.
|
|
327
|
-
2. Check which todos are still incomplete. Continue from the first incomplete todo.
|
|
328
|
-
3. Implement each remaining todo item in order — write the actual code changes.
|
|
329
|
-
4. After ALL todos are complete and code is written, run:
|
|
330
|
-
`<MCP_PREFIX>move_card({ cardId: "<cardId>", status: "validation" })`
|
|
331
|
-
5. Post an implementation summary comment:
|
|
332
|
-
`<MCP_PREFIX>add_comment({ cardId: "<cardId>", content: "## Implementation Complete\n\nReady for QA validation.\n\n### What was built\n<brief summary>\n\n### Files changed\n- <file>\n\n### Criteria coverage\n- <criterion>: satisfied via <explanation>" })`
|
|
333
|
-
6. Delete this session file: `rm .claude/rb-sessions/<cardId>.md`
|
|
334
|
-
7. Print: "## Implementation Complete: <card title>\n\nCard ID: <cardId>\nStatus: → validation\n\nRun /rb:validate-card <cardId> to run QA validation."
|
|
335
|
-
RBEOF
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### Step 8: Execute Implementation
|
|
339
|
-
|
|
340
|
-
Switch to execute mode. Work through the implementation:
|
|
341
|
-
|
|
342
|
-
1. **Work the todo list in order** — use `list_card_todos` to get the ordered checklist, implement each item before moving to the next
|
|
343
|
-
2. **Make atomic changes** — one logical unit at a time (e.g., backend schema first, then service, then routes, then frontend)
|
|
344
|
-
3. **Run tests after significant changes**:
|
|
345
|
-
```bash
|
|
346
|
-
cd rayburst && npm run test -- <relevant-test-file>
|
|
347
|
-
cd rayburst-api && npm run type-check
|
|
348
|
-
```
|
|
349
|
-
4. **Run lint/type check before moving on**:
|
|
350
|
-
```bash
|
|
351
|
-
cd rayburst && npm run check
|
|
352
|
-
cd rayburst-api && npm run check
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
**At each major phase boundary** (e.g., after backend is complete, before starting frontend), rewrite `.claude/rb-sessions/<cardId>.md` with an updated `currentPhase` that contains the exact next action. Do NOT just sed one line — rewrite the whole file so the Resume Instructions stay complete. The `currentPhase` value should be precise enough that after compaction you know exactly what code to write next. Examples:
|
|
356
|
-
- `Frontend phase — implement /legacy route in src/routes/legacy/index.tsx`
|
|
357
|
-
- `Wrap-up — all todos done, next: move card to validation and post summary comment`
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
cat > .claude/rb-sessions/<cardId>.md << 'RBEOF'
|
|
361
|
-
# rb:implement Session
|
|
362
|
-
|
|
363
|
-
## Session Info
|
|
364
|
-
- **sessionTitle:** rb:implement — <card title>
|
|
365
|
-
- **cardId:** <cardId>
|
|
366
|
-
- **cardTitle:** <card title>
|
|
367
|
-
- **startedAt:** <ISO timestamp>
|
|
368
|
-
- **currentPhase:** <precise description of exact next action>
|
|
369
|
-
|
|
370
|
-
## MCP Prefix
|
|
371
|
-
`<MCP_PREFIX>`
|
|
195
|
+
Keep under 5000 characters. Describe the approach — no raw code blocks.
|
|
372
196
|
|
|
373
|
-
|
|
374
|
-
<list each criterion: - [criterionId] title — description>
|
|
375
|
-
|
|
376
|
-
## Remaining Todos
|
|
377
|
-
<list only the NOT YET COMPLETE todos: - [ ] todo text>
|
|
197
|
+
---
|
|
378
198
|
|
|
379
|
-
|
|
199
|
+
### Step 8: Spawn Executor Agent
|
|
380
200
|
|
|
381
|
-
|
|
201
|
+
Spawn a `general-purpose` subagent to execute the plan. Pass it the full plan and all card context.
|
|
382
202
|
|
|
383
|
-
1. Your exact next action is: **<currentPhase>**
|
|
384
|
-
2. Complete that action, then work through any remaining todos above in order.
|
|
385
|
-
3. After ALL todos are done and code is written, run:
|
|
386
|
-
`<MCP_PREFIX>move_card({ cardId: "<cardId>", status: "validation" })`
|
|
387
|
-
4. Post an implementation summary comment:
|
|
388
|
-
`<MCP_PREFIX>add_comment({ cardId: "<cardId>", content: "## Implementation Complete\n\nReady for QA validation.\n\n### What was built\n<brief summary>\n\n### Files changed\n- <file>\n\n### Criteria coverage\n- <criterion>: satisfied via <explanation>" })`
|
|
389
|
-
5. Delete this session file: `rm .claude/rb-sessions/<cardId>.md`
|
|
390
|
-
6. Print: "## Implementation Complete: <card title>\n\nCard ID: <cardId>\nStatus: → validation\n\nRun /rb:validate-card <cardId> to run QA validation."
|
|
391
|
-
RBEOF
|
|
392
203
|
```
|
|
204
|
+
Agent(
|
|
205
|
+
subagent_type="general-purpose",
|
|
206
|
+
prompt="
|
|
207
|
+
You are implementing a Rayburst board card. Execute the plan below completely. Do not ask questions — make decisions and write the code.
|
|
393
208
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
209
|
+
## Card
|
|
210
|
+
Title: <card title>
|
|
211
|
+
Card ID: <cardId>
|
|
212
|
+
MCP Prefix: <MCP_PREFIX>
|
|
397
213
|
|
|
398
|
-
|
|
214
|
+
## Implementation Plan
|
|
215
|
+
<full $PLAN>
|
|
399
216
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
- Are there relevant tests that cover this behavior? If yes, do they pass?
|
|
403
|
-
- Use `Grep` to confirm the key logic is in place
|
|
217
|
+
## Acceptance Criteria (verify each before finishing)
|
|
218
|
+
<list all criteria with criterionId>
|
|
404
219
|
|
|
405
|
-
|
|
220
|
+
## Todo List (work in this order)
|
|
221
|
+
<list card todos>
|
|
406
222
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
223
|
+
## Execution Rules
|
|
224
|
+
- Work through todos in order
|
|
225
|
+
- Make atomic changes (backend schema → service → routes → frontend)
|
|
226
|
+
- After backend changes: run `cd rayburst-api && npm run type-check`
|
|
227
|
+
- After frontend changes: run `cd rayburst && npx biome check <changed files>`
|
|
228
|
+
- After implementation: do a self-check — does each criterion have code that satisfies it?
|
|
229
|
+
- When all todos are complete and criteria are satisfied, call:
|
|
230
|
+
<MCP_PREFIX>move_card({ cardId: '<cardId>', status: 'validation' })
|
|
231
|
+
- Then post a summary comment:
|
|
232
|
+
<MCP_PREFIX>add_comment({ cardId: '<cardId>', content: '## Implementation Complete\n\n### What was built\n<summary>\n\n### Files changed\n- <file>\n\n### Criteria coverage\n- <criterion>: satisfied via <explanation>' })
|
|
233
|
+
- Return a completion message listing files changed and criteria satisfied.
|
|
234
|
+
",
|
|
235
|
+
description="Implement: <card title>"
|
|
236
|
+
)
|
|
413
237
|
```
|
|
414
238
|
|
|
415
|
-
|
|
416
|
-
rm -f .claude/rb-sessions/<cardId>.md
|
|
417
|
-
```
|
|
239
|
+
---
|
|
418
240
|
|
|
419
|
-
|
|
241
|
+
### Step 9: Print Summary
|
|
420
242
|
|
|
421
|
-
|
|
422
|
-
<MCP_PREFIX>add_comment({
|
|
423
|
-
cardId: "<cardId>",
|
|
424
|
-
content: "## Implementation Complete\n\nReady for QA validation.\n\n### What was built\n<brief prose summary of what was implemented>\n\n### Files changed\n- <file path>\n- <file path>\n\n### Criteria coverage\n- <criterion description>: satisfied via <brief explanation>"
|
|
425
|
-
})
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
Then print:
|
|
243
|
+
After the executor returns, print:
|
|
429
244
|
|
|
430
245
|
```
|
|
431
246
|
## Implementation Complete: <Card Title>
|
|
@@ -436,7 +251,6 @@ Then print:
|
|
|
436
251
|
|
|
437
252
|
### Files Changed
|
|
438
253
|
- <file path>
|
|
439
|
-
- <file path>
|
|
440
254
|
|
|
441
255
|
Run `/rb:validate-card <cardId>` to run QA validation.
|
|
442
256
|
```
|
|
@@ -445,9 +259,16 @@ Run `/rb:validate-card <cardId>` to run QA validation.
|
|
|
445
259
|
|
|
446
260
|
## MCP Curl Fallback
|
|
447
261
|
|
|
448
|
-
When MCP tools are unavailable, use
|
|
262
|
+
When MCP tools are unavailable, use curl JSON-RPC. Read the API key from `.mcp.json` under the server assigned to the `engineer` role (or the first HTTP server entry).
|
|
449
263
|
|
|
450
264
|
```bash
|
|
265
|
+
# Ping
|
|
266
|
+
curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
267
|
+
-H "Authorization: Bearer <KEY>" \
|
|
268
|
+
-H "Content-Type: application/json" \
|
|
269
|
+
-H "Accept: application/json, text/event-stream" \
|
|
270
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ping","arguments":{}}}'
|
|
271
|
+
|
|
451
272
|
# Get card
|
|
452
273
|
curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
453
274
|
-H "Authorization: Bearer <KEY>" \
|
|
@@ -468,34 +289,6 @@ curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
|
468
289
|
-H "Content-Type: application/json" \
|
|
469
290
|
-H "Accept: application/json, text/event-stream" \
|
|
470
291
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"add_comment","arguments":{"cardId":"<cardId>","content":"<comment>"}}}'
|
|
471
|
-
|
|
472
|
-
# List comments (used in Step 3b to detect prior QA failures)
|
|
473
|
-
curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
474
|
-
-H "Authorization: Bearer <KEY>" \
|
|
475
|
-
-H "Content-Type: application/json" \
|
|
476
|
-
-H "Accept: application/json, text/event-stream" \
|
|
477
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_comments","arguments":{"cardId":"<cardId>"}}}'
|
|
478
|
-
|
|
479
|
-
# List validations (used in Step 3b to identify failing criteria)
|
|
480
|
-
curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
481
|
-
-H "Authorization: Bearer <KEY>" \
|
|
482
|
-
-H "Content-Type: application/json" \
|
|
483
|
-
-H "Accept: application/json, text/event-stream" \
|
|
484
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_validations","arguments":{"cardId":"<cardId>"}}}'
|
|
485
|
-
|
|
486
|
-
# Submit validation report (Steps 13)
|
|
487
|
-
curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
488
|
-
-H "Authorization: Bearer <KEY>" \
|
|
489
|
-
-H "Content-Type: application/json" \
|
|
490
|
-
-H "Accept: application/json, text/event-stream" \
|
|
491
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"submit_validation","arguments":{"cardId":"<cardId>","results":[{"criterionId":"<id>","status":"pass","comment":"<evidence>"}],"overallComment":"N of total criteria passing."}}}'
|
|
492
|
-
|
|
493
|
-
# Move card to done (Step 14 — only after submit_validation passes)
|
|
494
|
-
curl -s -X POST "https://api.rayburst.app/api/v1/mcp" \
|
|
495
|
-
-H "Authorization: Bearer <KEY>" \
|
|
496
|
-
-H "Content-Type: application/json" \
|
|
497
|
-
-H "Accept: application/json, text/event-stream" \
|
|
498
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"move_card","arguments":{"cardId":"<cardId>","status":"done"}}}'
|
|
499
292
|
```
|
|
500
293
|
|
|
501
294
|
Parse the `data:` line from the SSE response to extract the JSON result.
|
|
@@ -506,16 +299,9 @@ Parse the `data:` line from the SSE response to extract the JSON result.
|
|
|
506
299
|
|
|
507
300
|
- **Full UUIDs only** — short hashes return NOT_FOUND
|
|
508
301
|
- **Rate limit: 60 req/min** — batch MCP calls in groups of 4-5
|
|
509
|
-
- **
|
|
302
|
+
- **No interactive plan approval** — planner agent produces the plan, executor runs it immediately
|
|
303
|
+
- **Move card to `in-progress` before planning** (Step 5) — board must reflect active work
|
|
510
304
|
- **Post plan as comment before executing** (Step 7) — creates a paper trail
|
|
511
|
-
- **
|
|
512
|
-
- **Always run QA validation after implementation** (Steps 11–13) — never stop at `validation` status
|
|
513
|
-
- **Only move card to `done` after `submit_validation` passes** (Step 14) — the MCP gate is mandatory
|
|
514
|
-
- **On QA failure: post comment then move to `in-progress`** — never leave a failed card in `validation`
|
|
515
|
-
- **Do NOT fix failing criteria during QA** — report them, return the card, and stop
|
|
516
|
-
- **If conflict detection finds at-risk criteria, STOP and prompt** — do not silently proceed
|
|
517
|
-
- **If user cancels after conflict detection, move card back to `ready`** before stopping
|
|
518
|
-
- **Context auto-clean** — compact or delegate to subagent after each major implementation phase
|
|
305
|
+
- **Executor moves card to `validation`** — do not move it manually after spawning
|
|
519
306
|
- **Implementation comments under 5000 characters** — no raw code in comment content
|
|
520
|
-
- **Validation criterion comments under 500 characters** — plain prose only, no backticks
|
|
521
307
|
- **Run `/rb:init` first** if `.claude/rb-config.md` is missing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rayburst/cc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Rayburst slash commands for Claude Code — /rb:init, /rb:plan, /rb:sync, /rb:status, /rb:validate-feature, /rb:validate-card, /rb:implement, /rb:discover",
|
|
5
5
|
"bin": {
|
|
6
6
|
"rayburst-cc": "bin/install.js"
|