@arvorco/relentless 0.1.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/.claude/commands/relentless.analyze.md +20 -0
- package/.claude/commands/relentless.checklist.md +15 -0
- package/.claude/commands/relentless.clarify.md +19 -0
- package/.claude/commands/relentless.constitution.md +78 -0
- package/.claude/commands/relentless.implement.md +15 -0
- package/.claude/commands/relentless.plan.md +22 -0
- package/.claude/commands/relentless.plan.old.md +89 -0
- package/.claude/commands/relentless.specify.md +254 -0
- package/.claude/commands/relentless.tasks.md +25 -0
- package/.claude/commands/relentless.taskstoissues.md +15 -0
- package/.claude/settings.local.json +23 -0
- package/.claude/skills/analyze/SKILL.md +149 -0
- package/.claude/skills/checklist/SKILL.md +173 -0
- package/.claude/skills/checklist/templates/checklist-template.md +40 -0
- package/.claude/skills/clarify/SKILL.md +174 -0
- package/.claude/skills/constitution/SKILL.md +150 -0
- package/.claude/skills/constitution/templates/constitution-template.md +228 -0
- package/.claude/skills/implement/SKILL.md +141 -0
- package/.claude/skills/plan/SKILL.md +179 -0
- package/.claude/skills/plan/templates/plan-template.md +104 -0
- package/.claude/skills/prd/SKILL.md +242 -0
- package/.claude/skills/relentless/SKILL.md +265 -0
- package/.claude/skills/specify/SKILL.md +220 -0
- package/.claude/skills/specify/scripts/bash/check-prerequisites.sh +166 -0
- package/.claude/skills/specify/scripts/bash/common.sh +156 -0
- package/.claude/skills/specify/scripts/bash/create-new-feature.sh +305 -0
- package/.claude/skills/specify/scripts/bash/setup-plan.sh +61 -0
- package/.claude/skills/specify/scripts/bash/update-agent-context.sh +799 -0
- package/.claude/skills/specify/templates/spec-template.md +115 -0
- package/.claude/skills/tasks/SKILL.md +202 -0
- package/.claude/skills/tasks/templates/tasks-template.md +251 -0
- package/.claude/skills/taskstoissues/SKILL.md +97 -0
- package/.specify/memory/constitution.md +50 -0
- package/.specify/scripts/bash/check-prerequisites.sh +166 -0
- package/.specify/scripts/bash/common.sh +156 -0
- package/.specify/scripts/bash/create-new-feature.sh +297 -0
- package/.specify/scripts/bash/setup-plan.sh +61 -0
- package/.specify/scripts/bash/update-agent-context.sh +799 -0
- package/.specify/templates/agent-file-template.md +28 -0
- package/.specify/templates/checklist-template.md +40 -0
- package/.specify/templates/plan-template.md +104 -0
- package/.specify/templates/spec-template.md +115 -0
- package/.specify/templates/tasks-template.md +251 -0
- package/CHANGES_SUMMARY.md +255 -0
- package/CLAUDE.md +92 -0
- package/GEMINI_SETUP.md +256 -0
- package/LICENSE +21 -0
- package/README.md +1171 -0
- package/REFACTOR_SUMMARY.md +267 -0
- package/bin/relentless.ts +536 -0
- package/bun.lock +352 -0
- package/eslint.config.js +37 -0
- package/package.json +61 -0
- package/prd.json.example +64 -0
- package/prompt.md +108 -0
- package/ralph.sh +80 -0
- package/relentless/config.json +38 -0
- package/relentless/features/.gitkeep +0 -0
- package/relentless/features/ghsk-ideas/prd.json +229 -0
- package/relentless/features/ghsk-ideas/prd.md +191 -0
- package/relentless/features/ghsk-ideas/progress.txt +408 -0
- package/relentless/prompt.md +79 -0
- package/skills/checklist/SKILL.md +349 -0
- package/skills/clarify/SKILL.md +476 -0
- package/skills/prd/SKILL.md +242 -0
- package/skills/relentless/SKILL.md +268 -0
- package/skills/tasks/SKILL.md +577 -0
- package/src/agents/amp.ts +115 -0
- package/src/agents/claude.ts +185 -0
- package/src/agents/codex.ts +89 -0
- package/src/agents/droid.ts +90 -0
- package/src/agents/gemini.ts +109 -0
- package/src/agents/index.ts +16 -0
- package/src/agents/opencode.ts +88 -0
- package/src/agents/registry.ts +95 -0
- package/src/agents/types.ts +101 -0
- package/src/config/index.ts +8 -0
- package/src/config/loader.ts +237 -0
- package/src/config/schema.ts +115 -0
- package/src/execution/index.ts +8 -0
- package/src/execution/router.ts +49 -0
- package/src/execution/runner.ts +512 -0
- package/src/index.ts +11 -0
- package/src/init/index.ts +7 -0
- package/src/init/scaffolder.ts +377 -0
- package/src/prd/analyzer.ts +512 -0
- package/src/prd/index.ts +11 -0
- package/src/prd/issues.ts +249 -0
- package/src/prd/parser.ts +281 -0
- package/src/prd/progress.ts +198 -0
- package/src/prd/types.ts +170 -0
- package/src/tui/App.tsx +85 -0
- package/src/tui/TUIRunner.tsx +400 -0
- package/src/tui/components/AgentOutput.tsx +45 -0
- package/src/tui/components/AgentStatus.tsx +64 -0
- package/src/tui/components/CurrentStory.tsx +66 -0
- package/src/tui/components/Header.tsx +49 -0
- package/src/tui/components/ProgressBar.tsx +39 -0
- package/src/tui/components/StoryGrid.tsx +86 -0
- package/src/tui/hooks/useTUI.ts +147 -0
- package/src/tui/hooks/useTimer.ts +51 -0
- package/src/tui/index.tsx +17 -0
- package/src/tui/theme.ts +41 -0
- package/src/tui/types.ts +77 -0
- package/templates/constitution.md +228 -0
- package/templates/plan.md +273 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clarify
|
|
3
|
+
description: "Identify and clarify ambiguities in PRD specifications. Use for improving spec clarity. Triggers on: clarify prd, identify ambiguities, improve spec clarity, ask clarification questions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Interactive Clarification Skill
|
|
7
|
+
|
|
8
|
+
Systematically identify underspecified areas in PRD specifications and generate targeted clarification questions to improve specification quality.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## The Job
|
|
13
|
+
|
|
14
|
+
1. Read the PRD from `relentless/features/[feature-name]/prd.json` or `prd.md`
|
|
15
|
+
2. Scan for ambiguities across 9 categories
|
|
16
|
+
3. Generate max 5 highly targeted questions with multiple-choice options
|
|
17
|
+
4. Add `[NEEDS CLARIFICATION]` markers (max 3 per spec)
|
|
18
|
+
5. Save questions and answers to `relentless/features/[feature-name]/clarification-log.md`
|
|
19
|
+
6. Update PRD in-place with clarified information after each round
|
|
20
|
+
|
|
21
|
+
**Important:** This skill works with Claude Code, Amp, Gemini, and other AI coding agents.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 1: Ambiguity Detection Categories
|
|
26
|
+
|
|
27
|
+
Scan the PRD for these 9 types of ambiguities:
|
|
28
|
+
|
|
29
|
+
### 1. Behavioral Ambiguities
|
|
30
|
+
Questions about **how** the system should behave:
|
|
31
|
+
- What happens when an operation fails?
|
|
32
|
+
- How should the system respond to edge cases?
|
|
33
|
+
- What is the expected behavior during loading/waiting?
|
|
34
|
+
|
|
35
|
+
**Examples:**
|
|
36
|
+
- "What shows during data loading?" → Loading spinner? Skeleton UI? Previous data?
|
|
37
|
+
- "What happens if save fails?" → Retry? Show error? Rollback changes?
|
|
38
|
+
|
|
39
|
+
### 2. Data Ambiguities
|
|
40
|
+
Questions about **what data** and its structure:
|
|
41
|
+
- What fields are required vs optional?
|
|
42
|
+
- What are valid values/ranges?
|
|
43
|
+
- How is data validated?
|
|
44
|
+
|
|
45
|
+
**Examples:**
|
|
46
|
+
- "Is email field required?" → Yes/No/Optional with default?
|
|
47
|
+
- "What's max length for username?" → 20 chars? 50? Unlimited?
|
|
48
|
+
|
|
49
|
+
### 3. UI/UX Ambiguities
|
|
50
|
+
Questions about **visual and interaction** design:
|
|
51
|
+
- Where does this element appear?
|
|
52
|
+
- What style/color/size should it be?
|
|
53
|
+
- How do users interact with it?
|
|
54
|
+
|
|
55
|
+
**Examples:**
|
|
56
|
+
- "Where does the delete button appear?" → On each card? In detail view? Context menu?
|
|
57
|
+
- "What color indicates priority?" → Red/yellow/green? Custom colors?
|
|
58
|
+
|
|
59
|
+
### 4. Integration Ambiguities
|
|
60
|
+
Questions about **external dependencies**:
|
|
61
|
+
- Which API/service is used?
|
|
62
|
+
- What happens if external service is down?
|
|
63
|
+
- What authentication is required?
|
|
64
|
+
|
|
65
|
+
**Examples:**
|
|
66
|
+
- "Which payment provider?" → Stripe? PayPal? Multiple?
|
|
67
|
+
- "Fallback when API unavailable?" → Show cached data? Error message?
|
|
68
|
+
|
|
69
|
+
### 5. Permission/Security Ambiguities
|
|
70
|
+
Questions about **access control**:
|
|
71
|
+
- Who can perform this action?
|
|
72
|
+
- What permissions are required?
|
|
73
|
+
- How is authorization checked?
|
|
74
|
+
|
|
75
|
+
**Examples:**
|
|
76
|
+
- "Can users delete others' comments?" → Own only? Admins? Authors?
|
|
77
|
+
- "Authentication required?" → Yes? Only for certain actions?
|
|
78
|
+
|
|
79
|
+
### 6. Performance/Scale Ambiguities
|
|
80
|
+
Questions about **limits and optimization**:
|
|
81
|
+
- How many items can be displayed?
|
|
82
|
+
- Is pagination needed?
|
|
83
|
+
- What are acceptable response times?
|
|
84
|
+
|
|
85
|
+
**Examples:**
|
|
86
|
+
- "Max items per page?" → 10? 25? 100? Infinite scroll?
|
|
87
|
+
- "How to handle 1000+ records?" → Pagination? Virtual scrolling? Search only?
|
|
88
|
+
|
|
89
|
+
### 7. Error Handling Ambiguities
|
|
90
|
+
Questions about **failure scenarios**:
|
|
91
|
+
- What errors can occur?
|
|
92
|
+
- How are errors displayed to users?
|
|
93
|
+
- Should operations retry automatically?
|
|
94
|
+
|
|
95
|
+
**Examples:**
|
|
96
|
+
- "Validation error display?" → Inline? Toast? Modal?
|
|
97
|
+
- "Retry on network error?" → Automatic? Manual? How many times?
|
|
98
|
+
|
|
99
|
+
### 8. State Management Ambiguities
|
|
100
|
+
Questions about **state persistence**:
|
|
101
|
+
- Is this state saved to database?
|
|
102
|
+
- Should it persist across sessions?
|
|
103
|
+
- Is it local to component or global?
|
|
104
|
+
|
|
105
|
+
**Examples:**
|
|
106
|
+
- "Save filter selection?" → In URL? LocalStorage? Database? Session only?
|
|
107
|
+
- "Remember user preferences?" → Per device? Per account? Temporary?
|
|
108
|
+
|
|
109
|
+
### 9. Edge Case Ambiguities
|
|
110
|
+
Questions about **boundary conditions**:
|
|
111
|
+
- What happens with empty data?
|
|
112
|
+
- What about very long input?
|
|
113
|
+
- How to handle race conditions?
|
|
114
|
+
|
|
115
|
+
**Examples:**
|
|
116
|
+
- "Behavior with no data?" → Empty state message? Placeholder? Hide section?
|
|
117
|
+
- "Concurrent edits handling?" → Last write wins? Merge? Lock?
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Step 2: Question Generation Strategy
|
|
122
|
+
|
|
123
|
+
### Prioritization Rules
|
|
124
|
+
Generate questions for ambiguities that:
|
|
125
|
+
1. **Block implementation** (cannot proceed without knowing)
|
|
126
|
+
2. **Affect user experience** (visible to users)
|
|
127
|
+
3. **Impact architecture** (structural decisions)
|
|
128
|
+
4. **Have security implications** (permissions, data access)
|
|
129
|
+
|
|
130
|
+
### Question Format
|
|
131
|
+
Each question must:
|
|
132
|
+
- Be **specific** (reference exact user story or requirement)
|
|
133
|
+
- Have **multiple-choice options** (A/B/C/D format)
|
|
134
|
+
- Include **context** (why this matters)
|
|
135
|
+
- Offer **"Other"** option for flexibility
|
|
136
|
+
|
|
137
|
+
### Template:
|
|
138
|
+
```markdown
|
|
139
|
+
## Question [N]: [Category] - [Specific Topic]
|
|
140
|
+
|
|
141
|
+
**Context:** [User Story ID] specifies "[quote from PRD]" but doesn't clarify [what's ambiguous].
|
|
142
|
+
|
|
143
|
+
**Question:** [Clear, specific question]?
|
|
144
|
+
|
|
145
|
+
**Options:**
|
|
146
|
+
A. [Option 1 - most common/recommended]
|
|
147
|
+
B. [Option 2 - alternative approach]
|
|
148
|
+
C. [Option 3 - minimal/simple version]
|
|
149
|
+
D. Other: [please specify]
|
|
150
|
+
|
|
151
|
+
**Impact:** [Why this decision matters - implementation, UX, security, etc.]
|
|
152
|
+
|
|
153
|
+
**Recommendation:** Option [X] - [brief justification]
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Step 3: Clarification Markers
|
|
159
|
+
|
|
160
|
+
Add `[NEEDS CLARIFICATION]` markers in PRD at ambiguous points (max 3 per spec).
|
|
161
|
+
|
|
162
|
+
### Marker Format:
|
|
163
|
+
```markdown
|
|
164
|
+
[NEEDS CLARIFICATION: {category}] {brief description of what needs clarification}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Examples:
|
|
168
|
+
```markdown
|
|
169
|
+
- [ ] User can delete tasks [NEEDS CLARIFICATION: Permissions] - Own tasks only or any task?
|
|
170
|
+
- [ ] Show loading state [NEEDS CLARIFICATION: UI/UX] - Spinner, skeleton, or previous data?
|
|
171
|
+
- [ ] Filter persists [NEEDS CLARIFICATION: State] - In URL, localStorage, or database?
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Placement Rules:
|
|
175
|
+
- Place markers **inline** in acceptance criteria or functional requirements
|
|
176
|
+
- Limit to **3 markers maximum** per PRD to avoid clutter
|
|
177
|
+
- Remove marker after clarification is obtained and PRD is updated
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Step 4: Interactive Workflow
|
|
182
|
+
|
|
183
|
+
### Round 1: Initial Analysis
|
|
184
|
+
1. Scan PRD for all 9 ambiguity categories
|
|
185
|
+
2. Identify top 5 most critical ambiguities
|
|
186
|
+
3. Generate questions with multiple-choice options
|
|
187
|
+
4. Add up to 3 `[NEEDS CLARIFICATION]` markers
|
|
188
|
+
5. Save to `clarification-log.md`
|
|
189
|
+
|
|
190
|
+
### Round 2+: Update PRD
|
|
191
|
+
1. Collect answers from user
|
|
192
|
+
2. Update PRD in-place with clarified information
|
|
193
|
+
3. Remove resolved `[NEEDS CLARIFICATION]` markers
|
|
194
|
+
4. Append answers to `clarification-log.md`
|
|
195
|
+
5. If more ambiguities remain, generate next round of questions
|
|
196
|
+
|
|
197
|
+
### Stopping Condition
|
|
198
|
+
- All critical ambiguities resolved
|
|
199
|
+
- User indicates spec is clear enough
|
|
200
|
+
- 3 rounds of clarification completed (max)
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Step 5: Clarification Log Format
|
|
205
|
+
|
|
206
|
+
Create `clarification-log.md` with this structure:
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
# Clarification Log: [Feature Name]
|
|
210
|
+
|
|
211
|
+
Generated: [Date]
|
|
212
|
+
Status: [In Progress / Complete]
|
|
213
|
+
|
|
214
|
+
This log tracks clarification questions and answers for the [Feature Name] specification.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Round 1: [Date/Time]
|
|
219
|
+
|
|
220
|
+
### Question 1: [Category] - [Topic]
|
|
221
|
+
|
|
222
|
+
**Context:** [User Story ID] specifies "[quote]" but doesn't clarify [ambiguity].
|
|
223
|
+
|
|
224
|
+
**Question:** [Question text]?
|
|
225
|
+
|
|
226
|
+
**Options:**
|
|
227
|
+
A. [Option 1]
|
|
228
|
+
B. [Option 2]
|
|
229
|
+
C. [Option 3]
|
|
230
|
+
D. Other: [please specify]
|
|
231
|
+
|
|
232
|
+
**Impact:** [Why this matters]
|
|
233
|
+
|
|
234
|
+
**Recommendation:** Option A - [justification]
|
|
235
|
+
|
|
236
|
+
**Answer:** [User's answer - filled in after response]
|
|
237
|
+
|
|
238
|
+
**Action Taken:** [How PRD was updated based on answer]
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
### Question 2: [Category] - [Topic]
|
|
243
|
+
[Same format as Question 1]
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Round 2: [Date/Time]
|
|
248
|
+
[If needed - same format as Round 1]
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Summary
|
|
253
|
+
|
|
254
|
+
**Total Questions Asked:** [N]
|
|
255
|
+
**Ambiguities Resolved:** [N]
|
|
256
|
+
**Remaining Ambiguities:** [N]
|
|
257
|
+
**PRD Updates:** [List of sections updated]
|
|
258
|
+
|
|
259
|
+
**Status:** ✅ Specification is clear and ready for implementation
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Step 6: PRD Update Strategy
|
|
265
|
+
|
|
266
|
+
After receiving answers, update PRD sections:
|
|
267
|
+
|
|
268
|
+
### Update Acceptance Criteria:
|
|
269
|
+
**Before:**
|
|
270
|
+
```markdown
|
|
271
|
+
- [ ] Show loading state during data fetch [NEEDS CLARIFICATION: UI/UX]
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**After (based on answer "A. Spinner"):**
|
|
275
|
+
```markdown
|
|
276
|
+
- [ ] Show spinner with "Loading..." text during data fetch
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Update Functional Requirements:
|
|
280
|
+
**Before:**
|
|
281
|
+
```markdown
|
|
282
|
+
FR-3: Users can delete tasks [NEEDS CLARIFICATION: Permissions]
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**After (based on answer "A. Own tasks only"):**
|
|
286
|
+
```markdown
|
|
287
|
+
FR-3: Users can delete their own tasks only (not tasks created by others)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Add New Sections if Needed:
|
|
291
|
+
If clarification reveals new requirements, add:
|
|
292
|
+
- New acceptance criteria
|
|
293
|
+
- New functional requirements
|
|
294
|
+
- Technical considerations
|
|
295
|
+
- Edge case handling
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Example: Task Priority Feature
|
|
300
|
+
|
|
301
|
+
### Initial PRD (Ambiguous):
|
|
302
|
+
```markdown
|
|
303
|
+
### US-003: Add priority selector to task edit
|
|
304
|
+
**Description:** As a user, I want to change a task's priority when editing it.
|
|
305
|
+
|
|
306
|
+
**Acceptance Criteria:**
|
|
307
|
+
- [ ] Priority dropdown in task edit modal
|
|
308
|
+
- [ ] Shows current priority as selected
|
|
309
|
+
- [ ] Saves immediately on selection change [NEEDS CLARIFICATION: State]
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Clarification Question:
|
|
313
|
+
```markdown
|
|
314
|
+
## Question 1: State Management - Priority Change Persistence
|
|
315
|
+
|
|
316
|
+
**Context:** US-003 specifies "Saves immediately on selection change" but doesn't clarify the save mechanism or error handling.
|
|
317
|
+
|
|
318
|
+
**Question:** How should priority changes be saved and what happens if save fails?
|
|
319
|
+
|
|
320
|
+
**Options:**
|
|
321
|
+
A. Auto-save to database immediately, show error toast if fails, revert to previous value
|
|
322
|
+
B. Auto-save to database, optimistic UI update, retry silently on failure
|
|
323
|
+
C. Save only when user clicks "Save" button in modal
|
|
324
|
+
D. Other: [please specify]
|
|
325
|
+
|
|
326
|
+
**Impact:** Affects user experience, error handling implementation, and state management approach.
|
|
327
|
+
|
|
328
|
+
**Recommendation:** Option A - Clear feedback to user, explicit error handling, no data loss.
|
|
329
|
+
|
|
330
|
+
**Answer:** A
|
|
331
|
+
|
|
332
|
+
**Action Taken:** Updated US-003 acceptance criteria to specify auto-save behavior and error handling.
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Updated PRD (Clarified):
|
|
336
|
+
```markdown
|
|
337
|
+
### US-003: Add priority selector to task edit
|
|
338
|
+
**Description:** As a user, I want to change a task's priority when editing it.
|
|
339
|
+
|
|
340
|
+
**Acceptance Criteria:**
|
|
341
|
+
- [ ] Priority dropdown in task edit modal
|
|
342
|
+
- [ ] Shows current priority as selected
|
|
343
|
+
- [ ] Priority saves to database immediately on selection change
|
|
344
|
+
- [ ] Show success toast: "Priority updated to [High/Medium/Low]"
|
|
345
|
+
- [ ] On save failure: show error toast and revert dropdown to previous value
|
|
346
|
+
- [ ] Disable dropdown during save operation
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Quality Requirements
|
|
352
|
+
|
|
353
|
+
### For Each Question:
|
|
354
|
+
- [ ] References specific user story or requirement
|
|
355
|
+
- [ ] Has 3-4 multiple-choice options
|
|
356
|
+
- [ ] Includes context explaining why it matters
|
|
357
|
+
- [ ] Provides a recommendation with justification
|
|
358
|
+
- [ ] Falls into one of the 9 ambiguity categories
|
|
359
|
+
|
|
360
|
+
### For Clarification Markers:
|
|
361
|
+
- [ ] Max 3 markers per PRD
|
|
362
|
+
- [ ] Each marker specifies category
|
|
363
|
+
- [ ] Placed inline at point of ambiguity
|
|
364
|
+
- [ ] Removed after clarification
|
|
365
|
+
|
|
366
|
+
### For PRD Updates:
|
|
367
|
+
- [ ] All answered questions result in PRD updates
|
|
368
|
+
- [ ] Updates are specific and unambiguous
|
|
369
|
+
- [ ] Markers removed for resolved items
|
|
370
|
+
- [ ] New acceptance criteria added where needed
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Multi-Agent Support
|
|
375
|
+
|
|
376
|
+
This skill is designed to work with:
|
|
377
|
+
- **Claude Code**: Use AskUserQuestion tool for interactive clarification
|
|
378
|
+
- **Amp**: Generate questions, collect answers via chat, update PRD
|
|
379
|
+
- **Gemini**: Analyze PRD, identify ambiguities, present questions
|
|
380
|
+
- **Codex**: Programmatic ambiguity detection and question generation
|
|
381
|
+
- **Droid**: Interactive clarification workflow with user prompts
|
|
382
|
+
|
|
383
|
+
The skill does NOT require agent-specific features - it only needs:
|
|
384
|
+
- File reading capability
|
|
385
|
+
- PRD analysis (text understanding)
|
|
386
|
+
- Markdown file writing
|
|
387
|
+
- (Optional) Interactive user input for question/answer flow
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## Checklist Before Completion
|
|
392
|
+
|
|
393
|
+
- [ ] Scanned PRD across all 9 ambiguity categories
|
|
394
|
+
- [ ] Generated max 5 targeted questions
|
|
395
|
+
- [ ] Questions have multiple-choice format with recommendations
|
|
396
|
+
- [ ] Added up to 3 `[NEEDS CLARIFICATION]` markers
|
|
397
|
+
- [ ] Created `clarification-log.md` with proper structure
|
|
398
|
+
- [ ] (After answers) Updated PRD in-place with clarifications
|
|
399
|
+
- [ ] (After answers) Removed resolved markers from PRD
|
|
400
|
+
- [ ] (After answers) Appended answers to clarification log
|
|
401
|
+
- [ ] Clarification log saved to `relentless/features/[feature-name]/clarification-log.md`
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Implementation Tips
|
|
406
|
+
|
|
407
|
+
### Ambiguity Detection Heuristics
|
|
408
|
+
Look for these phrases that often indicate ambiguities:
|
|
409
|
+
- "appropriately", "properly", "correctly" → How specifically?
|
|
410
|
+
- "should work", "must handle" → What exact behavior?
|
|
411
|
+
- "user-friendly", "intuitive" → What specific UX?
|
|
412
|
+
- "if needed", "as appropriate" → When exactly?
|
|
413
|
+
- "error handling" without specifics → What errors? How handle?
|
|
414
|
+
|
|
415
|
+
### Question Prioritization
|
|
416
|
+
Ask about:
|
|
417
|
+
1. **High impact** (affects many stories or core functionality)
|
|
418
|
+
2. **Blocking** (cannot implement without knowing)
|
|
419
|
+
3. **User-facing** (visible to end users)
|
|
420
|
+
4. **Security-critical** (permissions, data access)
|
|
421
|
+
5. **Architectural** (affects system design)
|
|
422
|
+
|
|
423
|
+
Skip asking about:
|
|
424
|
+
- Standard best practices (linting, typechecking - assume these)
|
|
425
|
+
- Obvious defaults (empty states show message, errors show toast)
|
|
426
|
+
- Implementation details (how to code it - developer decides)
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Example Ambiguity Categories in Real PRDs
|
|
431
|
+
|
|
432
|
+
### Behavioral Ambiguity Example:
|
|
433
|
+
```markdown
|
|
434
|
+
US-004: Filter tasks by priority
|
|
435
|
+
- [ ] Filter dropdown with options: All | High | Medium | Low
|
|
436
|
+
```
|
|
437
|
+
**Ambiguity:** What happens when filter is changed? Immediate update? Apply button?
|
|
438
|
+
**Question:** Does filter apply immediately on selection or require "Apply" button click?
|
|
439
|
+
|
|
440
|
+
### Data Ambiguity Example:
|
|
441
|
+
```markdown
|
|
442
|
+
FR-1: Add priority field to tasks table
|
|
443
|
+
```
|
|
444
|
+
**Ambiguity:** Can priority be null? Default value?
|
|
445
|
+
**Question:** Should priority be required (NOT NULL) or optional? If required, what default?
|
|
446
|
+
|
|
447
|
+
### UI/UX Ambiguity Example:
|
|
448
|
+
```markdown
|
|
449
|
+
US-002: Display priority indicator
|
|
450
|
+
```
|
|
451
|
+
**Ambiguity:** Where exactly does indicator appear? What does it look like?
|
|
452
|
+
**Question:** Where should priority indicator appear on task card? (Top-left, top-right, inline with title?)
|
|
453
|
+
|
|
454
|
+
### Permission Ambiguity Example:
|
|
455
|
+
```markdown
|
|
456
|
+
US-003: Users can change task priority
|
|
457
|
+
```
|
|
458
|
+
**Ambiguity:** Any task or only own tasks? Admin privileges?
|
|
459
|
+
**Question:** Can users change priority on any task or only tasks they created?
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Advanced: Multi-Round Clarification
|
|
464
|
+
|
|
465
|
+
If PRD is highly ambiguous, run multiple rounds:
|
|
466
|
+
|
|
467
|
+
### Round 1: Foundational Questions
|
|
468
|
+
Focus on core behavior, data model, and high-level UX.
|
|
469
|
+
|
|
470
|
+
### Round 2: Integration & Edge Cases
|
|
471
|
+
After foundational clarity, ask about integrations, error handling, edge cases.
|
|
472
|
+
|
|
473
|
+
### Round 3: Polish & Performance
|
|
474
|
+
Final round for optimization, accessibility, performance considerations.
|
|
475
|
+
|
|
476
|
+
**Max 3 rounds** - after that, proceed with best judgment and document assumptions.
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd
|
|
3
|
+
description: "Generate a Product Requirements Document (PRD) for a new feature. Use when planning a feature, starting a new project, or when asked to create a PRD. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PRD Generator
|
|
7
|
+
|
|
8
|
+
Create detailed Product Requirements Documents that are clear, actionable, and suitable for implementation.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## The Job
|
|
13
|
+
|
|
14
|
+
1. Receive a feature description from the user
|
|
15
|
+
2. Ask 3-5 essential clarifying questions (with lettered options)
|
|
16
|
+
3. Generate a structured PRD based on answers
|
|
17
|
+
4. Save to `relentless/features/[feature-name]/prd.md`
|
|
18
|
+
|
|
19
|
+
**Important:** Do NOT start implementing. Just create the PRD.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 1: Clarifying Questions
|
|
24
|
+
|
|
25
|
+
Ask only critical questions where the initial prompt is ambiguous. Focus on:
|
|
26
|
+
|
|
27
|
+
- **Problem/Goal:** What problem does this solve?
|
|
28
|
+
- **Core Functionality:** What are the key actions?
|
|
29
|
+
- **Scope/Boundaries:** What should it NOT do?
|
|
30
|
+
- **Success Criteria:** How do we know it's done?
|
|
31
|
+
|
|
32
|
+
### Format Questions Like This:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
1. What is the primary goal of this feature?
|
|
36
|
+
A. Improve user onboarding experience
|
|
37
|
+
B. Increase user retention
|
|
38
|
+
C. Reduce support burden
|
|
39
|
+
D. Other: [please specify]
|
|
40
|
+
|
|
41
|
+
2. Who is the target user?
|
|
42
|
+
A. New users only
|
|
43
|
+
B. Existing users only
|
|
44
|
+
C. All users
|
|
45
|
+
D. Admin users only
|
|
46
|
+
|
|
47
|
+
3. What is the scope?
|
|
48
|
+
A. Minimal viable version
|
|
49
|
+
B. Full-featured implementation
|
|
50
|
+
C. Just the backend/API
|
|
51
|
+
D. Just the UI
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This lets users respond with "1A, 2C, 3B" for quick iteration.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 2: PRD Structure
|
|
59
|
+
|
|
60
|
+
Generate the PRD with these sections:
|
|
61
|
+
|
|
62
|
+
### 1. Introduction/Overview
|
|
63
|
+
Brief description of the feature and the problem it solves.
|
|
64
|
+
|
|
65
|
+
### 2. Goals
|
|
66
|
+
Specific, measurable objectives (bullet list).
|
|
67
|
+
|
|
68
|
+
### 3. User Stories
|
|
69
|
+
Each story needs:
|
|
70
|
+
- **Title:** Short descriptive name
|
|
71
|
+
- **Description:** "As a [user], I want [feature] so that [benefit]"
|
|
72
|
+
- **Acceptance Criteria:** Verifiable checklist of what "done" means
|
|
73
|
+
|
|
74
|
+
Each story should be small enough to implement in one focused session.
|
|
75
|
+
|
|
76
|
+
**Format:**
|
|
77
|
+
```markdown
|
|
78
|
+
### US-001: [Title]
|
|
79
|
+
**Description:** As a [user], I want [feature] so that [benefit].
|
|
80
|
+
|
|
81
|
+
**Acceptance Criteria:**
|
|
82
|
+
- [ ] Specific verifiable criterion
|
|
83
|
+
- [ ] Another criterion
|
|
84
|
+
- [ ] Typecheck/lint passes
|
|
85
|
+
- [ ] **[UI stories only]** Verify in browser using dev-browser skill
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Important:**
|
|
89
|
+
- Acceptance criteria must be verifiable, not vague. "Works correctly" is bad. "Button shows confirmation dialog before deleting" is good.
|
|
90
|
+
- **For any story with UI changes:** Always include "Verify in browser using dev-browser skill" as acceptance criteria. This ensures visual verification of frontend work.
|
|
91
|
+
|
|
92
|
+
### 4. Functional Requirements
|
|
93
|
+
Numbered list of specific functionalities:
|
|
94
|
+
- "FR-1: The system must allow users to..."
|
|
95
|
+
- "FR-2: When a user clicks X, the system must..."
|
|
96
|
+
|
|
97
|
+
Be explicit and unambiguous.
|
|
98
|
+
|
|
99
|
+
### 5. Non-Goals (Out of Scope)
|
|
100
|
+
What this feature will NOT include. Critical for managing scope.
|
|
101
|
+
|
|
102
|
+
### 6. Design Considerations (Optional)
|
|
103
|
+
- UI/UX requirements
|
|
104
|
+
- Link to mockups if available
|
|
105
|
+
- Relevant existing components to reuse
|
|
106
|
+
|
|
107
|
+
### 7. Technical Considerations (Optional)
|
|
108
|
+
- Known constraints or dependencies
|
|
109
|
+
- Integration points with existing systems
|
|
110
|
+
- Performance requirements
|
|
111
|
+
|
|
112
|
+
### 8. Success Metrics
|
|
113
|
+
How will success be measured?
|
|
114
|
+
- "Reduce time to complete X by 50%"
|
|
115
|
+
- "Increase conversion rate by 10%"
|
|
116
|
+
|
|
117
|
+
### 9. Open Questions
|
|
118
|
+
Remaining questions or areas needing clarification.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Writing for Junior Developers
|
|
123
|
+
|
|
124
|
+
The PRD reader may be a junior developer or AI agent. Therefore:
|
|
125
|
+
|
|
126
|
+
- Be explicit and unambiguous
|
|
127
|
+
- Avoid jargon or explain it
|
|
128
|
+
- Provide enough detail to understand purpose and core logic
|
|
129
|
+
- Number requirements for easy reference
|
|
130
|
+
- Use concrete examples where helpful
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Output
|
|
135
|
+
|
|
136
|
+
- **Format:** Markdown (`.md`)
|
|
137
|
+
- **Location:** `relentless/features/[feature-name]/`
|
|
138
|
+
- **Filename:** `prd.md`
|
|
139
|
+
|
|
140
|
+
**Note:** Create the feature directory first if it doesn't exist: `mkdir -p relentless/features/[feature-name]`
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Example PRD
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
# PRD: Task Priority System
|
|
148
|
+
|
|
149
|
+
## Introduction
|
|
150
|
+
|
|
151
|
+
Add priority levels to tasks so users can focus on what matters most. Tasks can be marked as high, medium, or low priority, with visual indicators and filtering to help users manage their workload effectively.
|
|
152
|
+
|
|
153
|
+
## Goals
|
|
154
|
+
|
|
155
|
+
- Allow assigning priority (high/medium/low) to any task
|
|
156
|
+
- Provide clear visual differentiation between priority levels
|
|
157
|
+
- Enable filtering and sorting by priority
|
|
158
|
+
- Default new tasks to medium priority
|
|
159
|
+
|
|
160
|
+
## User Stories
|
|
161
|
+
|
|
162
|
+
### US-001: Add priority field to database
|
|
163
|
+
**Description:** As a developer, I need to store task priority so it persists across sessions.
|
|
164
|
+
|
|
165
|
+
**Acceptance Criteria:**
|
|
166
|
+
- [ ] Add priority column to tasks table: 'high' | 'medium' | 'low' (default 'medium')
|
|
167
|
+
- [ ] Generate and run migration successfully
|
|
168
|
+
- [ ] Typecheck passes
|
|
169
|
+
|
|
170
|
+
### US-002: Display priority indicator on task cards
|
|
171
|
+
**Description:** As a user, I want to see task priority at a glance so I know what needs attention first.
|
|
172
|
+
|
|
173
|
+
**Acceptance Criteria:**
|
|
174
|
+
- [ ] Each task card shows colored priority badge (red=high, yellow=medium, gray=low)
|
|
175
|
+
- [ ] Priority visible without hovering or clicking
|
|
176
|
+
- [ ] Typecheck passes
|
|
177
|
+
- [ ] Verify in browser using dev-browser skill
|
|
178
|
+
|
|
179
|
+
### US-003: Add priority selector to task edit
|
|
180
|
+
**Description:** As a user, I want to change a task's priority when editing it.
|
|
181
|
+
|
|
182
|
+
**Acceptance Criteria:**
|
|
183
|
+
- [ ] Priority dropdown in task edit modal
|
|
184
|
+
- [ ] Shows current priority as selected
|
|
185
|
+
- [ ] Saves immediately on selection change
|
|
186
|
+
- [ ] Typecheck passes
|
|
187
|
+
- [ ] Verify in browser using dev-browser skill
|
|
188
|
+
|
|
189
|
+
### US-004: Filter tasks by priority
|
|
190
|
+
**Description:** As a user, I want to filter the task list to see only high-priority items when I'm focused.
|
|
191
|
+
|
|
192
|
+
**Acceptance Criteria:**
|
|
193
|
+
- [ ] Filter dropdown with options: All | High | Medium | Low
|
|
194
|
+
- [ ] Filter persists in URL params
|
|
195
|
+
- [ ] Empty state message when no tasks match filter
|
|
196
|
+
- [ ] Typecheck passes
|
|
197
|
+
- [ ] Verify in browser using dev-browser skill
|
|
198
|
+
|
|
199
|
+
## Functional Requirements
|
|
200
|
+
|
|
201
|
+
- FR-1: Add `priority` field to tasks table ('high' | 'medium' | 'low', default 'medium')
|
|
202
|
+
- FR-2: Display colored priority badge on each task card
|
|
203
|
+
- FR-3: Include priority selector in task edit modal
|
|
204
|
+
- FR-4: Add priority filter dropdown to task list header
|
|
205
|
+
- FR-5: Sort by priority within each status column (high to medium to low)
|
|
206
|
+
|
|
207
|
+
## Non-Goals
|
|
208
|
+
|
|
209
|
+
- No priority-based notifications or reminders
|
|
210
|
+
- No automatic priority assignment based on due date
|
|
211
|
+
- No priority inheritance for subtasks
|
|
212
|
+
|
|
213
|
+
## Technical Considerations
|
|
214
|
+
|
|
215
|
+
- Reuse existing badge component with color variants
|
|
216
|
+
- Filter state managed via URL search params
|
|
217
|
+
- Priority stored in database, not computed
|
|
218
|
+
|
|
219
|
+
## Success Metrics
|
|
220
|
+
|
|
221
|
+
- Users can change priority in under 2 clicks
|
|
222
|
+
- High-priority tasks immediately visible at top of lists
|
|
223
|
+
- No regression in task list performance
|
|
224
|
+
|
|
225
|
+
## Open Questions
|
|
226
|
+
|
|
227
|
+
- Should priority affect task ordering within a column?
|
|
228
|
+
- Should we add keyboard shortcuts for priority changes?
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Checklist
|
|
234
|
+
|
|
235
|
+
Before saving the PRD:
|
|
236
|
+
|
|
237
|
+
- [ ] Asked clarifying questions with lettered options
|
|
238
|
+
- [ ] Incorporated user's answers
|
|
239
|
+
- [ ] User stories are small and specific
|
|
240
|
+
- [ ] Functional requirements are numbered and unambiguous
|
|
241
|
+
- [ ] Non-goals section defines clear boundaries
|
|
242
|
+
- [ ] Saved to `relentless/features/[feature-name]/prd.md`
|