@arvorco/relentless 0.5.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ All notable changes to Relentless will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.2](https://github.com/ArvorCo/Relentless/releases/tag/v0.5.2) - 2026-01-23
9
+
10
+ ### Fixed
11
+ - **PRD Schema**: ExecutionHistory fields now have sensible defaults for partial execution states
12
+ - `attempts`, `escalations`, `actualCost` now default to 0/[] instead of being required
13
+ - `actualHarness` and `actualModel` are now optional (only set on completion)
14
+ - Fixes ZodError when loading PRDs with interrupted or in-progress executions
15
+
16
+ ## [0.5.1](https://github.com/ArvorCo/Relentless/releases/tag/v0.5.1) - 2026-01-23
17
+
18
+ ### Changed
19
+ - **Model Registry**: Updated Claude model identifiers to use stable aliases instead of dated versions (#6 - thanks @aruj0!)
20
+ - `claude-sonnet-4-5-20250929` → `claude-sonnet-4-5-latest`
21
+ - `claude-opus-4-5-20251101` → `claude-opus-4-5-latest`
22
+ - `claude-haiku-4-5-20250810` → `claude-haiku-4-5-latest`
23
+ - This ensures compatibility as Anthropic updates model versions
24
+
8
25
  ## [0.5.0](https://github.com/ArvorCo/Relentless/releases/tag/v0.5.0) - 2026-01-23
9
26
 
10
27
  ### Major Features
@@ -446,7 +463,9 @@ Relentless evolved from the [Ralph Wiggum Pattern](https://ghuntley.com/ralph/)
446
463
  - **License**: MIT
447
464
  - **Inspiration**: [Ralph Wiggum Pattern](https://ghuntley.com/ralph/) by Geoffrey Huntley
448
465
 
449
- [Unreleased]: https://github.com/ArvorCo/Relentless/compare/v0.5.0...HEAD
466
+ [Unreleased]: https://github.com/ArvorCo/Relentless/compare/v0.5.2...HEAD
467
+ [0.5.2]: https://github.com/ArvorCo/Relentless/compare/v0.5.1...v0.5.2
468
+ [0.5.1]: https://github.com/ArvorCo/Relentless/compare/v0.5.0...v0.5.1
450
469
  [0.5.0]: https://github.com/ArvorCo/Relentless/compare/v0.4.5...v0.5.0
451
470
  [0.4.5]: https://github.com/ArvorCo/Relentless/compare/v0.4.3...v0.4.5
452
471
  [0.4.3]: https://github.com/ArvorCo/Relentless/compare/v0.4.2...v0.4.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arvorco/relentless",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Universal AI agent orchestrator - works with Claude Code, Amp, OpenCode, Codex, Droid, and Gemini",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,42 +1,34 @@
1
- <!-- TEMPLATE_VERSION: 2.1.0 -->
2
- <!-- LAST_UPDATED: 2026-01-20 -->
3
-
4
1
  # Relentless Agent Instructions
5
2
 
6
3
  You are an autonomous coding agent orchestrated by Relentless - a universal AI agent orchestrator.
7
4
 
8
5
  ---
9
6
 
10
- ## Before Starting ANY Story
7
+ ## Context Already Provided
11
8
 
12
- **CRITICAL:** Read the feature artifacts in this order:
9
+ The orchestrator sends you optimized context in each prompt:
13
10
 
14
- 1. **`spec.md`** - Read FULL file to understand requirements
15
- 2. **`plan.md`** - Read FULL file to understand technical approach
16
- 3. **`tasks.md`** - Read ONLY the section for your current story (US-XXX)
17
- 4. **`checklist.md`** - Review quality criteria you must satisfy
18
- 5. **`prd.json`** - Find your story and check routing metadata
11
+ - **Constitution** - Project principles and governance (full)
12
+ - **spec.md** - Feature specification (full)
13
+ - **plan.md** - Technical implementation plan (full)
14
+ - **Current story** - Your assigned story from tasks.md with dependencies
15
+ - **Relevant checklist** - Filtered checklist items for your story
19
16
 
20
- This context is essential. Do NOT skip reading these files.
17
+ **You do NOT need to read these files separately** - they're already in your context.
21
18
 
22
- ---
19
+ Only read files if you need additional details not provided (e.g., examining existing code patterns).
23
20
 
24
- ## SpecKit Workflow Reference
21
+ ---
25
22
 
26
- Implementation is **Step 6 of 6** in the Relentless workflow:
23
+ ## ONE Story Per Iteration (CRITICAL)
27
24
 
28
- ```
29
- /relentless.specify → /relentless.plan → /relentless.tasks → /relentless.convert → /relentless.analyze → /relentless.implement
30
- ```
25
+ **You MUST work on exactly ONE user story per iteration.**
31
26
 
32
- Each step generates an artifact in `relentless/features/<feature>/`:
33
- - `spec.md` - Feature specification (routing preference)
34
- - `plan.md` - Technical implementation plan (test specifications)
35
- - `tasks.md` - User stories with acceptance criteria
36
- - `checklist.md` - Quality validation checklist
37
- - `prd.json` - Machine-readable PRD with routing
27
+ - Do NOT try to complete multiple stories in a single pass
28
+ - Do NOT batch stories together for "efficiency"
29
+ - Do NOT skip ahead to other stories after completing one
38
30
 
39
- **Run `/relentless.analyze` before implementing to validate artifact consistency.**
31
+ After completing ONE story, end your turn. The orchestrator will assign the next story.
40
32
 
41
33
  ---
42
34
 
@@ -67,20 +59,18 @@ bun test
67
59
  ## Your Task (Per Iteration)
68
60
 
69
61
  1. Check you're on the correct branch from PRD `branchName`
70
- 2. Read feature artifacts (spec.md, plan.md, your story in tasks.md)
71
- 3. Pick the **highest priority** story where `passes: false` and dependencies met
72
- 4. Check story routing metadata for complexity/model guidance
73
- 5. Review checklist items tagged `[US-XXX]` for your story
74
- 6. Review existing code to understand patterns
75
- 7. **Write tests FIRST** (TDD is mandatory)
76
- 8. Verify tests FAIL before implementation
77
- 9. Implement the story to make tests PASS
78
- 10. Run ALL quality checks (typecheck, lint, test)
79
- 11. If ALL checks pass, commit: `feat: [Story ID] - [Story Title]`
80
- 12. Update tasks.md: check off `- [x]` completed acceptance criteria
81
- 13. Update checklist.md: check off `- [x]` verified items
82
- 14. Update PRD: set `passes: true`
83
- 15. Append progress to `progress.txt`
62
+ 2. Review the story context already provided in this prompt
63
+ 3. Review existing code to understand patterns
64
+ 4. **Write tests FIRST** (TDD is mandatory)
65
+ 5. Verify tests FAIL before implementation
66
+ 6. Implement the story to make tests PASS
67
+ 7. Run ALL quality checks (typecheck, lint, test)
68
+ 8. If ALL checks pass, commit: `feat: [Story ID] - [Story Title]`
69
+ 9. Update tasks.md: check off `- [x]` completed acceptance criteria
70
+ 10. Update checklist.md: check off `- [x]` verified items
71
+ 11. Update PRD: set `passes: true`
72
+ 12. Append progress to `progress.txt`
73
+ 13. **STOP** - Do not continue to next story
84
74
 
85
75
  ---
86
76
 
@@ -153,7 +143,7 @@ After completion, execution history is saved for cost tracking.
153
143
 
154
144
  ## Checklist Validation
155
145
 
156
- Before completing a story, verify against `checklist.md`:
146
+ Before completing a story, verify against the checklist items provided:
157
147
 
158
148
  - [ ] All acceptance criteria from tasks.md satisfied
159
149
  - [ ] Tests written BEFORE implementation (TDD)
@@ -166,19 +156,6 @@ Before completing a story, verify against `checklist.md`:
166
156
 
167
157
  ---
168
158
 
169
- ## Check for Queued Prompts
170
-
171
- Between iterations, check `.queue.txt` for user input:
172
-
173
- ```bash
174
- # If .queue.txt exists, read and process it
175
- # Acknowledge in progress.txt
176
- # Process in FIFO order
177
- # Support commands: [PAUSE], [SKIP US-XXX], [ABORT]
178
- ```
179
-
180
- ---
181
-
182
159
  ## Progress Report Format
183
160
 
184
161
  APPEND to `progress.txt` after each story (never replace):
@@ -218,7 +195,7 @@ relentless/
218
195
  │ ├── agents/ # Agent adapters (claude, amp, opencode, codex, droid, gemini)
219
196
  │ ├── config/ # Configuration schema and loading
220
197
  │ ├── prd/ # PRD parsing and validation
221
- │ ├── execution/ # Orchestration loop and routing
198
+ │ ├── execution/ # Orchestration loop, routing, and context-builder
222
199
  │ ├── routing/ # Auto mode routing module
223
200
  │ └── init/ # Project initialization scaffolder
224
201
  ├── tests/ # Test files
@@ -251,29 +228,9 @@ relentless/
251
228
 
252
229
  ---
253
230
 
254
- ## Agent-Specific Guidelines
255
-
256
- ### Rate Limit Awareness
257
- - If you hit rate limits, note in progress.txt for future planning
258
- - Relentless will auto-fallback to other agents when limits hit
259
-
260
- ### Model Routing Notes
261
- - Simple tasks: Cheaper models acceptable
262
- - Complex logic: Use capable models
263
- - Final reviews: Always use SOTA models (Opus 4.5, GPT-5.2)
264
- - Check prd.json routing metadata for each story
265
-
266
- ### Parallel Execution
267
- - Tasks marked `[P]` in tasks.md can run in parallel
268
- - Use git worktrees for parallel work
269
- - Clean up worktrees after merge
270
- - Run integration tests after merging parallel work
271
-
272
- ---
273
-
274
231
  ## Common Mistakes to Avoid
275
232
 
276
- 1. **Skipping spec/plan reading** - You MUST read context before coding
233
+ 1. **Doing multiple stories** - Complete exactly ONE story, then STOP
277
234
  2. **Writing code before tests** - TDD is mandatory, tests come FIRST
278
235
  3. **Ignoring lint warnings** - Zero warnings required, not just zero errors
279
236
  4. **Marking incomplete stories done** - Only mark `passes: true` when ALL criteria met
@@ -281,9 +238,6 @@ relentless/
281
238
  6. **Committing broken code** - All quality checks must pass before commit
282
239
  7. **Using Node.js APIs** - Use Bun APIs instead
283
240
  8. **Adding unnecessary dependencies** - Prefer built-in solutions
284
- 9. **Skipping analysis** - Run `/relentless.analyze` before implementing
285
- 10. **Ignoring checklist** - Update checklist.md after completing criteria
286
- 11. **Not checking queue** - Always check `.queue.txt` for user input
287
241
 
288
242
  ---
289
243
 
@@ -300,21 +254,6 @@ Otherwise, end normally (next iteration continues with next story).
300
254
 
301
255
  ---
302
256
 
303
- ## Important Reminders
304
-
305
- - Work on ONE story per iteration
306
- - Write tests BEFORE implementation (TDD)
307
- - Review existing code before implementing
308
- - Review checklist items for the story
309
- - Commit frequently with proper message format
310
- - Keep all quality checks passing
311
- - Update ALL tracking files (tasks.md, checklist.md, prd.json, progress.txt)
312
- - Check `.queue.txt` for mid-run input
313
- - Reference constitution principles in progress.txt
314
- - Clean up any worktrees after merging
315
-
316
- ---
317
-
318
257
  **Personalized for Relentless**
319
- **Generated:** 2026-01-20
258
+ **Generated:** 2026-01-23
320
259
  **Re-generate:** /relentless.constitution
@@ -10,9 +10,9 @@
10
10
  * Pass the model name in the `options.model` parameter.
11
11
  *
12
12
  * **Supported models:**
13
- * - `opus-4.5` (claude-opus-4-5-20251101) - SOTA, best for code review and architecture
14
- * - `sonnet-4.5` (claude-sonnet-4-5-20250929) - Balanced, good for daily coding
15
- * - `haiku-4.5` (claude-haiku-4-5-20251001) - Fast and cheap, good for simple tasks
13
+ * - `opus-4.5` (claude-opus-4-5) - SOTA, best for code review and architecture
14
+ * - `sonnet-4.5` (claude-sonnet-4-5) - Balanced, good for daily coding
15
+ * - `haiku-4.5` (claude-haiku-4-5) - Fast and cheap, good for simple tasks
16
16
  *
17
17
  * These IDs map to the full Claude model identifiers in the CLI.
18
18
  *
package/src/prd/types.ts CHANGED
@@ -107,15 +107,15 @@ export type EscalationAttempt = z.infer<typeof EscalationAttemptSchema>;
107
107
  */
108
108
  export const ExecutionHistorySchema = z.object({
109
109
  /** Total number of attempts made */
110
- attempts: z.number().int().min(1),
110
+ attempts: z.number().int().min(0).default(0),
111
111
  /** Array of escalation attempts with details */
112
- escalations: z.array(EscalationAttemptSchema),
112
+ escalations: z.array(EscalationAttemptSchema).default([]),
113
113
  /** Total actual cost across all attempts in USD */
114
- actualCost: z.number().nonnegative(),
115
- /** Final harness that successfully completed the story */
116
- actualHarness: HarnessNameSchema,
117
- /** Final model that successfully completed the story */
118
- actualModel: z.string(),
114
+ actualCost: z.number().nonnegative().default(0),
115
+ /** Final harness that successfully completed the story (optional until completion) */
116
+ actualHarness: HarnessNameSchema.optional(),
117
+ /** Final model that successfully completed the story (optional until completion) */
118
+ actualModel: z.string().optional(),
119
119
  /** Total input tokens used across all attempts (optional) */
120
120
  inputTokens: z.number().nonnegative().optional(),
121
121
  /** Total output tokens used across all attempts (optional) */
@@ -93,7 +93,7 @@ export const MODEL_REGISTRY: ModelProfile[] = [
93
93
  strengths: ["code_review", "architecture", "debugging", "final_review", "complex_reasoning"],
94
94
  limitations: ["expensive", "slower_start"],
95
95
  cliFlag: "--model",
96
- cliValue: "claude-opus-4-5-20251101",
96
+ cliValue: "claude-opus-4-5",
97
97
  },
98
98
  {
99
99
  id: "sonnet-4.5",
@@ -106,7 +106,7 @@ export const MODEL_REGISTRY: ModelProfile[] = [
106
106
  strengths: ["frontend", "refactoring", "daily_coding", "balanced"],
107
107
  limitations: [],
108
108
  cliFlag: "--model",
109
- cliValue: "claude-sonnet-4-5-20250929",
109
+ cliValue: "claude-sonnet-4-5",
110
110
  },
111
111
  {
112
112
  id: "haiku-4.5",
@@ -121,7 +121,7 @@ export const MODEL_REGISTRY: ModelProfile[] = [
121
121
  strengths: ["prototyping", "scaffolding", "simple_tasks", "fast"],
122
122
  limitations: ["less_reasoning"],
123
123
  cliFlag: "--model",
124
- cliValue: "claude-haiku-4-5-20251001",
124
+ cliValue: "claude-haiku-4-5",
125
125
  },
126
126
 
127
127
  // ============== Codex (OpenAI) Models ==============
@@ -196,7 +196,7 @@ export const MODEL_REGISTRY: ModelProfile[] = [
196
196
  strengths: ["architecture", "debugging", "complex_reasoning"],
197
197
  limitations: ["expensive"],
198
198
  cliFlag: "-m",
199
- cliValue: "claude-opus-4-5-20251101",
199
+ cliValue: "claude-opus-4-5",
200
200
  },
201
201
  {
202
202
  id: "claude-sonnet-4-5-20250929",
@@ -209,7 +209,7 @@ export const MODEL_REGISTRY: ModelProfile[] = [
209
209
  strengths: ["balanced", "daily_coding"],
210
210
  limitations: [],
211
211
  cliFlag: "-m",
212
- cliValue: "claude-sonnet-4-5-20250929",
212
+ cliValue: "claude-sonnet-4-5",
213
213
  },
214
214
  {
215
215
  id: "claude-haiku-4-5-20251001",
@@ -222,7 +222,7 @@ export const MODEL_REGISTRY: ModelProfile[] = [
222
222
  strengths: ["fast", "simple_tasks"],
223
223
  limitations: ["less_reasoning"],
224
224
  cliFlag: "-m",
225
- cliValue: "claude-haiku-4-5-20251001",
225
+ cliValue: "claude-haiku-4-5",
226
226
  },
227
227
  {
228
228
  id: "gpt-5.2",