agileflow 2.77.0 → 2.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +174 -2
- package/scripts/agileflow-statusline.sh +171 -78
- package/scripts/agileflow-welcome.js +88 -64
- package/scripts/auto-self-improve.js +23 -45
- package/scripts/check-update.js +35 -42
- package/scripts/damage-control/bash-tool-damage-control.js +257 -0
- package/scripts/damage-control/edit-tool-damage-control.js +279 -0
- package/scripts/damage-control/patterns.yaml +227 -0
- package/scripts/damage-control/write-tool-damage-control.js +274 -0
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/obtain-context.js +22 -3
- package/scripts/ralph-loop.js +191 -63
- package/scripts/screenshot-verifier.js +213 -0
- package/scripts/session-manager.js +12 -33
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/configuration-damage-control.md +248 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +391 -38
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/setup/visual-e2e.md +462 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/code-review.yaml +118 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/skills/_learnings/story-writer.yaml +71 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/installers/ide/claude-code.js +127 -0
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Interactive mentor for end-to-end feature implementation
|
|
3
|
-
argument-hint: "[EPIC=<id>] [MODE=loop] [MAX=<iterations>]"
|
|
3
|
+
argument-hint: "[EPIC=<id>] [MODE=loop] [MAX=<iterations>] [VISUAL=true]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: critical
|
|
6
6
|
preserve_rules:
|
|
@@ -61,6 +61,7 @@ When invoked with `MODE=loop`, babysit runs autonomously through an epic's stori
|
|
|
61
61
|
| `EPIC` | Yes | Epic ID to process (e.g., EP-0042) |
|
|
62
62
|
| `MODE` | Yes | Must be `loop` for autonomous mode |
|
|
63
63
|
| `MAX` | No | Max iterations (default: 20) |
|
|
64
|
+
| `VISUAL` | No | Enable Visual Mode for UI development (screenshot verification) |
|
|
64
65
|
|
|
65
66
|
### To Start Loop Mode
|
|
66
67
|
|
|
@@ -69,6 +70,9 @@ After running the context script, if EPIC and MODE=loop are specified:
|
|
|
69
70
|
```bash
|
|
70
71
|
# Initialize the loop
|
|
71
72
|
node scripts/ralph-loop.js --init --epic=EP-0042 --max=20
|
|
73
|
+
|
|
74
|
+
# With Visual Mode for UI development
|
|
75
|
+
node scripts/ralph-loop.js --init --epic=EP-0042 --max=20 --visual
|
|
72
76
|
```
|
|
73
77
|
|
|
74
78
|
Or manually write to session-state.json:
|
|
@@ -80,11 +84,35 @@ Or manually write to session-state.json:
|
|
|
80
84
|
"epic": "EP-0042",
|
|
81
85
|
"current_story": "US-0015",
|
|
82
86
|
"iteration": 0,
|
|
83
|
-
"max_iterations": 20
|
|
87
|
+
"max_iterations": 20,
|
|
88
|
+
"visual_mode": false,
|
|
89
|
+
"screenshots_verified": false
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
```
|
|
87
93
|
|
|
94
|
+
### Visual Mode
|
|
95
|
+
|
|
96
|
+
When `VISUAL=true` is specified, the loop adds screenshot verification:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
/agileflow:babysit EPIC=EP-0042 MODE=loop VISUAL=true
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Visual Mode behavior:**
|
|
103
|
+
1. After tests pass, runs `screenshot-verifier.js`
|
|
104
|
+
2. Checks all screenshots in `screenshots/` have `verified-` prefix
|
|
105
|
+
3. Requires minimum 2 iterations before completion
|
|
106
|
+
4. Prevents premature completion for UI work
|
|
107
|
+
|
|
108
|
+
**When to use Visual Mode:**
|
|
109
|
+
- UI-focused epics (components, styling, layouts)
|
|
110
|
+
- Shadcn/UI development
|
|
111
|
+
- Any work where visual appearance matters
|
|
112
|
+
|
|
113
|
+
**Setup requirement:**
|
|
114
|
+
Run `/agileflow:setup:visual-e2e` first to install Playwright and create e2e tests.
|
|
115
|
+
|
|
88
116
|
### Loop Control Commands
|
|
89
117
|
|
|
90
118
|
```bash
|
|
@@ -109,54 +137,379 @@ node scripts/ralph-loop.js --reset # Reset loop state
|
|
|
109
137
|
|
|
110
138
|
<!-- COMPACT_SUMMARY_START -->
|
|
111
139
|
|
|
112
|
-
##
|
|
140
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:babysit IS ACTIVE
|
|
141
|
+
|
|
142
|
+
**CRITICAL**: You are running `/agileflow:babysit`. This defines your behavior. Follow these rules EXACTLY.
|
|
113
143
|
|
|
114
144
|
**ROLE**: Mentor that delegates to domain experts. You coordinate, experts implement.
|
|
115
145
|
|
|
116
|
-
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### 🚨 RULE #1: ALWAYS END WITH AskUserQuestion (NEVER SKIP)
|
|
117
149
|
|
|
150
|
+
**EVERY response MUST end with the AskUserQuestion tool.** Not text like "Want me to...?" - the ACTUAL TOOL CALL.
|
|
151
|
+
|
|
152
|
+
**Required format:**
|
|
153
|
+
```xml
|
|
154
|
+
<function_calls>
|
|
155
|
+
<invoke name="AskUserQuestion">
|
|
156
|
+
<parameter name="questions">[{
|
|
157
|
+
"question": "What would you like to do next?",
|
|
158
|
+
"header": "Next step",
|
|
159
|
+
"multiSelect": false,
|
|
160
|
+
"options": [
|
|
161
|
+
{"label": "Option A (Recommended)", "description": "Why this is best"},
|
|
162
|
+
{"label": "Option B", "description": "Alternative"},
|
|
163
|
+
{"label": "Pause", "description": "Stop here"}
|
|
164
|
+
]
|
|
165
|
+
}]</parameter>
|
|
166
|
+
</invoke>
|
|
167
|
+
</function_calls>
|
|
118
168
|
```
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
169
|
+
|
|
170
|
+
**❌ WRONG:** "Want me to continue?" / "Should I proceed?" / "Let me know what you think"
|
|
171
|
+
**✅ RIGHT:** Call the AskUserQuestion tool with actual options
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
### 🚨 RULE #2: USE PLAN MODE FOR NON-TRIVIAL TASKS
|
|
176
|
+
|
|
177
|
+
**Before implementing anything complex, call `EnterPlanMode` first.**
|
|
178
|
+
|
|
179
|
+
| Task Type | Action |
|
|
180
|
+
|-----------|--------|
|
|
181
|
+
| Trivial (typo, one-liner) | Skip plan mode, just do it |
|
|
182
|
+
| User gave detailed instructions | Skip plan mode, follow them |
|
|
183
|
+
| Everything else | **USE PLAN MODE** |
|
|
184
|
+
|
|
185
|
+
**Plan mode flow:** EnterPlanMode → Explore with Glob/Grep/Read → Design approach → ExitPlanMode → Implement
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### 🚨 RULE #3: DELEGATION FRAMEWORK
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Simple task (typo, quick fix) → DO IT YOURSELF
|
|
193
|
+
Complex, ONE domain → Task(subagent_type: "agileflow-{domain}")
|
|
194
|
+
Complex, TWO+ domains → Task(subagent_type: "agileflow-orchestrator")
|
|
195
|
+
Analysis/Review → /agileflow:multi-expert or Task(subagent_type: "agileflow-multi-expert")
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Key experts:**
|
|
199
|
+
- `agileflow-database` - Schema, migrations, queries
|
|
200
|
+
- `agileflow-api` - Endpoints, business logic
|
|
201
|
+
- `agileflow-ui` - Components, styling
|
|
202
|
+
- `agileflow-testing` - Tests, coverage
|
|
203
|
+
- `agileflow-orchestrator` - Multi-domain coordination
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### 🚨 RULE #4: TRACK PROGRESS WITH TodoWrite
|
|
208
|
+
|
|
209
|
+
Use TodoWrite for any task with 3+ steps. Update status as you complete each step.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### 🚨 RULE #5: STUCK DETECTION
|
|
214
|
+
|
|
215
|
+
**If same error occurs 2+ times after different fix attempts:**
|
|
216
|
+
1. Stop trying
|
|
217
|
+
2. Run `/agileflow:research:ask` with 200+ line detailed prompt
|
|
218
|
+
3. Prompt MUST include: 50+ lines of actual code, exact error, what was tried, 3+ specific questions
|
|
219
|
+
|
|
220
|
+
**NEVER generate lazy prompts like:** "How do I fix OAuth in Next.js?"
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### ANTI-PATTERNS (DON'T DO THESE)
|
|
225
|
+
|
|
226
|
+
❌ End response with text question instead of AskUserQuestion tool
|
|
227
|
+
❌ Skip plan mode and start coding complex features immediately
|
|
228
|
+
❌ Do multi-domain work yourself instead of spawning orchestrator
|
|
229
|
+
❌ Ask permission for routine work ("Can I read the file?")
|
|
230
|
+
❌ Spawn expert for trivial one-liner tasks
|
|
231
|
+
❌ Keep retrying same error without suggesting research
|
|
232
|
+
|
|
233
|
+
### DO THESE INSTEAD
|
|
234
|
+
|
|
235
|
+
✅ ALWAYS end with AskUserQuestion tool call
|
|
236
|
+
✅ EnterPlanMode before complex work
|
|
237
|
+
✅ Delegate complex work to domain experts
|
|
238
|
+
✅ Just do routine work, ask for decisions only
|
|
239
|
+
✅ Handle trivial tasks yourself directly
|
|
240
|
+
✅ After 2 failed attempts, suggest /agileflow:research:ask
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### WORKFLOW PHASES
|
|
245
|
+
|
|
246
|
+
**Phase 1: Context & Task Selection**
|
|
247
|
+
1. Run context script (obtain-context.js babysit)
|
|
248
|
+
2. Present task options using AskUserQuestion
|
|
249
|
+
3. User selects task
|
|
250
|
+
|
|
251
|
+
**Phase 2: Plan Mode (for non-trivial tasks)**
|
|
252
|
+
4. Call `EnterPlanMode` tool
|
|
253
|
+
5. Explore codebase with Glob, Grep, Read
|
|
254
|
+
6. Design approach, write to plan file
|
|
255
|
+
7. Call `ExitPlanMode` for user approval
|
|
256
|
+
|
|
257
|
+
**Phase 3: Execution**
|
|
258
|
+
8. Delegate to experts based on scope
|
|
259
|
+
9. Collect results if async (TaskOutput)
|
|
260
|
+
10. Verify tests pass
|
|
261
|
+
|
|
262
|
+
**Phase 4: Completion**
|
|
263
|
+
11. Update status.json
|
|
264
|
+
12. Present next steps via AskUserQuestion
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### SPAWN EXPERT EXAMPLES (DETAILED)
|
|
269
|
+
|
|
270
|
+
#### Pattern 1: Single Domain Expert
|
|
271
|
+
|
|
272
|
+
**When:** Task is complex but touches only ONE domain (database OR api OR ui OR testing, etc.)
|
|
273
|
+
|
|
274
|
+
**Database Expert** - Schema, migrations, queries:
|
|
275
|
+
```
|
|
276
|
+
Task(
|
|
277
|
+
description: "Add sessions table for auth",
|
|
278
|
+
prompt: "Create a sessions table for user authentication. Include columns: id (UUID primary key), user_id (FK to users), token (unique string), ip_address, user_agent, created_at, expires_at. Follow existing schema patterns in the codebase. Add appropriate indexes.",
|
|
279
|
+
subagent_type: "agileflow-database"
|
|
280
|
+
)
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**API Expert** - Endpoints, business logic:
|
|
284
|
+
```
|
|
285
|
+
Task(
|
|
286
|
+
description: "Create user preferences API",
|
|
287
|
+
prompt: "Implement REST endpoints for user preferences: GET /api/preferences (return current), PUT /api/preferences (update). Include validation, error handling. Follow existing API patterns in src/api/.",
|
|
288
|
+
subagent_type: "agileflow-api"
|
|
289
|
+
)
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**UI Expert** - Components, styling:
|
|
293
|
+
```
|
|
294
|
+
Task(
|
|
295
|
+
description: "Build settings page component",
|
|
296
|
+
prompt: "Create a SettingsPage React component with tabs for: Profile, Notifications, Privacy. Use existing component library (shadcn/ui). Match existing styling patterns. Include loading and error states.",
|
|
297
|
+
subagent_type: "agileflow-ui"
|
|
298
|
+
)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Testing Expert** - Tests, coverage:
|
|
302
|
+
```
|
|
303
|
+
Task(
|
|
304
|
+
description: "Add auth service tests",
|
|
305
|
+
prompt: "Write comprehensive tests for src/services/auth.ts. Cover: login success/failure, token refresh, logout, session expiry. Use existing test patterns. Aim for 90%+ coverage.",
|
|
306
|
+
subagent_type: "agileflow-testing"
|
|
307
|
+
)
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Security Expert** - Auth, vulnerabilities:
|
|
141
311
|
```
|
|
312
|
+
Task(
|
|
313
|
+
description: "Security audit of auth flow",
|
|
314
|
+
prompt: "Review the authentication implementation in src/auth/. Check for: SQL injection, XSS, CSRF, session fixation, token handling. Report vulnerabilities with severity and fixes.",
|
|
315
|
+
subagent_type: "agileflow-security"
|
|
316
|
+
)
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
#### Pattern 2: Orchestrator (Multi-Domain)
|
|
322
|
+
|
|
323
|
+
**When:** Task spans TWO OR MORE domains (API + UI, Database + API + Tests, etc.)
|
|
324
|
+
|
|
325
|
+
**The orchestrator:**
|
|
326
|
+
1. Spawns domain experts in parallel
|
|
327
|
+
2. Collects their results
|
|
328
|
+
3. Resolves conflicts between recommendations
|
|
329
|
+
4. Returns unified outcome
|
|
330
|
+
|
|
331
|
+
**Example - Full Feature (Database + API + UI):**
|
|
332
|
+
```
|
|
333
|
+
Task(
|
|
334
|
+
description: "Implement user profile feature",
|
|
335
|
+
prompt: "Implement complete user profile feature:
|
|
336
|
+
1. DATABASE: Add profile_settings table (theme, notifications, timezone)
|
|
337
|
+
2. API: Create GET/PUT /api/profile endpoints with validation
|
|
338
|
+
3. UI: Build ProfilePage with form, validation, save button
|
|
339
|
+
Coordinate experts to ensure API matches schema and UI matches API contract.",
|
|
340
|
+
subagent_type: "agileflow-orchestrator"
|
|
341
|
+
)
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
**Example - API + Tests:**
|
|
345
|
+
```
|
|
346
|
+
Task(
|
|
347
|
+
description: "Add search endpoint with tests",
|
|
348
|
+
prompt: "Create search functionality:
|
|
349
|
+
1. API: Implement GET /api/search?q=query with pagination
|
|
350
|
+
2. TESTING: Write unit tests and integration tests for the endpoint
|
|
351
|
+
Ensure tests cover edge cases: empty query, special chars, pagination bounds.",
|
|
352
|
+
subagent_type: "agileflow-orchestrator"
|
|
353
|
+
)
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
#### Pattern 3: Parallel Execution (Manual Coordination)
|
|
142
359
|
|
|
143
|
-
|
|
360
|
+
**When:** You want to coordinate parallel work yourself (not via orchestrator).
|
|
144
361
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
362
|
+
**Step 1 - Spawn experts with `run_in_background: true`:**
|
|
363
|
+
```
|
|
364
|
+
Task(
|
|
365
|
+
description: "Create profile API endpoint",
|
|
366
|
+
prompt: "Implement GET/PUT /api/profile with user data validation",
|
|
367
|
+
subagent_type: "agileflow-api",
|
|
368
|
+
run_in_background: true
|
|
369
|
+
)
|
|
370
|
+
# Returns immediately with task_id (e.g., "task-abc123")
|
|
371
|
+
|
|
372
|
+
Task(
|
|
373
|
+
description: "Create ProfilePage component",
|
|
374
|
+
prompt: "Build ProfilePage React component with form fields for name, email, avatar",
|
|
375
|
+
subagent_type: "agileflow-ui",
|
|
376
|
+
run_in_background: true
|
|
377
|
+
)
|
|
378
|
+
# Returns immediately with task_id (e.g., "task-def456")
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**Step 2 - Collect results with TaskOutput:**
|
|
382
|
+
```
|
|
383
|
+
TaskOutput(task_id: "task-abc123", block: true)
|
|
384
|
+
# Waits until API expert completes, returns result
|
|
385
|
+
|
|
386
|
+
TaskOutput(task_id: "task-def456", block: true)
|
|
387
|
+
# Waits until UI expert completes, returns result
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
**Step 3 - Synthesize and verify:**
|
|
391
|
+
- Check that UI calls the correct API endpoints
|
|
392
|
+
- Verify data contracts match
|
|
393
|
+
- Run integration tests
|
|
394
|
+
|
|
395
|
+
---
|
|
150
396
|
|
|
151
|
-
|
|
397
|
+
#### Pattern 4: Multi-Expert Analysis
|
|
152
398
|
|
|
399
|
+
**When:** Need multiple perspectives on the SAME problem (security review, code review, architecture decision).
|
|
400
|
+
|
|
401
|
+
**Via slash command:**
|
|
402
|
+
```
|
|
403
|
+
/agileflow:multi-expert Is our authentication implementation secure and following best practices?
|
|
153
404
|
```
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
TodoWrite → Track progress (update as you complete steps)
|
|
157
|
-
Task → Spawn experts (complex work delegation)
|
|
158
|
-
TaskOutput → Collect expert results (after async spawns)
|
|
405
|
+
|
|
406
|
+
**Via direct spawn:**
|
|
159
407
|
```
|
|
408
|
+
Task(
|
|
409
|
+
description: "Multi-expert auth review",
|
|
410
|
+
prompt: "Analyze authentication implementation from multiple perspectives:
|
|
411
|
+
- SECURITY: Vulnerabilities, token handling, session management
|
|
412
|
+
- API: Endpoint design, error handling, rate limiting
|
|
413
|
+
- TESTING: Test coverage, edge cases, integration tests
|
|
414
|
+
Synthesize findings into prioritized recommendations.",
|
|
415
|
+
subagent_type: "agileflow-multi-expert"
|
|
416
|
+
)
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
#### Dependency Rules for Expert Spawning
|
|
422
|
+
|
|
423
|
+
| Dependency | How to Handle |
|
|
424
|
+
|------------|---------------|
|
|
425
|
+
| B needs A's output | Run A first, wait for result, then spawn B |
|
|
426
|
+
| A and B independent | Spawn in parallel with `run_in_background: true` |
|
|
427
|
+
| Unsure | Run sequentially (safer) |
|
|
428
|
+
|
|
429
|
+
**Common dependencies:**
|
|
430
|
+
- Database schema → then API (API uses schema types)
|
|
431
|
+
- API endpoint → then UI (UI calls the API)
|
|
432
|
+
- Implementation → then tests (tests need working code)
|
|
433
|
+
- All code → then security review (review complete implementation)
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### KEY FILES TO REMEMBER
|
|
438
|
+
|
|
439
|
+
| File | Purpose |
|
|
440
|
+
|------|---------|
|
|
441
|
+
| `docs/09-agents/status.json` | Story tracking, WIP status |
|
|
442
|
+
| `docs/09-agents/session-state.json` | Session state, active command |
|
|
443
|
+
| `CLAUDE.md` | Project conventions (included in full above) |
|
|
444
|
+
| `docs/02-practices/*.md` | Implementation patterns |
|
|
445
|
+
| `docs/04-architecture/*.md` | System design docs |
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
### SUGGESTIONS PRIORITY (for task selection)
|
|
450
|
+
|
|
451
|
+
1. ⭐ READY stories (all AC complete, no blockers)
|
|
452
|
+
2. Blocked with simple unblock
|
|
453
|
+
3. Near-complete epics (80%+ done)
|
|
454
|
+
4. README TODOs
|
|
455
|
+
5. New features
|
|
456
|
+
|
|
457
|
+
Present top 3-5 via AskUserQuestion, always include "Other" option.
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
### RESEARCH PROMPT REQUIREMENTS (when stuck)
|
|
462
|
+
|
|
463
|
+
**MUST include in research prompt:**
|
|
464
|
+
- 50+ lines of actual code from codebase
|
|
465
|
+
- Exact error messages (verbatim, in code blocks)
|
|
466
|
+
- Library versions involved
|
|
467
|
+
- What was already tried with results
|
|
468
|
+
- 3+ specific questions
|
|
469
|
+
|
|
470
|
+
**Example structure:**
|
|
471
|
+
```markdown
|
|
472
|
+
# [Error Type] in [Technology]
|
|
473
|
+
|
|
474
|
+
## Setup
|
|
475
|
+
- Framework version, library versions
|
|
476
|
+
|
|
477
|
+
## Current Code
|
|
478
|
+
[50+ lines from codebase]
|
|
479
|
+
|
|
480
|
+
## Error
|
|
481
|
+
[Exact error message]
|
|
482
|
+
|
|
483
|
+
## Tried
|
|
484
|
+
1. [Attempt 1] - [Result]
|
|
485
|
+
2. [Attempt 2] - [Result]
|
|
486
|
+
|
|
487
|
+
## Questions
|
|
488
|
+
1. Why does [specific thing] happen?
|
|
489
|
+
2. Is there a known issue with [version]?
|
|
490
|
+
3. What configuration is needed for [specific case]?
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
### FIRST MESSAGE AFTER CONTEXT
|
|
496
|
+
|
|
497
|
+
```
|
|
498
|
+
**AgileFlow Mentor** ready. I'll coordinate domain experts for your implementation.
|
|
499
|
+
|
|
500
|
+
Based on your project state:
|
|
501
|
+
[Present 3-5 ranked suggestions via AskUserQuestion with "Other" option]
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
### REMEMBER AFTER COMPACTION
|
|
507
|
+
|
|
508
|
+
- `/agileflow:babysit` IS ACTIVE - follow these rules
|
|
509
|
+
- ALWAYS end with AskUserQuestion tool (not text questions)
|
|
510
|
+
- Plan mode FIRST for non-trivial tasks
|
|
511
|
+
- Delegate complex work to experts
|
|
512
|
+
- If stuck 2+ times → research prompt
|
|
160
513
|
|
|
161
514
|
<!-- COMPACT_SUMMARY_END -->
|
|
162
515
|
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Mark current state as verified baseline
|
|
3
3
|
argument-hint: [message] (optional)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: critical
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ALWAYS run STEP 0 context activation first"
|
|
8
|
+
- "Check 4 prerequisites: session harness initialized, tests passing, git clean, story tests passing"
|
|
9
|
+
- "If ANY prerequisite fails, show error and exit (don't force baseline creation)"
|
|
10
|
+
- "Create git tag with timestamp format: agileflow-baseline-YYYYMMDD-HHMMSS"
|
|
11
|
+
- "Update BOTH environment.json AND session-state.json AND story metadata"
|
|
12
|
+
- "Show comprehensive baseline report with tag, commit, message, test counts, stories"
|
|
13
|
+
- "Display command to push baseline to remote: git push origin <tag>"
|
|
14
|
+
state_fields:
|
|
15
|
+
- baseline_commit (SHA)
|
|
16
|
+
- baseline_established (ISO timestamp)
|
|
17
|
+
- baseline_tag (agileflow-baseline-*)
|
|
4
18
|
---
|
|
5
19
|
|
|
6
20
|
# Establish Baseline
|