@arvorco/relentless 0.3.0 → 0.4.2

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.
Files changed (71) hide show
  1. package/.claude/commands/relentless.constitution.md +1 -1
  2. package/.claude/commands/relentless.convert.md +25 -0
  3. package/.claude/commands/relentless.specify.md +1 -1
  4. package/.claude/skills/analyze/SKILL.md +113 -40
  5. package/.claude/skills/analyze/templates/analysis-report.md +138 -0
  6. package/.claude/skills/checklist/SKILL.md +143 -51
  7. package/.claude/skills/checklist/templates/checklist.md +43 -11
  8. package/.claude/skills/clarify/SKILL.md +70 -11
  9. package/.claude/skills/constitution/SKILL.md +61 -3
  10. package/.claude/skills/constitution/templates/constitution.md +241 -160
  11. package/.claude/skills/constitution/templates/prompt.md +150 -20
  12. package/.claude/skills/convert/SKILL.md +248 -0
  13. package/.claude/skills/implement/SKILL.md +82 -34
  14. package/.claude/skills/plan/SKILL.md +136 -27
  15. package/.claude/skills/plan/templates/plan.md +92 -9
  16. package/.claude/skills/specify/SKILL.md +110 -19
  17. package/.claude/skills/specify/scripts/bash/create-new-feature.sh +2 -2
  18. package/.claude/skills/specify/scripts/bash/setup-plan.sh +1 -1
  19. package/.claude/skills/specify/templates/spec.md +40 -5
  20. package/.claude/skills/tasks/SKILL.md +75 -1
  21. package/.claude/skills/tasks/templates/tasks.md +5 -4
  22. package/CHANGELOG.md +63 -1
  23. package/MANUAL.md +40 -0
  24. package/README.md +263 -11
  25. package/bin/relentless.ts +292 -5
  26. package/package.json +2 -2
  27. package/relentless/config.json +46 -2
  28. package/relentless/constitution.md +2 -2
  29. package/relentless/prompt.md +97 -18
  30. package/src/agents/amp.ts +53 -13
  31. package/src/agents/claude.ts +70 -15
  32. package/src/agents/codex.ts +73 -14
  33. package/src/agents/droid.ts +68 -14
  34. package/src/agents/exec.ts +96 -0
  35. package/src/agents/gemini.ts +59 -16
  36. package/src/agents/opencode.ts +188 -9
  37. package/src/cli/fallback-order.ts +210 -0
  38. package/src/cli/index.ts +63 -0
  39. package/src/cli/mode-flag.ts +198 -0
  40. package/src/cli/review-flags.ts +192 -0
  41. package/src/config/loader.ts +16 -1
  42. package/src/config/schema.ts +157 -2
  43. package/src/execution/runner.ts +144 -21
  44. package/src/init/scaffolder.ts +285 -25
  45. package/src/prd/parser.ts +92 -1
  46. package/src/prd/types.ts +136 -0
  47. package/src/review/index.ts +92 -0
  48. package/src/review/prompt.ts +293 -0
  49. package/src/review/runner.ts +337 -0
  50. package/src/review/tasks/docs.ts +529 -0
  51. package/src/review/tasks/index.ts +80 -0
  52. package/src/review/tasks/lint.ts +436 -0
  53. package/src/review/tasks/quality.ts +760 -0
  54. package/src/review/tasks/security.ts +452 -0
  55. package/src/review/tasks/test.ts +456 -0
  56. package/src/review/tasks/typecheck.ts +323 -0
  57. package/src/review/types.ts +139 -0
  58. package/src/routing/cascade.ts +310 -0
  59. package/src/routing/classifier.ts +338 -0
  60. package/src/routing/estimate.ts +270 -0
  61. package/src/routing/fallback.ts +512 -0
  62. package/src/routing/index.ts +124 -0
  63. package/src/routing/registry.ts +501 -0
  64. package/src/routing/report.ts +570 -0
  65. package/src/routing/router.ts +287 -0
  66. package/src/tui/App.tsx +2 -0
  67. package/src/tui/TUIRunner.tsx +103 -8
  68. package/src/tui/components/CurrentStory.tsx +23 -1
  69. package/src/tui/hooks/useTUI.ts +1 -0
  70. package/src/tui/types.ts +9 -0
  71. package/.claude/skills/specify/scripts/bash/update-agent-context.sh +0 -799
@@ -1,228 +1,309 @@
1
+ <!-- TEMPLATE_VERSION: 2.1.0 -->
2
+ <!-- LAST_UPDATED: 2026-01-20 -->
3
+
1
4
  # Project Constitution
2
5
 
6
+ **Version:** 1.0.0
7
+ **Ratified:** [DATE]
8
+ **Last Amended:** [DATE]
9
+
10
+ ---
11
+
3
12
  ## Overview
4
13
 
5
- This document defines the governing principles, patterns, and constraints for this project. All agents and developers MUST follow these guidelines when working on the codebase.
14
+ This document defines the governing principles, patterns, and constraints for this project. All AI agents and developers MUST follow these guidelines when working on the codebase.
15
+
16
+ **This is a generic template.** Customize it for your project using `/relentless.constitution`.
17
+
18
+ ---
6
19
 
7
20
  ## Core Principles
8
21
 
9
- ### Architecture
22
+ ### 1. Test-Driven Development (TDD)
23
+
24
+ **MUST:**
25
+ - Write tests BEFORE implementation code
26
+ - Verify tests FAIL before writing implementation
27
+ - All new features MUST have test coverage
28
+ - All bug fixes MUST include regression tests
29
+ - Tests MUST be part of acceptance criteria
30
+
31
+ **SHOULD:**
32
+ - Aim for >80% code coverage on critical paths
33
+ - Write integration tests for API endpoints
34
+ - Write E2E tests for user-facing flows
35
+ - Use descriptive test names that document behavior
36
+
37
+ **Rationale:** TDD ensures code correctness, documents behavior, and prevents regressions. Tests written first force clear thinking about requirements.
38
+
39
+ ---
40
+
41
+ ### 2. Quality Gates
42
+
43
+ **MUST:**
44
+ - All commits MUST pass typecheck with 0 errors
45
+ - All commits MUST pass lint with 0 errors AND 0 warnings
46
+ - All commits MUST pass tests
47
+ - No debug code in production (console.log, debugger)
48
+ - No unused imports or variables
49
+
50
+ **SHOULD:**
51
+ - Run quality checks locally before pushing
52
+ - Fix lint warnings immediately, don't accumulate debt
53
+ - Keep build times under reasonable limits
54
+
55
+ **Rationale:** Quality gates catch issues early and maintain codebase health over time.
56
+
57
+ ---
58
+
59
+ ### 3. Code Architecture
10
60
 
11
- **MUST** follow these architectural patterns:
61
+ **MUST:**
12
62
  - Follow existing code structure and organization patterns
13
63
  - Keep modules focused and single-purpose
14
- - Use dependency injection where appropriate
64
+ - Avoid circular dependencies
65
+ - Export types alongside implementations
15
66
 
16
- **SHOULD** consider these best practices:
67
+ **SHOULD:**
17
68
  - Prefer composition over inheritance
18
- - Keep functions small and focused
69
+ - Keep functions small and focused (<50 lines)
19
70
  - Write self-documenting code
71
+ - Use meaningful names (no abbreviations)
20
72
 
21
- ### Code Quality
22
-
23
- **MUST** maintain these quality standards:
24
- - All commits MUST pass typecheck with 0 errors
25
- - All commits MUST pass lint with 0 warnings
26
- - All new features MUST include appropriate tests
27
- - All code MUST be formatted consistently
73
+ **Rationale:** Consistent architecture makes code predictable and maintainable.
28
74
 
29
- **SHOULD** strive for:
30
- - High test coverage (aim for >80%)
31
- - Clear, descriptive variable and function names
32
- - Comprehensive error handling
75
+ ---
33
76
 
34
- ### Version Control
77
+ ### 4. Type Safety
35
78
 
36
- **MUST** follow these Git practices:
37
- - Write clear, descriptive commit messages
38
- - Reference user story IDs in commits: `feat: [US-XXX] - Description`
39
- - Keep commits focused and atomic
40
- - Do not commit broken code
79
+ **MUST:**
80
+ - Use strict TypeScript mode
81
+ - No `any` type except in documented exceptional cases
82
+ - Validate external input at system boundaries
83
+ - Export type definitions for public APIs
41
84
 
42
- **SHOULD** maintain:
43
- - Clean commit history
44
- - Meaningful branch names
45
- - Updated documentation with code changes
85
+ **SHOULD:**
86
+ - Use Zod or similar for runtime validation
87
+ - Prefer type inference over explicit annotations
88
+ - Use discriminated unions for state machines
89
+ - Document complex type constraints
46
90
 
47
- ## Technology Stack
91
+ **Rationale:** Type safety prevents runtime errors and improves developer experience.
48
92
 
49
- ### Language & Runtime
93
+ ---
50
94
 
51
- - **TypeScript** - Primary language
52
- - **Bun** - Runtime environment (not Node.js)
53
- - **Zod** - Schema validation
95
+ ### 5. Version Control
54
96
 
55
- ### Key Libraries
97
+ **MUST:**
98
+ - Write clear, descriptive commit messages
99
+ - Reference user story IDs: `feat: [US-XXX] - Description`
100
+ - Keep commits focused and atomic
101
+ - Never commit broken code
102
+ - Never commit secrets or credentials
56
103
 
57
- - Commander - CLI parsing
58
- - Chalk - Terminal formatting
59
- - Execa - Process execution
104
+ **SHOULD:**
105
+ - Use conventional commit format
106
+ - Keep PR/MR size manageable (<500 lines)
107
+ - Update documentation with code changes
108
+ - Squash fixup commits before merge
60
109
 
61
- ## File Organization
110
+ **Rationale:** Good version control practices enable collaboration and debugging.
62
111
 
63
- ```
64
- project/
65
- ├── bin/ # CLI entry points
66
- ├── src/ # Source code
67
- │ ├── agents/ # Agent adapters
68
- │ ├── config/ # Configuration
69
- │ ├── execution/ # Orchestration
70
- │ ├── init/ # Project scaffolding
71
- │ └── prd/ # PRD handling
72
- ├── templates/ # Template files
73
- ├── skills/ # Agent skills
74
- └── relentless/ # Relentless workspace
75
- ├── config.json
76
- ├── prompt.md
77
- └── features/
78
- ```
112
+ ---
79
113
 
80
- ## Coding Standards
114
+ ### 6. Error Handling
81
115
 
82
- ### TypeScript
116
+ **MUST:**
117
+ - Handle all error cases explicitly
118
+ - Provide descriptive error messages
119
+ - Validate input at system boundaries
120
+ - Never swallow errors silently
83
121
 
84
- **MUST** follow:
85
- - Use strict TypeScript mode
86
- - Avoid `any` type - use `unknown` or proper types
87
- - Export types alongside implementations
88
- - Use Zod schemas for runtime validation
122
+ **SHOULD:**
123
+ - Include context in error messages
124
+ - Use typed error classes
125
+ - Provide recovery suggestions
126
+ - Log errors with appropriate levels
89
127
 
90
- **SHOULD** prefer:
91
- - Interface for public APIs
92
- - Type for unions and intersections
93
- - Explicit return types on public functions
128
+ **Rationale:** Proper error handling improves debugging and user experience.
94
129
 
95
- ### Error Handling
96
-
97
- **MUST** implement:
98
- - Descriptive error messages
99
- - Proper error types
100
- - Validation at system boundaries
101
- - Graceful degradation where appropriate
130
+ ---
102
131
 
103
- **SHOULD** include:
104
- - Context in error messages
105
- - Recovery suggestions
106
- - Logging for debugging
132
+ ### 7. Documentation
107
133
 
108
- ### Testing
134
+ **MUST:**
135
+ - Document public APIs and interfaces
136
+ - Document breaking changes in commits
137
+ - Keep README updated with setup instructions
138
+ - Document non-obvious design decisions
109
139
 
110
- **MUST** test:
111
- - Core business logic
112
- - Edge cases and error conditions
113
- - Integration points
114
- - CLI commands
140
+ **SHOULD:**
141
+ - Document configuration options
142
+ - Include usage examples
143
+ - Document troubleshooting steps
144
+ - Keep inline comments minimal but meaningful
115
145
 
116
- **SHOULD** test:
117
- - Helper functions
118
- - Utilities
119
- - Type guards
146
+ **Rationale:** Documentation reduces onboarding time and prevents knowledge loss.
120
147
 
121
- ## Documentation
148
+ ---
122
149
 
123
- **MUST** document:
124
- - Public APIs and interfaces
125
- - Complex algorithms or logic
126
- - Breaking changes in commits
127
- - Setup and installation steps
150
+ ### 8. Security
128
151
 
129
- **SHOULD** document:
130
- - Configuration options
131
- - Architecture decisions
132
- - Common workflows
133
- - Troubleshooting steps
152
+ **MUST:**
153
+ - Never commit secrets or credentials
154
+ - Validate and sanitize user input
155
+ - Use parameterized queries (no SQL injection)
156
+ - Follow principle of least privilege
134
157
 
135
- ## Security
158
+ **SHOULD:**
159
+ - Keep dependencies updated
160
+ - Run security audits periodically
161
+ - Use environment variables for configuration
162
+ - Implement rate limiting for APIs
136
163
 
137
- **MUST** ensure:
138
- - No secrets committed to git
139
- - Proper input validation
140
- - Safe file system operations
141
- - Minimal permissions required
164
+ **Rationale:** Security is non-negotiable and must be built in from the start.
142
165
 
143
- **SHOULD** consider:
144
- - Rate limiting where appropriate
145
- - Audit logs for sensitive operations
146
- - Security updates for dependencies
166
+ ---
147
167
 
148
- ## Performance
168
+ ## Technology Stack
149
169
 
150
- **MUST** maintain:
151
- - Fast startup time (<1s)
152
- - Responsive CLI commands
153
- - Efficient file operations
154
- - Minimal memory footprint
170
+ **Customize this section for your project:**
155
171
 
156
- **SHOULD** optimize:
157
- - Parallel operations where safe
158
- - Caching for repeated operations
159
- - Lazy loading of heavy modules
172
+ ### Language & Runtime
173
+ - [Language] - Primary language
174
+ - [Runtime] - Runtime environment
160
175
 
161
- ## Constraints
176
+ ### Key Libraries
177
+ - [Library 1] - Purpose
178
+ - [Library 2] - Purpose
179
+ - [Library 3] - Purpose
162
180
 
163
- ### Dependencies
181
+ ### Quality Tools
182
+ - [Linter] - Code linting
183
+ - [Formatter] - Code formatting
184
+ - [Test Framework] - Testing
164
185
 
165
- **MUST NOT**:
166
- - Add dependencies without justification
167
- - Include deprecated packages
168
- - Use packages with known security issues
186
+ ---
169
187
 
170
- **SHOULD**:
171
- - Prefer built-in solutions over dependencies
172
- - Keep dependencies minimal and focused
173
- - Regularly update dependencies
188
+ ## File Organization
174
189
 
175
- ### Backwards Compatibility
190
+ **Customize this section for your project:**
176
191
 
177
- **MUST**:
178
- - Maintain compatibility with existing PRDs
179
- - Provide migration paths for breaking changes
180
- - Version configuration formats
192
+ ```
193
+ project/
194
+ ├── src/ # Source code
195
+ │ ├── components/ # UI components (if applicable)
196
+ │ ├── services/ # Business logic
197
+ │ ├── utils/ # Utilities
198
+ │ └── types/ # Type definitions
199
+ ├── tests/ # Test files
200
+ ├── docs/ # Documentation
201
+ └── relentless/ # Relentless workspace
202
+ ├── config.json # Configuration
203
+ ├── constitution.md
204
+ ├── prompt.md
205
+ └── features/ # Feature workspaces
206
+ ```
181
207
 
182
- **SHOULD**:
183
- - Deprecate features before removal
184
- - Provide clear upgrade documentation
185
- - Support at least 2 major versions
208
+ ---
186
209
 
187
210
  ## Agent-Specific Guidelines
188
211
 
189
- ### For All Agents
212
+ ### For All AI Agents
190
213
 
191
- **MUST**:
192
- - Read progress.txt before starting work
214
+ **MUST:**
215
+ - Read spec.md and plan.md BEFORE starting work
216
+ - Read only the relevant story section from tasks.md
193
217
  - Work on ONE story per iteration
218
+ - Follow TDD - write tests first
219
+ - Run ALL quality checks before committing
194
220
  - Update PRD after completing a story
195
221
  - Append learnings to progress.txt
196
- - Run all quality checks before committing
197
222
 
198
- **SHOULD**:
199
- - Review existing code before modifying
200
- - Follow established patterns
201
- - Ask questions when unclear
223
+ **SHOULD:**
224
+ - Review existing code patterns before modifying
225
+ - Ask questions when requirements are unclear
202
226
  - Document non-obvious decisions
227
+ - Keep commits small and focused
203
228
 
204
229
  ### Iteration Workflow
205
230
 
206
- 1. Read PRD to find next incomplete story
207
- 2. Read progress.txt for context and patterns
231
+ 1. Read spec.md, plan.md, checklist.md
232
+ 2. Find your story in tasks.md (only read that section)
208
233
  3. Review relevant existing code
209
- 4. Implement the single story
210
- 5. Run typecheck and lint
211
- 6. Run tests if applicable
212
- 7. Commit with proper message format
213
- 8. Update PRD passes: true
214
- 9. Append to progress.txt
215
- 10. Check if all stories complete
234
+ 4. Write tests FIRST (TDD)
235
+ 5. Verify tests FAIL
236
+ 6. Implement minimum code to pass tests
237
+ 7. Run typecheck, lint, test
238
+ 8. Commit with proper message format
239
+ 9. Update PRD: `passes: true`
240
+ 10. Append to progress.txt
241
+ 11. Check if all stories complete
242
+
243
+ ---
244
+
245
+ ## Routing and Cost Optimization
246
+
247
+ When using Relentless Auto Mode:
248
+
249
+ **MUST:**
250
+ - Respect routing decisions in prd.json
251
+ - Report actual costs vs estimated costs
252
+ - Not override routing without explicit permission
253
+
254
+ **SHOULD:**
255
+ - Use appropriate model for task complexity
256
+ - Consider cost when choosing approaches
257
+ - Track and report token usage
258
+
259
+ **Modes:**
260
+ - `free` - Free tier models only (~95% savings)
261
+ - `cheap` - Budget models (~75% savings)
262
+ - `good` - Balanced quality/cost (~50% savings)
263
+ - `genius` - Premium models (no savings)
264
+
265
+ ---
266
+
267
+ ## Governance
268
+
269
+ ### Amendment Process
270
+
271
+ 1. Propose changes via PR
272
+ 2. Discuss with team
273
+ 3. Update version semantically:
274
+ - **MAJOR**: Breaking changes to principles
275
+ - **MINOR**: New principles added
276
+ - **PATCH**: Clarifications, typo fixes
277
+ 4. Update `Last Amended` date
278
+ 5. Document rationale for change
279
+
280
+ ### Compliance
281
+
282
+ - Constitution is checked before each feature implementation
283
+ - Violations should be flagged in code review
284
+ - Repeated violations require team discussion
285
+ - Emergency exceptions require documentation
286
+
287
+ ### Review Schedule
288
+
289
+ - **Quarterly**: Full constitution review
290
+ - **Per Feature**: Relevance check
291
+ - **On Issues**: Investigate if constitution gap
292
+
293
+ ---
294
+
295
+ ## Customization Notes
296
+
297
+ This template should be customized with:
216
298
 
217
- ## Review and Updates
299
+ 1. **Technology Stack** - Your specific languages, frameworks, tools
300
+ 2. **File Organization** - Your project structure
301
+ 3. **Quality Commands** - Your actual typecheck, lint, test commands
302
+ 4. **Additional Principles** - Domain-specific rules
218
303
 
219
- This constitution should be:
220
- - **Reviewed** at project milestones
221
- - **Updated** when patterns emerge
222
- - **Referenced** in code reviews
223
- - **Enforced** in CI/CD pipelines
304
+ Run `/relentless.constitution` to generate a personalized version.
224
305
 
225
306
  ---
226
307
 
227
- Last Updated: YYYY-MM-DD
228
- Version: 1.0.0
308
+ **Template Version:** 2.0.0
309
+ **Compatible with:** Relentless v0.2.0+
@@ -1,6 +1,9 @@
1
+ <!-- TEMPLATE_VERSION: 2.1.0 -->
2
+ <!-- LAST_UPDATED: 2026-01-20 -->
3
+
1
4
  # Relentless Agent Instructions
2
5
 
3
- You are an autonomous coding agent. Follow these instructions exactly.
6
+ You are an autonomous coding agent orchestrated by Relentless. Follow these instructions exactly.
4
7
 
5
8
  **This is a generic template. Personalize it for your project using:**
6
9
  ```bash
@@ -9,26 +12,110 @@ You are an autonomous coding agent. Follow these instructions exactly.
9
12
 
10
13
  ---
11
14
 
15
+ ## Before Starting ANY Story
16
+
17
+ **CRITICAL:** Read the feature artifacts in this order:
18
+
19
+ 1. **`spec.md`** - Read FULL file to understand requirements
20
+ 2. **`plan.md`** - Read FULL file to understand technical approach
21
+ 3. **`tasks.md`** - Read ONLY the section for your current story (US-XXX)
22
+ 4. **`checklist.md`** - Review quality criteria you must satisfy
23
+ 5. **`prd.json`** - Find your story and check routing metadata
24
+
25
+ This context is essential. Do NOT skip reading these files.
26
+
27
+ ---
28
+
12
29
  ## Your Task (Per Iteration)
13
30
 
14
- 1. Read `relentless/features/<feature>/prd.json`
15
- 2. Read `relentless/features/<feature>/progress.txt`
16
- 3. Check you're on the correct branch from PRD `branchName`
17
- 4. Pick the **highest priority** story where `passes: false`
31
+ 1. Check you're on the correct branch from PRD `branchName`
32
+ 2. Read feature artifacts (spec.md, plan.md, your story in tasks.md)
33
+ 3. Pick the **highest priority** story where `passes: false` and dependencies met
34
+ 4. Check story routing metadata for complexity/model guidance
18
35
  5. Review existing code to understand patterns
19
- 6. Implement the story
20
- 7. Run quality checks (typecheck, lint, test)
21
- 8. If ALL checks pass, commit: `feat: [Story ID] - [Story Title]`
22
- 9. Update PRD: set `passes: true`
23
- 10. Append progress to `progress.txt`
36
+ 6. **Write tests FIRST** (TDD is mandatory)
37
+ 7. Verify tests FAIL before implementation
38
+ 8. Implement the story to make tests PASS
39
+ 9. Run ALL quality checks (typecheck, lint, test)
40
+ 10. If ALL checks pass, commit: `feat: [Story ID] - [Story Title]`
41
+ 11. Update PRD: set `passes: true`
42
+ 12. Append progress to `progress.txt`
24
43
 
25
44
  ---
26
45
 
27
- ## Quality Requirements
46
+ ## TDD Workflow (MANDATORY)
47
+
48
+ You MUST follow Test-Driven Development:
49
+
50
+ ```
51
+ 1. Write test → 2. Run test (MUST FAIL) → 3. Implement → 4. Run test (MUST PASS)
52
+ ```
53
+
54
+ **Before implementing ANY code:**
55
+ - Write unit tests for the functionality
56
+ - Run tests to verify they FAIL
57
+ - Then implement the minimum code to make them PASS
58
+
59
+ **Tests are NOT optional.** Every story must have test coverage.
60
+
61
+ ---
28
62
 
29
- Before marking a story complete:
30
- - [ ] All quality checks pass (typecheck, lint, test)
31
- - [ ] Zero errors and zero warnings
63
+ ## Quality Gates (Non-Negotiable)
64
+
65
+ Before marking ANY story as complete, run these commands:
66
+
67
+ ```bash
68
+ # TypeScript check (customize for your project)
69
+ bun run typecheck # or: npx tsc --noEmit
70
+
71
+ # Linting (customize for your project)
72
+ bun run lint # or: npx eslint .
73
+
74
+ # Tests (customize for your project)
75
+ bun test # or: npm test
76
+ ```
77
+
78
+ **ALL checks must pass with ZERO errors and ZERO warnings.**
79
+
80
+ If ANY check fails:
81
+ 1. Fix the issue
82
+ 2. Re-run all checks
83
+ 3. Only then mark the story complete
84
+
85
+ ---
86
+
87
+ ## Routing Awareness
88
+
89
+ Stories in `prd.json` may have routing metadata:
90
+
91
+ ```json
92
+ {
93
+ "routing": {
94
+ "complexity": "medium",
95
+ "harness": "claude",
96
+ "model": "sonnet-4.5",
97
+ "estimatedCost": 0.0034
98
+ }
99
+ }
100
+ ```
101
+
102
+ **What this means:**
103
+ - **complexity**: How hard the task is (simple/medium/complex/expert)
104
+ - **harness/model**: Which AI was chosen for this task
105
+ - **estimatedCost**: Pre-execution cost estimate
106
+
107
+ After completion, execution history is saved for cost tracking.
108
+
109
+ ---
110
+
111
+ ## Checklist Validation
112
+
113
+ Before completing a story, verify against `checklist.md`:
114
+
115
+ - [ ] All acceptance criteria from tasks.md satisfied
116
+ - [ ] Tests written and passing
117
+ - [ ] Typecheck passes
118
+ - [ ] Lint passes
32
119
  - [ ] No debug code (console.log, debugger)
33
120
  - [ ] No unused imports or variables
34
121
  - [ ] Follows existing patterns
@@ -37,12 +124,22 @@ Before marking a story complete:
37
124
 
38
125
  ## Progress Report Format
39
126
 
40
- APPEND to progress.txt:
41
- ```
42
- ## [Date/Time] - [Story ID]
127
+ APPEND to `progress.txt` after each story:
128
+
129
+ ```markdown
130
+ ## [Date] - [Story ID]: [Story Title]
131
+
132
+ **Completed:**
43
133
  - What was implemented
44
134
  - Files changed
45
- - Learnings for future iterations
135
+
136
+ **Tests:**
137
+ - Tests written and passing
138
+
139
+ **Learnings:**
140
+ - Patterns discovered
141
+ - Gotchas for future iterations
142
+
46
143
  ---
47
144
  ```
48
145
 
@@ -52,12 +149,40 @@ APPEND to progress.txt:
52
149
 
53
150
  After completing a story, check if ALL stories have `passes: true`.
54
151
 
55
- If ALL complete:
152
+ If ALL complete, output:
56
153
  ```
57
154
  <promise>COMPLETE</promise>
58
155
  ```
59
156
 
60
- Otherwise, end normally (next iteration continues).
157
+ Otherwise, end normally (next iteration continues with next story).
158
+
159
+ ---
160
+
161
+ ## SpecKit Workflow Reference
162
+
163
+ The full Relentless workflow is:
164
+
165
+ ```
166
+ /relentless.specify → /relentless.plan → /relentless.tasks → /relentless.convert → /relentless.analyze → /relentless.implement
167
+ ```
168
+
169
+ Each step generates an artifact in `relentless/features/<feature>/`:
170
+ - `spec.md` - Feature specification
171
+ - `plan.md` - Technical implementation plan
172
+ - `tasks.md` - User stories with acceptance criteria
173
+ - `checklist.md` - Quality validation checklist
174
+ - `prd.json` - Machine-readable PRD with routing
175
+
176
+ ---
177
+
178
+ ## Common Mistakes to Avoid
179
+
180
+ 1. **Skipping spec/plan reading** - You MUST read context before coding
181
+ 2. **Writing code before tests** - TDD is mandatory, tests come FIRST
182
+ 3. **Ignoring lint warnings** - Zero warnings required, not just zero errors
183
+ 4. **Marking incomplete stories done** - Only mark `passes: true` when ALL criteria met
184
+ 5. **Not updating progress.txt** - Document learnings for future iterations
185
+ 6. **Committing broken code** - All quality checks must pass before commit
61
186
 
62
187
  ---
63
188
 
@@ -70,3 +195,8 @@ This is the default template. You should personalize `relentless/prompt.md` with
70
195
  - Project-specific gotchas
71
196
 
72
197
  Run `/relentless.constitution` to generate a personalized prompt.
198
+
199
+ ---
200
+
201
+ **Template Version:** 2.0.0
202
+ **Compatible with:** Relentless v0.2.0+