agentic-loop 3.7.0 → 3.7.1
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/commands/prd.md +60 -30
- package/package.json +1 -1
package/.claude/commands/prd.md
CHANGED
|
@@ -99,53 +99,83 @@ Break the idea into small, executable stories:
|
|
|
99
99
|
|
|
100
100
|
- Each story completable in one Claude session (~10-15 min)
|
|
101
101
|
- Max 3-4 acceptance criteria per story
|
|
102
|
-
- Order by dependency
|
|
103
102
|
- Max 10 stories (suggest phases if more needed)
|
|
104
103
|
- If appending, start IDs from the next available number
|
|
105
104
|
|
|
106
|
-
### Step 5:
|
|
105
|
+
### Step 5: Write Draft PRD
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
Write the initial PRD to `.ralph/prd.json`:
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
- ✅ **REQUIRE** `npx tsc --noEmit` for TypeScript frontend stories
|
|
115
|
-
- ✅ **REQUIRE** playwright/test commands for UI stories
|
|
109
|
+
1. Ensure .ralph directory exists:
|
|
110
|
+
```bash
|
|
111
|
+
mkdir -p .ralph && touch .ralph/.prd-edit-allowed
|
|
112
|
+
```
|
|
116
113
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
2. Write all stories to `.ralph/prd.json`
|
|
115
|
+
- If **appending**: Read existing JSON, add new stories, update count
|
|
116
|
+
|
|
117
|
+
**Do not present to user yet - validation comes next.**
|
|
121
118
|
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
### Step 6: Validate and Fix (MANDATORY)
|
|
120
|
+
|
|
121
|
+
**Read back the PRD you just wrote and validate EVERY story.**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
cat .ralph/prd.json
|
|
124
125
|
```
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
For EACH story, ask yourself:
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
1. **"Is this testable?"** - Can the testSteps actually run?
|
|
130
|
+
- ❌ `grep -q 'function' file.py` → Only checks code exists, not behavior
|
|
131
|
+
- ❌ `test -f src/component.tsx` → Only checks file exists
|
|
132
|
+
- ❌ "Visit the page and verify" → Not executable
|
|
133
|
+
- ✅ `curl ... | jq -e` → Tests actual API response
|
|
134
|
+
- ✅ `npm test` / `pytest` → Runs real tests
|
|
135
|
+
- ✅ `npx playwright test` → Runs real tests
|
|
129
136
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
2. **"Is this passable?"** - Given prior stories completed, can this story's tests pass?
|
|
138
|
+
- If TASK-003 needs a user to exist, does TASK-001 or TASK-002 create one?
|
|
139
|
+
- If TASK-004 tests a login flow, does a prior story create the auth endpoint?
|
|
140
|
+
|
|
141
|
+
**Fix any issues you find:**
|
|
142
|
+
|
|
143
|
+
| Problem | Fix |
|
|
144
|
+
|---------|-----|
|
|
145
|
+
| testSteps use grep/test only | Replace with curl, pytest, npm test, playwright |
|
|
146
|
+
| Story depends on something not yet created | Reorder stories or add missing dependency story |
|
|
147
|
+
| testSteps would pass on current code | Strengthen tests to verify NEW behavior |
|
|
148
|
+
| No testSteps for backend story | Add `curl -s {config.urls.backend}/endpoint \| jq -e '.field'` |
|
|
149
|
+
| No testSteps for frontend story | Add `npx tsc --noEmit` + `npm test` |
|
|
150
|
+
|
|
151
|
+
### Step 7: Reorder if Needed
|
|
152
|
+
|
|
153
|
+
If validation found dependency issues, reorder stories:
|
|
134
154
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
155
|
+
1. Stories that create foundations (DB schemas, base components) come first
|
|
156
|
+
2. Stories that depend on others come after their dependencies
|
|
157
|
+
3. Update `dependsOn` arrays to reflect the order
|
|
158
|
+
4. Re-number story IDs if needed (TASK-001, TASK-002, etc.)
|
|
159
|
+
|
|
160
|
+
**After reordering, re-run Step 6 validation to confirm the new order works.**
|
|
161
|
+
|
|
162
|
+
### Step 8: Present Final PRD
|
|
163
|
+
|
|
164
|
+
Open the PRD for review:
|
|
165
|
+
```bash
|
|
166
|
+
open -a TextEdit .ralph/prd.json
|
|
167
|
+
```
|
|
138
168
|
|
|
139
|
-
|
|
169
|
+
Say: "I've {created|updated} the PRD with {N} stories and opened it in TextEdit.
|
|
140
170
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
171
|
+
Review the PRD and let me know:
|
|
172
|
+
- **'approved'** - Ready for `ralph run`
|
|
173
|
+
- **'edit [changes]'** - Tell me what to change
|
|
174
|
+
- Or edit the JSON directly and say **'done'**"
|
|
145
175
|
|
|
146
176
|
**STOP and wait for user response.**
|
|
147
177
|
|
|
148
|
-
### Step
|
|
178
|
+
### Step 9: Final Instructions
|
|
149
179
|
|
|
150
180
|
Once approved, say:
|
|
151
181
|
|