@nathapp/nax 0.51.2 → 0.52.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.
Files changed (4) hide show
  1. package/CHANGELOG.md +1304 -88
  2. package/README.md +98 -987
  3. package/dist/nax.js +886 -860
  4. package/package.json +6 -1
package/CHANGELOG.md CHANGED
@@ -1,18 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ > **Note:** For releases after v0.51.2, see [GitHub Releases](https://github.com/nathapp-io/nax/releases).
4
+
3
5
  All notable changes to this project will be documented in this file.
4
6
 
5
7
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
8
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
9
 
10
+
11
+ ## [0.51.2] — 2026-03-22
12
+
13
+ ### Added
14
+ - **features:** Remove plan.md and tasks.md from scaffold, enhancing the spec.md template
15
+
16
+ ### Fixed
17
+ - **test:** Update .nax/packages/ to .nax/mono/ in test fixtures for consistency
18
+ - **plan:** Add no-test and noTestJustification to plan/decompose prompts
19
+
20
+ ### Changed
21
+ - **monorepo:** Rename .nax/packages/ to .nax/mono/ and clean up documentation
22
+
23
+
8
24
  ## [0.51.0] - 2026-03-21
9
25
 
10
26
  ### Added
11
27
 
12
- - **STRAT-001: `no-test` strategy** — New test strategy for stories with zero behavioral change (config, docs, CI/build files, dependency bumps, pure refactors). Requires `noTestJustification` field at every assignment point (plan prompt, LLM routing, batch routing) to prevent lazy test-skipping. `no-test` stories use an implement-only prompt (no RED/GREEN/REFACTOR), are exempt from greenfield override (BUG-010) and test-after escalation (S5), and batch separately from tested stories.
13
- - **DIR-001: Rename `nax/` → `.nax/`** — Project-level config directory now uses hidden dot-prefix convention (like `.git/`, `.claude/`). `PROJECT_NAX_DIR = ".nax"` SSOT constant in `src/config/paths.ts`. Package configs moved from `<pkg>/nax/config.json` to `.nax/packages/<pkg>/config.json`. 93 files updated.
14
- - **BUG-073: Acceptance fix story quality** — Fix stories now include acceptance test file path, truncated failure output, and "fix implementation not tests" instruction. Batched by related stories (cap 8) instead of 1-per-AC. Fix stories inherit `workdir` from related story. `>80%` AC failure triggers test regeneration instead of fix stories.
15
- - **BUG-073: Acceptance staleness detection** — SHA-256 fingerprint of AC set stored in `acceptance-meta.json`. Acceptance test auto-regenerates (with `.bak` backup) when stories are added/removed/modified.
28
+ - **`no-test` strategy** — New test strategy for stories with zero behavioral change (config, docs, CI/build files, dependency bumps, pure refactors). Requires `noTestJustification` field at every assignment point (plan prompt, LLM routing, batch routing) to prevent lazy test-skipping. `no-test` stories use an implement-only prompt (no RED/GREEN/REFACTOR), are exempt from greenfield override and test-after escalation, and batch separately from tested stories.
29
+ - **Rename `nax/` → `.nax/`** — Project-level config directory now uses hidden dot-prefix convention (like `.git/`, `.claude/`). `PROJECT_NAX_DIR = ".nax"` SSOT constant in `src/config/paths.ts`. Package configs moved from `<pkg>/nax/config.json` to `.nax/packages/<pkg>/config.json`. 93 files updated.
30
+ - **Acceptance fix story quality** — Fix stories now include acceptance test file path, truncated failure output, and "fix implementation not tests" instruction. Batched by related stories (cap 8) instead of 1-per-AC. Fix stories inherit `workdir` from related story. `>80%` AC failure triggers test regeneration instead of fix stories.
31
+ - **Acceptance staleness detection** — SHA-256 fingerprint of AC set stored in `acceptance-meta.json`. Acceptance test auto-regenerates (with `.bak` backup) when stories are added/removed/modified.
16
32
 
17
33
  ### Fixed
18
34
 
@@ -35,19 +51,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
35
51
 
36
52
  ---
37
53
 
54
+
55
+ ## [0.50.3] — 2026-03-21
56
+
57
+ ### Fixed
58
+ - **acceptance:** Add missing log on stub regeneration failure.
59
+ - **acceptance:** Enhance stub detection with a 3-step language-agnostic prompt.
60
+ - **acceptance:** Introduce configurable timeout and framework-agnostic prompt hints.
61
+ - **acceptance:** Use configured agent and real codebase context.
62
+
63
+ ### Changed
64
+ - **acceptance:** Remove `buildWorkdirFileTree`; agent now explores the project itself.
65
+
66
+
67
+ ## [0.50.2] — 2026-03-20
68
+
69
+ ### Changed
70
+ - **config:** Move testing to quality.testing for per-package support.
71
+
72
+
73
+ ## [0.50.1] — 2026-03-20
74
+
75
+ ### Added
76
+ - **prompts:** Enforce hermetic testing via testing config.
77
+
78
+ ### Fixed
79
+ - **prd:** Promote decomposed parent to passed when all sub-stories are complete.
80
+ - **regression:** Derive rectification model tier from complexity instead of unpersisted model tier.
81
+ - **decompose:** Emit `story:decomposed` event and avoid wasting iterations on decomposition.
82
+ - **prd:** Preserve analysis and contextFiles fields during plan output validation.
83
+ - **precheck:** Allow collapsed nax/ directory entries in dirty-tree check.
84
+
85
+
38
86
  ## [0.50.0] - 2026-03-19
39
87
 
40
88
  ### Added
41
89
 
42
- - **ENH-005: Context chaining** — Dependent stories automatically receive parent story's changed files as context. After a story passes, `outputFiles` are captured via `git diff storyGitRef..HEAD` (scoped to `story.workdir` in monorepos) and injected into dependent stories' context via `getParentOutputFiles()`.
43
- - **ENH-006: Structured plan prompt** — `nax plan` now uses a 3-step prompt (understand → analyze → generate). Analysis stored in `prd.analysis` field and injected into all story contexts. `contextFiles` populated per-story by the plan LLM. Hard ban on analysis/test-only/validation stories.
44
- - **ENH-007: Reconciliation review gate** — Reconciliation no longer blindly auto-passes stories that failed at review stage. Stores `failureStage` on failed stories; re-runs built-in review checks before reconciling `review`/`autofix` failures.
45
- - **ENH-008: Monorepo workdir scoping** — Decomposed sub-stories now inherit `workdir` from parent. Agent rectification runs in `story.workdir` (not repo root) and prompt includes scope constraint for out-of-package prevention.
90
+ - **Context chaining** — Dependent stories automatically receive parent story's changed files as context. After a story passes, `outputFiles` are captured via `git diff storyGitRef..HEAD` (scoped to `story.workdir` in monorepos) and injected into dependent stories' context via `getParentOutputFiles()`.
91
+ - **Structured plan prompt** — `nax plan` now uses a 3-step prompt (understand → analyze → generate). Analysis stored in `prd.analysis` field and injected into all story contexts. `contextFiles` populated per-story by the plan LLM. Hard ban on analysis/test-only/validation stories.
92
+ - **Reconciliation review gate** — Reconciliation no longer blindly auto-passes stories that failed at review stage. Stores `failureStage` on failed stories; re-runs built-in review checks before reconciling `review`/`autofix` failures.
93
+ - **Monorepo workdir scoping** — Decomposed sub-stories now inherit `workdir` from parent. Agent rectification runs in `story.workdir` (not repo root) and prompt includes scope constraint for out-of-package prevention.
46
94
  - `prd.analysis?: string` field — planning phase analysis available to all story contexts
47
95
 
48
96
  ### Fixed
49
97
 
50
- - **BUG-071**: `COMPLEXITY_GUIDE` and `TEST_STRATEGY_GUIDE` prompt constants had inverted mappings. Corrected: `simple→tdd-simple`, `medium→three-session-tdd-lite`, `expert→three-session-tdd`. `test-after` is explicit opt-out only, never auto-assigned.
98
+ - **fix:** `COMPLEXITY_GUIDE` and `TEST_STRATEGY_GUIDE` prompt constants had inverted mappings. Corrected: `simple→tdd-simple`, `medium→three-session-tdd-lite`, `expert→three-session-tdd`. `test-after` is explicit opt-out only, never auto-assigned.
99
+
100
+
101
+ ## [0.49.6] — 2026-03-19
102
+
103
+ ### Fixed
104
+ - **webhook:** Replace polling loop in `receive()` with event-driven Promise.
105
+ - **test:** Eliminate global mock contamination across test files.
106
+ - Use `Bun.readableStreamToText` for stdout in `getChangedFiles` and `getPgid`.
107
+ - Adjust `docker-compose.test.yml` to avoid YAML folding issues.
108
+ - Break circular import between prompts-tdd and prompts-main.
109
+ - Restore working pattern for `getChangedFiles`.
110
+ - Read git diff stdout concurrently with process exit in `getChangedFiles`.
111
+ - Standardize agent adapter session options.
112
+ - Resolve model aliases before passing to acpx and set model at session creation.
113
+ - Reuse ACP session across rectification attempts for context continuity.
114
+
115
+ ### Other
116
+ - Revert changes to model alias resolution before passing to acpx.
117
+
51
118
 
52
119
  ## [0.49.3] - 2026-03-18
53
120
 
@@ -58,10 +125,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
125
  - **Re-decompose on second run:** Batch-mode story selector was missing `"decomposed"` in its status skip list (single-story path already excluded it). Stories with `status: "decomposed"` were being picked up again, triggering unnecessary LLM decompose calls. Added `"decomposed"` to batch filter and a guard in routing SD-004 block.
59
126
  - **totalCost always 0:** `handlePipelineFailure` returned no `costDelta`; `iteration-runner` hardcoded `costDelta: 0` for failures. Agent cost for failed stories was silently dropped. Fix: extract `agentResult?.estimatedCost` in failure path same as success path.
60
127
 
128
+
61
129
  ## [0.49.2] - 2026-03-18
62
130
 
63
131
  ### Fixed
64
- - **Test strategy descriptions:** `TEST_STRATEGY_GUIDE` (used in plan and decompose prompts) had incorrect descriptions for `three-session-tdd` and `three-session-tdd-lite`. Both strategies use 3 sessions. Key distinction: `three-session-tdd` (strict) — test-writer makes no src/ changes, implementer makes no test changes; `three-session-tdd-lite` (lite) — test-writer may add minimal src/ stubs, implementer may expand coverage and replace stubs. Updated in `src/config/test-strategy.ts`, `docs/specs/test-strategy-ssot.md`, and `docs/architecture/ARCHITECTURE.md`.
132
+ - **Test strategy descriptions:** `TEST_STRATEGY_GUIDE` had incorrect descriptions for `three-session-tdd` and `three-session-tdd-lite`. Both use 3 sessions. Key distinction: `three-session-tdd` (strict) — test-writer makes no src/ changes; `three-session-tdd-lite` — test-writer may add minimal src/ stubs.
65
133
 
66
134
  ## [0.49.1] - 2026-03-18
67
135
 
@@ -71,6 +139,100 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
71
139
  - **`autoCommitIfDirty` skipping monorepo subdirs:** The working-directory guard rejected any workdir that wasn't exactly the git root, silently skipping commits for monorepo package subdirs. Fix: allow subdirs (`startsWith(gitRoot + '/')`); use `git add .` for subdirs vs `git add -A` at root.
72
140
  - **`complete()` missing model in `generateFromPRD()` and `plan` auto mode:** `generator.ts` ignored `options.modelDef.model`; `plan.ts` auto path didn't call `resolveModel()`. Both now pass the correct resolved model to `adapter.complete()`.
73
141
 
142
+
143
+ ## [0.49.0] — 2026-03-18
144
+
145
+ ### Added
146
+ - **config:** Introduce per-package config override functionality.
147
+
148
+ ### Fixed
149
+ - **acceptance:** Strip markdown fences from `generateFromPRD` output.
150
+ - **verify:** Ensure TEST_FAILURE hands off to rectification stage without escalation.
151
+ - **tdd:** Adjust greenfield-no-tests to escalate instead of pausing.
152
+ - **autofix:** Modify review to hand off to autofix stage instead of escalating.
153
+
154
+
155
+ ## [0.48.4] — 2026-03-18
156
+
157
+ ### Fixed
158
+ - Skip {{package}} template when no package.json is present.
159
+ - Sync runtime file allowlist with checks-git and handle monorepo paths.
160
+ - Substitute {{package}} in testScoped and bypass smart-runner for monorepo orchestrators.
161
+
162
+
163
+ ## [0.48.3] — 2026-03-18
164
+
165
+ ### Fixed
166
+ - Sweep ACP sessions on SIGINT/SIGTERM for crash recovery.
167
+ - Remove spurious ~/ entry from gitignore scaffold.
168
+ - Do not gitignore prd.json as it is a tracked spec file.
169
+ - Whitelist nax/features/*/prd.json as a runtime file.
170
+ - Respect config.generate.agents for root and per-package generation.
171
+
172
+
173
+ ## [0.48.2] — 2026-03-18
174
+
175
+ ### Fixed
176
+ - Add --cwd to session close command to prevent process leaks.
177
+
178
+
179
+ ## [0.48.1] — 2026-03-18
180
+
181
+ ### Fixed
182
+ - Auto-generate per-package CLAUDE.md when nax/context.md packages are discovered.
183
+ - Warn and fallback when generate.agents is misplaced under autoMode.
184
+
185
+
186
+ ## [0.48.0] — 2026-03-18
187
+
188
+ ### Added
189
+ - Add config.generate.agents to restrict which agents are generated.
190
+ - Add per-package tech stack scanning to planning prompt.
191
+
192
+ ### Fixed
193
+ - Discover monorepo packages from workspace manifests when nax/context.md is missing.
194
+ - Replace hardcoded /tmp paths with unique per-run paths to prevent test collisions.
195
+ - Mock interaction bridge in plan-interactive tests to avoid real stdin prompts.
196
+
197
+ ### Performance
198
+ - Reduce test suite time by approximately 31 seconds through targeted fixes.
199
+
200
+ ### Changed
201
+ - Remove trivial type checks and low-value assertions from tests.
202
+ - Organize loose unit test files into subdirectories.
203
+ - Replace opaque identifiers with descriptive test names in tests.
204
+
205
+
206
+ ## [0.47.0] — 2026-03-17
207
+
208
+ ### Added
209
+ - Scope changed-file checks to story.workdir.
210
+ - Resolve per-package test command via loadConfigForWorkdir.
211
+ - Add loadConfigForWorkdir for monorepo package config resolution.
212
+ - Add mergePackageConfig utility for per-package quality.commands.
213
+ - Inject monorepo package list and workdir hint into planning prompt.
214
+ - Workdir-scoped test execution and smart-runner package prefix fix.
215
+ - Add --package flag to scaffold per-package nax/context.md.
216
+ - Add --package and --all-packages flags for monorepo CLAUDE.md generation.
217
+ - Load package-level nax/context.md for per-story workdir.
218
+ - Resolve story.workdir for per-story working directory override.
219
+ - Add UserStory.workdir field with schema validation.
220
+
221
+ ### Fixed
222
+ - Restore review.commands.test fallback for legitimate config field.
223
+ - Throw error if story.workdir does not exist on disk.
224
+ - Downgrade test/lint/typecheck command checks to warning.
225
+
226
+ ### Other
227
+ - Merge remote-tracking branch for monorepo workdir phase 1.
228
+
229
+
230
+ ## [0.46.3] — 2026-03-17
231
+
232
+ ### Fixed
233
+ - Change 'Integration-level' to 'Real-implementation'.
234
+
235
+
74
236
  ## [0.46.2] - 2026-03-17
75
237
 
76
238
  ### Fixed
@@ -79,20 +241,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
79
241
  ### Tests
80
242
  - 12 new tests in `test/unit/pipeline/stages/autofix.test.ts` covering agent rectification paths.
81
243
 
244
+
82
245
  ## [0.46.1] - 2026-03-17
83
246
 
84
247
  ### Fixed
85
- - **BUG-074:** `working-tree-clean` precheck now allows 12 nax runtime files to be dirty without blocking. Includes fix for `--porcelain` trim bug that corrupted leading status chars.
86
- - **BUG-074:** `nax init` now adds complete gitignore entries for all nax runtime files (was missing: status.json, plan/, acp-sessions.json, interactions/, progress.txt, acceptance-refined.json, .nax-pids, .nax-wt/, ~/).
87
- - **BUG-074:** `checkGitignoreCoversNax` warning now checks 6 critical patterns (was only 3).
88
- - **BUG-075:** `acceptance-refined.json` now written to featureDir instead of workdir root.
89
- - **BUG-076:** HOME env is now validated before passing to spawned agents — if not an absolute path (e.g. unexpanded "~"), falls back to `os.homedir()` with a warning log. Prevents literal "~/" directory creation in repo.
90
- - **BUG-076:** New `checkHomeEnvValid()` precheck warning fires when HOME is unset or not absolute.
248
+ - **fix:** `working-tree-clean` precheck now allows 12 nax runtime files to be dirty without blocking. Includes fix for `--porcelain` trim bug that corrupted leading status chars.
249
+ - **fix:** `nax init` now adds complete gitignore entries for all nax runtime files (was missing: status.json, plan/, acp-sessions.json, interactions/, progress.txt, acceptance-refined.json, .nax-pids, .nax-wt/, ~/).
250
+ - **fix:** `checkGitignoreCoversNax` warning now checks 6 critical patterns (was only 3).
251
+ - **fix:** `acceptance-refined.json` now written to featureDir instead of workdir root.
252
+ - **fix:** HOME env is now validated before passing to spawned agents — if not an absolute path (e.g. unexpanded "~"), falls back to `os.homedir()` with a warning log. Prevents literal "~/" directory creation in repo.
253
+ - **fix:** New `checkHomeEnvValid()` precheck warning fires when HOME is unset or not absolute.
91
254
 
92
255
  ### Tests
93
256
  - New tests in `test/unit/precheck/checks-git.test.ts` (188 lines) for working-tree-clean allowlist.
94
257
  - New tests in `test/unit/agents/claude/execution.test.ts` (79 lines) for HOME sanitization.
95
258
 
259
+
96
260
  ## [0.46.0] - 2026-03-16
97
261
 
98
262
  ### Fixed
@@ -112,10 +276,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
112
276
  - **ARCHITECTURE.md §1:** Updated `src/agents/` tree.
113
277
  - **ARCHITECTURE.md §16:** New section — agent adapter folder conventions, `shared/` rules, ACP cost alignment.
114
278
 
279
+
280
+ ## [0.45.0] — 2026-03-16
281
+
282
+ ### Added
283
+ - **execution:** Add debug logging for batch routing story count.
284
+ - **config:** Introduce a single source of truth for test strategy, including types, resolver, and prompt fragments.
285
+
286
+ ### Fixed
287
+ - **execution:** Thread `agentGetFn` through the acceptance loop and parallel pipeline contexts.
288
+
289
+ ### Changed
290
+ - **prd:** Utilize `resolveTestStrategy()` in `validatePlanOutput`.
291
+ - **prompts:** Replace inline strategy, complexity, and grouping text with shared imports.
292
+
293
+ ---
294
+
295
+
296
+ ## [0.44.0] — 2026-03-16
297
+
298
+ ### Added
299
+ - **acp:** Implement session lifecycle features, including keep-on-fail, sweep, and rectification context.
300
+
301
+ ### Fixed
302
+ - **precheck:** Restore `checkPRDValid` to its original position in the tier1 sequence.
303
+ - **cli:** Perform precheck before plan execution, guard against `prd.json` overwrite, and fix `nax status`.
304
+
305
+ ---
306
+
307
+
308
+ ## [0.43.1] — 2026-03-16
309
+
310
+ ### Fixed
311
+ - **cli:** Initialize plan logger in the `nax run --plan` flow.
312
+
313
+ ---
314
+
315
+
115
316
  ## [0.43.0] - 2026-03-16
116
317
 
117
318
  ### Added
118
- - **PERM-001:** `src/config/permissions.ts` — `resolvePermissions(config, stage)` as the single source of truth for all permission decisions across CLI and ACP adapters.
319
+ - `src/config/permissions.ts` — `resolvePermissions(config, stage)` as the single source of truth for all permission decisions across CLI and ACP adapters.
119
320
  - **New types:** `PermissionProfile` (`"unrestricted" | "safe" | "scoped"`), `PipelineStage`, `ResolvedPermissions` interface.
120
321
  - **Schema:** `execution.permissionProfile` config field — takes precedence over legacy `dangerouslySkipPermissions` boolean. `"scoped"` is a Phase 2 stub.
121
322
  - **`pipelineStage?`** added to `AgentRunOptions` — each call site sets the appropriate stage (`"plan"`, `"run"`, `"rectification"`, etc.).
@@ -131,106 +332,1121 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
131
332
  ### Changed
132
333
  - `nax/config.json` — explicit `"permissionProfile": "unrestricted"` (was implicit via schema default).
133
334
 
134
- ## [0.30.0] - 2026-03-08
335
+
336
+ ## [0.42.9] — 2026-03-16
337
+
338
+ ### Added
339
+ - **plan:** Initialize logger for `nax plan`, writing logs to `nax/features/<feature>/plan-<timestamp>.jsonl`.
340
+
341
+ ---
342
+
343
+
344
+ ## [0.42.8] — 2026-03-16
345
+
346
+ ### Added
347
+ - **plan:** Add permission, model, and session logging to `nax run --plan`.
135
348
 
136
349
  ### Fixed
137
- - **Global install crash:** `bin/nax.ts`, `headless-formatter.ts`, and `cli/analyze.ts` were reading `package.json` at runtime via `import.meta.dir`-relative paths. In a global bun install, these paths resolve incorrectly, causing an ENOENT crash on launch. All three now use the static `NAX_VERSION` constant (baked in at build time).
350
+ - **plan:** Ensure `approve-all` is always used in interactive plan sessions.
138
351
 
139
- ### Refactored
140
- - **Prompt Builder wired to sections:** `PromptBuilder` now calls `buildRoleTaskSection()`, `buildIsolationSection()`, `buildStorySection()`, and `buildConventionsSection()` from `src/prompts/sections/` instead of duplicated inline functions. Eliminates 80+ lines of dead code.
141
- - **Sections expanded:** `role-task.ts` and `isolation.ts` now cover all 4 roles (`implementer`, `test-writer`, `verifier`, `single-session`). Previously only covered 1–2 roles each.
142
- - **Template stubs removed:** `src/prompts/templates/` directory deleted — all 4 stub files (`implementer.ts`, `test-writer.ts`, `verifier.ts`, `single-session.ts`) were empty and unused.
352
+ ---
353
+
354
+
355
+ ## [0.42.7] 2026-03-15
356
+
357
+ ### Fixed
358
+ - Address code review fixes for critical issues.
359
+
360
+
361
+ ## [0.42.6] — 2026-03-15
362
+
363
+ ### Fixed
364
+ - Clean up ACP session with `PidRegistry`.
365
+
366
+ ---
143
367
 
144
- ## [0.29.0] - 2026-03-08
368
+
369
+ ## [0.42.5] — 2026-03-15
370
+
371
+ ### Fixed
372
+ - Add `workdir` to `CompleteOptions` and fix `cwd` in all adapters.
373
+ - Revert session creation to ensure compatibility, add `featureName` to plan, and guard `agentName`.
374
+
375
+ ---
376
+
377
+
378
+ ## [0.42.4] — 2026-03-15
379
+
380
+ _No user-facing changes._
381
+
382
+
383
+ ## [0.42.3] — 2026-03-15
384
+
385
+ ### Fixed
386
+ - Resolve model by tier in `plan`, remove `--format json`, and adjust file-based PRD output.
387
+
388
+ ---
389
+
390
+
391
+ ## [0.42.2] — 2026-03-15
145
392
 
146
393
  ### Added
147
- - **CTX-001:** `context.fileInjection` config flag (`"keyword" | "disabled"`, default `"disabled"`). MCP-aware agents pull context on-demand; file injection is now opt-in.
148
- - **CTX-002:** `nax config --explain` documents `context.fileInjection` with rationale and examples.
149
- - **CTX-003:** Unit tests covering all `fileInjection` modes (disabled, keyword, legacy compat).
394
+ - Delegate to Turbo/NX for monorepo support and detect pnpm/bun workspaces.
150
395
 
151
396
  ### Fixed
152
- - **Implementer prompt:** Agent sessions now include explicit `git commit` instruction — implementation changes were previously left uncommitted, blocking the review stage.
153
- - **Review stage:** `nax/status.json`, `nax/features/*/prd.json`, and `.nax-verifier-verdict.json` are excluded from the working-tree-clean check (nax runtime files, not agent changes).
154
- - **Version display:** Installed binary no longer shows `(dev)` `bin` now points to pre-built `dist/nax.js` with `GIT_COMMIT` injected at publish time.
397
+ - Add `--cwd` to sessions to ensure proper handling in `createSession` and `loadSession`.
398
+ - Resolve model from config in `plan()` instead of using 'default'.
399
+ - Pass `dangerouslySkipPermissions` and `maxInteractionTurns` to `plan()`.
400
+ - Ensure one-shot uses CLI adapter while interactive uses protocol-aware adapter.
401
+ - Load config with project directory in run command.
402
+ - Unwrap result envelope in `complete()` for one-shot sessions.
403
+ - Use protocol-aware registry and pass config to `adapter.plan()`.
404
+
405
+ ### Changed
406
+ - Consolidate `AgentConfig` by adding `maxInteractionTurns` and removing obsolete fields.
155
407
 
408
+ ### Other
409
+ - Remove patch script.
410
+
411
+ ---
156
412
 
157
- ## [0.18.6] - 2026-03-04
413
+
414
+ ## [0.42.1] — 2026-03-14
158
415
 
159
416
  ### Fixed
160
- - **BUG-2:** Infinite PTY respawn loop in `usePty` hook by destructuring object-identity dependencies.
161
- - **MEM-1 & MEM-3:** Prevented child process hangs on full `stderr` pipes by switching to `stderr: "inherit"`.
162
- - **BUG-21 & BUG-22:** Added missing error handling and `.catch()` chains to process `stdout` streaming and exit handlers.
417
+ - Ensure tests fail on crash or syntax error instead of silently passing.
418
+ - Make `nax run --plan` always interactive; add `--one-shot` flag.
419
+ - Update `tdd-lite` alias to map to `three-session-tdd-lite`.
420
+ - Fix gaps in `plan-v2` regarding stdin bridge, interactive run, and test strategy names.
421
+ - Add timeout and rate-limit retry to `complete()` in ACP.
163
422
 
164
- ## [0.18.5] - 2026-03-04
423
+ ---
424
+
425
+
426
+ ## [0.42.0] — 2026-03-14
427
+
428
+ ### Added
429
+ - Deprecate `nax analyze` with a migration path to `nax plan`.
430
+ - Introduce CLI flag wiring for `nax plan` and `nax run --plan`.
431
+ - Implement interactive planning mode via ACP session.
432
+ - Rewrite `planCommand` to output `prd.json` using `--auto LLM` one-shot.
433
+ - Add PRD JSON validation and schema enforcement.
434
+ - Introduce `slow-tests.ts` script to identify slow tests from Bun JUnit XML output.
435
+
436
+ ### Fixed
437
+ - Use `validatePlanOutput` from `schema.ts` in `plan-v2`, fix routing complexity extraction, and update test fixtures.
438
+ - Suppress false max-turns warning in non-interactive mode for ACP.
439
+ - Inject `_sessionRunnerDeps.autoCommitIfDirty` for reliable test mocking.
440
+ - Update autoCommitIfDirty test mock to handle `rev-parse --show-toplevel` guard.
441
+ - Update ACP acceptance test for correct default protocol.
442
+ - Repair acceptance tests for the latest schema and adapter structure.
443
+ - Default `CI=1` for all test runs to prevent real agent execution.
444
+ - Implement auto-commit git guard and script import.meta.main guards.
445
+
446
+ ### Performance
447
+ - Fix Precheck Integration tests using `DEFAULT_CONFIG` iterationDelay.
448
+ - Address remaining slow tests by adjusting iterationDelay and webhook backoff.
449
+ - Eliminate fixed sleeps in three additional slow test areas.
450
+ - Remove 2s iterationDelay sleep in execution runner integration tests.
451
+ - Replace real `Bun.sleep` in retry test with injectable sleep spy.
452
+ - Resolve `scanCodebase` 10s-per-test slowness by optimizing directory reading.
453
+
454
+ ### Other
455
+ - Remove pull policy.
456
+ - Run test.
457
+
458
+ ---
459
+
460
+
461
+ ## [0.41.0] — 2026-03-14
462
+
463
+ ### Added
464
+ - **acp-adapter:** implement session persistence and tests for acp-adapter
465
+ - **acp-adapter:** implement acpx session mode for plan/run continuity and multi-turn interaction
466
+ - **acp-adapter:** add structured logging for runOnce
467
+ - **agents:** log the protocol/adapter being used
468
+ - **acp:** wire interaction bridge to plan() via run()
469
+ - **acp:** add interaction bridge support via JSON-RPC streaming
470
+ - implement ACP cost tracking from token usage
471
+ - **acp-adapter:** implement plan() and decompose() on AcpAgentAdapter
472
+ - **acp-adapter:** implement AcpInteractionBridge for routing
473
+ - **acp-adapter:** implement createAgentRegistry() and logActiveProtocol()
474
+ - **acp-adapter:** implement AcpAgentAdapter with injectable dependencies
475
+ - refactor acceptance generators to use adapter.complete() instead of Bun.spawn
476
+
477
+ ### Fixed
478
+ - **acp:** ensure client.close() is called alongside session.close()
479
+ - **acp:** add SpawnAcpClient as the default production createClient factory
480
+ - **acp:** wire featureName, storyId, and sessionRole through TDD and execution callers
481
+ - **acp:** refactor session lifecycle for proper naming and permissions
482
+ - **acp:** wire run, complete, plan, and decompose to createClient injectable dependency
483
+ - **acp-adapter:** resolve session mode gaps identified in spec cross-check
484
+ - **acp-adapter:** pass agentName through session helpers
485
+ - **acp-adapter:** narrow rate limit detection to avoid false positives
486
+ - **acp:** thread prdPath to acceptance loop and use safe logging in adapter
487
+ - **acp-adapter:** address parity gaps with ClaudeCodeAdapter
488
+ - **acp:** thread pidRegistry and interactionBridge through execution pipeline
489
+ - **acp-adapter:** fix stdout double-read and add PID registry
490
+ - **config:** add agent protocol field to NaxConfigSchema
491
+ - **acp:** respect dangerouslySkipPermissions option
492
+ - **acp:** add stdin pipe support and fix Bun FileSink stdin API
493
+ - remove unsupported --max-tokens flag from claude-complete.ts
494
+ - wire protocol-aware agent registry through execution pipeline
495
+ - apply hotfixes to feature branch
496
+ - add acpx dependency and set default agent.protocol to acp
497
+ - verify and adjust Plan and decompose via ACP
498
+ - verify and adjust Interaction bridge for sessionUpdate to interaction chain
499
+ - commit status.json and runtime files upon run completion
500
+ - verify and adjust ACP adapter core for run() and complete() via AcpClient
501
+ - replace decompose stub with default agent adapter fallback
502
+ - disable decompose trigger and reset ACP-002 to pending
503
+ - use file-existence checks in acceptance tests and reset ACP-002
504
+ - correct acceptance test import paths and reset ACP-002
165
505
 
166
506
  ### Changed
167
- - **BUN-001:** Replaced `node-pty` (native C++ addon) with `Bun.spawn` piped stdio in `src/agents/claude.ts` and `src/tui/hooks/usePty.ts`. No native build required.
507
+ - **acp:** rewrite adapter to properly utilize acpx CLI
168
508
 
169
- ### Removed
170
- - `node-pty` dependency from `package.json`
509
+ ### Other
510
+ - Merge feat/acp-agent-adapter into master
511
+
512
+
513
+ ## [0.40.1] — 2026-03-13
514
+
515
+ ### Added
516
+ - **ui-test-strategies:** implement UI test strategies for acceptance
517
+ - **ui-test-strategies:** wire testStrategy and testFramework through acceptance-setup stage
518
+ - **ui-test-strategies:** add strategy-aware instructions to refinement prompt
519
+ - **ui-test-strategies:** implement strategy-aware acceptance test generator templates
520
+ - **ui-test-strategies:** detect UI frameworks in detectStack
521
+ - **config:** add AcceptanceTestStrategy type and schema fields
522
+ - **acceptance:** add PRD and acceptance tests for v0.40.1 UI test strategies
171
523
 
172
524
  ### Fixed
173
- - CI `before_script` no longer installs `python3 make g++` (not needed without native build)
174
- - CI `bun install` no longer needs `--ignore-scripts`
175
- - Flaky test `execution runner > completes when all stories are done` — skipped with root cause comment (acceptance loop iteration count non-deterministic)
525
+ - export AcceptanceConfigSchema for UI test strategies feature
526
+ - verify and adjust test strategy types and config schema extension
176
527
 
177
- ## [0.18.4] - 2026-03-04
528
+
529
+ ## [0.40.0] — 2026-03-12
530
+
531
+ ### Added
532
+ - **acceptance:** implement acceptance-setup pipeline stage with RED gate
533
+ - **acceptance:** generate acceptance tests from PRD for test generation
534
+ - **acceptance:** implement AC refinement module with LLM adapter integration
535
+ - **prompts:** migrate prompt stage to use PromptBuilder for batch prompts
536
+ - **prompts:** add batch role to PromptBuilder
178
537
 
179
538
  ### Fixed
180
- - **BUG-031:** Keyword classifier no longer drifts across retries `description` excluded from complexity/strategy classification (only `title`, `acceptanceCriteria`, `tags` used). Prevents prior error context from upgrading story complexity mid-run.
181
- - **BUG-033:** LLM routing now retries on timeout/transient failure. New config: `routing.llm.retries` (default: 1), `routing.llm.retryDelayMs` (default: 1000ms). Default timeout raised from 15s to 30s.
539
+ - verify and adjust integration test for RED to GREEN acceptance cycle
540
+ - wire preRunPipeline into runner before per-story loop
541
+ - resolve lint and type issues in generator-prd test file
542
+ - **ci:** align notify_pipeline_failed rules with test job rules
543
+ - **ci:** make test dependency optional in notify_pipeline_failed
544
+ - **ci:** fix notify_mr_success and notify_pipeline_failed jobs
545
+
546
+
547
+ ## [0.39.3] — 2026-03-12
182
548
 
183
549
  ### Added
184
- - Pre-commit hook (`.githooks/pre-commit`) runs `typecheck` + `lint` before every commit. Install with: `git config core.hooksPath .githooks`
550
+ - **prompts:** add session context to all TDD role prompts
551
+ - **prompts:** inject test command from config into role prompts
552
+ - **security:** enhance prompt hardening and expand environment variable stripping
185
553
 
186
- ## [0.10.0] - 2026-02-23
554
+ ### Fixed
555
+ - **analyze:** remove hardcoded API key check
556
+ - **prompts:** pass constitution and testCommand to all TDD roles
557
+
558
+ ### Changed
559
+ - **routing:** clean up LLM routing prompt
560
+ - **prompts:** unify test-after and tdd-simple into a single prompt
561
+
562
+
563
+ ## [0.39.2] — 2026-03-12
187
564
 
188
565
  ### Added
566
+ - **review:** implement deferred plugin review after all stories complete
567
+ - **review:** skip plugin reviewers when pluginMode is deferred
568
+ - add pluginMode config to ReviewConfig schema
189
569
 
190
- #### Plugin System
191
- - Introduced extensible plugin architecture supporting:
192
- - Prompt optimizers for context compression and token reduction
193
- - Custom routers for intelligent agent/model selection
194
- - Code reviewers for quality gates and automated checks
195
- - Context providers for dynamic context injection
196
- - Custom reporters for execution reporting and analytics
197
- - Agent launchers for custom agent implementations
198
- - Plugin discovery from both global (`~/.nax/plugins`) and project-local (`nax/plugins`) directories
199
- - Plugin validation and lifecycle management (setup/teardown hooks)
200
- - Safe plugin loading with comprehensive error handling
201
- - Plugin configuration via `nax/config.json` with per-plugin settings
202
570
 
203
- #### Global Configuration Layering
204
- - Implemented three-tier configuration system:
205
- - User-global config (`~/.nax/config.json`) for default preferences
206
- - Project config (`nax/config.json`) for project-specific settings
207
- - CLI overrides for runtime customization
208
- - Deep merge strategy with array override semantics
209
- - Layered constitution loading with optional global opt-out
210
- - Project-level directory detection for automatic config discovery
211
- - Validation and normalization at each layer
571
+ ## [0.39.1] 2026-03-12
212
572
 
213
- #### Prompt Optimizer
214
- - Built-in prompt optimization system with modular optimizer plugins
215
- - Token budget enforcement with configurable limits
216
- - Multi-strategy optimization:
217
- - Redundancy elimination
218
- - Context summarization
219
- - Selective detail retention
220
- - Optimization statistics tracking (original vs. optimized token counts, reduction percentage)
221
- - Integration with execution pipeline for automatic prompt optimization
222
- - Plugin API for custom optimization strategies
223
-
224
- ### Changed
225
- - Refactored config loading to support global + project layering
226
- - Updated constitution loader to support skipGlobal flag
227
- - Enhanced plugin registry with proper lifecycle management
228
- - Improved error handling across plugin loading and validation
229
-
230
- ### Fixed
231
- - Path security test failures on macOS (handled `/private` symlink prefix)
232
- - TypeScript compilation errors across 9 files (20 total errors resolved)
233
- - Import organization and code formatting issues (96 files auto-formatted)
573
+ ### Fixed
574
+ - **routing:** resolve agent adapter for LLM batch routing
575
+ - **review:** pass storyGitRef to review orchestrator for plugin changed-file detection
576
+
577
+
578
+ ## [0.39.0] — 2026-03-12
579
+
580
+ ### Added
581
+ - **init:** implement post-init checklist and unified init flow
582
+ - **init:** generate context.md for project initialization
583
+ - **init:** auto-detect project stack and pre-fill quality commands
584
+
585
+
586
+ ## [0.38.2] 2026-03-11
587
+
588
+ ### Added
589
+ - **plugins:** add enabled/disabled toggle for plugins
590
+
591
+
592
+ ## [0.38.1] 2026-03-11
593
+
594
+ ### Fixed
595
+ - Make timeout-handler killFn injectable to fix SIGTERM test.
596
+ - Clean up pidRegistries Map after run completion.
597
+ - Validate story IDs before git branch creation.
598
+ - Resolve PID registry race conditions and timer leaks.
599
+ - Eliminate leaked timers in executeOnce and fix runOnce test command injection.
600
+ - Update parallel-cleanup tests for Phase 3 file split.
601
+ - Add storyGitRef to ExecutionConfig and define StoryCompletedEvent type.
602
+ - Fix beforeEach scoping in lifecycle tests.
603
+ - Remove duplicate imports in cli-precheck test.
604
+ - Remove duplicate skipInCI declaration in cli-precheck test.
605
+
606
+ ### Changed
607
+ - Extract errorMessage utility.
608
+ - Split lifecycle.test.ts and fix runner modules lint errors.
609
+ - Extract magic number to named constant.
610
+ - Extract shared JSON file read/write utility.
611
+ - Split types.ts into extensions module.
612
+ - Split parallel.ts into coordinator and worker modules.
613
+ - Split verdict.ts into reader module.
614
+ - Complete verdict.ts split with reader and coerce modules.
615
+ - Split crash-recovery.ts into writer, signals, and heartbeat modules.
616
+ - Split checks-blockers.ts into git, config, cli, and system modules.
617
+ - Split logs.ts into reader and formatter modules.
618
+ - Split types.ts into schema-types and runtime-types modules.
619
+ - Split parallel-executor.ts into rectify and rectification-pass modules.
620
+ - Split claude.ts into execution, complete, and interactive modules.
621
+ - Split prompts.ts into main, init, export, and tdd modules.
622
+ - Split config.ts into display, get, and diff modules.
623
+ - Wrap Bun calls in injectable dependencies.
624
+ - Remove duplicate integration and execution tests.
625
+ - Remove duplicate context tests.
626
+ - Consolidate execution lifecycle tests.
627
+ - Consolidate decompose validator tests.
628
+
629
+ ### Other
630
+ - Update gitignore.
631
+
632
+
633
+ ## [0.38.0] — 2026-03-10
634
+
635
+ ### Added
636
+ - Add test file size enforcement script.
637
+ - Add dead test detection script.
638
+ - Add automated test overlap analyzer script.
639
+
640
+ ---
641
+
642
+
643
+ ## [0.37.0] — 2026-03-10
644
+
645
+ ### Added
646
+ - Wire promptsInitCommand into nax init scaffold.
647
+ - Integrate nax prompts --export CLI functionality.
648
+ - Add exportPromptCommand for nax prompts --export <role>.
649
+ - Add tdd-simple default template to promptsInitCommand.
650
+ - Add tdd-simple to PromptsConfigSchema override enum.
651
+ - Document v0.37.0 prompt template export.
652
+
653
+ ### Fixed
654
+ - Guard executionConfig optional chaining in review orchestrator.
655
+ - Include auto-committed changes in plugin reviewer scan.
656
+
657
+ ---
658
+
659
+
660
+ ## [0.36.2] — 2026-03-10
661
+
662
+ ### Added
663
+ - Implement merge conflict rectification in parallel executor.
664
+ - Classify runtime crashes separately from test failures.
665
+
666
+ ### Fixed
667
+ - Skip runner integration tests in CI due to missing Claude CLI.
668
+ - Mock runParallelExecution at runner level to fix dynamic-import isolation.
669
+ - Capture _parallelExecutorDeps originals in beforeEach to prevent CI contamination.
670
+ - Update integration tests for mergeConflicts field rename and runElapsedMs.
671
+ - Update MFX-005 test mocks to use mergeConflicts field name.
672
+ - Rename ParallelBatchResult fields and update durationMs to runElapsedMs.
673
+ - Preserve story metrics across model escalation.
674
+ - Fix parallel batch metrics aggregation.
675
+
676
+ ---
677
+
678
+
679
+ ## [0.36.1] — 2026-03-10
680
+
681
+ ### Added
682
+ - Wire verdict section into PromptBuilder for verifier.
683
+
684
+ ### Fixed
685
+ - Recognize VERIFIED keyword in coerceVerdict.
686
+ - Update migration test to use renamed buildBatchRoutingPrompt.
687
+ - Wire constitution into TDD implementer sessions.
688
+ - Log plugin reviewer result and error details in orchestrator.
689
+ - Log raw content when verifier verdict JSON fails to parse.
690
+ - Normalize choose interaction responses in chain.prompt().
691
+
692
+ ### Changed
693
+ - Deduplicate functions and fix imports.
694
+ - Remove dead exports.
695
+ - Remove dead standalone prompt functions.
696
+ - Deduplicate test filter warning and use template literals.
697
+
698
+ ---
699
+
700
+
701
+ ## [0.36.0] — 2026-03-10
702
+
703
+ ### Added
704
+ - Implement nax agents CLI command.
705
+ - Update precheck for multi-agent support.
706
+ - Implement Gemini CLI context generator.
707
+ - Implement Codex context generator with AGENTS.md support.
708
+ - Document multi-agent config in nax config --explain.
709
+ - Implement OpenCodeAdapter with complete() support.
710
+ - Initial PRD for v0.36.0 (multi-agent).
711
+
712
+ ### Fixed
713
+ - Resolve routing stage crash when config.execution is undefined.
714
+ - Address merge conflicts in full adapter implementations.
715
+ - Wire agent adapter into routing context for LLM routing.
716
+ - Ensure tolerant verdict coercion for free-form agent output.
717
+
718
+ ### Changed
719
+ - Extract autoCommitIfDirty into src/utils/git.ts.
720
+
721
+ ---
722
+
723
+
724
+ ## [0.35.0] — 2026-03-09
725
+
726
+ ### Added
727
+ - Implement CodexAdapter with execute and complete methods.
728
+ - Add tdd-simple strategy option and switch nax project config to auto.
729
+ - Refactor auto plugin to use adapter.complete().
730
+ - Refactor LLM routing strategy to use adapter.complete().
731
+ - Add PluginLogger for write-only, stage-prefixed logging for plugins.
732
+ - Refactor classifier to use adapter.complete() and remove @anthropic-ai/sdk.
733
+ - Remove hardcoded Claude-Sonnet-4-5 model fallbacks.
734
+ - Add checkAgentCLI to support configured agent binary.
735
+ - Export CompleteOptions and CompleteError from agents barrel.
736
+ - Implement complete() method on ClaudeCodeAdapter.
737
+
738
+ ### Fixed
739
+ - Auto-commit after rectification agent sessions.
740
+ - Log verdict file content when missing required fields.
741
+ - Only skip testStrategy override for LLM-routed cache hits.
742
+ - Remove second testStrategy override in routing stage cache hit.
743
+ - Use NODE_ENV check for test environment detection instead of any-cast.
744
+ - Add missing logs in TDD session and rectification paths.
745
+ - Recompute testStrategy from complexity on LLM cache hit.
746
+ - Allow Telegram/Webhook interaction plugins in headless mode.
747
+ - Integrate checkAgentCLI into precheck orchestrator.
748
+
749
+ ---
750
+
751
+
752
+ ## [0.34.0] — 2026-03-09
753
+
754
+ ### Added
755
+ - Remove duplicate stopHeartbeat and writeExitSummary from sequential executor.
756
+ - Implement smart-skip for deferred regression when all stories pass the full-suite gate in sequential mode.
757
+ - Track fullSuiteGatePassed per story in metrics.
758
+ - Handle deferred regression failure in run-completion.
759
+ - Add on-final-regression-fail hook.
760
+ - Move run:completed event after regression gate.
761
+ - Add on-all-stories-complete lifecycle hook.
762
+
763
+ ### Fixed
764
+ - Add storyDurationMs to story.complete and progress logs.
765
+
766
+ ### Other
767
+ - Update Claude.
768
+
769
+ ---
770
+
771
+
772
+ ## [0.33.0] — 2026-03-09
773
+
774
+ ### Added
775
+ - Thread structured review findings through escalation to retry context.
776
+ - Wire pipeline integration and CLI entry point for decomposition.
777
+ - Add structured ReviewFinding type for reviewer plugins.
778
+ - Introduce config schema, PRD mutation, and story-oversized trigger for decomposition.
779
+ - Add post-decompose validators for overlap, coverage, complexity, and dependency.
780
+ - Implement DecomposeBuilder fluent API and prompt sections.
781
+
782
+ ### Fixed
783
+ - Resolve duplicate exit summary and premature heartbeat stop in execution.
784
+ - Correct overlap validator thresholds in decomposition to match specifications.
785
+
786
+
787
+ ## [0.32.2] — 2026-03-09
788
+
789
+ ### Fixed
790
+ - Address full-suite gate silently passing on crash/OOM truncated output in tdd-simple.
791
+
792
+
793
+ ## [0.32.1] — 2026-03-09
794
+
795
+ ### Added
796
+ - Implement tilde expansion in hook command parser.
797
+
798
+
799
+ ## [0.32.0] — 2026-03-09
800
+
801
+ ### Added
802
+ - Wire tdd-simple execution path.
803
+ - Add tdd-simple prompt section and PromptBuilder support.
804
+ - Introduce tdd-simple test strategy type and routing.
805
+
806
+ ### Fixed
807
+ - Use actual testStrategy in prompt stage logging.
808
+ - Correct prompt template generation to include only four templates.
809
+ - Add tdd-simple to RoutingResult type union.
810
+
811
+
812
+ ## [0.31.1] — 2026-03-09
813
+
814
+ ### Fixed
815
+ - Auto-commit after agent sessions to prevent review failures.
816
+
817
+
818
+ ## [0.31.0] — 2026-03-08
819
+
820
+ ### Added
821
+ - Auto-configure prompts.overrides during initialization.
822
+ - Wire prompts --init into the CLI.
823
+ - Add nax prompts --init to export default templates.
824
+
825
+ ### Fixed
826
+ - Normalize PRD status aliases and precheck command detection.
827
+ - Use 'pending' status in tdd-simple PRD instead of 'open'.
828
+ - Inject context markdown into verifier prompt.
829
+
830
+
831
+ ## [0.30.0] - 2026-03-08
832
+
833
+ ### Fixed
834
+ - **Global install crash:** `bin/nax.ts`, `headless-formatter.ts`, and `cli/analyze.ts` were reading `package.json` at runtime via `import.meta.dir`-relative paths. In a global bun install, these paths resolve incorrectly, causing an ENOENT crash on launch. All three now use the static `NAX_VERSION` constant (baked in at build time).
835
+
836
+ ### Refactored
837
+ - **Prompt Builder wired to sections:** `PromptBuilder` now calls `buildRoleTaskSection()`, `buildIsolationSection()`, `buildStorySection()`, and `buildConventionsSection()` from `src/prompts/sections/` instead of duplicated inline functions. Eliminates 80+ lines of dead code.
838
+ - **Sections expanded:** `role-task.ts` and `isolation.ts` now cover all 4 roles (`implementer`, `test-writer`, `verifier`, `single-session`). Previously only covered 1–2 roles each.
839
+ - **Template stubs removed:** `src/prompts/templates/` directory deleted — all 4 stub files (`implementer.ts`, `test-writer.ts`, `verifier.ts`, `single-session.ts`) were empty and unused.
840
+
841
+
842
+ ## [0.29.0] - 2026-03-08
843
+
844
+ ### Added
845
+ - `context.fileInjection` config flag (`"keyword" | "disabled"`, default `"disabled"`). MCP-aware agents pull context on-demand; file injection is now opt-in.
846
+ - `nax config --explain` documents `context.fileInjection` with rationale and examples.
847
+ - Unit tests covering all `fileInjection` modes (disabled, keyword, legacy compat).
848
+
849
+ ### Fixed
850
+ - **Implementer prompt:** Agent sessions now include explicit `git commit` instruction — implementation changes were previously left uncommitted, blocking the review stage.
851
+ - **Review stage:** `nax/status.json`, `nax/features/*/prd.json`, and `.nax-verifier-verdict.json` are excluded from the working-tree-clean check (nax runtime files, not agent changes).
852
+ - **Version display:** Installed binary no longer shows `(dev)` — `bin` now points to pre-built `dist/nax.js` with `GIT_COMMIT` injected at publish time.
853
+
854
+
855
+ ## [0.28.0] — 2026-03-08
856
+
857
+ ### Added
858
+ - Add prompts config schema validation and precheck for override files.
859
+
860
+ ### Fixed
861
+ - Document prompts config in nax config --explain and add precheck validation.
862
+ - Migrate all existing prompt-building call sites to PromptBuilder.
863
+ - Implement default templates and user override loader.
864
+ - Add .solo/ to gitignore and stage missing execution.ts hunk.
865
+ - Implement typed sections: isolation, role-task, story, verdict, conventions.
866
+ - Create PromptBuilder class with layered section architecture.
867
+
868
+
869
+ ## [0.27.1] — 2026-03-08
870
+
871
+ ### Fixed
872
+ - Skip verification when TDD full-suite gate is passed and differentiate skip reasons in the pipeline runner.
873
+
874
+
875
+ ## [0.27.0] — 2026-03-08
876
+
877
+ ### Added
878
+ - Assert clean working tree before running review checks.
879
+
880
+ ### Fixed
881
+ - Consolidate dead quality.commands.typecheck/lint into review resolution chain.
882
+ - Fix checkOptionalCommands precheck to use the correct config resolution path.
883
+ - Guard GIT_COMMIT injection against empty strings and add safe.directory to CI release stage.
884
+ - Resolve naxCommit from git at runtime when not build-injected.
885
+ - Sort imports in optimizer/index.ts.
886
+
887
+ ### Changed
888
+ - Use Bun-native APIs for runtime commit resolution in version.ts.
889
+
890
+
891
+ ## [0.26.0] — 2026-03-08
892
+
893
+ ### Fixed
894
+ - Add missing contentHash field to StoryRouting type.
895
+ - Adjust contentHash in StoryRouting for staleness detection.
896
+ - Adjust initialComplexity in StoryRouting and StoryMetrics for accurate reporting.
897
+ - Ensure initial routing is persisted to prd.json on first classification.
898
+
899
+
900
+ ## [0.25.0] — 2026-03-07
901
+
902
+ ### Added
903
+ - Wire on-resume, on-session-end, and on-error hook events.
904
+ - Wire story-ambiguity and review-gate triggers.
905
+ - Wire security-review, merge-conflict, and pre-merge triggers.
906
+ - Wire max-retries trigger in interaction subscriber.
907
+ - Wire cost-exceeded and cost-warning triggers in sequential-executor.
908
+
909
+
910
+ ## [0.24.0] — 2026-03-07
911
+
912
+ ### Added
913
+ - Introduce global resolution for nax logs via central registry.
914
+ - Add nax runs CLI command for managing the central run registry.
915
+ - Implement registry writer subscriber.
916
+ - Create events file writer subscriber.
917
+
918
+
919
+ ## [0.23.0] — 2026-03-07
920
+
921
+ ### Added
922
+ - Log nax version and git commit hash at the start of each run.
923
+ - Add required statusFile parameter to end-to-end tests.
924
+ - Align status readers to nax/status.json.
925
+ - Write feature-level status at the end of a run.
926
+
927
+ ### Fixed
928
+ - Use process.kill(pid,0) for checking if a process is alive.
929
+ - Add testScoped, lintFix, and formatFix to quality.commands Zod schema.
930
+
931
+
932
+ ## [0.22.4] — 2026-03-07
933
+
934
+ ### Fixed
935
+ - Fix scoped test command, testScoped config, and command logging.
936
+
937
+
938
+ ## [0.22.3] — 2026-03-07
939
+
940
+ ### Added
941
+ - Mark the status-file-consolidation feature as complete.
942
+
943
+ ### Fixed
944
+ - Add a 10-second hard deadline to async signal handlers.
945
+ - Replace Bun.sleep with a clearable setTimeout in the executor.
946
+ - Release lock when setupRun fails after acquisition.
947
+ - Narrow catch in drainWithDeadline to expected errors.
948
+ - Treat corrupt lock files as stale and delete them.
949
+ - Replace executing array with Set to prevent race conditions.
950
+ - Declare product requirements document before crash handler to avoid TDZ.
951
+ - Suppress unhandled rejection on timeoutPromise.
952
+ - Use emitAsync for human-review:requested event.
953
+ - Read stdout/stderr concurrently with proc.exited.
954
+ - Remove cancel() on locked ReadableStreams, using kill() only.
955
+
956
+
957
+ ## [0.22.2] — 2026-03-07
958
+
959
+ ### Added
960
+ - Automatically write project-level status to nax/status.json.
961
+
962
+ ### Fixed
963
+ - Silence floating outputPromise on LLM timeout to prevent crashes.
964
+ - Add missing fields to the SFC product requirements document.
965
+ - Ensure required fields for status-file consolidation are included.
966
+ - Use the userStories field in the SFC product requirements document.
967
+
968
+
969
+ ## [0.22.1] — 2026-03-07
970
+
971
+ _No user-facing changes._
972
+
973
+
974
+ ## [0.22.0] — 2026-03-07
975
+
976
+ ### Added
977
+ - Complete Phase 4 by deleting deprecated files and streamlining executors.
978
+ - Remove preIterationTierCheck from executor.
979
+ - Eliminate deprecated code and routing duplicates.
980
+ - Consolidate subscribers via event bus for hooks, reporters, and interactions.
981
+ - Introduce new pipeline stages: rectify, autofix, regression, and retry action.
982
+ - Split context.test.ts into focused files for better organization.
983
+ - Conduct coverage gap analysis.
984
+ - Tag tests for re-architecture impact.
985
+ - Split large test files for better manageability.
986
+ - Reorganize test folder structure for clarity.
987
+
988
+ ### Fixed
989
+ - Add a 15-second timeout guard to runNaxCommand in CLI logs test.
990
+ - Address 11 code review issues, including critical and major fixes.
991
+ - Implement hard deadline and OS-level force-kill to prevent process hangs.
992
+ - Delete test files marked for removal.
993
+ - Fix biome lint issues related to import order and formatting.
994
+ - Correct broken relative paths due to folder reorganization.
995
+ - Fix broken import paths in plan-analyze-run.test.ts after moving to test/e2e/.
996
+
997
+
998
+ ## [0.21.0] — 2026-03-06
999
+
1000
+ ### Added
1001
+ - Deprecate test-after from auto routing, defaulting to three-session-tdd-lite.
1002
+ - Introduce baseRef tracking for precise smart-runner diffs.
1003
+
1004
+ ### Fixed
1005
+ - Update tests for path-only context and TDD-lite default.
1006
+ - Address path-only context issue for oversized files.
1007
+ - Fix LLM routing stream drain on timeout.
1008
+ - Cancel stdout/stderr streams before process termination on LLM timeout.
1009
+ - Follow up on runOnce() SIGKILL and unregister in the finally block.
1010
+ - Revert to bun run test for quality.commands.test to avoid spawn issues.
1011
+ - Prevent orphan processes with simple fixes.
1012
+
1013
+
1014
+ ## [0.20.0] — 2026-03-06
1015
+
1016
+ ### Added
1017
+ - Complete the verification architecture v2 for version 0.20.0.
1018
+ - Implement the new verification architecture v2.
1019
+ - Remove duplicate verification in post-verify scope.
1020
+ - Add product requirements document for verification architecture v2.
1021
+
1022
+ ### Fixed
1023
+ - Revert verify.ts default to deferred and fix smart-runner test context.
1024
+ - Set default regressionGate mode to per-story for clarity in smart-runner tests.
1025
+ - Refactor foundation tests for compatibility with v0.20.0 architecture.
1026
+ - Allow scoped verification in deferred regression mode.
1027
+ - Sync implementation with green unit tests for US-003.
1028
+ - Make final adjustments to logic and tests for US-003 deferred regression gate.
1029
+ - Refactor rectification-flow tests to align with v0.20.0 architecture.
1030
+ - Verify and adjust the deferred regression gate.
1031
+ - Fix regression in tests and verify stage output tailing.
1032
+
1033
+
1034
+ ## [0.19.0] — 2026-03-05
1035
+
1036
+ ### Added
1037
+ - Implement security hardening and fixes in v0.19.0.
1038
+
1039
+
1040
+ ## [0.18.6] - 2026-03-04
1041
+
1042
+ ### Fixed
1043
+ - **fix:** Infinite PTY respawn loop in `usePty` hook by destructuring object-identity dependencies.
1044
+ - **MEM-1 & MEM-3:** Prevented child process hangs on full `stderr` pipes by switching to `stderr: "inherit"`.
1045
+ - Added missing error handling and `.catch()` chains to process `stdout` streaming and exit handlers.
1046
+
1047
+
1048
+ ## [0.18.5] - 2026-03-04
1049
+
1050
+ ### Changed
1051
+ - Replaced `node-pty` (native C++ addon) with `Bun.spawn` piped stdio in `src/agents/claude.ts` and `src/tui/hooks/usePty.ts`. No native build required.
1052
+
1053
+ ### Removed
1054
+ - `node-pty` dependency from `package.json`
1055
+
1056
+ ### Fixed
1057
+ - CI `before_script` no longer installs `python3 make g++` (not needed without native build)
1058
+ - CI `bun install` no longer needs `--ignore-scripts`
1059
+ - Flaky test `execution runner > completes when all stories are done` — skipped with root cause comment (acceptance loop iteration count non-deterministic)
1060
+
1061
+
1062
+ ## [0.18.4] - 2026-03-04
1063
+
1064
+ ### Fixed
1065
+ - **fix:** Keyword classifier no longer drifts across retries — `description` excluded from complexity/strategy classification (only `title`, `acceptanceCriteria`, `tags` used). Prevents prior error context from upgrading story complexity mid-run.
1066
+ - **fix:** LLM routing now retries on timeout/transient failure. New config: `routing.llm.retries` (default: 1), `routing.llm.retryDelayMs` (default: 1000ms). Default timeout raised from 15s to 30s.
1067
+
1068
+ ### Added
1069
+ - Pre-commit hook (`.githooks/pre-commit`) — runs `typecheck` + `lint` before every commit. Install with: `git config core.hooksPath .githooks`
1070
+
1071
+
1072
+ ## [0.18.3] — 2026-03-04
1073
+
1074
+ ### Added
1075
+ - Introduce execution reliability features and smart runner enhancements.
1076
+ - Add configurable test file patterns and structured failure types.
1077
+
1078
+ ### Fixed
1079
+ - Implement optional chaining in regression gate config and finalize barrel imports in integration tests.
1080
+
1081
+ ---
1082
+
1083
+
1084
+ ## [0.18.2] — 2026-03-03
1085
+
1086
+ ### Added
1087
+ - Integrate smart runner into the verify stage.
1088
+ - Add `execution.smartTestRunner` flag for configuration.
1089
+ - Introduce functions for scoped test runs and source-to-test file mapping.
1090
+
1091
+ ### Fixed
1092
+ - Resolve leakage issues in smart runner tests and adjust console logging options.
1093
+
1094
+ ---
1095
+
1096
+
1097
+ ## [0.18.1] — 2026-03-03
1098
+
1099
+ ### Fixed
1100
+ - Skip CLAUDE-dependent precheck integration tests in CI.
1101
+ - Add global git identity to the test stage for git commits in tests.
1102
+ - Fix CI to skip environment-sensitive tests and resolve ENOENT crashes.
1103
+
1104
+ ---
1105
+
1106
+
1107
+ ## [0.18.0] — 2026-03-03
1108
+
1109
+ ### Added
1110
+ - Integrate interaction chain into the runner loop.
1111
+
1112
+ ### Fixed
1113
+ - Log exit code and stderr on agent session failure.
1114
+ - Prioritize retrying failed stories before moving to the next.
1115
+ - Ensure Task classified log shows final routing state after all overrides.
1116
+ - Skip hanging verify tests and disable type check in review.
1117
+ - Add `storyId` to all JSONL event emitters.
1118
+ - Emit `run.complete` event on SIGTERM shutdown.
1119
+
1120
+ ---
1121
+
1122
+
1123
+ ## [0.17.1] — 2026-03-02
1124
+
1125
+ ### Fixed
1126
+ - Improve timeout messaging and skip test-writer on retry.
1127
+
1128
+ ---
1129
+
1130
+
1131
+ ## [0.17.0] — 2026-03-02
1132
+
1133
+ ### Added
1134
+ - Introduce config management features including default view and explanation commands.
1135
+ - Add `--diff` flag to the `nax config` command.
1136
+ - Add configuration default view with source header.
1137
+
1138
+ ### Fixed
1139
+ - Adjust `nax config` for default view and explanation commands.
1140
+ - Add `USER/LOGNAME` to the environment allowlist for macOS Keychain authentication.
1141
+ - Ensure escalation routing is applied correctly in iterations.
1142
+
1143
+ ---
1144
+
1145
+
1146
+ ## [0.16.2] — 2026-03-01
1147
+
1148
+ ### Added
1149
+ - **unlock:** Implement unlock command with unit tests.
1150
+
1151
+ ### Fixed
1152
+ - **tdd:** Skip greenfield pause when pre-existing test files exist in repo.
1153
+
1154
+
1155
+ ## [0.16.1] — 2026-03-01
1156
+
1157
+ ### Added
1158
+ - **generate:** Multi-language auto-injection for various programming languages.
1159
+ - **generate:** Project context generator replaces constitution generator.
1160
+
1161
+ ### Fixed
1162
+ - **tests:** Resolve all pre-existing integration test failures.
1163
+ - **execution:** Hotfix broken import and ReferenceError.
1164
+
1165
+
1166
+ ## [0.15.3] — 2026-02-28
1167
+
1168
+ ### Added
1169
+ - **constitution:** Implement constitution-to-agent-config generator.
1170
+
1171
+
1172
+ ## [0.15.1] — 2026-02-28
1173
+
1174
+ ### Added
1175
+ - **interaction:** Implement Telegram, webhook, and interactive pipeline core.
1176
+
1177
+ ### Fixed
1178
+ - **interaction:** Resolve code review findings from v0.15.0 audit.
1179
+ - **tests:** Skip precheck in unit/integration tests to fix failing tests.
1180
+
1181
+ ### Changed
1182
+ - **execution:** Trim `parallel.ts` from 404 to 400 lines.
1183
+ - **routing:** Split `llm.ts` into `llm.ts` and `llm-prompts.ts`.
1184
+
1185
+
1186
+ ## [0.14.1] — 2026-02-28
1187
+
1188
+ ### Added
1189
+ - Add `nax diagnose` CLI command.
1190
+
1191
+ ### Fixed
1192
+ - **diagnose:** Resolve `projectDir` to parent of `nax/` subdir.
1193
+
1194
+
1195
+ ## [0.14.0] — 2026-02-28
1196
+
1197
+ ### Added
1198
+ - **runner:** Auto-switch to test-after on greenfield with no tests.
1199
+ - **execution:** Add PID registry for orphan process cleanup on crash.
1200
+ - **verify:** Add full-suite regression gate after scoped tests.
1201
+
1202
+ ### Fixed
1203
+ - **runner:** Reset attempt counter on tier escalation.
1204
+
1205
+
1206
+ ## [0.13.0] — 2026-02-27
1207
+
1208
+ ### Added
1209
+ - **precheck:** Implement CLI command with `--json` flag.
1210
+ - **precheck:** Add types and check implementations.
1211
+ - Add `storyPoints` field and auto-default to 1.
1212
+
1213
+ ### Fixed
1214
+ - **precheck:** Fix integration test setup to commit fixtures before precheck.
1215
+
1216
+
1217
+ ## [0.12.0] — 2026-02-27
1218
+
1219
+ ### Added
1220
+ - **logging:** Implement `nax logs` command with filtering and follow mode.
1221
+ - **status:** Introduce `nax status` command for active run detection.
1222
+ - **logging:** Add human-friendly formatter with verbosity levels.
1223
+ - **cli:** Add project resolver with CWD and `-d` flag support.
1224
+ - **plugins:** Sample console reporter plugin with tests.
1225
+ - **pipeline:** Integrate plugin system and reporters into runner.
1226
+ - **optimizer:** Add prompt optimization stage with rule-based optimizer.
1227
+ - **config:** Integrate global config layering into loaders and schema.
1228
+ - Add `nax prompts` CLI command for prompt inspection.
1229
+
1230
+ ### Fixed
1231
+ - Accept 'done'/'passed' for skip and default tags to empty array.
1232
+ - **tests:** Resolve remaining test failures.
1233
+ - **runner:** Add state reconciliation for failed stories with commits.
1234
+ - **cli:** Replace `process.exit` with thrown errors.
1235
+
1236
+ ### Changed
1237
+ - **test:** Restructure test suite into unit/integration/ui tiers.
1238
+
1239
+
1240
+ ## [0.9.2] — 2026-02-22
1241
+
1242
+ ### Fixed
1243
+ - Update verifier prompt in TDD to allow legitimate test modifications.
1244
+
1245
+
1246
+ ## [0.9.1] — 2026-02-22
1247
+
1248
+ ### Fixed
1249
+ - Respect LLM complexity, add PRD fields, and relax isolation in analysis.
1250
+
1251
+ ---
1252
+
1253
+
1254
+ ## [0.9.0] — 2026-02-22
1255
+
1256
+ ### Added
1257
+ - Introduce configurable LLM routing mode: one-shot, per-story, hybrid.
1258
+ - Split relevantFiles into contextFiles and expectedFiles.
1259
+ - Wire routing mode to batch trigger and hybrid re-route.
1260
+ - Implement one-shot mode to skip per-story LLM calls on cache miss.
1261
+ - Replace routing.llm.batchMode with routing.llm.mode enum.
1262
+ - Add nax runs commands and complete console.log migration in CLI.
1263
+ - Emit structured stage lifecycle events in the logger.
1264
+ - Add --verbose, --quiet, --silent flags and run directory in CLI.
1265
+ - Implement structured Logger with level gating and JSONL output.
1266
+ - Enhance routing with LLM support and batch capabilities.
1267
+ - Add LLM routing config schema and defaults.
1268
+ - Introduce configurable model tiers per TDD session.
1269
+ - Add test deduplication guidance referencing coverage summary.
1270
+ - Inject test coverage summary into story prompts.
1271
+ - Add test file scanner for coverage summary.
1272
+ - Wire ADR-003 verification and stall detection into the runner.
1273
+ - Add blocked status, stall detection, and update escalation tests in PRD.
1274
+ - Port ADR-003 robust orchestration feedback loop to @nathapp/nax.
1275
+
1276
+ ### Fixed
1277
+ - Resolve review HIGH/MED findings before v0.9 merge.
1278
+ - Apply batchMode compatibility shim before defaults merge.
1279
+ - Return no-op logger when not initialized for test safety.
1280
+ - Address P1-P5 review findings for LLM routing.
1281
+ - Address P1+P2 from code review regarding workdir in post-verification.
1282
+ - Clean up orphaned child processes after TDD session failure.
1283
+ - Detect empty test-writer sessions in TDD orchestrator.
1284
+ - Prevent false positive pauses during post-TDD test verification.
1285
+ - Use CLI aliases for default model config.
1286
+ - Reset attempts on tier escalation with defensive checks.
1287
+ - Surface ASSET_CHECK errors as mandatory instructions in prompt.
1288
+ - Implement pre-iteration tier escalation and per-story failure cap.
1289
+ - Re-derive modelTier from cached complexity.
1290
+ - Fix syntax error in agents' plan method.
1291
+ - Use Bun.file() for plan stdout redirect in agents.
1292
+ - Use file descriptors instead of shell redirect for plan output in agents.
1293
+ - Restore --permission-mode plan for all modes in agents.
1294
+ - Read stdout/stderr before proc.exited to prevent stream loss in agents.
1295
+ - Resolve P0/P1 review findings from ADR-003 code review.
1296
+
1297
+ ### Changed
1298
+ - Output contextFiles instead of relevantFiles in analysis.
1299
+ - Use getExpectedFiles for asset checks in verification.
1300
+ - Use getContextFiles for prompt injection in context.
1301
+ - Add contextFiles and expectedFiles types and resolvers in PRD.
1302
+ - Migrate console.log to structured logger in agents, pipeline, and execution.
1303
+ - Deduplicate proc.kill on timeout and add unit tests for validation helpers.
1304
+ - Make routing strategy chain async for LLM support.
1305
+ - Resolve P2/P3 review findings.
1306
+
1307
+ ---
1308
+
1309
+
1310
+ ## [0.6.0] — 2026-02-17
1311
+
1312
+ ### Added
1313
+ - Enhance TUI with a responsive layout and polish.
1314
+ - Introduce keyboard controls and overlays in TUI.
1315
+ - Embed agent PTY session in the TUI.
1316
+ - Add an Ink-based TUI with a stories panel.
1317
+ - Implement an event emitter for TUI integration.
1318
+
1319
+ ### Fixed
1320
+ - Polish P3-P4 review findings in TUI.
1321
+ - Populate story costs and add PTY line length limits.
1322
+ - Wire PTY integration to the agent panel.
1323
+
1324
+ ---
1325
+
1326
+
1327
+ ## [0.5.0] — 2026-02-17
1328
+
1329
+ ### Added
1330
+ - Add developer-configurable token pricing per model tier.
1331
+ - Implement adaptive metrics-driven routing strategy.
1332
+ - Introduce a pluggable routing strategy system.
1333
+ - Add per-story and per-run cost tracking.
1334
+
1335
+ ### Changed
1336
+ - Rename ngent to @nathapp/nax.
1337
+
1338
+ ---
1339
+
1340
+
1341
+ ## [0.4.0] — 2026-02-17
1342
+
1343
+ ### Added
1344
+ - Add a self-correcting fix loop with human override for acceptance.
1345
+ - Introduce acceptance validation as a pipeline stage.
1346
+ - Generate acceptance tests from specification acceptance criteria.
1347
+
1348
+ ### Fixed
1349
+ - Resolve E2E timeouts and clean up acceptance tests.
1350
+ - Respect existing story status and derive routing at runtime.
1351
+ - Handle stale locks and reduce OOM risk in the verify stage.
1352
+
1353
+ ---
1354
+
1355
+
1356
+ ## [0.3.0] — 2026-02-17
1357
+
1358
+ ### Added
1359
+ - Decompose spec into classified stories for analysis.
1360
+ - Introduce interactive planning via agent plan mode.
1361
+ - Add post-implementation review phase.
1362
+ - Enhance story classification with LLM capabilities.
1363
+ - Implement a constitution system with prompt injection.
1364
+
1365
+ ### Fixed
1366
+ - Implement verify stage and resolve type inconsistencies in the pipeline.
1367
+
1368
+ ### Changed
1369
+ - Standardize error handling and add comprehensive JSDoc in the pipeline.
1370
+ - Extract runner.ts into composable pipeline stages.
1371
+ - Add a composable pipeline framework with stage runner.
1372
+
1373
+ ---
1374
+
1375
+
1376
+ ## [0.2.0] — 2026-02-17
1377
+
1378
+ ### Added
1379
+ - Load relevant source files into agent context.
1380
+ - Add capability metadata and tier validation for agents.
1381
+ - Introduce progress display and TDD dry-run mode.
1382
+ - Implement story batching for simple stories.
1383
+ - Establish an explicit 3-tier escalation chain.
1384
+ - Add PAUSE/ABORT/SKIP commands to the queue.
1385
+ - Enable story-scoped extraction from PRD.
1386
+ - Integrate UserStory context fields into context builder.
1387
+ - Add context builder module for story-scoped prompt optimization.
1388
+ - Support model tiers with provider and environment overrides in configuration.
1389
+ - Wire featureDir into CLI run command for progress logging.
1390
+ - Add comprehensive config validation tests.
1391
+ - Implement cost tracking and queue manager with 58 total tests.
1392
+ - Introduce analyze command with progress logging and 32 tests passing.
1393
+ - Create agent execution loop and three-session TDD orchestrator.
1394
+ - Initial scaffold for CLI, agents, routing, hooks, TDD isolation, with 17 tests passing.
1395
+
1396
+ ### Fixed
1397
+ - Add batch-wide escalation option for execution.
1398
+ - Optimize dirty-flag reload to reduce unnecessary IO.
1399
+ - Include confidence scores in cost estimation.
1400
+ - Improve memory limits and accuracy of cost estimation.
1401
+ - Resolve queue race condition and optimize batching.
1402
+ - Add path validation and agent installation checks for security.
1403
+ - Prevent command injection in hook execution.
1404
+ - Address remaining review findings from v0.2.
1405
+ - Check queue commands before batch execution and add skipped status.
1406
+ - Document batch escalation and remove duplicate validateConfig.
1407
+
1408
+ ### Performance
1409
+ - Precompute batch plan to eliminate O(n²) re-checking.
1410
+
1411
+ ### Changed
1412
+ - Standardize error handling and extract magic numbers as named constants.
1413
+ - Replace manual validation with Zod schema parsing in configuration.
1414
+ - Convert QueueCommand to a discriminated union.
1415
+ - Extract escalation, queue-handler, and helpers from runner.
1416
+ - Extract prompts and batching modules from runner.
1417
+ - Apply DRY principles to context helper, fix token estimation, and remove dead config.
1418
+
1419
+ ---
1420
+
1421
+ ## [0.10.0] - 2026-02-23
1422
+
1423
+ ### Added
1424
+
1425
+ #### Plugin System
1426
+ - Extensible plugin architecture: prompt optimizers, custom routers, code reviewers, context providers, custom reporters, and agent launchers
1427
+ - Plugin discovery from global (`~/.nax/plugins`) and project-local (`.nax/plugins`) directories
1428
+ - Plugin validation and lifecycle management (setup/teardown hooks)
1429
+ - Plugin configuration via `.nax/config.json` with per-plugin settings
1430
+
1431
+ #### Global Configuration Layering
1432
+ - Three-tier configuration system: user-global (`~/.nax/config.json`), project (`.nax/config.json`), and CLI overrides
1433
+ - Deep merge strategy with array override semantics
1434
+ - Layered constitution loading with optional global opt-out
1435
+
1436
+ #### Prompt Optimizer
1437
+ - Built-in prompt optimization with configurable token budget enforcement
1438
+ - Optimization strategies: redundancy elimination, context summarization, selective detail retention
1439
+ - Optimization statistics tracking (original vs. optimized token counts, reduction %)
1440
+
1441
+ ### Changed
1442
+ - Config loading refactored to support global + project layering
1443
+
1444
+ ### Fixed
1445
+ - Path security test failures on macOS (`/private` symlink prefix)
1446
+ - TypeScript compilation errors across 9 files
1447
+ - Import formatting across 96 files
1448
+
1449
+ ---
234
1450
 
235
1451
  ### Previous releases
236
1452
  - See git history for changes prior to v0.10.0