@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.
- package/.claude/commands/relentless.constitution.md +1 -1
- package/.claude/commands/relentless.convert.md +25 -0
- package/.claude/commands/relentless.specify.md +1 -1
- package/.claude/skills/analyze/SKILL.md +113 -40
- package/.claude/skills/analyze/templates/analysis-report.md +138 -0
- package/.claude/skills/checklist/SKILL.md +143 -51
- package/.claude/skills/checklist/templates/checklist.md +43 -11
- package/.claude/skills/clarify/SKILL.md +70 -11
- package/.claude/skills/constitution/SKILL.md +61 -3
- package/.claude/skills/constitution/templates/constitution.md +241 -160
- package/.claude/skills/constitution/templates/prompt.md +150 -20
- package/.claude/skills/convert/SKILL.md +248 -0
- package/.claude/skills/implement/SKILL.md +82 -34
- package/.claude/skills/plan/SKILL.md +136 -27
- package/.claude/skills/plan/templates/plan.md +92 -9
- package/.claude/skills/specify/SKILL.md +110 -19
- package/.claude/skills/specify/scripts/bash/create-new-feature.sh +2 -2
- package/.claude/skills/specify/scripts/bash/setup-plan.sh +1 -1
- package/.claude/skills/specify/templates/spec.md +40 -5
- package/.claude/skills/tasks/SKILL.md +75 -1
- package/.claude/skills/tasks/templates/tasks.md +5 -4
- package/CHANGELOG.md +63 -1
- package/MANUAL.md +40 -0
- package/README.md +263 -11
- package/bin/relentless.ts +292 -5
- package/package.json +2 -2
- package/relentless/config.json +46 -2
- package/relentless/constitution.md +2 -2
- package/relentless/prompt.md +97 -18
- package/src/agents/amp.ts +53 -13
- package/src/agents/claude.ts +70 -15
- package/src/agents/codex.ts +73 -14
- package/src/agents/droid.ts +68 -14
- package/src/agents/exec.ts +96 -0
- package/src/agents/gemini.ts +59 -16
- package/src/agents/opencode.ts +188 -9
- package/src/cli/fallback-order.ts +210 -0
- package/src/cli/index.ts +63 -0
- package/src/cli/mode-flag.ts +198 -0
- package/src/cli/review-flags.ts +192 -0
- package/src/config/loader.ts +16 -1
- package/src/config/schema.ts +157 -2
- package/src/execution/runner.ts +144 -21
- package/src/init/scaffolder.ts +285 -25
- package/src/prd/parser.ts +92 -1
- package/src/prd/types.ts +136 -0
- package/src/review/index.ts +92 -0
- package/src/review/prompt.ts +293 -0
- package/src/review/runner.ts +337 -0
- package/src/review/tasks/docs.ts +529 -0
- package/src/review/tasks/index.ts +80 -0
- package/src/review/tasks/lint.ts +436 -0
- package/src/review/tasks/quality.ts +760 -0
- package/src/review/tasks/security.ts +452 -0
- package/src/review/tasks/test.ts +456 -0
- package/src/review/tasks/typecheck.ts +323 -0
- package/src/review/types.ts +139 -0
- package/src/routing/cascade.ts +310 -0
- package/src/routing/classifier.ts +338 -0
- package/src/routing/estimate.ts +270 -0
- package/src/routing/fallback.ts +512 -0
- package/src/routing/index.ts +124 -0
- package/src/routing/registry.ts +501 -0
- package/src/routing/report.ts +570 -0
- package/src/routing/router.ts +287 -0
- package/src/tui/App.tsx +2 -0
- package/src/tui/TUIRunner.tsx +103 -8
- package/src/tui/components/CurrentStory.tsx +23 -1
- package/src/tui/hooks/useTUI.ts +1 -0
- package/src/tui/types.ts +9 -0
- package/.claude/skills/specify/scripts/bash/update-agent-context.sh +0 -799
|
@@ -22,7 +22,7 @@ The constitution skill (`.claude/skills/constitution/SKILL.md`) will guide you t
|
|
|
22
22
|
- Version control (branches, commits, CI/CD)
|
|
23
23
|
|
|
24
24
|
2. **Generate Constitution**: Create personalized governance document
|
|
25
|
-
- Load template from `.claude/skills/constitution/templates/constitution
|
|
25
|
+
- Load template from `.claude/skills/constitution/templates/constitution.md`
|
|
26
26
|
- Replace all placeholders with concrete values from user answers
|
|
27
27
|
- Ensure MUST/SHOULD rules are clear and testable
|
|
28
28
|
- Set version 1.0.0 for new, increment semantically for updates
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Convert tasks.md to prd.json with smart routing classification.
|
|
3
|
+
handoffs:
|
|
4
|
+
- label: Analyze Consistency
|
|
5
|
+
agent: relentless.analyze
|
|
6
|
+
prompt: Analyze cross-artifact consistency
|
|
7
|
+
send: true
|
|
8
|
+
- label: Start Implementation
|
|
9
|
+
agent: relentless.implement
|
|
10
|
+
prompt: Begin implementation
|
|
11
|
+
send: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Load the convert skill and convert tasks.md to prd.json with routing.
|
|
15
|
+
|
|
16
|
+
**Context:** $ARGUMENTS
|
|
17
|
+
|
|
18
|
+
The convert skill will:
|
|
19
|
+
1. Locate tasks.md in the current feature directory
|
|
20
|
+
2. Validate story structure, dependencies, and TDD compliance
|
|
21
|
+
3. Run `relentless convert` with routing classification
|
|
22
|
+
4. Display routing summary (complexity, harness, model, cost)
|
|
23
|
+
5. Report next steps
|
|
24
|
+
|
|
25
|
+
**Important:** Routing is ALWAYS included by default. This enables intelligent cost optimization.
|
|
@@ -27,7 +27,7 @@ The specify skill (`.claude/skills/specify/SKILL.md`) will guide you through:
|
|
|
27
27
|
2. **Load Context**
|
|
28
28
|
- Read `relentless/constitution.md` for governance rules
|
|
29
29
|
- Note MUST/SHOULD requirements for specifications
|
|
30
|
-
- Load spec template from `.claude/skills/specify/templates/spec
|
|
30
|
+
- Load spec template from `.claude/skills/specify/templates/spec.md`
|
|
31
31
|
|
|
32
32
|
3. **Generate Specification**
|
|
33
33
|
- Extract key concepts: actors, actions, data, constraints
|
|
@@ -9,12 +9,36 @@ Validate consistency across feature artifacts before implementation.
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## SpecKit Workflow
|
|
13
|
+
|
|
14
|
+
This skill is **Step 5 of 6** in the Relentless workflow:
|
|
15
|
+
|
|
16
|
+
specify → plan → tasks → convert → **analyze** → implement
|
|
17
|
+
|
|
18
|
+
Prerequisites (ALL must exist):
|
|
19
|
+
- `spec.md` - Feature specification
|
|
20
|
+
- `plan.md` - Technical implementation plan
|
|
21
|
+
- `tasks.md` - User stories and tasks
|
|
22
|
+
- `prd.json` - Converted PRD with routing metadata (run convert first)
|
|
23
|
+
- `checklist.md` - Quality validation checklist (recommended)
|
|
24
|
+
|
|
25
|
+
Purpose:
|
|
26
|
+
- Validate consistency across ALL artifacts
|
|
27
|
+
- Catch gaps before implementation begins
|
|
28
|
+
- **Ensure TDD and routing compliance**
|
|
29
|
+
- **Verify quality gates are defined**
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
12
33
|
## The Job
|
|
13
34
|
|
|
14
35
|
1. Read all feature artifacts
|
|
15
36
|
2. Check for consistency issues
|
|
16
|
-
3. Validate
|
|
17
|
-
4.
|
|
37
|
+
3. **Validate TDD compliance**
|
|
38
|
+
4. **Validate routing metadata**
|
|
39
|
+
5. **Validate quality gates**
|
|
40
|
+
6. Validate against constitution
|
|
41
|
+
7. Generate analysis report
|
|
18
42
|
|
|
19
43
|
---
|
|
20
44
|
|
|
@@ -25,10 +49,10 @@ Required:
|
|
|
25
49
|
- `relentless/features/NNN-feature/spec.md`
|
|
26
50
|
- `relentless/features/NNN-feature/plan.md`
|
|
27
51
|
- `relentless/features/NNN-feature/tasks.md`
|
|
52
|
+
- `relentless/features/NNN-feature/prd.json`
|
|
28
53
|
- `relentless/features/NNN-feature/checklist.md`
|
|
29
54
|
|
|
30
55
|
Optional:
|
|
31
|
-
- `relentless/features/NNN-feature/prd.json`
|
|
32
56
|
- `relentless/features/NNN-feature/progress.txt`
|
|
33
57
|
|
|
34
58
|
---
|
|
@@ -41,33 +65,69 @@ Optional:
|
|
|
41
65
|
- [ ] Plan addresses all spec requirements
|
|
42
66
|
- [ ] Checklist covers all tasks
|
|
43
67
|
|
|
44
|
-
### 2.
|
|
68
|
+
### 2. TDD Compliance Validation (MANDATORY)
|
|
69
|
+
|
|
70
|
+
Verify that:
|
|
71
|
+
- [ ] Every story in tasks.md has test acceptance criteria
|
|
72
|
+
- [ ] Test specifications exist in plan.md
|
|
73
|
+
- [ ] Checklist includes test validation items
|
|
74
|
+
- [ ] No stories marked "tests optional"
|
|
75
|
+
- [ ] Given/When/Then format used in acceptance criteria
|
|
76
|
+
|
|
77
|
+
**Flag as CRITICAL if TDD requirements are missing.**
|
|
78
|
+
|
|
79
|
+
### 3. Routing Metadata Validation (MANDATORY)
|
|
80
|
+
|
|
81
|
+
Verify that prd.json contains for EVERY story:
|
|
82
|
+
- [ ] `routing.complexity` - simple/medium/complex/expert
|
|
83
|
+
- [ ] `routing.harness` - claude/gemini/codex/opencode/amp/droid
|
|
84
|
+
- [ ] `routing.model` - specific model name
|
|
85
|
+
- [ ] `routing.mode` - free/cheap/good/genius
|
|
86
|
+
- [ ] `routing.estimatedCost` - cost in USD
|
|
87
|
+
|
|
88
|
+
Also verify:
|
|
89
|
+
- [ ] Routing preference in spec.md matches prd.json routing mode
|
|
90
|
+
- [ ] Complexity classifications are reasonable for story scope
|
|
91
|
+
|
|
92
|
+
**Flag as CRITICAL if routing metadata is missing.**
|
|
93
|
+
|
|
94
|
+
### 4. Quality Gates Validation (MANDATORY)
|
|
95
|
+
|
|
96
|
+
Verify that ALL THREE quality gates are present in acceptance criteria:
|
|
97
|
+
- [ ] Typecheck requirement (`bun run typecheck` passes with 0 errors)
|
|
98
|
+
- [ ] Lint requirement (`bun run lint` passes with 0 errors AND 0 warnings)
|
|
99
|
+
- [ ] Test requirement (`bun test` passes)
|
|
100
|
+
|
|
101
|
+
**Flag as CRITICAL if any quality gate is missing.**
|
|
102
|
+
|
|
103
|
+
### 5. Constitution Compliance
|
|
45
104
|
- [ ] Plan follows MUST rules
|
|
46
105
|
- [ ] Tasks include required quality checks
|
|
47
106
|
- [ ] Testing requirements met
|
|
48
107
|
- [ ] Security requirements addressed
|
|
108
|
+
- [ ] No `any` types planned
|
|
49
109
|
|
|
50
|
-
###
|
|
110
|
+
### 6. Dependency Consistency
|
|
51
111
|
- [ ] Task dependencies are valid (no circular refs)
|
|
52
112
|
- [ ] Referenced dependencies exist
|
|
53
113
|
- [ ] Dependency order makes sense
|
|
54
114
|
|
|
55
|
-
###
|
|
115
|
+
### 7. Scope Consistency
|
|
56
116
|
- [ ] Plan doesn't include out-of-scope items
|
|
57
117
|
- [ ] Tasks match plan scope
|
|
58
118
|
- [ ] No scope creep in checklist
|
|
59
119
|
|
|
60
|
-
###
|
|
120
|
+
### 8. Data Model Consistency
|
|
61
121
|
- [ ] Entities mentioned in spec are in plan
|
|
62
122
|
- [ ] Plan data models match spec requirements
|
|
63
123
|
- [ ] Tasks create required entities
|
|
64
124
|
|
|
65
|
-
###
|
|
125
|
+
### 9. API Consistency
|
|
66
126
|
- [ ] Endpoints in plan match spec scenarios
|
|
67
127
|
- [ ] Tasks implement all planned endpoints
|
|
68
128
|
- [ ] Checklist validates all endpoints
|
|
69
129
|
|
|
70
|
-
###
|
|
130
|
+
### 10. Testing Coverage
|
|
71
131
|
- [ ] Each task has test acceptance criteria
|
|
72
132
|
- [ ] Checklist includes test validation
|
|
73
133
|
- [ ] Test types match constitution requirements
|
|
@@ -76,15 +136,19 @@ Optional:
|
|
|
76
136
|
|
|
77
137
|
## Issue Severity
|
|
78
138
|
|
|
79
|
-
**CRITICAL:** Blocks implementation
|
|
139
|
+
**CRITICAL:** Blocks implementation - MUST fix before proceeding
|
|
80
140
|
- Constitution MUST rule violations
|
|
141
|
+
- **Missing TDD requirements**
|
|
142
|
+
- **Missing routing metadata in prd.json**
|
|
143
|
+
- **Missing quality gate requirements**
|
|
81
144
|
- Circular dependencies
|
|
82
145
|
- Missing required artifacts
|
|
83
146
|
|
|
84
147
|
**WARNING:** Should fix before implementation
|
|
85
148
|
- Incomplete coverage of requirements
|
|
86
149
|
- Ambiguous acceptance criteria
|
|
87
|
-
- Missing test criteria
|
|
150
|
+
- Missing test criteria for some stories
|
|
151
|
+
- Routing preference mismatch (spec vs prd.json)
|
|
88
152
|
|
|
89
153
|
**INFO:** Nice to have
|
|
90
154
|
- Style inconsistencies
|
|
@@ -95,48 +159,54 @@ Optional:
|
|
|
95
159
|
|
|
96
160
|
## Report Format
|
|
97
161
|
|
|
162
|
+
Use the template at `templates/analysis-report.md`:
|
|
163
|
+
|
|
98
164
|
```markdown
|
|
99
|
-
# Consistency Analysis
|
|
165
|
+
# Consistency Analysis Report
|
|
100
166
|
|
|
101
|
-
**
|
|
102
|
-
**
|
|
167
|
+
**Feature:** [feature-name]
|
|
168
|
+
**Date:** [date]
|
|
169
|
+
**Status:** [PASS | FAIL | WARNINGS]
|
|
103
170
|
|
|
104
171
|
## Summary
|
|
105
|
-
- Stories: N/M completed
|
|
106
|
-
- Issues: X total (Y critical, Z warnings, W info)
|
|
107
172
|
|
|
108
|
-
|
|
173
|
+
| Category | Status | Issues |
|
|
174
|
+
|----------|--------|--------|
|
|
175
|
+
| Completeness | ✅/❌ | [count] |
|
|
176
|
+
| TDD Compliance | ✅/❌ | [count] |
|
|
177
|
+
| Routing Validation | ✅/❌ | [count] |
|
|
178
|
+
| Quality Gates | ✅/❌ | [count] |
|
|
179
|
+
| Constitution | ✅/❌ | [count] |
|
|
180
|
+
| Dependencies | ✅/❌ | [count] |
|
|
109
181
|
|
|
110
|
-
|
|
111
|
-
**Location:** tasks.md
|
|
112
|
-
**Details:** US-002 depends on US-003, US-003 depends on US-002
|
|
113
|
-
**Fix:** Remove circular dependency, reorder tasks
|
|
182
|
+
## Critical Issues
|
|
114
183
|
|
|
115
|
-
|
|
184
|
+
### CRIT-001: [Issue Title]
|
|
185
|
+
**Location:** [file]
|
|
186
|
+
**Details:** [description]
|
|
187
|
+
**Fix:** [required action]
|
|
116
188
|
|
|
117
|
-
|
|
118
|
-
**Location:** tasks.md, US-004
|
|
119
|
-
**Details:** No integration test in acceptance criteria
|
|
120
|
-
**Fix:** Add integration test requirement
|
|
189
|
+
## Recommendations
|
|
121
190
|
|
|
122
|
-
|
|
191
|
+
1. [Action item 1]
|
|
192
|
+
2. [Action item 2]
|
|
123
193
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
**Details:** No performance validation for US-005
|
|
127
|
-
**Suggestion:** Add performance checklist item
|
|
194
|
+
**Next Step:** /relentless.implement (if PASS) or fix issues (if FAIL)
|
|
195
|
+
```
|
|
128
196
|
|
|
129
|
-
|
|
197
|
+
---
|
|
130
198
|
|
|
131
|
-
|
|
132
|
-
2. Address WARNINGS for better quality
|
|
133
|
-
3. Consider INFO items for completeness
|
|
199
|
+
## Output
|
|
134
200
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
201
|
+
1. Save analysis report to `relentless/features/NNN-feature/analysis-report.md`
|
|
202
|
+
2. Update progress.txt with analysis results
|
|
203
|
+
3. Report:
|
|
204
|
+
- Overall status: PASS/FAIL/WARNINGS
|
|
205
|
+
- Critical issues count
|
|
206
|
+
- TDD compliance: PASS/FAIL
|
|
207
|
+
- Routing validation: PASS/FAIL
|
|
208
|
+
- Quality gates: PASS/FAIL
|
|
209
|
+
- Next step: `/relentless.implement` or fix issues
|
|
140
210
|
|
|
141
211
|
---
|
|
142
212
|
|
|
@@ -144,6 +214,9 @@ Optional:
|
|
|
144
214
|
|
|
145
215
|
- Run before starting implementation
|
|
146
216
|
- Constitution compliance is non-negotiable
|
|
217
|
+
- **TDD compliance is non-negotiable**
|
|
218
|
+
- **Routing metadata is required for all stories**
|
|
219
|
+
- **Quality gates (typecheck, lint, test) are mandatory**
|
|
147
220
|
- Fix critical issues immediately
|
|
148
221
|
- Warnings can sometimes be deferred
|
|
149
222
|
- Re-run after making fixes
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Consistency Analysis Report
|
|
2
|
+
|
|
3
|
+
**Feature:** [feature-name]
|
|
4
|
+
**Date:** [date]
|
|
5
|
+
**Status:** [PASS | FAIL | WARNINGS]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Summary
|
|
10
|
+
|
|
11
|
+
| Category | Status | Issues |
|
|
12
|
+
|----------|--------|--------|
|
|
13
|
+
| Completeness | ✅/❌ | [count] |
|
|
14
|
+
| TDD Compliance | ✅/❌ | [count] |
|
|
15
|
+
| Routing Validation | ✅/❌ | [count] |
|
|
16
|
+
| Quality Gates | ✅/❌ | [count] |
|
|
17
|
+
| Constitution | ✅/❌ | [count] |
|
|
18
|
+
| Dependencies | ✅/❌ | [count] |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## TDD Compliance
|
|
23
|
+
|
|
24
|
+
- [ ] Every story has test acceptance criteria
|
|
25
|
+
- [ ] Test specifications in plan.md
|
|
26
|
+
- [ ] Checklist includes test items
|
|
27
|
+
- [ ] Given/When/Then format used
|
|
28
|
+
|
|
29
|
+
**Issues Found:**
|
|
30
|
+
- [List any TDD gaps]
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Routing Validation
|
|
35
|
+
|
|
36
|
+
- [ ] Routing preference in spec.md
|
|
37
|
+
- [ ] Routing carried to plan.md
|
|
38
|
+
- [ ] prd.json has routing metadata for all stories
|
|
39
|
+
- [ ] Complexity classifications reasonable
|
|
40
|
+
|
|
41
|
+
**Stories with routing metadata:**
|
|
42
|
+
| Story ID | Complexity | Harness | Model | Mode | Cost |
|
|
43
|
+
|----------|------------|---------|-------|------|------|
|
|
44
|
+
| US-001 | [value] | [value] | [value] | [value] | [value] |
|
|
45
|
+
|
|
46
|
+
**Issues Found:**
|
|
47
|
+
- [List any routing gaps]
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Quality Gates
|
|
52
|
+
|
|
53
|
+
- [ ] Typecheck in acceptance criteria (0 errors)
|
|
54
|
+
- [ ] Lint in acceptance criteria (0 errors, 0 warnings)
|
|
55
|
+
- [ ] Test in acceptance criteria
|
|
56
|
+
|
|
57
|
+
**Issues Found:**
|
|
58
|
+
- [List any quality gate gaps]
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Critical Issues
|
|
63
|
+
|
|
64
|
+
### CRIT-001: [Issue Title]
|
|
65
|
+
**Location:** [file:line]
|
|
66
|
+
**Details:** [description of the issue]
|
|
67
|
+
**Impact:** [what breaks if not fixed]
|
|
68
|
+
**Fix:** [required action]
|
|
69
|
+
|
|
70
|
+
### CRIT-002: [Issue Title]
|
|
71
|
+
**Location:** [file:line]
|
|
72
|
+
**Details:** [description]
|
|
73
|
+
**Impact:** [what breaks]
|
|
74
|
+
**Fix:** [required action]
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Warnings
|
|
79
|
+
|
|
80
|
+
### WARN-001: [Issue Title]
|
|
81
|
+
**Location:** [file:line]
|
|
82
|
+
**Details:** [description]
|
|
83
|
+
**Suggestion:** [recommended fix]
|
|
84
|
+
|
|
85
|
+
### WARN-002: [Issue Title]
|
|
86
|
+
**Location:** [file:line]
|
|
87
|
+
**Details:** [description]
|
|
88
|
+
**Suggestion:** [recommended fix]
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Info
|
|
93
|
+
|
|
94
|
+
### INFO-001: [Issue Title]
|
|
95
|
+
**Location:** [file:line]
|
|
96
|
+
**Details:** [description]
|
|
97
|
+
**Suggestion:** [optional improvement]
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Completeness Matrix
|
|
102
|
+
|
|
103
|
+
| Spec Requirement | Plan Section | Task(s) | Checklist Item |
|
|
104
|
+
|------------------|--------------|---------|----------------|
|
|
105
|
+
| REQ-001: [name] | [section] | US-XXX | CHK-XXX |
|
|
106
|
+
| REQ-002: [name] | [section] | US-XXX | CHK-XXX |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Recommendations
|
|
111
|
+
|
|
112
|
+
1. [Action item 1 - priority]
|
|
113
|
+
2. [Action item 2 - priority]
|
|
114
|
+
3. [Action item 3 - priority]
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Next Steps
|
|
119
|
+
|
|
120
|
+
**If PASS:**
|
|
121
|
+
- Ready for `/relentless.implement`
|
|
122
|
+
- All critical checks passed
|
|
123
|
+
- TDD, routing, and quality gates validated
|
|
124
|
+
|
|
125
|
+
**If FAIL:**
|
|
126
|
+
1. Fix all CRITICAL issues
|
|
127
|
+
2. Re-run `/relentless.analyze`
|
|
128
|
+
3. Proceed to implement only after PASS
|
|
129
|
+
|
|
130
|
+
**If WARNINGS:**
|
|
131
|
+
- Can proceed with caution
|
|
132
|
+
- Address warnings during implementation
|
|
133
|
+
- Document any deferred items
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
**Analysis completed by:** /relentless.analyze
|
|
138
|
+
**Timestamp:** [datetime]
|
|
@@ -9,12 +9,74 @@ Generate domain-specific quality checklists to validate implementation completen
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## SpecKit Workflow
|
|
13
|
+
|
|
14
|
+
This skill runs **after tasks, before analyze**:
|
|
15
|
+
|
|
16
|
+
specify → plan → tasks → convert → **checklist** → analyze → implement
|
|
17
|
+
|
|
18
|
+
Purpose:
|
|
19
|
+
- Generate validation checklist from spec/plan/tasks
|
|
20
|
+
- **Ensure quality gates are defined**
|
|
21
|
+
- **Ensure TDD requirements are included**
|
|
22
|
+
- **Ensure routing compliance is checked**
|
|
23
|
+
- Provide implement phase with verification criteria
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## TDD is MANDATORY
|
|
28
|
+
|
|
29
|
+
Every generated checklist MUST include these testing items:
|
|
30
|
+
|
|
31
|
+
### Testing & TDD (Required for ALL stories)
|
|
32
|
+
- [ ] Unit tests written BEFORE implementation
|
|
33
|
+
- [ ] Unit tests verified to FAIL before coding
|
|
34
|
+
- [ ] Integration tests for API/data flows
|
|
35
|
+
- [ ] E2E tests for user-facing flows
|
|
36
|
+
- [ ] Test coverage meets 80% target
|
|
37
|
+
- [ ] All tests pass
|
|
38
|
+
|
|
39
|
+
**These items are non-negotiable and must appear in every checklist.**
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Mandatory Quality Gates
|
|
44
|
+
|
|
45
|
+
Every story in the checklist MUST include:
|
|
46
|
+
|
|
47
|
+
### Quality Gates (Non-Negotiable)
|
|
48
|
+
- [ ] `bun run typecheck` passes with 0 errors
|
|
49
|
+
- [ ] `bun run lint` passes with 0 errors AND 0 warnings
|
|
50
|
+
- [ ] `bun test` passes
|
|
51
|
+
- [ ] No debug code (console.log, debugger)
|
|
52
|
+
- [ ] No unused imports or variables
|
|
53
|
+
|
|
54
|
+
**All three commands must pass - no exceptions.**
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Routing Validation Items
|
|
59
|
+
|
|
60
|
+
Every checklist MUST include:
|
|
61
|
+
|
|
62
|
+
### Routing Compliance
|
|
63
|
+
- [ ] Routing preference documented in spec.md
|
|
64
|
+
- [ ] prd.json has routing metadata for all stories
|
|
65
|
+
- [ ] Complexity classifications match story scope
|
|
66
|
+
- [ ] Estimated costs are reasonable
|
|
67
|
+
- [ ] Mode selection (free/cheap/good/genius) is appropriate
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
12
71
|
## The Job
|
|
13
72
|
|
|
14
73
|
1. Read spec.md, plan.md, and tasks.md
|
|
15
74
|
2. Extract quality requirements from constitution
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
75
|
+
3. **Include mandatory TDD items**
|
|
76
|
+
4. **Include mandatory quality gate items**
|
|
77
|
+
5. **Include routing compliance items**
|
|
78
|
+
6. Generate comprehensive checklist
|
|
79
|
+
7. Save to `checklist.md`
|
|
18
80
|
|
|
19
81
|
**Important:** Checklist items get merged into prd.json acceptance criteria!
|
|
20
82
|
|
|
@@ -40,14 +102,18 @@ Read:
|
|
|
40
102
|
|
|
41
103
|
## Step 3: Generate Checklist Categories
|
|
42
104
|
|
|
43
|
-
Create
|
|
105
|
+
Create 7-10 categories based on feature domain:
|
|
44
106
|
|
|
45
|
-
**
|
|
107
|
+
**Mandatory Categories (always include):**
|
|
108
|
+
- **0. Quality Gates** - typecheck, lint, test
|
|
109
|
+
- **1. TDD Compliance** - tests before code
|
|
110
|
+
- **2. Routing Compliance** - metadata validation
|
|
111
|
+
|
|
112
|
+
**Common Categories (include as needed):**
|
|
46
113
|
- Schema & Database
|
|
47
114
|
- Backend Logic
|
|
48
115
|
- Frontend Components (if applicable)
|
|
49
116
|
- API Integration
|
|
50
|
-
- Testing & Validation
|
|
51
117
|
- Security & Permissions
|
|
52
118
|
- Performance & UX
|
|
53
119
|
- Documentation
|
|
@@ -70,18 +136,18 @@ For each category, create 5-10 specific validation items:
|
|
|
70
136
|
- 80% of items should reference specific user stories `[US-XXX]`
|
|
71
137
|
- 20% should identify gaps, ambiguities, or edge cases
|
|
72
138
|
- Each item must be specific and testable
|
|
73
|
-
- Total:
|
|
139
|
+
- Total: 30-50 items across all categories
|
|
74
140
|
|
|
75
141
|
---
|
|
76
142
|
|
|
77
143
|
## Step 5: Reference Constitution
|
|
78
144
|
|
|
79
145
|
Ensure checklist includes items for constitution MUST rules:
|
|
80
|
-
- Type safety requirements
|
|
81
|
-
- Testing coverage
|
|
146
|
+
- Type safety requirements (no `any` types)
|
|
147
|
+
- Testing coverage (80% minimum)
|
|
82
148
|
- Security standards
|
|
83
149
|
- Performance expectations
|
|
84
|
-
- Code quality standards
|
|
150
|
+
- Code quality standards (0 lint warnings)
|
|
85
151
|
|
|
86
152
|
---
|
|
87
153
|
|
|
@@ -91,9 +157,10 @@ Ensure checklist includes items for constitution MUST rules:
|
|
|
91
157
|
2. Report:
|
|
92
158
|
- Total checklist items: N
|
|
93
159
|
- Items per category
|
|
160
|
+
- Mandatory items included: TDD ✓, Quality Gates ✓, Routing ✓
|
|
94
161
|
- Constitution compliance items: N
|
|
95
162
|
- Gaps identified: N
|
|
96
|
-
- Next step:
|
|
163
|
+
- Next step: `/relentless.convert` (if not done) or `/relentless.analyze`
|
|
97
164
|
|
|
98
165
|
---
|
|
99
166
|
|
|
@@ -106,60 +173,84 @@ Ensure checklist includes items for constitution MUST rules:
|
|
|
106
173
|
**Created:** 2026-01-11
|
|
107
174
|
**Feature:** [spec.md](./spec.md)
|
|
108
175
|
|
|
109
|
-
##
|
|
176
|
+
## 0. Quality Gates (MANDATORY - Every Story)
|
|
177
|
+
|
|
178
|
+
- [ ] CHK-001 `bun run typecheck` passes with 0 errors
|
|
179
|
+
- [ ] CHK-002 `bun run lint` passes with 0 errors AND 0 warnings
|
|
180
|
+
- [ ] CHK-003 `bun test` passes
|
|
181
|
+
- [ ] CHK-004 No debug code (console.log, debugger statements)
|
|
182
|
+
- [ ] CHK-005 No unused imports or variables
|
|
183
|
+
|
|
184
|
+
## 1. TDD Compliance (MANDATORY)
|
|
185
|
+
|
|
186
|
+
- [ ] CHK-006 Tests written BEFORE implementation code
|
|
187
|
+
- [ ] CHK-007 Tests verified to FAIL before writing implementation
|
|
188
|
+
- [ ] CHK-008 Unit test coverage ≥80%
|
|
189
|
+
- [ ] CHK-009 Integration tests for all API endpoints
|
|
190
|
+
- [ ] CHK-010 E2E tests for complete user flows
|
|
191
|
+
|
|
192
|
+
## 2. Routing Compliance (MANDATORY)
|
|
193
|
+
|
|
194
|
+
- [ ] CHK-011 Routing preference documented in spec.md
|
|
195
|
+
- [ ] CHK-012 prd.json has routing metadata for all stories
|
|
196
|
+
- [ ] CHK-013 Complexity classifications correct for story scope
|
|
197
|
+
- [ ] CHK-014 Estimated costs are reasonable
|
|
198
|
+
- [ ] CHK-015 Mode selection appropriate for complexity
|
|
199
|
+
|
|
200
|
+
## 3. Schema & Database
|
|
110
201
|
|
|
111
|
-
- [ ] CHK-
|
|
112
|
-
- [ ] CHK-
|
|
113
|
-
- [ ] CHK-
|
|
114
|
-
- [ ] CHK-
|
|
115
|
-
- [ ] CHK-
|
|
202
|
+
- [ ] CHK-016 [US-001] User table has all required fields (id, email, password_hash, confirmed, timestamps)
|
|
203
|
+
- [ ] CHK-017 [US-001] Email field has UNIQUE constraint
|
|
204
|
+
- [ ] CHK-018 [US-001] Indexes created on frequently queried fields (email)
|
|
205
|
+
- [ ] CHK-019 [Gap] Consider adding last_login_at timestamp for analytics
|
|
206
|
+
- [ ] CHK-020 [US-001] Migration script tested on clean database
|
|
116
207
|
|
|
117
|
-
## Backend Logic
|
|
208
|
+
## 4. Backend Logic
|
|
118
209
|
|
|
119
|
-
- [ ] CHK-
|
|
120
|
-
- [ ] CHK-
|
|
121
|
-
- [ ] CHK-
|
|
122
|
-
- [ ] CHK-
|
|
123
|
-
- [ ] CHK-
|
|
210
|
+
- [ ] CHK-021 [US-001] Password hashing uses bcrypt with appropriate cost factor
|
|
211
|
+
- [ ] CHK-022 [US-001] Email validation prevents common typos and invalid formats
|
|
212
|
+
- [ ] CHK-023 [US-002] JWT tokens include user ID and expiration
|
|
213
|
+
- [ ] CHK-024 [US-002] Token verification handles expired tokens gracefully
|
|
214
|
+
- [ ] CHK-025 [Ambiguity] Password reset flow not specified - out of scope?
|
|
124
215
|
|
|
125
|
-
## API Integration
|
|
216
|
+
## 5. API Integration
|
|
126
217
|
|
|
127
|
-
- [ ] CHK-
|
|
128
|
-
- [ ] CHK-
|
|
129
|
-
- [ ] CHK-
|
|
130
|
-
- [ ] CHK-
|
|
131
|
-
- [ ] CHK-
|
|
132
|
-
- [ ] CHK-
|
|
218
|
+
- [ ] CHK-026 [US-001] POST /api/auth/register returns 201 on success
|
|
219
|
+
- [ ] CHK-027 [US-001] Register endpoint returns 400 for invalid email
|
|
220
|
+
- [ ] CHK-028 [US-001] Register endpoint returns 409 for duplicate email
|
|
221
|
+
- [ ] CHK-029 [US-002] POST /api/auth/login returns 401 for wrong password
|
|
222
|
+
- [ ] CHK-030 [US-002] Login endpoint returns 403 for unconfirmed account
|
|
223
|
+
- [ ] CHK-031 [Edge Case] Rate limiting on auth endpoints to prevent brute force
|
|
133
224
|
|
|
134
|
-
## Testing & Validation
|
|
225
|
+
## 6. Testing & Validation
|
|
135
226
|
|
|
136
|
-
- [ ] CHK-
|
|
137
|
-
- [ ] CHK-
|
|
138
|
-
- [ ] CHK-
|
|
139
|
-
- [ ] CHK-
|
|
140
|
-
- [ ] CHK-
|
|
141
|
-
- [ ] CHK-
|
|
227
|
+
- [ ] CHK-032 [US-001] Unit tests for password hashing utility
|
|
228
|
+
- [ ] CHK-033 [US-001] Unit tests for email validation
|
|
229
|
+
- [ ] CHK-034 [US-002] Integration test for full registration flow
|
|
230
|
+
- [ ] CHK-035 [US-002] Integration test for login flow
|
|
231
|
+
- [ ] CHK-036 [US-003] E2E test for email confirmation
|
|
232
|
+
- [ ] CHK-037 [Constitution] Test coverage meets minimum 80% requirement
|
|
142
233
|
|
|
143
|
-
## Security & Permissions
|
|
234
|
+
## 7. Security & Permissions
|
|
144
235
|
|
|
145
|
-
- [ ] CHK-
|
|
146
|
-
- [ ] CHK-
|
|
147
|
-
- [ ] CHK-
|
|
148
|
-
- [ ] CHK-
|
|
149
|
-
- [ ] CHK-
|
|
236
|
+
- [ ] CHK-038 [US-001] Passwords never logged or exposed in errors
|
|
237
|
+
- [ ] CHK-039 [US-001] Password requirements enforced (min length, complexity)
|
|
238
|
+
- [ ] CHK-040 [US-002] JWT secret stored in environment variable, not code
|
|
239
|
+
- [ ] CHK-041 [US-002] Token expiration validated on every request
|
|
240
|
+
- [ ] CHK-042 [Gap] Consider adding account lockout after N failed attempts
|
|
150
241
|
|
|
151
|
-
## Performance & UX
|
|
242
|
+
## 8. Performance & UX
|
|
152
243
|
|
|
153
|
-
- [ ] CHK-
|
|
154
|
-
- [ ] CHK-
|
|
155
|
-
- [ ] CHK-
|
|
156
|
-
- [ ] CHK-
|
|
244
|
+
- [ ] CHK-043 [US-001] Registration completes within 2 seconds
|
|
245
|
+
- [ ] CHK-044 [US-002] Login completes within 1 second
|
|
246
|
+
- [ ] CHK-045 [US-003] Confirmation email sent within 30 seconds
|
|
247
|
+
- [ ] CHK-046 [Edge Case] Graceful handling when email service is down
|
|
157
248
|
|
|
158
|
-
## Documentation
|
|
249
|
+
## 9. Documentation
|
|
159
250
|
|
|
160
|
-
- [ ] CHK-
|
|
161
|
-
- [ ] CHK-
|
|
162
|
-
- [ ] CHK-
|
|
251
|
+
- [ ] CHK-047 API endpoints documented with examples
|
|
252
|
+
- [ ] CHK-048 Environment variables documented in README
|
|
253
|
+
- [ ] CHK-049 Database schema documented
|
|
163
254
|
```
|
|
164
255
|
|
|
165
256
|
---
|
|
@@ -171,3 +262,4 @@ Ensure checklist includes items for constitution MUST rules:
|
|
|
171
262
|
- Identify gaps and ambiguities with `[Gap]` and `[Ambiguity]` tags
|
|
172
263
|
- Each item must be independently verifiable
|
|
173
264
|
- Balance between comprehensiveness and practicality
|
|
265
|
+
- **Mandatory sections (Quality Gates, TDD, Routing) must always be included**
|