|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -## 3.0.0 — 2026-03-10 |
| 3 | +All notable changes to this project will be documented in this file. |
4 | 4 |
|
5 | | -### npm package, worktree-isolated Fixer, and cross-IDE installation |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
6 | 7 |
|
7 | | -**npm global install and CLI:** |
8 | | -- New `package.json` with `@codexstar/bug-hunter` package name |
9 | | -- New `bin/bug-hunter` CLI entry point with `install`, `doctor`, and `info` commands |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +## [3.0.0] — 2026-03-10 |
| 11 | + |
| 12 | +### Added |
| 13 | +- `package.json` with `@codexstar/bug-hunter` package name |
| 14 | +- `bin/bug-hunter` CLI entry point with `install`, `doctor`, and `info` commands |
10 | 15 | - `bug-hunter install` auto-detects Claude Code, Codex, Cursor, Kiro, and generic agents directories |
11 | 16 | - `bug-hunter doctor` checks environment readiness (Node.js, Context Hub, Context7, git) |
12 | 17 | - Install via: `npm install -g @codexstar/bug-hunter && bug-hunter install` |
13 | | - |
14 | | -**Cross-IDE installation via skills.sh:** |
15 | 18 | - Compatible with `npx skills add codexstar69/bug-hunter` for Cursor, Windsurf, Copilot, Kiro, and Claude Code |
16 | | -- No publish step required — auto-discovered from public GitHub repo with valid SKILL.md |
17 | | - |
18 | | -**Worktree-isolated Fixer dispatch (subagent/teams backends):** |
19 | | -- New `scripts/worktree-harvest.cjs` — manages git worktrees for safe, isolated Fixer execution |
20 | | - - 6 subcommands: `prepare`, `harvest`, `checkout-fix`, `cleanup`, `cleanup-all`, `status` |
21 | | - - Fixer edits happen in an isolated worktree; commits land on the fix branch without touching the user's working tree |
22 | | - - Crash recovery via `cleanup-all` with automatic stash preservation |
23 | | - - Meta-file filtering prevents `.worktree-manifest.json` and `.harvest-result.json` from polluting dirty detection |
| 19 | +- `scripts/worktree-harvest.cjs` — manages git worktrees for safe, isolated Fixer execution (6 subcommands: `prepare`, `harvest`, `checkout-fix`, `cleanup`, `cleanup-all`, `status`) |
| 20 | +- 13 new tests in `scripts/tests/worktree-harvest.test.cjs` (full suite: 25/25 passing) |
| 21 | +- 5 new error rows in SKILL.md for worktree failures: prepare, harvest dirty, harvest no-manifest, cleanup, and checkout-fix errors |
| 22 | + |
| 23 | +### Changed |
24 | 24 | - `modes/fix-pipeline.md` updated with dual-path dispatch: worktree path (prepare → dispatch → harvest → cleanup) and direct path |
25 | 25 | - `modes/_dispatch.md` updated with Fixer worktree lifecycle diagram and CRITICAL warning about Agent tool's built-in `isolation: "worktree"` |
26 | 26 | - `templates/subagent-wrapper.md` updated with `{WORKTREE_RULES}` variable for Fixer isolation rules |
27 | | -- 13 new tests in `scripts/tests/worktree-harvest.test.cjs` (full suite: 25/25 passing) |
28 | | - |
29 | | -**Context Hub preflight warning:** |
30 | | -- SKILL.md Step 5b now shows a visible `⚠️` warning when `chub` is not installed, with install command |
31 | | -- Previously was a silent suggestion — now impossible to miss |
32 | | - |
33 | | -**SKILL.md error table:** |
34 | | -- 5 new error rows for worktree failures: prepare, harvest dirty, harvest no-manifest, cleanup, and checkout-fix errors |
35 | | - |
36 | | ---- |
| 27 | +- SKILL.md Step 5b now shows a visible `⚠️` warning when `chub` is not installed (previously a silent suggestion) |
37 | 28 |
|
38 | | -## 2026-03-10 13:26 |
| 29 | +## [2.4.1] — 2026-03-10 |
39 | 30 |
|
| 31 | +### Fixed |
40 | 32 | - `scripts/triage.cjs`: LOW-only repositories promoted into `scanOrder` so script-heavy codebases do not collapse to zero scannable files |
41 | 33 | - `scripts/run-bug-hunter.cjs`: `teams` backend name aligned with the documented dispatch mode |
42 | 34 | - `scripts/run-bug-hunter.cjs`: `code-index.cjs` treated as optional during preflight and gated only when index-backed flows are requested |
43 | 35 | - `scripts/run-bug-hunter.cjs`: low-confidence delta expansion now reuses the caller's configured `--delta-hops` value |
| 36 | + |
| 37 | +### Added |
44 | 38 | - `scripts/tests/run-bug-hunter.test.cjs`: regressions for LOW-only triage, optional `code-index`, `teams` backend selection, and delta-hop expansion |
45 | 39 |
|
46 | | -## 2.4.0 — 2026-03-10 |
| 40 | +## [2.4.0] — 2026-03-10 |
47 | 41 |
|
48 | | -### Context Hub integration — curated docs with Context7 fallback |
| 42 | +### Added |
| 43 | +- `scripts/doc-lookup.cjs`: hybrid documentation lookup that tries [Context Hub](https://github.com/andrewyng/context-hub) (chub) first for curated, versioned, annotatable docs, then falls back to Context7 API when chub doesn't have the library |
| 44 | +- Requires `@aisuite/chub` installed globally (`npm install -g @aisuite/chub`) — optional but recommended; pipeline works without it via Context7 fallback |
49 | 45 |
|
50 | | -- New `scripts/doc-lookup.cjs`: hybrid documentation lookup that tries [Context Hub](https://github.com/andrewyng/context-hub) (chub) first for curated, versioned, annotatable docs, then falls back to Context7 API when chub doesn't have the library |
| 46 | +### Changed |
51 | 47 | - All agent prompts (hunter, skeptic, fixer, doc-lookup) updated to use `doc-lookup.cjs` as primary with `context7-api.cjs` as explicit fallback |
52 | 48 | - Preflight smoke test now checks `doc-lookup.cjs` first, falls back to `context7-api.cjs` |
53 | 49 | - `run-bug-hunter.cjs` validates both scripts exist at startup |
54 | | -- Requires `@aisuite/chub` installed globally (`npm install -g @aisuite/chub`) — optional but recommended; pipeline works without it via Context7 fallback |
55 | | - |
56 | | -## 2.3.0 — 2026-03-10 |
57 | 50 |
|
58 | | -### Loop mode is now on by default |
| 51 | +## [2.3.0] — 2026-03-10 |
59 | 52 |
|
| 53 | +### Changed |
60 | 54 | - `LOOP_MODE=true` is the new default — every `/bug-hunter` invocation iterates until full CRITICAL/HIGH coverage |
61 | | -- Added `--no-loop` flag to opt out and get single-pass behavior |
62 | 55 | - `--loop` flag still accepted for backwards compatibility (no-op) |
63 | 56 | - Updated triage warnings, coverage enforcement, and all documentation to reflect the new default |
64 | | -- `/bug-hunter src/` now finds bugs, fixes them, AND loops until full coverage — zero flags needed |
65 | 57 |
|
66 | | -## 2.2.1 — 2026-03-10 |
| 58 | +### Added |
| 59 | +- `--no-loop` flag to opt out and get single-pass behavior |
67 | 60 |
|
68 | | -### Fix: `--loop` mode now actually loops |
| 61 | +## [2.2.1] — 2026-03-10 |
69 | 62 |
|
70 | | -The `--loop` flag was broken — loop mode files described a "ralph-loop" system but never called `ralph_start`, so the pipeline ran once and stopped. Fixed: |
71 | | - |
72 | | -- **`modes/loop.md`**: added explicit `ralph_start` call instructions with correct `taskContent` and `maxIterations` parameters |
73 | | -- **`modes/fix-loop.md`**: same fix for `--loop --fix` combined mode, plus removed manual state file creation (handled by `ralph_start`) |
74 | | -- **`SKILL.md`**: added CRITICAL integration note requiring `ralph_start` call when `LOOP_MODE=true` |
| 63 | +### Fixed |
| 64 | +- `modes/loop.md`: added explicit `ralph_start` call instructions with correct `taskContent` and `maxIterations` parameters |
| 65 | +- `modes/fix-loop.md`: same fix for `--loop --fix` combined mode, plus removed manual state file creation (handled by `ralph_start`) |
| 66 | +- `SKILL.md`: added CRITICAL integration note requiring `ralph_start` call when `LOOP_MODE=true` |
75 | 67 | - Changed completion signal from `<promise>DONE</promise>` to `<promise>COMPLETE</promise>` (correct ralph-loop API) |
76 | 68 | - Each iteration now calls `ralph_done` to proceed instead of relying on a non-existent hook |
77 | 69 |
|
78 | | -## 2.2.0 — 2026-03-10 |
79 | | - |
80 | | -### Fix pipeline hardening — 12 reliability and safety optimizations |
| 70 | +## [2.2.0] — 2026-03-10 |
81 | 71 |
|
82 | | -- **Rollback timeout guard**: `git revert` calls now timeout after 60 seconds; conflicts abort cleanly instead of hanging the pipeline indefinitely |
83 | | -- **Dynamic lock TTL**: single-writer lock TTL scales with queue size (`max(1800, bugs * 600)`), preventing expiry on large fix runs |
84 | | -- **Lock heartbeat renewal**: new `renew` command in `fix-lock.cjs` — fixer renews the lock after each bug fix to prevent mid-run TTL expiry |
85 | | -- **Fixer context budget**: `MAX_BUGS_PER_FIXER = 5` — large fix queues are split into sequential batches to prevent context window overflow and hallucinated patches |
86 | | -- **Cross-file dependency ordering**: when `code-index.cjs` is available, fixes are ordered by import graph (fix dependencies before dependents) |
87 | | -- **Flaky test detection**: baseline tests run twice; tests that fail non-deterministically are excluded from revert decisions |
88 | | -- **Per-bug revert granularity**: clarified one-commit-per-bug as mandatory; reverts target individual bugs, not clusters |
89 | | -- **Dynamic canary sizing**: `max(1, min(3, ceil(eligible * 0.2)))` — canary group scales with queue size instead of hardcoded 1–3 |
90 | | -- **Post-fix re-scan severity floor**: fixer-introduced bugs below MEDIUM severity are logged but don't trigger `FIXER_BUG` status |
91 | | -- **Dry-run mode** (`--dry-run`): preview planned fixes without editing files — Fixer reads code and outputs unified diff previews, no git commits |
92 | | -- **Machine-readable fix report**: `.bug-hunter/fix-report.json` written alongside markdown report for CI/CD gating, dashboards, and ticket automation |
93 | | -- **Circuit breaker**: if >50% of fix attempts fail/revert (min 3 attempts), remaining fixes are halted to prevent token waste on unstable codebases |
94 | | -- **Global Phase 2 timeout**: 30-minute deadline for the entire fix execution phase; unprocessed bugs are marked SKIPPED |
| 72 | +### Added |
| 73 | +- Rollback timeout guard: `git revert` calls now timeout after 60 seconds; conflicts abort cleanly instead of hanging |
| 74 | +- Dynamic lock TTL: single-writer lock TTL scales with queue size (`max(1800, bugs * 600)`) |
| 75 | +- Lock heartbeat renewal: new `renew` command in `fix-lock.cjs` |
| 76 | +- Fixer context budget: `MAX_BUGS_PER_FIXER = 5` — large fix queues split into sequential batches |
| 77 | +- Cross-file dependency ordering: when `code-index.cjs` is available, fixes are ordered by import graph |
| 78 | +- Flaky test detection: baseline tests run twice; non-deterministic failures excluded from revert decisions |
| 79 | +- Dynamic canary sizing: `max(1, min(3, ceil(eligible * 0.2)))` — canary group scales with queue size |
| 80 | +- Dry-run mode (`--dry-run`): preview planned fixes without editing files |
| 81 | +- Machine-readable fix report: `.bug-hunter/fix-report.json` for CI/CD gating, dashboards, and ticket automation |
| 82 | +- Circuit breaker: if >50% of fix attempts fail/revert (min 3 attempts), remaining fixes are halted |
| 83 | +- Global Phase 2 timeout: 30-minute deadline for the entire fix execution phase |
95 | 84 |
|
96 | | -## 2.1.0 — 2026-03-10 |
| 85 | +### Changed |
| 86 | +- Per-bug revert granularity: clarified one-commit-per-bug as mandatory; reverts target individual bugs, not clusters |
| 87 | +- Post-fix re-scan severity floor: fixer-introduced bugs below MEDIUM severity are logged but don't trigger `FIXER_BUG` status |
97 | 88 |
|
98 | | -### v3 security pipeline + dependency scanner reliability |
| 89 | +## [2.1.0] — 2026-03-10 |
99 | 90 |
|
| 91 | +### Added |
100 | 92 | - STRIDE/CWE fields in Hunter findings format, with CWE quick-reference mapping for security categories |
101 | 93 | - Skeptic hard-exclusion fast path (15 false-positive classes) before deep review |
102 | 94 | - Referee security enrichment: reachability, exploitability, CVSS 3.1, and PoC blocks for critical/high security bugs |
103 | 95 | - Threat model support: `--threat-model` flag, `prompts/threat-model.md`, Recon/Hunter threat-context wiring |
104 | 96 | - Dependency scan support: `--deps` flag and `scripts/dep-scan.cjs` output to `.bug-hunter/dep-findings.json` |
105 | 97 | - JSON report contract: `.bug-hunter/findings.json` plus canonical `.bug-hunter/report.md` |
106 | 98 | - Few-shot calibration examples for Hunter and Skeptic in `prompts/examples/` |
107 | | -- `dep-scan.cjs` lockfile-aware audits (`npm`, `pnpm`, `yarn`, `bun`) and non-zero audit exit handling so vulnerability exits are not misreported as scanner failures |
108 | 99 |
|
109 | | -## 2.0.0 — 2026-03-10 |
| 100 | +### Fixed |
| 101 | +- `dep-scan.cjs` lockfile-aware audits (`npm`, `pnpm`, `yarn`, `bun`) and non-zero audit exit handling so vulnerability exits are not misreported as scanner failures |
110 | 102 |
|
111 | | -### Structural overhaul — triage pipeline + 36% token reduction |
| 103 | +## [2.0.0] — 2026-03-10 |
112 | 104 |
|
113 | | -**Pipeline restructure:** |
| 105 | +### Changed |
114 | 106 | - Triage moved to Step 1 (after arg parse) — was running before target resolved |
115 | 107 | - All mode files consume triage JSON — riskMap, scanOrder, fileBudget flow downstream |
116 | 108 | - Recon demoted to enrichment — no longer does file classification when triage exists |
117 | | -- Step 7.0 re-audit gate removed — duplicated Referee's work |
118 | | - |
119 | | -**Deduplication:** |
120 | | -- `modes/_dispatch.md` — shared dispatch patterns (18 references across modes) |
121 | 109 | - Mode files compressed: small 7.3→2.9KB, parallel 7.9→4.2KB, extended 7.1→3.3KB, scaled 7.3→2.7KB |
122 | 110 | - Skip-file patterns consolidated — single authoritative list in SKILL.md |
123 | 111 | - Error handling table updated with correct step references |
124 | | - |
125 | | -**Dead weight removed:** |
126 | | -- FIX-PLAN.md deleted (26KB dead planning doc) |
127 | | -- README.md compressed from 8.5KB to 3.7KB |
128 | | -- code-index.cjs marked optional |
129 | | - |
130 | | -**Prompt compression:** |
131 | 112 | - hunter.md: scope rules and security checklist compressed |
132 | 113 | - recon.md: output format template and "What to map" sections compressed |
133 | 114 | - referee.md: tiering rules, re-check section, output format compressed |
134 | 115 | - skeptic.md: false-positive patterns compressed to inline format |
135 | | - |
136 | | -**Logic gaps fixed:** |
137 | 116 | - Branch-diff/staged optimization note in Step 3 |
138 | 117 | - single-file.md: local-sequential backend support added |
139 | 118 |
|
140 | | -**Size:** 187,964 → 119,825 bytes (36% reduction, ~30K tokens) |
| 119 | +### Added |
| 120 | +- `modes/_dispatch.md` — shared dispatch patterns (18 references across modes) |
| 121 | + |
| 122 | +### Removed |
| 123 | +- Step 7.0 re-audit gate removed — duplicated Referee's work |
| 124 | +- FIX-PLAN.md deleted (26KB dead planning doc) |
| 125 | +- README.md compressed from 8.5KB to 3.7KB |
| 126 | +- code-index.cjs marked optional |
141 | 127 |
|
142 | | -## 1.0.0 — 2026-03-10 |
| 128 | +## [1.0.0] — 2026-03-10 |
143 | 129 |
|
144 | | -### Zero-token pre-recon triage (`triage.cjs`) |
145 | | -- `scripts/triage.cjs` runs before any LLM agent — 0 tokens, <2s for 2,000+ files |
| 130 | +### Added |
| 131 | +- `scripts/triage.cjs` — zero-token pre-recon triage, runs before any LLM agent (<2s for 2,000+ files) |
146 | 132 | - FILE_BUDGET, strategy, and domain map decided by triage, not Recon |
147 | 133 | - Writes `.bug-hunter/triage.json` with strategy, fileBudget, domains, riskMap, scanOrder |
148 | 134 | - `local-sequential.md` with full phase-by-phase instructions |
149 | 135 | - Subagent wrapper template in `templates/subagent-wrapper.md` |
150 | 136 | - Coverage enforcement — partial audits produce explicit warnings |
151 | 137 | - Large codebase strategy with domain-first tiered scanning |
| 138 | + |
| 139 | +[Unreleased]: https://github.com/codexstar69/bug-hunter/compare/v3.0.0...HEAD |
| 140 | +[3.0.0]: https://github.com/codexstar69/bug-hunter/compare/v2.4.1...v3.0.0 |
| 141 | +[2.4.1]: https://github.com/codexstar69/bug-hunter/compare/v2.4.0...v2.4.1 |
| 142 | +[2.4.0]: https://github.com/codexstar69/bug-hunter/compare/v2.3.0...v2.4.0 |
| 143 | +[2.3.0]: https://github.com/codexstar69/bug-hunter/compare/v2.2.1...v2.3.0 |
| 144 | +[2.2.1]: https://github.com/codexstar69/bug-hunter/compare/v2.2.0...v2.2.1 |
| 145 | +[2.2.0]: https://github.com/codexstar69/bug-hunter/compare/v2.1.0...v2.2.0 |
| 146 | +[2.1.0]: https://github.com/codexstar69/bug-hunter/compare/v2.0.0...v2.1.0 |
| 147 | +[2.0.0]: https://github.com/codexstar69/bug-hunter/compare/v1.0.0...v2.0.0 |
| 148 | +[1.0.0]: https://github.com/codexstar69/bug-hunter/releases/tag/v1.0.0 |
0 commit comments