@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,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`
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relentless
|
|
3
|
+
description: "Convert PRDs to prd.json format for the Relentless autonomous agent system. Use when you have an existing PRD and need to convert it to Relentless JSON format. Triggers on: convert this prd, turn this into relentless format, create prd.json from this, relentless json."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Relentless PRD Converter
|
|
7
|
+
|
|
8
|
+
Converts existing PRDs to the prd.json format that Relentless uses for autonomous execution with any AI coding agent.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## The Job
|
|
13
|
+
|
|
14
|
+
Take a PRD (markdown file or text) and convert it to `relentless/prd.json` in your project directory.
|
|
15
|
+
|
|
16
|
+
**Important:** All relentless files are stored in the `relentless/` subdirectory.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Output Format
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"project": "[Project Name]",
|
|
25
|
+
"branchName": "relentless/[feature-name-kebab-case]",
|
|
26
|
+
"description": "[Feature description from PRD title/intro]",
|
|
27
|
+
"userStories": [
|
|
28
|
+
{
|
|
29
|
+
"id": "US-001",
|
|
30
|
+
"title": "[Story title]",
|
|
31
|
+
"description": "As a [user], I want [feature] so that [benefit]",
|
|
32
|
+
"acceptanceCriteria": [
|
|
33
|
+
"Criterion 1",
|
|
34
|
+
"Criterion 2",
|
|
35
|
+
"Typecheck passes"
|
|
36
|
+
],
|
|
37
|
+
"priority": 1,
|
|
38
|
+
"passes": false,
|
|
39
|
+
"notes": ""
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Story Size: The Number One Rule
|
|
48
|
+
|
|
49
|
+
**Each story must be completable in ONE Relentless iteration (one context window).**
|
|
50
|
+
|
|
51
|
+
Relentless spawns a fresh AI agent instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.
|
|
52
|
+
|
|
53
|
+
### Right-sized stories:
|
|
54
|
+
- Add a database column and migration
|
|
55
|
+
- Add a UI component to an existing page
|
|
56
|
+
- Update a server action with new logic
|
|
57
|
+
- Add a filter dropdown to a list
|
|
58
|
+
|
|
59
|
+
### Too big (split these):
|
|
60
|
+
- "Build the entire dashboard" - Split into: schema, queries, UI components, filters
|
|
61
|
+
- "Add authentication" - Split into: schema, middleware, login UI, session handling
|
|
62
|
+
- "Refactor the API" - Split into one story per endpoint or pattern
|
|
63
|
+
|
|
64
|
+
**Rule of thumb:** If you cannot describe the change in 2-3 sentences, it is too big.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Story Ordering: Dependencies First
|
|
69
|
+
|
|
70
|
+
Stories execute in priority order. Earlier stories must not depend on later ones.
|
|
71
|
+
|
|
72
|
+
**Correct order:**
|
|
73
|
+
1. Schema/database changes (migrations)
|
|
74
|
+
2. Server actions / backend logic
|
|
75
|
+
3. UI components that use the backend
|
|
76
|
+
4. Dashboard/summary views that aggregate data
|
|
77
|
+
|
|
78
|
+
**Wrong order:**
|
|
79
|
+
1. UI component (depends on schema that does not exist yet)
|
|
80
|
+
2. Schema change
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Acceptance Criteria: Must Be Verifiable
|
|
85
|
+
|
|
86
|
+
Each criterion must be something the agent can CHECK, not something vague.
|
|
87
|
+
|
|
88
|
+
### Good criteria (verifiable):
|
|
89
|
+
- "Add `status` column to tasks table with default 'pending'"
|
|
90
|
+
- "Filter dropdown has options: All, Active, Completed"
|
|
91
|
+
- "Clicking delete shows confirmation dialog"
|
|
92
|
+
- "Typecheck passes"
|
|
93
|
+
- "Tests pass"
|
|
94
|
+
|
|
95
|
+
### Bad criteria (vague):
|
|
96
|
+
- "Works correctly"
|
|
97
|
+
- "User can do X easily"
|
|
98
|
+
- "Good UX"
|
|
99
|
+
- "Handles edge cases"
|
|
100
|
+
|
|
101
|
+
### Always include as final criterion:
|
|
102
|
+
```
|
|
103
|
+
"Typecheck passes"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
For stories with testable logic, also include:
|
|
107
|
+
```
|
|
108
|
+
"Tests pass"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### For stories that change UI, also include:
|
|
112
|
+
```
|
|
113
|
+
"Verify in browser"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Frontend stories are NOT complete until visually verified.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Conversion Rules
|
|
121
|
+
|
|
122
|
+
1. **Each user story becomes one JSON entry**
|
|
123
|
+
2. **IDs**: Sequential (US-001, US-002, etc.)
|
|
124
|
+
3. **Priority**: Based on dependency order, then document order
|
|
125
|
+
4. **All stories**: `passes: false` and empty `notes`
|
|
126
|
+
5. **branchName**: Derive from feature name, kebab-case, prefixed with `relentless/`
|
|
127
|
+
6. **Always add**: "Typecheck passes" to every story's acceptance criteria
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Splitting Large PRDs
|
|
132
|
+
|
|
133
|
+
If a PRD has big features, split them:
|
|
134
|
+
|
|
135
|
+
**Original:**
|
|
136
|
+
> "Add user notification system"
|
|
137
|
+
|
|
138
|
+
**Split into:**
|
|
139
|
+
1. US-001: Add notifications table to database
|
|
140
|
+
2. US-002: Create notification service for sending notifications
|
|
141
|
+
3. US-003: Add notification bell icon to header
|
|
142
|
+
4. US-004: Create notification dropdown panel
|
|
143
|
+
5. US-005: Add mark-as-read functionality
|
|
144
|
+
6. US-006: Add notification preferences page
|
|
145
|
+
|
|
146
|
+
Each is one focused change that can be completed and verified independently.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Example
|
|
151
|
+
|
|
152
|
+
**Input PRD:**
|
|
153
|
+
```markdown
|
|
154
|
+
# Task Status Feature
|
|
155
|
+
|
|
156
|
+
Add ability to mark tasks with different statuses.
|
|
157
|
+
|
|
158
|
+
## Requirements
|
|
159
|
+
- Toggle between pending/in-progress/done on task list
|
|
160
|
+
- Filter list by status
|
|
161
|
+
- Show status badge on each task
|
|
162
|
+
- Persist status in database
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Output prd.json:**
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"project": "TaskApp",
|
|
169
|
+
"branchName": "relentless/task-status",
|
|
170
|
+
"description": "Task Status Feature - Track task progress with status indicators",
|
|
171
|
+
"userStories": [
|
|
172
|
+
{
|
|
173
|
+
"id": "US-001",
|
|
174
|
+
"title": "Add status field to tasks table",
|
|
175
|
+
"description": "As a developer, I need to store task status in the database.",
|
|
176
|
+
"acceptanceCriteria": [
|
|
177
|
+
"Add status column: 'pending' | 'in_progress' | 'done' (default 'pending')",
|
|
178
|
+
"Generate and run migration successfully",
|
|
179
|
+
"Typecheck passes"
|
|
180
|
+
],
|
|
181
|
+
"priority": 1,
|
|
182
|
+
"passes": false,
|
|
183
|
+
"notes": ""
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "US-002",
|
|
187
|
+
"title": "Display status badge on task cards",
|
|
188
|
+
"description": "As a user, I want to see task status at a glance.",
|
|
189
|
+
"acceptanceCriteria": [
|
|
190
|
+
"Each task card shows colored status badge",
|
|
191
|
+
"Badge colors: gray=pending, blue=in_progress, green=done",
|
|
192
|
+
"Typecheck passes",
|
|
193
|
+
"Verify in browser"
|
|
194
|
+
],
|
|
195
|
+
"priority": 2,
|
|
196
|
+
"passes": false,
|
|
197
|
+
"notes": ""
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "US-003",
|
|
201
|
+
"title": "Add status toggle to task list rows",
|
|
202
|
+
"description": "As a user, I want to change task status directly from the list.",
|
|
203
|
+
"acceptanceCriteria": [
|
|
204
|
+
"Each row has status dropdown or toggle",
|
|
205
|
+
"Changing status saves immediately",
|
|
206
|
+
"UI updates without page refresh",
|
|
207
|
+
"Typecheck passes",
|
|
208
|
+
"Verify in browser"
|
|
209
|
+
],
|
|
210
|
+
"priority": 3,
|
|
211
|
+
"passes": false,
|
|
212
|
+
"notes": ""
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "US-004",
|
|
216
|
+
"title": "Filter tasks by status",
|
|
217
|
+
"description": "As a user, I want to filter the list to see only certain statuses.",
|
|
218
|
+
"acceptanceCriteria": [
|
|
219
|
+
"Filter dropdown: All | Pending | In Progress | Done",
|
|
220
|
+
"Filter persists in URL params",
|
|
221
|
+
"Typecheck passes",
|
|
222
|
+
"Verify in browser"
|
|
223
|
+
],
|
|
224
|
+
"priority": 4,
|
|
225
|
+
"passes": false,
|
|
226
|
+
"notes": ""
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Running Relentless
|
|
235
|
+
|
|
236
|
+
After creating relentless/prd.json, run the orchestrator:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# With Claude Code (default)
|
|
240
|
+
./relentless/bin/relentless.sh
|
|
241
|
+
|
|
242
|
+
# With a specific agent
|
|
243
|
+
./relentless/bin/relentless.sh --agent amp
|
|
244
|
+
./relentless/bin/relentless.sh --agent codex
|
|
245
|
+
./relentless/bin/relentless.sh --agent gemini
|
|
246
|
+
|
|
247
|
+
# Smart routing (auto-select best agent per story)
|
|
248
|
+
./relentless/bin/relentless.sh --agent auto
|
|
249
|
+
|
|
250
|
+
# Custom max iterations
|
|
251
|
+
./relentless/bin/relentless.sh --max-iterations 30
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Checklist Before Saving
|
|
257
|
+
|
|
258
|
+
Before writing prd.json, verify:
|
|
259
|
+
|
|
260
|
+
- [ ] Each story is completable in one iteration (small enough)
|
|
261
|
+
- [ ] Stories are ordered by dependency (schema to backend to UI)
|
|
262
|
+
- [ ] Every story has "Typecheck passes" as criterion
|
|
263
|
+
- [ ] UI stories have "Verify in browser" as criterion
|
|
264
|
+
- [ ] Acceptance criteria are verifiable (not vague)
|
|
265
|
+
- [ ] No story depends on a later story
|