@arvorco/relentless 0.3.1 → 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.convert.md +25 -0
- 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/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 +262 -10
- 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
|
@@ -6,31 +6,60 @@
|
|
|
6
6
|
|
|
7
7
|
**Note**: This checklist is generated by the `/relentless.checklist` command based on feature context and requirements.
|
|
8
8
|
|
|
9
|
-
<!--
|
|
9
|
+
<!--
|
|
10
10
|
============================================================================
|
|
11
11
|
IMPORTANT: The checklist items below are SAMPLE ITEMS for illustration only.
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
The /relentless.checklist command MUST replace these with actual items based on:
|
|
14
14
|
- User's specific checklist request
|
|
15
15
|
- Feature requirements from spec.md
|
|
16
16
|
- Technical context from plan.md
|
|
17
17
|
- Implementation details from tasks.md
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
MANDATORY SECTIONS (must always be included):
|
|
20
|
+
- 0. Quality Gates - typecheck, lint, test
|
|
21
|
+
- 1. TDD Compliance - tests before code
|
|
22
|
+
- 2. Routing Compliance - metadata validation
|
|
23
|
+
|
|
19
24
|
DO NOT keep these sample items in the generated checklist file.
|
|
20
25
|
============================================================================
|
|
21
26
|
-->
|
|
22
27
|
|
|
23
|
-
##
|
|
28
|
+
## 0. Quality Gates (MANDATORY - Every Story)
|
|
29
|
+
|
|
30
|
+
- [ ] CHK-001 `bun run typecheck` passes with 0 errors
|
|
31
|
+
- [ ] CHK-002 `bun run lint` passes with 0 errors AND 0 warnings
|
|
32
|
+
- [ ] CHK-003 `bun test` passes
|
|
33
|
+
- [ ] CHK-004 No debug code (console.log, debugger statements)
|
|
34
|
+
- [ ] CHK-005 No unused imports or variables
|
|
35
|
+
|
|
36
|
+
## 1. TDD Compliance (MANDATORY)
|
|
37
|
+
|
|
38
|
+
- [ ] CHK-006 Tests written BEFORE implementation code
|
|
39
|
+
- [ ] CHK-007 Tests verified to FAIL before writing implementation
|
|
40
|
+
- [ ] CHK-008 Unit test coverage ≥80%
|
|
41
|
+
- [ ] CHK-009 Integration tests for all API endpoints
|
|
42
|
+
- [ ] CHK-010 E2E tests for complete user flows
|
|
43
|
+
|
|
44
|
+
## 2. Routing Compliance (MANDATORY)
|
|
45
|
+
|
|
46
|
+
- [ ] CHK-011 Routing preference documented in spec.md
|
|
47
|
+
- [ ] CHK-012 prd.json has routing metadata for all stories
|
|
48
|
+
- [ ] CHK-013 Complexity classifications correct for story scope
|
|
49
|
+
- [ ] CHK-014 Estimated costs are reasonable
|
|
50
|
+
- [ ] CHK-015 Mode selection appropriate for complexity
|
|
51
|
+
|
|
52
|
+
## [Category 3]
|
|
24
53
|
|
|
25
|
-
- [ ]
|
|
26
|
-
- [ ]
|
|
27
|
-
- [ ]
|
|
54
|
+
- [ ] CHK-016 First checklist item with clear action [US-XXX]
|
|
55
|
+
- [ ] CHK-017 Second checklist item [US-XXX]
|
|
56
|
+
- [ ] CHK-018 Third checklist item [US-XXX]
|
|
28
57
|
|
|
29
|
-
## [Category
|
|
58
|
+
## [Category 4]
|
|
30
59
|
|
|
31
|
-
- [ ]
|
|
32
|
-
- [ ]
|
|
33
|
-
- [ ]
|
|
60
|
+
- [ ] CHK-019 Another category item [US-XXX]
|
|
61
|
+
- [ ] CHK-020 Item with specific criteria [US-XXX]
|
|
62
|
+
- [ ] CHK-021 Final item in this category [US-XXX]
|
|
34
63
|
|
|
35
64
|
## Notes
|
|
36
65
|
|
|
@@ -38,3 +67,6 @@
|
|
|
38
67
|
- Add comments or findings inline
|
|
39
68
|
- Link to relevant resources or documentation
|
|
40
69
|
- Items are numbered sequentially for easy reference
|
|
70
|
+
- **Quality Gates, TDD, and Routing sections are mandatory**
|
|
71
|
+
- Reference user stories with `[US-XXX]` tags
|
|
72
|
+
- Mark gaps with `[Gap]` and ambiguities with `[Ambiguity]`
|
|
@@ -9,10 +9,42 @@ Systematically identify and resolve ambiguities in feature specifications.
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## SpecKit Workflow
|
|
13
|
+
|
|
14
|
+
Clarify can be invoked at any stage when ambiguities arise:
|
|
15
|
+
|
|
16
|
+
specify ↔ **clarify** ↔ plan ↔ **clarify** ↔ tasks
|
|
17
|
+
|
|
18
|
+
The skill helps resolve ambiguities that could affect:
|
|
19
|
+
- **Test design** (unclear acceptance criteria)
|
|
20
|
+
- **Routing decisions** (unclear complexity)
|
|
21
|
+
- **Implementation choices** (unclear requirements)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Testability Requirements
|
|
26
|
+
|
|
27
|
+
When clarifying requirements, ensure answers are:
|
|
28
|
+
- **Specific enough to write tests against**
|
|
29
|
+
- **Measurable** (can verify with automated tests)
|
|
30
|
+
- **Unambiguous** (no multiple interpretations)
|
|
31
|
+
|
|
32
|
+
### Good vs Bad Clarifications
|
|
33
|
+
|
|
34
|
+
| Bad (vague) | Good (testable) |
|
|
35
|
+
|-------------|-----------------|
|
|
36
|
+
| "How should validation work?" | "Should email validation reject 'user@localhost'?" |
|
|
37
|
+
| "What about error handling?" | "Should invalid password show 'Invalid credentials' or 'Password too short'?" |
|
|
38
|
+
| "How secure should it be?" | "Should we require 2FA for admin users?" |
|
|
39
|
+
|
|
40
|
+
**Every clarification should result in a testable requirement.**
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
12
44
|
## The Job
|
|
13
45
|
|
|
14
46
|
1. Read spec.md
|
|
15
|
-
2. Scan for
|
|
47
|
+
2. Scan for 10 types of ambiguities (including testability)
|
|
16
48
|
3. Present clarification questions to user
|
|
17
49
|
4. Update spec with answers
|
|
18
50
|
5. Save clarification log
|
|
@@ -27,7 +59,7 @@ Read `relentless/features/NNN-feature/spec.md`
|
|
|
27
59
|
|
|
28
60
|
## Step 2: Scan for Ambiguities
|
|
29
61
|
|
|
30
|
-
Check for these
|
|
62
|
+
Check for these 10 types:
|
|
31
63
|
|
|
32
64
|
**1. Behavioral Ambiguities**
|
|
33
65
|
- What happens when [action]?
|
|
@@ -75,6 +107,24 @@ Check for these 9 types:
|
|
|
75
107
|
- Race conditions?
|
|
76
108
|
- Example: "What if two users register with same email simultaneously?"
|
|
77
109
|
|
|
110
|
+
**10. Testability Ambiguities (NEW)**
|
|
111
|
+
- Are acceptance criteria specific enough to test?
|
|
112
|
+
- What edge cases need test coverage?
|
|
113
|
+
- What test data/fixtures are required?
|
|
114
|
+
- What should unit vs integration tests cover?
|
|
115
|
+
- Example: "Should we test with unicode characters in email addresses?"
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Optional: Clarify Routing Preference
|
|
120
|
+
|
|
121
|
+
If routing preference is unclear or missing from spec, ask:
|
|
122
|
+
- "Is this feature simple, medium, complex, or expert-level?"
|
|
123
|
+
- "Should it use free/cheap/good/genius models?"
|
|
124
|
+
- "Any specific AI model requirements?"
|
|
125
|
+
|
|
126
|
+
Record the answer and update spec.md metadata.
|
|
127
|
+
|
|
78
128
|
---
|
|
79
129
|
|
|
80
130
|
## Step 3: Present Questions
|
|
@@ -88,10 +138,12 @@ For each ambiguity found (max 5 most critical):
|
|
|
88
138
|
|
|
89
139
|
**What we need to know:** [Specific question]
|
|
90
140
|
|
|
141
|
+
**Testability Impact:** [How this affects test design]
|
|
142
|
+
|
|
91
143
|
**Options:**
|
|
92
|
-
A. [Option 1] - [Implications]
|
|
93
|
-
B. [Option 2] - [Implications]
|
|
94
|
-
C. [Option 3] - [Implications]
|
|
144
|
+
A. [Option 1] - [Implications + how to test]
|
|
145
|
+
B. [Option 2] - [Implications + how to test]
|
|
146
|
+
C. [Option 3] - [Implications + how to test]
|
|
95
147
|
D. Custom - [Your answer]
|
|
96
148
|
|
|
97
149
|
**Your choice:** _
|
|
@@ -105,6 +157,7 @@ After receiving answers:
|
|
|
105
157
|
1. Update spec.md with clarifications
|
|
106
158
|
2. Remove `[NEEDS CLARIFICATION]` markers
|
|
107
159
|
3. Add concrete details based on answers
|
|
160
|
+
4. **Ensure updated requirements are testable (Given/When/Then)**
|
|
108
161
|
|
|
109
162
|
---
|
|
110
163
|
|
|
@@ -120,6 +173,7 @@ Create `relentless/features/NNN-feature/clarification-log.md`:
|
|
|
120
173
|
**Question:** [Question]
|
|
121
174
|
**Answer:** [User's choice]
|
|
122
175
|
**Updated Sections:** [List spec sections updated]
|
|
176
|
+
**Test Impact:** [What tests can now be written]
|
|
123
177
|
|
|
124
178
|
## Q2: [Topic] - DEFERRED
|
|
125
179
|
**Date:** 2026-01-11
|
|
@@ -138,10 +192,12 @@ Create `relentless/features/NNN-feature/clarification-log.md`:
|
|
|
138
192
|
|
|
139
193
|
**What we need to know:** What are the specific password requirements?
|
|
140
194
|
|
|
195
|
+
**Testability Impact:** Need exact rules to write validation tests.
|
|
196
|
+
|
|
141
197
|
**Options:**
|
|
142
|
-
A. Basic (min 8 characters) - Simple, user-friendly
|
|
143
|
-
B. Moderate (min 8 chars + number + symbol) - Balanced security
|
|
144
|
-
C. Strict (min 12 chars + number + symbol + upper/lower) - High security
|
|
198
|
+
A. Basic (min 8 characters) - Simple, user-friendly. Test: reject 7 chars, accept 8.
|
|
199
|
+
B. Moderate (min 8 chars + number + symbol) - Balanced security. Test: reject "password", accept "Pass1!"
|
|
200
|
+
C. Strict (min 12 chars + number + symbol + upper/lower) - High security. Test: comprehensive regex.
|
|
145
201
|
D. Custom - Define your own rules
|
|
146
202
|
|
|
147
203
|
**Your choice:** B
|
|
@@ -154,10 +210,12 @@ D. Custom - Define your own rules
|
|
|
154
210
|
|
|
155
211
|
**What we need to know:** How should we handle repeated failed logins?
|
|
156
212
|
|
|
213
|
+
**Testability Impact:** Need exact limits to write rate limiting tests.
|
|
214
|
+
|
|
157
215
|
**Options:**
|
|
158
|
-
A. No limit - Allow unlimited attempts
|
|
159
|
-
B. Rate limit - Max 5 attempts per minute per IP
|
|
160
|
-
C. Account lockout - Lock account after 5 failed attempts for 30 minutes
|
|
216
|
+
A. No limit - Allow unlimited attempts. Test: N/A (no limit to test)
|
|
217
|
+
B. Rate limit - Max 5 attempts per minute per IP. Test: 6th attempt in 60s fails.
|
|
218
|
+
C. Account lockout - Lock account after 5 failed attempts for 30 minutes. Test: verify lockout and unlock timing.
|
|
161
219
|
D. Custom - Define your own approach
|
|
162
220
|
|
|
163
221
|
**Your choice:** C
|
|
@@ -172,3 +230,4 @@ D. Custom - Define your own approach
|
|
|
172
230
|
- Some ambiguities can be deferred to implementation
|
|
173
231
|
- Update spec immediately after clarification
|
|
174
232
|
- Keep clarification log for future reference
|
|
233
|
+
- **Every resolved ambiguity should enable writing tests**
|
|
@@ -21,6 +21,52 @@ Create a personalized project constitution that defines your team's coding princ
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
## Upgrade Detection (For Existing Users)
|
|
25
|
+
|
|
26
|
+
If `relentless/constitution.md` and/or `relentless/prompt.md` already exist:
|
|
27
|
+
|
|
28
|
+
### Step 0: Check for Template Updates
|
|
29
|
+
|
|
30
|
+
1. **Read current files:**
|
|
31
|
+
- Check version in existing constitution.md (look for `<!-- TEMPLATE_VERSION: X.Y.Z -->` or `**Template Version:**`)
|
|
32
|
+
- Check generated date in existing prompt.md
|
|
33
|
+
|
|
34
|
+
2. **Compare with templates:**
|
|
35
|
+
- Read `.claude/skills/constitution/templates/constitution.md`
|
|
36
|
+
- Read `.claude/skills/constitution/templates/prompt.md`
|
|
37
|
+
- Check template VERSION comments for changes
|
|
38
|
+
|
|
39
|
+
3. **Detect changes:**
|
|
40
|
+
- If template version > existing version → Offer upgrade
|
|
41
|
+
- If template has new sections → Offer selective merge
|
|
42
|
+
- If quality commands changed → Offer prompt.md refresh
|
|
43
|
+
|
|
44
|
+
4. **Offer upgrade options:**
|
|
45
|
+
```markdown
|
|
46
|
+
## Upgrade Available
|
|
47
|
+
|
|
48
|
+
Your constitution.md is v2.0.0, template is v2.1.0.
|
|
49
|
+
|
|
50
|
+
Changes in v2.1.0:
|
|
51
|
+
- Added SpecKit workflow documentation
|
|
52
|
+
- Enhanced TDD requirements
|
|
53
|
+
- Added quality gates section
|
|
54
|
+
|
|
55
|
+
Options:
|
|
56
|
+
A. Full upgrade (backup existing, apply template changes)
|
|
57
|
+
B. Selective merge (show diff, choose sections)
|
|
58
|
+
C. Skip upgrade (keep existing)
|
|
59
|
+
D. Regenerate from scratch (lose customizations)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
5. **If upgrading:**
|
|
63
|
+
- Backup existing files to `*.backup`
|
|
64
|
+
- Apply template changes preserving customizations
|
|
65
|
+
- Update version number
|
|
66
|
+
- Update `LAST_AMENDED_DATE` to today
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
24
70
|
## Step 1: Gather Project Information
|
|
25
71
|
|
|
26
72
|
Ask essential questions about the project:
|
|
@@ -92,6 +138,8 @@ Read and analyze project documentation:
|
|
|
92
138
|
|
|
93
139
|
Load the base template from `templates/prompt.md` and personalize it:
|
|
94
140
|
|
|
141
|
+
**Must include spec/plan/tasks awareness** so the agent reads `spec.md` and `plan.md` in full before execution, and reads only the relevant user story section from `tasks.md` for the current story.
|
|
142
|
+
|
|
95
143
|
**Base Template Location:** `templates/prompt.md`
|
|
96
144
|
|
|
97
145
|
Create a personalized `prompt.md` with:
|
|
@@ -123,12 +171,22 @@ Before marking ANY story as complete:
|
|
|
123
171
|
- Database/backend info
|
|
124
172
|
- Styling approach
|
|
125
173
|
|
|
126
|
-
**Section 3: TDD Workflow** (
|
|
127
|
-
- Test-first workflow
|
|
174
|
+
**Section 3: TDD Workflow** (MANDATORY)
|
|
175
|
+
- Test-first workflow (write tests BEFORE implementation)
|
|
128
176
|
- Test location patterns
|
|
129
177
|
- Test commands
|
|
178
|
+
- Verification that tests FAIL before implementation
|
|
179
|
+
|
|
180
|
+
**Section 4: Routing Awareness**
|
|
181
|
+
- Explanation of routing metadata in prd.json
|
|
182
|
+
- Complexity levels (simple/medium/complex/expert)
|
|
183
|
+
- Cost optimization modes (free/cheap/good/genius)
|
|
184
|
+
|
|
185
|
+
**Section 5: SpecKit Workflow**
|
|
186
|
+
- Full workflow: specify → plan → tasks → convert → analyze → implement
|
|
187
|
+
- Artifact awareness: spec.md, plan.md, tasks.md, checklist.md, prd.json
|
|
130
188
|
|
|
131
|
-
**Section
|
|
189
|
+
**Section 6: Common Pitfalls** (from AGENTS.md/docs)
|
|
132
190
|
- Project-specific gotchas
|
|
133
191
|
- Known issues
|
|
134
192
|
- Best practices
|