ralphie 1.0.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/LICENSE +21 -0
- package/README.md +110 -0
- package/bin/ralphie +2 -0
- package/dist/cli.js +3296 -0
- package/package.json +67 -0
- package/skills/create-spec/SKILL.md +222 -0
- package/skills/ralphie-iterate/SKILL.md +959 -0
- package/skills/review-spec/SKILL.md +390 -0
- package/skills/verify/SKILL.md +496 -0
- package/templates/.ai/ralphie/.gitkeep +0 -0
- package/templates/.claude/ralphie.md +576 -0
- package/templates/.claude/settings.json.example +25 -0
- package/templates/.claude/skills/create-spec/SKILL.md +222 -0
- package/templates/.claude/skills/ralphie-iterate/SKILL.md +959 -0
- package/templates/RALPHIE.md +100 -0
- package/templates/STATE.txt +2 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-spec
|
|
3
|
+
description: Validate SPEC.md for format compliance and content quality. Checks for checkbox syntax, code snippets, file paths, and provides content critique on problem-solution fit, integration awareness, scalability, and scope.
|
|
4
|
+
context: fork
|
|
5
|
+
allowed-tools: Read, Grep, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Review SPEC Skill
|
|
9
|
+
|
|
10
|
+
Validate `SPEC.md` files for format compliance and content quality before finalizing.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Read SPEC → Format Checks → Content Critique → Report
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Step 1: Read SPEC.md
|
|
19
|
+
|
|
20
|
+
Read the entire `SPEC.md` file to analyze its structure and content.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
Read SPEC.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Step 2: Format Checks
|
|
27
|
+
|
|
28
|
+
Check for format violations that break Ralphie iteration efficiency or create ambiguity.
|
|
29
|
+
|
|
30
|
+
### 2.1 Checkbox Syntax
|
|
31
|
+
|
|
32
|
+
**PASS:**
|
|
33
|
+
```markdown
|
|
34
|
+
- [ ] Task description
|
|
35
|
+
- [x] Completed task
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**FAIL:**
|
|
39
|
+
```markdown
|
|
40
|
+
- [] Missing space
|
|
41
|
+
- [X] Uppercase X
|
|
42
|
+
- Task without checkbox
|
|
43
|
+
* Using asterisk instead of dash
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Check for:**
|
|
47
|
+
- All tasks use `- [ ]` or `- [x]` format
|
|
48
|
+
- Lowercase `x` for completed tasks
|
|
49
|
+
- Space after checkbox
|
|
50
|
+
- Dash `-` prefix, not asterisk `*` or number
|
|
51
|
+
|
|
52
|
+
### 2.2 No Code Snippets
|
|
53
|
+
|
|
54
|
+
**FAIL - Code snippets in tasks:**
|
|
55
|
+
```markdown
|
|
56
|
+
- [ ] Fix auth bug
|
|
57
|
+
- Use `bcrypt.compare()` instead of `===`
|
|
58
|
+
- Add this code:
|
|
59
|
+
```typescript
|
|
60
|
+
const isValid = await bcrypt.compare(password, hash);
|
|
61
|
+
```
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**PASS - Deliverable-focused:**
|
|
65
|
+
```markdown
|
|
66
|
+
- [ ] Fix auth bug
|
|
67
|
+
- Password comparison should be timing-safe
|
|
68
|
+
- Handle comparison errors gracefully
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Check for:**
|
|
72
|
+
- No ` ```language ` code blocks in task descriptions
|
|
73
|
+
- No inline code that shows implementation (`` `bcrypt.compare()` `` is implementation)
|
|
74
|
+
- Verification sections CAN include code examples (those are test scripts, not implementation)
|
|
75
|
+
|
|
76
|
+
### 2.3 No File Paths in Tasks
|
|
77
|
+
|
|
78
|
+
**FAIL - File paths prescribe implementation:**
|
|
79
|
+
```markdown
|
|
80
|
+
- [ ] Fix auth bug
|
|
81
|
+
- Modify src/auth/login.ts line 42
|
|
82
|
+
- Update src/middleware/validate.ts
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**PASS - Outcome-focused:**
|
|
86
|
+
```markdown
|
|
87
|
+
- [ ] Fix auth bug
|
|
88
|
+
- Login endpoint returns 401 for invalid credentials
|
|
89
|
+
- Credentials are validated before database lookup
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Check for:**
|
|
93
|
+
- No file:line references (e.g., `auth.ts:42`)
|
|
94
|
+
- No specific file paths in task bullets (e.g., `src/auth/login.ts`)
|
|
95
|
+
- Files belong in `.ai/ralphie/plan.md`, not SPEC.md
|
|
96
|
+
|
|
97
|
+
### 2.4 Sub-Bullets Are Deliverables
|
|
98
|
+
|
|
99
|
+
**FAIL - Sub-bullets as instructions:**
|
|
100
|
+
```markdown
|
|
101
|
+
- [ ] Create user API
|
|
102
|
+
- Install express and body-parser
|
|
103
|
+
- Create routes/user.ts file
|
|
104
|
+
- Add GET and POST handlers
|
|
105
|
+
- Write tests in tests/user.test.ts
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**PASS - Sub-bullets as deliverables:**
|
|
109
|
+
```markdown
|
|
110
|
+
- [ ] Create user API
|
|
111
|
+
- GET /users - list all users
|
|
112
|
+
- POST /users - create new user
|
|
113
|
+
- Returns 400 for invalid input
|
|
114
|
+
- Tests cover all endpoints
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Check for:**
|
|
118
|
+
- Sub-bullets describe WHAT not HOW
|
|
119
|
+
- Sub-bullets are verifiable outcomes
|
|
120
|
+
- No "Create X file" or "Add Y function" (those are plans, not requirements)
|
|
121
|
+
|
|
122
|
+
### 2.5 Task Batching
|
|
123
|
+
|
|
124
|
+
**FAIL - Over-split tasks:**
|
|
125
|
+
```markdown
|
|
126
|
+
- [ ] Create UserModel.ts
|
|
127
|
+
- [ ] Create UserService.ts
|
|
128
|
+
- [ ] Create UserController.ts
|
|
129
|
+
- [ ] Create user.test.ts
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**PASS - Properly batched:**
|
|
133
|
+
```markdown
|
|
134
|
+
- [ ] Create User module (Model, Service, Controller) with tests
|
|
135
|
+
- User CRUD operations
|
|
136
|
+
- Input validation
|
|
137
|
+
- Tests cover all operations
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Check for:**
|
|
141
|
+
- Related files are batched into single tasks
|
|
142
|
+
- Tasks that could be done together aren't artificially split
|
|
143
|
+
- Each checkbox = one meaningful iteration (30min - 2hr of work)
|
|
144
|
+
|
|
145
|
+
### Format Check Summary
|
|
146
|
+
|
|
147
|
+
Report each violation found:
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
## Format Issues
|
|
151
|
+
|
|
152
|
+
### Checkbox Syntax
|
|
153
|
+
- Line 42: Uses `* [ ]` instead of `- [ ]`
|
|
154
|
+
- Line 58: Completed task uses `[X]` instead of `[x]`
|
|
155
|
+
|
|
156
|
+
### Code Snippets
|
|
157
|
+
- Lines 65-70: Task contains TypeScript code block
|
|
158
|
+
- Line 82: Implementation detail in sub-bullet: `Use bcrypt.compare()`
|
|
159
|
+
|
|
160
|
+
### File Paths
|
|
161
|
+
- Line 92: References `src/auth/login.ts:42`
|
|
162
|
+
- Line 105: Sub-bullet says "Modify middleware/validate.ts"
|
|
163
|
+
|
|
164
|
+
### Sub-Bullets Not Deliverables
|
|
165
|
+
- Line 120: "Install express and body-parser" (instruction, not deliverable)
|
|
166
|
+
- Line 121: "Create routes/user.ts file" (prescribes file structure)
|
|
167
|
+
|
|
168
|
+
### Task Batching
|
|
169
|
+
- Lines 140-143: Four separate tasks for related User module files (should be one task)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Step 3: Content Critique
|
|
173
|
+
|
|
174
|
+
Evaluate whether the SPEC describes a good problem-solution fit.
|
|
175
|
+
|
|
176
|
+
### 3.1 Problem-Solution Fit
|
|
177
|
+
|
|
178
|
+
**Questions to ask:**
|
|
179
|
+
- Does the SPEC clearly state what problem it solves?
|
|
180
|
+
- Are the tasks aligned with solving that problem?
|
|
181
|
+
- Are there tasks that seem unrelated to the stated goal?
|
|
182
|
+
|
|
183
|
+
**Example concern:**
|
|
184
|
+
```markdown
|
|
185
|
+
## Concern: Task Misalignment
|
|
186
|
+
SPEC Goal: "Build a CLI tool for managing database migrations"
|
|
187
|
+
Task: "Add user authentication with OAuth"
|
|
188
|
+
|
|
189
|
+
This task doesn't align with the stated goal. Authentication might be needed for a web UI, but the goal describes a CLI tool.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 3.2 Integration Awareness
|
|
193
|
+
|
|
194
|
+
**Questions to ask:**
|
|
195
|
+
- Does the SPEC consider existing systems?
|
|
196
|
+
- Are there tasks for integration points (APIs, databases, services)?
|
|
197
|
+
- Does it account for backward compatibility if modifying existing code?
|
|
198
|
+
|
|
199
|
+
**Example concern:**
|
|
200
|
+
```markdown
|
|
201
|
+
## Concern: Missing Integration
|
|
202
|
+
SPEC adds a new payment endpoint but doesn't mention:
|
|
203
|
+
- How it integrates with existing order system
|
|
204
|
+
- Whether existing payment records need migration
|
|
205
|
+
- How to handle in-flight transactions during deployment
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### 3.3 Scalability Considerations
|
|
209
|
+
|
|
210
|
+
**Questions to ask:**
|
|
211
|
+
- For performance-critical features, are there tasks for optimization?
|
|
212
|
+
- For high-volume features, is there consideration of limits/throttling?
|
|
213
|
+
- Are there tasks for monitoring or observability?
|
|
214
|
+
|
|
215
|
+
**Example concern:**
|
|
216
|
+
```markdown
|
|
217
|
+
## Concern: Scalability Not Addressed
|
|
218
|
+
SPEC adds a webhook system but doesn't include:
|
|
219
|
+
- Rate limiting for incoming webhooks
|
|
220
|
+
- Queue for processing high volumes
|
|
221
|
+
- Retry logic for failed deliveries
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Note:** Not all SPECs need scalability tasks. Simple CLIs, internal tools, and MVPs can skip this.
|
|
225
|
+
|
|
226
|
+
### 3.4 Scope Appropriateness
|
|
227
|
+
|
|
228
|
+
**Questions to ask:**
|
|
229
|
+
- Is the SPEC trying to do too much in one go?
|
|
230
|
+
- Are there tasks that could be deferred to later phases?
|
|
231
|
+
- Is the SPEC missing critical prerequisites?
|
|
232
|
+
|
|
233
|
+
**Example concern:**
|
|
234
|
+
```markdown
|
|
235
|
+
## Concern: Scope Too Large
|
|
236
|
+
SPEC has 45 tasks across 8 phases. Recommend:
|
|
237
|
+
- Identify MVP subset (first 10-15 tasks)
|
|
238
|
+
- Move nice-to-have features to Phase 2 SPEC
|
|
239
|
+
- Focus on one complete workflow first
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Example concern:**
|
|
243
|
+
```markdown
|
|
244
|
+
## Concern: Missing Prerequisites
|
|
245
|
+
SPEC starts with "Create admin dashboard" but has no tasks for:
|
|
246
|
+
- User authentication (needed to know who's an admin)
|
|
247
|
+
- Database schema (what data will the dashboard show?)
|
|
248
|
+
Recommend adding prerequisite tasks first.
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Content Critique Summary
|
|
252
|
+
|
|
253
|
+
Report concerns in priority order:
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
## Content Concerns
|
|
257
|
+
|
|
258
|
+
### HIGH PRIORITY
|
|
259
|
+
1. **Missing Prerequisites**: Authentication tasks should come before admin dashboard
|
|
260
|
+
2. **Scope Too Large**: 45 tasks is too many for one SPEC - recommend splitting into MVP and Phase 2
|
|
261
|
+
|
|
262
|
+
### MEDIUM PRIORITY
|
|
263
|
+
3. **Integration Gap**: No mention of how new API integrates with existing order system
|
|
264
|
+
4. **Scalability Risk**: Webhook system needs rate limiting and queue (high volume expected)
|
|
265
|
+
|
|
266
|
+
### LOW PRIORITY
|
|
267
|
+
5. **Task Misalignment**: OAuth task seems unrelated to CLI tool goal (clarify if needed)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Step 4: Generate Report
|
|
271
|
+
|
|
272
|
+
Combine format checks and content critique into a final report.
|
|
273
|
+
|
|
274
|
+
### Output Format
|
|
275
|
+
|
|
276
|
+
```markdown
|
|
277
|
+
# SPEC Review: [PASS/FAIL]
|
|
278
|
+
|
|
279
|
+
## Format: [PASS/FAIL]
|
|
280
|
+
|
|
281
|
+
[If FAIL, list all format violations from Step 2]
|
|
282
|
+
[If PASS, say "No format violations found."]
|
|
283
|
+
|
|
284
|
+
## Content: [PASS/CONCERNS]
|
|
285
|
+
|
|
286
|
+
[If CONCERNS, list all content issues from Step 3 in priority order]
|
|
287
|
+
[If PASS, say "No content concerns. SPEC is well-structured and ready."]
|
|
288
|
+
|
|
289
|
+
## Recommendations
|
|
290
|
+
|
|
291
|
+
[List actionable improvements, prioritized]
|
|
292
|
+
|
|
293
|
+
1. Fix format violations (required before finalizing)
|
|
294
|
+
2. Address HIGH PRIORITY content concerns
|
|
295
|
+
3. Consider MEDIUM PRIORITY concerns if applicable
|
|
296
|
+
4. Review LOW PRIORITY suggestions
|
|
297
|
+
|
|
298
|
+
## Summary
|
|
299
|
+
|
|
300
|
+
[Overall assessment - ready to use, needs revision, or needs major rework]
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Example: PASS Report
|
|
304
|
+
|
|
305
|
+
```markdown
|
|
306
|
+
# SPEC Review: PASS
|
|
307
|
+
|
|
308
|
+
## Format: PASS
|
|
309
|
+
No format violations found.
|
|
310
|
+
|
|
311
|
+
## Content: PASS
|
|
312
|
+
No content concerns. SPEC is well-structured with:
|
|
313
|
+
- Clear goal statement
|
|
314
|
+
- Tasks properly batched (15 tasks across 3 phases)
|
|
315
|
+
- Good integration awareness (migration tasks included)
|
|
316
|
+
- Appropriate scope for MVP
|
|
317
|
+
|
|
318
|
+
## Recommendations
|
|
319
|
+
None. SPEC is ready to use.
|
|
320
|
+
|
|
321
|
+
## Summary
|
|
322
|
+
✓ SPEC follows all conventions and is ready for implementation.
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Example: FAIL Report
|
|
326
|
+
|
|
327
|
+
```markdown
|
|
328
|
+
# SPEC Review: FAIL
|
|
329
|
+
|
|
330
|
+
## Format: FAIL
|
|
331
|
+
|
|
332
|
+
### Code Snippets
|
|
333
|
+
- Lines 65-70: Task contains TypeScript code block showing implementation
|
|
334
|
+
- Line 82: Sub-bullet includes `bcrypt.compare()` implementation detail
|
|
335
|
+
|
|
336
|
+
### File Paths
|
|
337
|
+
- Line 92: References specific file `src/auth/login.ts:42`
|
|
338
|
+
|
|
339
|
+
### Sub-Bullets Not Deliverables
|
|
340
|
+
- Line 120: "Install express and body-parser" is an instruction, not a deliverable
|
|
341
|
+
- Line 121: "Create routes/user.ts file" prescribes file structure
|
|
342
|
+
|
|
343
|
+
## Content: CONCERNS
|
|
344
|
+
|
|
345
|
+
### HIGH PRIORITY
|
|
346
|
+
1. **Missing Prerequisites**: Tasks 8-12 build admin dashboard but authentication (Task 15) comes later. Reorder so auth comes first.
|
|
347
|
+
2. **Scope Too Large**: 45 tasks is too ambitious. Recommend creating MVP SPEC with first 15 tasks, defer rest to Phase 2.
|
|
348
|
+
|
|
349
|
+
### MEDIUM PRIORITY
|
|
350
|
+
3. **Integration Gap**: New payment endpoint (Task 22) doesn't mention integration with existing order system or data migration.
|
|
351
|
+
|
|
352
|
+
## Recommendations
|
|
353
|
+
|
|
354
|
+
1. **Fix format violations** (required):
|
|
355
|
+
- Remove code blocks from task descriptions
|
|
356
|
+
- Remove file:line references
|
|
357
|
+
- Rewrite sub-bullets as deliverables ("WHAT") not instructions ("HOW")
|
|
358
|
+
|
|
359
|
+
2. **Address HIGH PRIORITY concerns**:
|
|
360
|
+
- Reorder tasks: move authentication (Task 15) to Phase 1, before admin dashboard
|
|
361
|
+
- Split SPEC: Create `SPEC-MVP.md` with first 15 tasks, `SPEC-Phase2.md` with remaining 30
|
|
362
|
+
|
|
363
|
+
3. **Consider MEDIUM concerns**:
|
|
364
|
+
- Add integration tasks for payment endpoint (migration, order system integration)
|
|
365
|
+
|
|
366
|
+
## Summary
|
|
367
|
+
❌ SPEC needs revision before use. Focus on fixing format violations and reordering tasks to address prerequisites.
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Quick Reference
|
|
371
|
+
|
|
372
|
+
| Check | Pass | Fail |
|
|
373
|
+
|-------|------|------|
|
|
374
|
+
| **Checkbox** | `- [ ]` or `- [x]` | `- []`, `- [X]`, `*`, numbers |
|
|
375
|
+
| **Code** | No code in tasks | ` ``` ` blocks or implementation code |
|
|
376
|
+
| **Files** | No file paths | `src/auth.ts:42`, specific filenames |
|
|
377
|
+
| **Sub-bullets** | Deliverables (WHAT) | Instructions (HOW) |
|
|
378
|
+
| **Batching** | Related work grouped | Tiny tasks split artificially |
|
|
379
|
+
|
|
380
|
+
## When to Use This Skill
|
|
381
|
+
|
|
382
|
+
**Use `/review-spec` when:**
|
|
383
|
+
- You just generated a SPEC with `/create-spec`
|
|
384
|
+
- User asks you to validate a SPEC before starting work
|
|
385
|
+
- You're unsure if a SPEC follows conventions
|
|
386
|
+
- Running `ralphie spec --auto` (autonomous mode uses this for self-review)
|
|
387
|
+
|
|
388
|
+
**Don't use when:**
|
|
389
|
+
- SPEC has already been validated and user is ready to start iterations
|
|
390
|
+
- You're mid-iteration (use `/ralphie-iterate` instead)
|