aiblueprint-cli 1.4.15 → 1.4.16
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/claude-code-config/skills/setup-ralph/SKILL.md +117 -0
- package/claude-code-config/skills/setup-ralph/scripts/setup.sh +278 -0
- package/claude-code-config/skills/setup-ralph/steps/step-00-init.md +215 -0
- package/claude-code-config/skills/setup-ralph/steps/step-01-interactive-prd.md +366 -0
- package/claude-code-config/skills/setup-ralph/steps/step-02-create-stories.md +273 -0
- package/claude-code-config/skills/setup-ralph/steps/step-03-finish.md +245 -0
- package/package.json +1 -1
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-01-interactive-prd
|
|
3
|
+
description: Collaborative PRD brainstorming with parallel exploration (APEX-style)
|
|
4
|
+
prev_step: steps/step-00-init.md
|
|
5
|
+
next_step: steps/step-02-create-stories.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 1: Interactive PRD Creation
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER generate content without user input - you're a FACILITATOR
|
|
13
|
+
- 🛑 NEVER be too technical - focus on WHAT and WHY, not HOW
|
|
14
|
+
- 🛑 NEVER write final PRD without user approval
|
|
15
|
+
- 🛑 NEVER run ralph.sh - only create PRD files
|
|
16
|
+
- ✅ ALWAYS brainstorm collaboratively - ask, listen, refine
|
|
17
|
+
- ✅ ALWAYS use parallel exploration to understand codebase context
|
|
18
|
+
- ✅ ALWAYS let user validate each section before continuing
|
|
19
|
+
- 📋 YOU ARE A FACILITATOR and BRAINSTORMING PARTNER
|
|
20
|
+
- 💬 FOCUS on understanding the vision, not implementation details
|
|
21
|
+
- 🚫 FORBIDDEN to skip brainstorming phases
|
|
22
|
+
- 🚫 FORBIDDEN to proceed without user confirmation at each phase
|
|
23
|
+
|
|
24
|
+
## EXECUTION PROTOCOLS:
|
|
25
|
+
|
|
26
|
+
- 🎯 Start with open discovery - understand the vision
|
|
27
|
+
- 💾 Build PRD incrementally with user approval at each section
|
|
28
|
+
- 📖 Use parallel agents to gather context (like APEX analyze phase)
|
|
29
|
+
- 🚫 FORBIDDEN to load next step until PRD is saved and approved
|
|
30
|
+
|
|
31
|
+
## CONTEXT BOUNDARIES:
|
|
32
|
+
|
|
33
|
+
**Available from step-00:**
|
|
34
|
+
- `{project_path}` - Absolute path to project
|
|
35
|
+
- `{ralph_dir}` - Path to .claude/ralph
|
|
36
|
+
- `{feature_name}` - Feature folder name (e.g., `01-add-auth`)
|
|
37
|
+
- `{feature_dir}` - Path to feature folder
|
|
38
|
+
|
|
39
|
+
## YOUR TASK:
|
|
40
|
+
|
|
41
|
+
Collaboratively brainstorm with the user to create a comprehensive PRD, using parallel exploration to understand the codebase context.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## EXECUTION SEQUENCE:
|
|
46
|
+
|
|
47
|
+
### Phase 1: Discovery & Vision
|
|
48
|
+
|
|
49
|
+
**Start with a warm welcome:**
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
🚀 Let's brainstorm your feature: {feature_name}
|
|
53
|
+
|
|
54
|
+
I'm here as your brainstorming partner. We'll explore your ideas together
|
|
55
|
+
and create a PRD that captures exactly what you want to build.
|
|
56
|
+
|
|
57
|
+
This is about WHAT you want, not HOW to build it.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Use AskUserQuestion for initial discovery:**
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
questions:
|
|
64
|
+
- header: "Vision"
|
|
65
|
+
question: "In one sentence, what's the core idea of this feature?"
|
|
66
|
+
options:
|
|
67
|
+
- label: "Let me describe it"
|
|
68
|
+
description: "I'll explain my vision"
|
|
69
|
+
multiSelect: false
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**After user responds, ask follow-up questions conversationally:**
|
|
73
|
+
|
|
74
|
+
1. **"What problem does this solve?"** - Pain point, who experiences it
|
|
75
|
+
2. **"What does success look like?"** - Ideal outcome when it's done
|
|
76
|
+
3. **"Who benefits most?"** - Primary users/personas
|
|
77
|
+
|
|
78
|
+
**After gathering vision, offer A/P/C menu:**
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
questions:
|
|
82
|
+
- header: "Vision"
|
|
83
|
+
question: "We've captured your vision. What's next?"
|
|
84
|
+
options:
|
|
85
|
+
- label: "Continue to exploration (Recommended)"
|
|
86
|
+
description: "Let me explore your codebase to understand context"
|
|
87
|
+
- label: "Refine vision more"
|
|
88
|
+
description: "I want to add or change something"
|
|
89
|
+
- label: "Advanced: Brainstorming techniques"
|
|
90
|
+
description: "Use specific brainstorming methods"
|
|
91
|
+
multiSelect: false
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Phase 2: Parallel Exploration (APEX-Style)
|
|
95
|
+
|
|
96
|
+
**Launch parallel exploration agents to understand context:**
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
📡 Exploring your codebase to understand context...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**CRITICAL: Launch ALL agents in a SINGLE message for parallel execution.**
|
|
103
|
+
|
|
104
|
+
**Agent 1: Codebase Exploration** (`explore-codebase`)
|
|
105
|
+
```
|
|
106
|
+
Find existing code related to: {user's feature description}
|
|
107
|
+
|
|
108
|
+
Report:
|
|
109
|
+
1. Files that contain related functionality
|
|
110
|
+
2. Existing patterns used for similar features
|
|
111
|
+
3. How similar features are currently structured
|
|
112
|
+
4. What infrastructure already exists
|
|
113
|
+
|
|
114
|
+
Report ONLY what exists - no planning.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Agent 2: Documentation Research** (`explore-docs`)
|
|
118
|
+
```
|
|
119
|
+
Research documentation for libraries that might be relevant to: {user's feature description}
|
|
120
|
+
|
|
121
|
+
Find:
|
|
122
|
+
1. How relevant libraries/frameworks work
|
|
123
|
+
2. Common patterns from official docs
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**After exploration completes, synthesize findings:**
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
🔍 Context Discovery Complete
|
|
130
|
+
|
|
131
|
+
**Related code found:**
|
|
132
|
+
- {list key files and what they do}
|
|
133
|
+
|
|
134
|
+
**Existing patterns:**
|
|
135
|
+
- {list patterns you can follow}
|
|
136
|
+
|
|
137
|
+
**Infrastructure available:**
|
|
138
|
+
- {list utilities and helpers}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Phase 3: Scope Definition
|
|
142
|
+
|
|
143
|
+
**Help user define clear scope:**
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
questions:
|
|
147
|
+
- header: "Scope"
|
|
148
|
+
question: "How big should this feature be for the first version?"
|
|
149
|
+
options:
|
|
150
|
+
- label: "Minimal MVP (Recommended)"
|
|
151
|
+
description: "Just the core functionality - can iterate later"
|
|
152
|
+
- label: "Full feature"
|
|
153
|
+
description: "Complete implementation with all edge cases"
|
|
154
|
+
- label: "Let's discuss"
|
|
155
|
+
description: "Help me figure out the right scope"
|
|
156
|
+
multiSelect: false
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**If "Let's discuss":**
|
|
160
|
+
Use the 3-question MVP test:
|
|
161
|
+
1. "What's the ONE thing this must do to be useful?"
|
|
162
|
+
2. "What can we add in version 2?"
|
|
163
|
+
3. "What's explicitly NOT part of this?"
|
|
164
|
+
|
|
165
|
+
### Phase 4: Feature Brainstorming
|
|
166
|
+
|
|
167
|
+
**Brainstorm the key capabilities:**
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
questions:
|
|
171
|
+
- header: "Features"
|
|
172
|
+
question: "What are the 3-5 key things this feature should do?"
|
|
173
|
+
options:
|
|
174
|
+
- label: "Let me list them"
|
|
175
|
+
description: "I'll describe the main capabilities"
|
|
176
|
+
multiSelect: false
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**After user lists features, reflect back:**
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
📝 Key Features Identified:
|
|
183
|
+
|
|
184
|
+
1. {Feature 1} - {brief description}
|
|
185
|
+
2. {Feature 2} - {brief description}
|
|
186
|
+
3. {Feature 3} - {brief description}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Then offer refinement:**
|
|
190
|
+
|
|
191
|
+
```yaml
|
|
192
|
+
questions:
|
|
193
|
+
- header: "Features"
|
|
194
|
+
question: "Does this capture what you want?"
|
|
195
|
+
options:
|
|
196
|
+
- label: "Yes, continue (Recommended)"
|
|
197
|
+
description: "Move to organizing into phases"
|
|
198
|
+
- label: "Add more features"
|
|
199
|
+
description: "I want to add something"
|
|
200
|
+
- label: "Remove or change"
|
|
201
|
+
description: "Some of these need adjustment"
|
|
202
|
+
multiSelect: false
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Phase 5: Phase Planning
|
|
206
|
+
|
|
207
|
+
**Help organize features into phases:**
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
💡 Let's organize these into phases for Ralph:
|
|
211
|
+
|
|
212
|
+
**Phase 1 (Foundation):** What must work first?
|
|
213
|
+
**Phase 2 (Core):** Main functionality
|
|
214
|
+
**Phase 3 (Polish):** Nice-to-haves
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Guide the splitting:**
|
|
218
|
+
- Each phase should have 3-8 stories
|
|
219
|
+
- Each story = 5-30 minutes of work
|
|
220
|
+
- Stories must be independently committable
|
|
221
|
+
|
|
222
|
+
**Story Writing Guidelines:**
|
|
223
|
+
```
|
|
224
|
+
✅ Good story: "Add email validation to signup form"
|
|
225
|
+
❌ Too big: "Build entire auth system"
|
|
226
|
+
❌ Too small: "Add import statement"
|
|
227
|
+
|
|
228
|
+
Each story should:
|
|
229
|
+
- Be completable by one developer
|
|
230
|
+
- Not depend on future stories
|
|
231
|
+
- Deliver measurable value
|
|
232
|
+
- Be independently testable
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Phase 6: Draft PRD
|
|
236
|
+
|
|
237
|
+
**Generate PRD draft based on all brainstorming:**
|
|
238
|
+
|
|
239
|
+
```markdown
|
|
240
|
+
# Feature: {Feature Name}
|
|
241
|
+
|
|
242
|
+
## Vision
|
|
243
|
+
{1 paragraph from Phase 1 - in user's words}
|
|
244
|
+
|
|
245
|
+
## Problem
|
|
246
|
+
{Pain point and who experiences it}
|
|
247
|
+
|
|
248
|
+
## Solution
|
|
249
|
+
{High-level approach - WHAT not HOW}
|
|
250
|
+
|
|
251
|
+
## Success Criteria
|
|
252
|
+
- {What success looks like - from user}
|
|
253
|
+
|
|
254
|
+
## Key Features
|
|
255
|
+
- {Feature 1}
|
|
256
|
+
- {Feature 2}
|
|
257
|
+
- {Feature 3}
|
|
258
|
+
|
|
259
|
+
## Phases
|
|
260
|
+
|
|
261
|
+
### Phase 1: Foundation
|
|
262
|
+
- [ ] {Story 1 - small, atomic}
|
|
263
|
+
- [ ] {Story 2}
|
|
264
|
+
|
|
265
|
+
### Phase 2: Core Functionality
|
|
266
|
+
- [ ] {Story 3}
|
|
267
|
+
- [ ] {Story 4}
|
|
268
|
+
|
|
269
|
+
### Phase 3: Polish
|
|
270
|
+
- [ ] {Story 5}
|
|
271
|
+
|
|
272
|
+
## Out of Scope
|
|
273
|
+
- {What we're NOT doing - from Phase 3}
|
|
274
|
+
|
|
275
|
+
## Context from Codebase
|
|
276
|
+
- Key files: {from exploration}
|
|
277
|
+
- Patterns to follow: {from exploration}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Note: Keep it non-technical. Focus on WHAT, not HOW.**
|
|
281
|
+
|
|
282
|
+
### Phase 7: Review & Finalize
|
|
283
|
+
|
|
284
|
+
**Present PRD for review:**
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
questions:
|
|
288
|
+
- header: "PRD Review"
|
|
289
|
+
question: "Here's the PRD. How does it look?"
|
|
290
|
+
options:
|
|
291
|
+
- label: "Looks great, save it (Recommended)"
|
|
292
|
+
description: "Save PRD and create user stories"
|
|
293
|
+
- label: "Make changes"
|
|
294
|
+
description: "I want to adjust something"
|
|
295
|
+
- label: "Start over"
|
|
296
|
+
description: "Let's brainstorm from scratch"
|
|
297
|
+
multiSelect: false
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**If "Make changes":** Ask what to change, update, present again.
|
|
301
|
+
|
|
302
|
+
### Phase 8: Save PRD
|
|
303
|
+
|
|
304
|
+
**Save to `{feature_dir}/PRD.md`:**
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
✅ PRD saved to: {feature_dir}/PRD.md
|
|
308
|
+
|
|
309
|
+
Ready to transform this into user stories for Ralph!
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## BRAINSTORMING TECHNIQUES (If user selects "Advanced")
|
|
315
|
+
|
|
316
|
+
Offer these techniques:
|
|
317
|
+
|
|
318
|
+
1. **What If Scenarios** - "What if users could X? What if Y didn't exist?"
|
|
319
|
+
2. **Reversal** - "What would make this feature fail completely?"
|
|
320
|
+
3. **First Principles** - "What's the fundamental problem we're solving?"
|
|
321
|
+
4. **Six Thinking Hats** - Facts, Emotions, Cautions, Benefits, Creativity, Process
|
|
322
|
+
5. **SCAMPER** - Substitute, Combine, Adapt, Modify, Put to other uses, Eliminate, Reverse
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## SUCCESS METRICS:
|
|
327
|
+
|
|
328
|
+
✅ Vision clearly captured in user's words
|
|
329
|
+
✅ Codebase context explored with parallel agents
|
|
330
|
+
✅ Scope defined (MVP vs full)
|
|
331
|
+
✅ Features brainstormed collaboratively
|
|
332
|
+
✅ Phases organized logically
|
|
333
|
+
✅ PRD drafted and approved by user
|
|
334
|
+
✅ User validated at each phase (not auto-generated)
|
|
335
|
+
|
|
336
|
+
## FAILURE MODES:
|
|
337
|
+
|
|
338
|
+
❌ Generating PRD without user input (CRITICAL)
|
|
339
|
+
❌ Being too technical (focus on WHAT not HOW)
|
|
340
|
+
❌ Skipping exploration phase
|
|
341
|
+
❌ Not offering A/P/C menus at each phase
|
|
342
|
+
❌ Making assumptions without asking
|
|
343
|
+
❌ Creating huge stories (each should be 5-30 min)
|
|
344
|
+
❌ Running ralph.sh (user runs it themselves!)
|
|
345
|
+
|
|
346
|
+
## FACILITATOR PROTOCOLS:
|
|
347
|
+
|
|
348
|
+
- Ask, don't assume
|
|
349
|
+
- Reflect back what you heard
|
|
350
|
+
- Use user's language, not technical jargon
|
|
351
|
+
- Offer choices, don't dictate
|
|
352
|
+
- Build incrementally with validation
|
|
353
|
+
- Keep energy collaborative, not transactional
|
|
354
|
+
|
|
355
|
+
## NEXT STEP:
|
|
356
|
+
|
|
357
|
+
After PRD is saved and approved, load `./step-02-create-stories.md`
|
|
358
|
+
|
|
359
|
+
<critical>
|
|
360
|
+
Remember: You are a FACILITATOR. The PRD should be in the USER'S words,
|
|
361
|
+
capturing THEIR vision. Your job is to ask good questions, explore context,
|
|
362
|
+
and organize their ideas - not to generate content they haven't validated.
|
|
363
|
+
|
|
364
|
+
The goal is the BEST possible PRD and BEST possible task split.
|
|
365
|
+
Small, well-defined stories are KEY to Ralph working effectively.
|
|
366
|
+
</critical>
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-02-create-stories
|
|
3
|
+
description: Transform PRD into user stories (prd.json)
|
|
4
|
+
prev_step: steps/step-01-interactive-prd.md
|
|
5
|
+
next_step: steps/step-03-finish.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 2: Create User Stories
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER create stories without reading PRD.md first
|
|
13
|
+
- 🛑 NEVER make stories too large - each must fit in ONE iteration
|
|
14
|
+
- 🛑 NEVER run ralph.sh - only create prd.json, user runs commands
|
|
15
|
+
- ✅ ALWAYS include acceptance criteria for each story
|
|
16
|
+
- ✅ ALWAYS set correct priority order (1 = first to implement)
|
|
17
|
+
- 📋 YOU ARE a story writer, not an implementer
|
|
18
|
+
- 💬 FOCUS on breaking down PRD into atomic stories
|
|
19
|
+
- 🚫 FORBIDDEN to proceed without user confirmation
|
|
20
|
+
|
|
21
|
+
## EXECUTION PROTOCOLS:
|
|
22
|
+
|
|
23
|
+
- 🎯 Read PRD.md completely before writing stories
|
|
24
|
+
- 💾 Save prd.json after user approval
|
|
25
|
+
- 📖 Each story must have clear acceptance criteria
|
|
26
|
+
- 🚫 FORBIDDEN to load next step until prd.json is saved
|
|
27
|
+
|
|
28
|
+
## CONTEXT BOUNDARIES:
|
|
29
|
+
|
|
30
|
+
**Available from previous steps:**
|
|
31
|
+
- `{project_path}` - Absolute path to project
|
|
32
|
+
- `{ralph_dir}` - Path to .claude/ralph
|
|
33
|
+
- `{feature_name}` - Feature folder name
|
|
34
|
+
- `{feature_dir}` - Path to feature folder
|
|
35
|
+
- PRD.md exists in `{feature_dir}`
|
|
36
|
+
|
|
37
|
+
## YOUR TASK:
|
|
38
|
+
|
|
39
|
+
Transform the PRD into a prd.json file with properly structured user stories that Ralph can execute.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## EXECUTION SEQUENCE:
|
|
44
|
+
|
|
45
|
+
### 1. Read PRD.md
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
Read: {feature_dir}/PRD.md
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Extract:
|
|
52
|
+
- Feature name and description
|
|
53
|
+
- All user stories/tasks
|
|
54
|
+
- Acceptance criteria
|
|
55
|
+
- Technical notes
|
|
56
|
+
|
|
57
|
+
### 2. Generate Branch Name
|
|
58
|
+
|
|
59
|
+
Create a branch name from the feature:
|
|
60
|
+
- Format: `feat/{feature-name}`
|
|
61
|
+
- Example: `feat/01-add-auth` or `feat/user-dashboard`
|
|
62
|
+
|
|
63
|
+
### 3. Transform Stories to JSON
|
|
64
|
+
|
|
65
|
+
**For each story in the PRD, create a JSON object:**
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"id": "US-001",
|
|
70
|
+
"title": "Short descriptive title",
|
|
71
|
+
"acceptanceCriteria": [
|
|
72
|
+
"Specific criterion 1",
|
|
73
|
+
"Specific criterion 2",
|
|
74
|
+
"TypeScript compiles",
|
|
75
|
+
"Tests pass"
|
|
76
|
+
],
|
|
77
|
+
"priority": 1,
|
|
78
|
+
"passes": false,
|
|
79
|
+
"notes": "Any context Claude needs"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Story Sizing Rules:**
|
|
84
|
+
|
|
85
|
+
✅ **Good Story Size:**
|
|
86
|
+
- Can be implemented in 5-30 minutes
|
|
87
|
+
- Changes 1-5 files
|
|
88
|
+
- Has clear start and end
|
|
89
|
+
- Independent (can be committed alone)
|
|
90
|
+
|
|
91
|
+
❌ **Story Too Large - Split It:**
|
|
92
|
+
- "Build entire auth system" → Split into 10+ stories
|
|
93
|
+
- "Add user dashboard" → Split into individual widgets
|
|
94
|
+
- "Refactor module" → Split by function/component
|
|
95
|
+
|
|
96
|
+
❌ **Story Too Small - Combine:**
|
|
97
|
+
- "Add import statement" → Combine with the story that uses it
|
|
98
|
+
- "Fix typo" → Combine with related story
|
|
99
|
+
|
|
100
|
+
### 4. Structure prd.json
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"branchName": "feat/{feature-name}",
|
|
105
|
+
"userStories": [
|
|
106
|
+
{
|
|
107
|
+
"id": "US-001",
|
|
108
|
+
"title": "Add FeatureType enum value",
|
|
109
|
+
"acceptanceCriteria": [
|
|
110
|
+
"FEATURE_TYPE added to enum in schema",
|
|
111
|
+
"TypeScript compiles without errors"
|
|
112
|
+
],
|
|
113
|
+
"priority": 1,
|
|
114
|
+
"passes": false,
|
|
115
|
+
"notes": "First step - add the type before using it"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "US-002",
|
|
119
|
+
"title": "Create feature handler skeleton",
|
|
120
|
+
"acceptanceCriteria": [
|
|
121
|
+
"New handler file created following existing patterns",
|
|
122
|
+
"Basic structure in place",
|
|
123
|
+
"TypeScript compiles"
|
|
124
|
+
],
|
|
125
|
+
"priority": 2,
|
|
126
|
+
"passes": false,
|
|
127
|
+
"notes": "Follow pattern from existing handlers"
|
|
128
|
+
}
|
|
129
|
+
// ... more stories
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 5. Priority Guidelines
|
|
135
|
+
|
|
136
|
+
**Priority determines execution order (1 = first):**
|
|
137
|
+
|
|
138
|
+
1. **Foundation** (Priority 1-5)
|
|
139
|
+
- Schema changes
|
|
140
|
+
- Type definitions
|
|
141
|
+
- Base interfaces
|
|
142
|
+
|
|
143
|
+
2. **Core Logic** (Priority 6-15)
|
|
144
|
+
- Business logic
|
|
145
|
+
- Main functionality
|
|
146
|
+
- API endpoints
|
|
147
|
+
|
|
148
|
+
3. **UI Components** (Priority 16-25)
|
|
149
|
+
- Display components
|
|
150
|
+
- Forms
|
|
151
|
+
- Interactions
|
|
152
|
+
|
|
153
|
+
4. **Integration** (Priority 26-35)
|
|
154
|
+
- Connect pieces
|
|
155
|
+
- Error handling
|
|
156
|
+
- Edge cases
|
|
157
|
+
|
|
158
|
+
5. **Polish** (Priority 36+)
|
|
159
|
+
- Tests
|
|
160
|
+
- Documentation
|
|
161
|
+
- Cleanup
|
|
162
|
+
|
|
163
|
+
### 6. Present Stories for Review
|
|
164
|
+
|
|
165
|
+
Show all stories to user:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
📋 User Stories for {feature_name}
|
|
169
|
+
|
|
170
|
+
Branch: {branchName}
|
|
171
|
+
Total stories: {count}
|
|
172
|
+
|
|
173
|
+
| ID | Priority | Title |
|
|
174
|
+
|----|----------|-------|
|
|
175
|
+
| US-001 | 1 | Add FeatureType enum value |
|
|
176
|
+
| US-002 | 2 | Create feature handler skeleton |
|
|
177
|
+
| ... | ... | ... |
|
|
178
|
+
|
|
179
|
+
[Show full JSON for review]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Use AskUserQuestion:**
|
|
183
|
+
```yaml
|
|
184
|
+
questions:
|
|
185
|
+
- header: "Stories"
|
|
186
|
+
question: "Do these user stories look correct? Any changes needed?"
|
|
187
|
+
options:
|
|
188
|
+
- label: "Looks good, save them (Recommended)"
|
|
189
|
+
description: "Save prd.json and get run instructions"
|
|
190
|
+
- label: "Adjust stories"
|
|
191
|
+
description: "I want to add, remove, or modify some stories"
|
|
192
|
+
- label: "Re-read PRD"
|
|
193
|
+
description: "Let me update PRD.md first, then try again"
|
|
194
|
+
multiSelect: false
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 7. Iterate if Needed
|
|
198
|
+
|
|
199
|
+
If user wants changes:
|
|
200
|
+
- Ask what to change
|
|
201
|
+
- Add/remove/modify stories
|
|
202
|
+
- Adjust priorities
|
|
203
|
+
- Present again
|
|
204
|
+
|
|
205
|
+
### 8. Save prd.json
|
|
206
|
+
|
|
207
|
+
Once approved, save to `{feature_dir}/prd.json`:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# Use Write tool
|
|
211
|
+
Write to: {feature_dir}/prd.json
|
|
212
|
+
Content: [JSON with proper formatting]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Also update progress.txt with key files:**
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Append to progress.txt
|
|
219
|
+
Edit: {feature_dir}/progress.txt
|
|
220
|
+
|
|
221
|
+
Append:
|
|
222
|
+
## Key Files
|
|
223
|
+
- {list of files that will be modified}
|
|
224
|
+
- {based on PRD technical design}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## STORY QUALITY CHECKLIST:
|
|
230
|
+
|
|
231
|
+
Before saving, verify each story:
|
|
232
|
+
|
|
233
|
+
✅ **Atomic** - One clear thing to implement
|
|
234
|
+
✅ **Independent** - Can be committed alone
|
|
235
|
+
✅ **Testable** - Clear acceptance criteria
|
|
236
|
+
✅ **Prioritized** - Dependencies come first
|
|
237
|
+
✅ **Sized Right** - 5-30 minutes of work
|
|
238
|
+
✅ **Has Context** - Notes explain what Claude needs to know
|
|
239
|
+
|
|
240
|
+
## SUCCESS METRICS:
|
|
241
|
+
|
|
242
|
+
✅ PRD.md read completely
|
|
243
|
+
✅ All stories extracted and structured
|
|
244
|
+
✅ Priorities set correctly (dependencies first)
|
|
245
|
+
✅ Each story has acceptance criteria
|
|
246
|
+
✅ User approved the stories
|
|
247
|
+
✅ prd.json saved correctly
|
|
248
|
+
✅ progress.txt updated with key files
|
|
249
|
+
|
|
250
|
+
## FAILURE MODES:
|
|
251
|
+
|
|
252
|
+
❌ Stories too large (will fail to complete in one iteration)
|
|
253
|
+
❌ Missing acceptance criteria
|
|
254
|
+
❌ Wrong priority order (dependency after dependent)
|
|
255
|
+
❌ No TypeScript/test criteria in stories
|
|
256
|
+
❌ Skipped user approval
|
|
257
|
+
|
|
258
|
+
## STORY CREATION PROTOCOLS:
|
|
259
|
+
|
|
260
|
+
- Always include "TypeScript compiles" in acceptance criteria
|
|
261
|
+
- Always include "Tests pass" if project has tests
|
|
262
|
+
- Use consistent ID format: US-001, US-002, etc.
|
|
263
|
+
- Notes should explain patterns to follow
|
|
264
|
+
- Group related stories with consecutive priorities
|
|
265
|
+
|
|
266
|
+
## NEXT STEP:
|
|
267
|
+
|
|
268
|
+
After prd.json is saved, load `./step-03-finish.md` to show run instructions.
|
|
269
|
+
|
|
270
|
+
<critical>
|
|
271
|
+
Remember: Story size is CRITICAL. Each story must be completable in one Ralph iteration.
|
|
272
|
+
If in doubt, split into smaller stories. More small stories > fewer large stories.
|
|
273
|
+
</critical>
|