session-orchestrator 3.17.0 → 3.19.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 (187) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.cursor/rules/030-wave-execution.mdc +17 -1
  5. package/CHANGELOG.md +105 -412
  6. package/README.md +12 -9
  7. package/SECURITY.md +190 -27
  8. package/agents/AGENTS.md +20 -3
  9. package/agents/code-implementer.md +6 -6
  10. package/agents/db-specialist.md +1 -1
  11. package/agents/qa-strategist.md +31 -6
  12. package/agents/schemas/qa-strategist.schema.json +27 -0
  13. package/agents/schemas/test-writer.schema.json +60 -2
  14. package/agents/security-reviewer.md +1 -1
  15. package/agents/session-reviewer.md +1 -1
  16. package/agents/test-writer.md +29 -10
  17. package/agents/ui-developer.md +1 -1
  18. package/commands/contract-version-bump.md +28 -0
  19. package/commands/portfolio.md +1 -1
  20. package/docs/USER-GUIDE.md +8 -3
  21. package/docs/ci-setup.md +121 -7
  22. package/docs/codex-setup.md +1 -1
  23. package/docs/components.md +6 -6
  24. package/docs/cursor-setup.md +22 -9
  25. package/docs/events-schema.md +5 -1
  26. package/docs/instruction-delivery.md +444 -0
  27. package/docs/rule-authoring.md +58 -9
  28. package/docs/session-config-reference.md +244 -9
  29. package/docs/session-config-template.md +39 -3
  30. package/hooks/_lib/guard-source-loader.mjs +467 -0
  31. package/hooks/_lib/lock-bootstrap.mjs +21 -0
  32. package/hooks/_lib/vcs-create-matcher.mjs +119 -0
  33. package/hooks/config-protection.mjs +0 -0
  34. package/hooks/enforce-commands.mjs +10 -2
  35. package/hooks/hooks-codex.json +1 -1
  36. package/hooks/hooks-cursor.json +11 -2
  37. package/hooks/hooks-pi.json +10 -0
  38. package/hooks/hooks.json +21 -1
  39. package/hooks/on-session-end.mjs +178 -18
  40. package/hooks/on-session-start.mjs +23 -0
  41. package/hooks/post-bash-write-verify.mjs +977 -0
  42. package/hooks/post-subagent-discovery-validator.mjs +256 -41
  43. package/hooks/pre-bash-destructive-guard.mjs +525 -160
  44. package/hooks/pre-bash-issue-budget.mjs +167 -0
  45. package/hooks/pre-bash-sessions-ledger-guard.mjs +627 -0
  46. package/hooks/pre-bash-templates-first.mjs +96 -63
  47. package/hooks/subagent-telemetry.mjs +527 -37
  48. package/package.json +5 -2
  49. package/pi/prompts/contract-version-bump.md +12 -0
  50. package/rules/README.md +32 -0
  51. package/scripts/archive-closed-prds.mjs +12 -22
  52. package/scripts/autopilot-multi.mjs +103 -20
  53. package/scripts/backfill-abandoned-sessions.mjs +160 -4
  54. package/scripts/check-doc-consistency.sh +17 -1
  55. package/scripts/eval-session.mjs +50 -9
  56. package/scripts/fleet-instruction-scan.mjs +141 -0
  57. package/scripts/lib/autopilot/mr-draft.mjs +31 -1
  58. package/scripts/lib/autopilot/worktree-pipeline.mjs +113 -5
  59. package/scripts/lib/backlog-scan.mjs +39 -6
  60. package/scripts/lib/blocked-commands-policy.mjs +340 -0
  61. package/scripts/lib/ci-status-banner.mjs +75 -12
  62. package/scripts/lib/claude-md-budget-lint.mjs +283 -34
  63. package/scripts/lib/command-blocker.mjs +1013 -58
  64. package/scripts/lib/config/config-protection.mjs +2 -1
  65. package/scripts/lib/config/drift-check.mjs +9 -1
  66. package/scripts/lib/config/gitlab-portfolio.mjs +1 -1
  67. package/scripts/lib/config/issue-budget.mjs +123 -0
  68. package/scripts/lib/config/reconcile.mjs +21 -0
  69. package/scripts/lib/config/section-extractor.mjs +121 -1
  70. package/scripts/lib/config-schema.mjs +23 -3
  71. package/scripts/lib/config.mjs +17 -0
  72. package/scripts/lib/convergence-monitor.mjs +49 -3
  73. package/scripts/lib/description-surface.mjs +535 -0
  74. package/scripts/lib/dispatcher/enumerate.mjs +26 -40
  75. package/scripts/lib/ecosystem-wizard/config-writer.mjs +26 -24
  76. package/scripts/lib/ecosystem-wizard/wizard-prompt.mjs +1 -1
  77. package/scripts/lib/eval/engine.mjs +47 -5
  78. package/scripts/lib/events.mjs +59 -7
  79. package/scripts/lib/gates/gate-full.mjs +15 -3
  80. package/scripts/lib/gates/gate-helpers.mjs +132 -6
  81. package/scripts/lib/gitlab-ops/stale-mr-sweep.mjs +28 -8
  82. package/scripts/lib/gitlab-portfolio/aggregator.mjs +8 -2
  83. package/scripts/lib/gitlab-portfolio/cli.mjs +1 -1
  84. package/scripts/lib/handover-gate.mjs +7 -3
  85. package/scripts/lib/harness-audit/categories/category4.mjs +9 -3
  86. package/scripts/lib/instruction-budget-guard.mjs +402 -51
  87. package/scripts/lib/io.mjs +345 -10
  88. package/scripts/lib/issue-budget.mjs +269 -0
  89. package/scripts/lib/issue-close-strip-labels.mjs +39 -9
  90. package/scripts/lib/label-scope.mjs +47 -0
  91. package/scripts/lib/learnings/schema.mjs +43 -3
  92. package/scripts/lib/lock-reaper.mjs +1 -2
  93. package/scripts/lib/memory-proposals/schema.mjs +36 -1
  94. package/scripts/lib/peer-discovery.mjs +645 -0
  95. package/scripts/lib/pi-hook-bridge.mjs +146 -17
  96. package/scripts/lib/product-repo-detect.mjs +9 -8
  97. package/scripts/lib/project-hygiene.mjs +432 -0
  98. package/scripts/lib/quality-gate.mjs +167 -0
  99. package/scripts/lib/recommendations-v0.mjs +1 -1
  100. package/scripts/lib/reconcile/eligibility.mjs +1 -1
  101. package/scripts/lib/reconcile/emitter.mjs +23 -4
  102. package/scripts/lib/reconcile/engine.mjs +147 -39
  103. package/scripts/lib/reconcile/idempotency.mjs +114 -14
  104. package/scripts/lib/reconcile-nudge-banner.mjs +65 -9
  105. package/scripts/lib/resource-probe/evaluate.mjs +70 -4
  106. package/scripts/lib/resource-probe.mjs +19 -0
  107. package/scripts/lib/rule-loader.mjs +6 -0
  108. package/scripts/lib/scope-baseline.mjs +564 -0
  109. package/scripts/lib/scope-gate.mjs +399 -98
  110. package/scripts/lib/session-close-backfill.mjs +61 -6
  111. package/scripts/lib/session-end/phase-skip.mjs +1 -0
  112. package/scripts/lib/session-id.mjs +221 -41
  113. package/scripts/lib/session-lock.mjs +304 -6
  114. package/scripts/lib/session-schema/constants.mjs +22 -3
  115. package/scripts/lib/session-schema/validator.mjs +16 -0
  116. package/scripts/lib/sessions-integrity-banner.mjs +294 -0
  117. package/scripts/lib/sessions-staleness-banner.mjs +121 -12
  118. package/scripts/lib/skill-evolution/idempotency.mjs +135 -16
  119. package/scripts/lib/skill-evolution/mr-opener.mjs +9 -1
  120. package/scripts/lib/spiral-carryover.mjs +142 -30
  121. package/scripts/lib/state-md/mission-status.mjs +53 -3
  122. package/scripts/lib/subagents-schema.mjs +43 -9
  123. package/scripts/lib/test-runner/issue-reconcile.mjs +53 -13
  124. package/scripts/lib/tests-src-ratio.mjs +484 -0
  125. package/scripts/lib/validate/check-agents.mjs +56 -0
  126. package/scripts/lib/validate/check-hooks-symmetry.mjs +244 -10
  127. package/scripts/lib/validate/check-rules.mjs +217 -35
  128. package/scripts/lib/validate/check-test-value-bans.mjs +782 -0
  129. package/scripts/lib/validate/check-unicode-safety.mjs +1 -0
  130. package/scripts/lib/validate-vendored-rules.mjs +10 -2
  131. package/scripts/lib/vault-archive.mjs +17 -2
  132. package/scripts/lib/vault-backfill/glab.mjs +8 -0
  133. package/scripts/lib/vault-mirror/process.mjs +30 -0
  134. package/scripts/lib/vault-mirror/render-sessions.mjs +293 -36
  135. package/scripts/lib/vcs-repo-spec.mjs +362 -0
  136. package/scripts/lib/wave-resource-gate.mjs +115 -11
  137. package/scripts/lib/worktree/listing.mjs +44 -7
  138. package/scripts/mcp-server.sh +17 -3
  139. package/scripts/measure-context-overhead.sh +151 -0
  140. package/scripts/memory-propose.mjs +72 -9
  141. package/scripts/print-applicable-rules.mjs +51 -12
  142. package/scripts/release.mjs +534 -0
  143. package/scripts/run-quality-gate.mjs +123 -5
  144. package/scripts/validate-wave-scope.mjs +182 -17
  145. package/scripts/vault-integration-watcher.mjs +32 -10
  146. package/skills/_shared/config-reading.md +2 -2
  147. package/skills/bootstrap/fast-template.md +1 -1
  148. package/skills/claude-md-drift-check/checker.mjs +145 -28
  149. package/skills/contract-version-bump/SKILL.md +219 -0
  150. package/skills/discovery/SKILL.md +4 -4
  151. package/skills/discovery/issue-templates.md +11 -11
  152. package/skills/discovery/probes-audit.md +1 -1
  153. package/skills/discovery/probes-feature.md +1 -1
  154. package/skills/discovery/probes-session.md +26 -5
  155. package/skills/ecosystem-health/SKILL.md +1 -1
  156. package/skills/ecosystem-health/wizard.md +4 -4
  157. package/skills/evolve/SKILL.md +1 -0
  158. package/skills/gitlab-ops/SKILL.md +20 -12
  159. package/skills/gitlab-portfolio/SKILL.md +2 -2
  160. package/skills/hook-development/SKILL.md +1 -1
  161. package/skills/mode-selector/SKILL.md +1 -1
  162. package/skills/npm-publish/SKILL.md +17 -1
  163. package/skills/plan/SKILL.md +5 -5
  164. package/skills/plan/mode-feature.md +4 -4
  165. package/skills/plan/mode-new.md +10 -10
  166. package/skills/plan/mode-retro.md +1 -1
  167. package/skills/quality-gates/SKILL.md +1 -1
  168. package/skills/reconcile/SKILL.md +21 -4
  169. package/skills/session-end/SKILL.md +34 -13
  170. package/skills/session-end/discovery-scan.md +4 -2
  171. package/skills/session-end/drift-operations.md +4 -4
  172. package/skills/session-end/metrics-collection.md +13 -0
  173. package/skills/session-end/phase-3-2-docs-verification.md +1 -1
  174. package/skills/session-end/phase-3-6-tail.md +2 -1
  175. package/skills/session-end/plan-verification.md +5 -2
  176. package/skills/session-end/vault-operations.md +1 -1
  177. package/skills/session-end/verification-checklist.md +1 -1
  178. package/skills/session-plan/SKILL.md +6 -2
  179. package/skills/session-plan/wave-template.md +2 -0
  180. package/skills/session-start/SKILL.md +73 -7
  181. package/skills/session-start/phase-4-5-resource-health.md +15 -2
  182. package/skills/test-runner/SKILL.md +2 -2
  183. package/skills/vault-sync/validator.mjs +108 -7
  184. package/skills/wave-executor/SKILL.md +5 -2
  185. package/skills/wave-executor/circuit-breaker.md +2 -0
  186. package/skills/wave-executor/wave-loop.md +163 -10
  187. package/templates/_shared/loop.md +4 -4
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.",
10
- "version": "3.17.0"
10
+ "version": "3.19.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "session-orchestrator",
4
- "version": "3.17.0",
4
+ "version": "3.19.0",
5
5
  "description": "Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.",
6
6
  "author": {
7
7
  "name": "Bernhard Goetzendorfer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "session-orchestrator",
3
- "version": "3.17.0+codex.20260721060103",
3
+ "version": "3.19.0+codex.20260804175819",
4
4
  "description": "Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.",
5
5
  "keywords": [
6
6
  "session",
@@ -73,7 +73,23 @@ Role-specific scope rules:
73
73
  - **Quality Phase 1 (Simplification)**: production files changed this session only (no test files)
74
74
  - **Quality Phase 2 (Tests)**: test file patterns only (`**/*.test.*`, `**/*.spec.*`, `**/__tests__/**`)
75
75
 
76
- Validate with: `bash "$CURSOR_RULES_DIR/../scripts/validate-wave-scope.sh"` — fix JSON if it exits 1.
76
+ **Test-sibling expansion (#970):** a scope entry naming a production file but not its test sibling makes the task's own regression test unwritable — the guard then enforces exactly the inconsistency the quality gate exists to catch. Before writing `allowedPaths`, expand the union through the shared helper do not hand-derive the paths:
77
+
78
+ ```js
79
+ import { expandTestSiblings } from '$CURSOR_RULES_DIR/../scripts/lib/scope-gate.mjs';
80
+ // Pass this wave's role verbatim — the helper GATES on it.
81
+ const allowedPaths = expandTestSiblings(unionScopes, { role });
82
+ ```
83
+
84
+ It emits a **glob** from the production basename (`foo.mjs` → `tests/**/foo*.test.mjs`), skips absolute entries, and is a strict no-op on Discovery's `[]`. **Which roles it fires for is decided inside the helper** — `TEST_SIBLING_EXPANSION_ROLES` in `scripts/lib/scope-gate.mjs` (currently Impl-Core / Impl-Polish; Quality Phase 1 is off, Phase 2 inert). Pass the role; do not pre-filter by role here. An absent or unrecognised role does **not** expand (fail-closed). Expand before the overlap check and before the file is written, in one pass. Full rule, the measured hit-rate and its ~15% residual, and the per-repo configurability: `skills/wave-executor/wave-loop.md` § Scope Manifest #3.
85
+
86
+ Validate with: `node "$CURSOR_RULES_DIR/../scripts/validate-wave-scope.mjs" < .cursor/wave-scope.json` — fix JSON if it exits 1. Before each task batch, also assert the task's file scope against the manifest, carrying the mechanical half of the rule above (gated on the manifest's `role`, so it self-skips where expansion does not fire):
87
+
88
+ ```bash
89
+ node "$CURSOR_RULES_DIR/../scripts/validate-wave-scope.mjs" \
90
+ --assert-subset "$TASK_FILESCOPE_JSON" --expand-test-siblings \
91
+ < .cursor/wave-scope.json
92
+ ```
77
93
 
78
94
  ### Step 2: Execute Tasks Sequentially
79
95
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,105 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [3.19.0] - 2026-08-04
11
+
12
+ Guard-hardening and release-mechanics line. Headline: the destructive-command guard closed
13
+ six measured wrapper bypasses and inverted a silent redirect-truncation allow into a deny;
14
+ the session lock gained an ownership proof; and the release process itself became one
15
+ dispatch — whose very first preflight run surfaced that v3.18.0 had been tagged but never
16
+ published to npm (the registry still served 3.17.0), the exact incident class #978 names.
17
+
18
+ ### Added
19
+
20
+ - **`scripts/release.mjs` — Release als ein Dispatch (#978, local half)** — one surfaces
21
+ table drives both the mechanical version rewrite (`--set-version`: 12 version literals
22
+ across 10 files, Codex cachebuster rotation, package-lock sync) and the preflight
23
+ (`--check`: surface parity with pattern-dead-is-a-failure semantics, CHANGELOG entry +
24
+ folded-[Unreleased] gate, tag collision on local/origin/github, npm-registry collision,
25
+ a `git grep` drift sweep over ALL tracked files, CI-green-on-HEAD via
26
+ `ci-status-banner.mjs`, the seven-pattern leakage gate over `npm pack --dry-run`).
27
+ `--publish` runs the token flow from `skills/npm-publish/SKILL.md` and creates the
28
+ annotated git tag only AFTER a registry-verified publish — eliminating the
29
+ "tagged but unpublished" state v3.18.0 fell into. Its first run surfaced two real gaps:
30
+ v3.18.0 was tagged but never published to npm (the registry served 3.17.0), and the
31
+ hidden `.codex-plugin` manifest was invisible to a plain ripgrep census — hidden
32
+ directories need `git grep`. The CI half of #978 (a `$CI_COMMIT_TAG` release stage)
33
+ stays open.
34
+ - **`skills/contract-version-bump/`** — reusable, distributable skill for version-bumping machine-readable contracts (JSON Schema, API specs, config schemas): classifies the change against the contract's OWN versioning rule (not generic semver instinct), finds every version literal and vendored copy across this repo and `cross-repos:`, checks whether every known consumer evaluates each new/changed schema keyword, applies the bump consistently, writes a Keep-a-Changelog entry, and reports downstream drift. Codifies three traps from a real case (GitLab issue #17, `aiat-enablement` repo, 2026-07-25). Ships with `/contract-version-bump`.
35
+ - **Wrapper unwrapping in the destructive-command guard (#982)** — table-driven
36
+ `WRAPPER_UNWRAP` (`sudo`/`doas`/`env` flags/`nohup`/`timeout`/`nice`/`stdbuf`,
37
+ `sudo -i/-s` → sh, `su` as interpreter) plus depth-capped `-c`/`env -S` payload
38
+ recursion; `rm` parsers rewritten segment-based on the shared splitter. Six measured
39
+ bypasses closed, zero regressions (differential-proved).
40
+ - **Blocked-commands policy floor (#972)** — new `scripts/lib/blocked-commands-policy.mjs`
41
+ with floor ∪ overlay semantics: escalate-only, whole-rule-wins on block collisions,
42
+ fail-to-floor on empty/malformed overlays. Replaces first-hit-wins.
43
+ - **Redirect target denylist (#983)** — new redirect token class (longest-match
44
+ `&>>`/`&>`/`>|`/`>>`/`>`/`N>`-forms) and rule 14 `redirect-truncate-protected`: the
45
+ premise was inverted — `&> CLAUDE.md` was a silent ALLOW-with-truncation before.
46
+ - **Session-lock ownership proof (#987)** — owner proof persisted at lock genesis
47
+ (`.orchestrator/runtime/lock-owner-proof.json`); session-end releases only on
48
+ self-rotation and refuses foreign same-day collisions — closes the #926 residual.
49
+ - **session-orchestrator.com redesign** — terminal hero, wave pipeline, leaderboard shell,
50
+ measured-numbers section (reconcile-rule count corrected 11 → 13 by the close-review).
51
+
52
+ ### Fixed
53
+
54
+ - **Guard bypass residuals (three follow-up rounds)** — the denylist read repo-relative
55
+ while an attacker wrote absolute paths; the guard evaluated the working tree instead of
56
+ the rules corpus; a backslash split what bash glues together; and the review panel found
57
+ two further holes the repair session had itself opened. Each round closed with
58
+ fake-regression proofs.
59
+ - **Session identity (#926, #914)** — an ending session no longer deletes a living foreign
60
+ session lock, and the abandoned-session backfiller no longer deletes the alarm it was
61
+ built to raise.
62
+ - **Instrument deduplication** — nine instances of one fact wearing two faces consolidated
63
+ to single sources; the panel found three more in the repair itself.
64
+ - **Reconcile expiry tests** — two tests measured the floor constant instead of
65
+ `ruleExpiryDays`; they now measure the contract.
66
+
67
+ ### Security
68
+
69
+ - **Two high-severity transitive vulnerabilities** unreachable by `npm audit fix` closed
70
+ via `package.json` overrides (same class, found twice — the second instance surfaced
71
+ after the first override landed).
72
+
73
+ ## [3.18.0] - 2026-07-31
74
+
75
+ Panel-follow-ups & consolidation release. Headline: the review panel's own findings from the
76
+ prior deep session, fixed and re-verified — three self-silencing vectors closed in the
77
+ bash-write-verify scope detector, a credential that could no longer reach argv, and the
78
+ instrument deduplication the panel asked for — alongside an instruction-corpus diet (always-on
79
+ directive budget 471→~440) and a TV-003 consolidation tranche (net test count down, catch-power
80
+ up via a mutation sweep). The panel found real bugs in this session's own coordinator-written
81
+ code again — the sixth consecutive confirmation — and W5 fixed all four.
82
+
83
+ ### Added
84
+
85
+ - **Instruction-delivery measurement + baseline ablation axis (#936)** — `evals/instruction-ablation/run.mjs` gains a `--rules-source repo|baseline` switch (host-local precedence, no hardcoded path) so one command ablates the fleet-wide `projects-baseline` corpus; the decision rule is pre-registered in `docs/instruction-delivery.md §6`, fail-safe toward KEEP because a wrong cut regresses fourteen repos.
86
+ - **hooks-symmetry Check 6 (#942)** — `check-hooks-symmetry.mjs` now compares handler SETS per event, not just event keys, so a hook wired on only one platform is no longer structurally invisible; `post-bash-write-verify` ported to Pi, Codex documented as an exception.
87
+ - **Mutation-testing sweep (#910)** — 8 modules, 46 mutants, 70% kill-rate; eight need-gated tests close the highest-value survivors (boundary comparisons + wiring/fail-safe), report at `docs/mutation-testing/`.
88
+ - **CPU 5-minute load axis (#943)** — `resource-probe` emits `cpu_load_5m`/`cpu_load_5m_pct`; the wave resource gate judges CPU on `min(1m, 5m)` so it no longer halves a wave on the decaying 1-minute average of its own just-finished quality run.
89
+ - **Two glob-scoped reconcile rules** — `a-green-quality-gate-is-not-CI-evidence` and `a-file-wide-toContain-judges-one-block` (both conditional, zero always-on ceiling cost); the bash-3.2 `case`-in-`$()` gotcha folded into `bash-harness-pitfalls.md`.
90
+ - **CI advisory job `test-value-bans`** — non-blocking, runs the narrowed ban scanner; `.husky/pre-push` gate + schema-drift marker guard now have tests (#940).
91
+
92
+ ### Fixed
93
+
94
+ - **#907 credential leak (CWE-214)** — remote-URL credentials are stripped at the single source (`resolveRawRemoteUrl`) before reaching any `-R`/`--repo`/`--hostname` argv position or verbose log. The W4 panel then found the first fix incomplete for a raw `@` inside the token (`user:gl@token@host`); the userinfo class now binds to the LAST `@` before the authority ends, closing the residual. A bare `git@host` SSH login is left untouched.
95
+ - **#938 bash-write-verify self-silencing (3 vectors)** — the control file left the hook's own ignore list; the gate is read from the recorded snapshot, not the live file; a re-baseline reports out-of-scope dirt via mtime. W4-panel follow-through: the `isMain` guard now realpath's both sides (a symlinked plugin install no longer silently disables the hook), and the mtime re-baseline uses `>=` with the scope file excluded (equal-mtime false-negative closed).
96
+ - **#914 fabricated completion timestamp** — the abandoned-session backfill no longer stamps the backfill-run wall-clock as `completed_at` (which produced ~64h of phantom runtime on real records); it uses the last events-attested timestamp with a `_completed_at_estimated` flag.
97
+ - **#939 orphan telemetry records** — the `subagents.jsonl` orphan-stop class (harness-side phantom SubagentStops) is documented on BOTH the lifetime (51%) and running-window (~93%) numbers, with a `start_record_found` write-time discriminator.
98
+ - **#911 check-test-value-bans over-reporting + ReDoS** — B1 narrowed from 352 findings to 9 (dynamic-derived counts only), the length regex hardened from >2min to 0ms on pathological input, and B4 extended with a scope-gated `systemMessage` key.
99
+ - **#886 eight instruction contradictions (C-1…C-8)** resolved against the code; the C-3 divergence (code-implementer test-writing ban vs the wave-executor's need-gated briefing) reconciled to the need-gated model on both surfaces.
100
+
101
+ ### Changed
102
+
103
+ - **Instruction-corpus diet** — always-on directive budget 471→~440/480: `loop-and-monitor.md` pointer-ised into ADR-0010 (71→37 directives, body halved) with all eight delta-sync footers preserved (#885); `lsp.md`/`owner-persona.md`/`quality-gates-autofix.md` trimmed to pointers (#884).
104
+ - **TV-003 consolidation** — 51 prose-presence pin tests removed and one implementation-mirror deleted (#912-T1); `config.test.mjs` split into seven feature-domain files (151 tests preserved); tests:src 1.7135→1.69.
105
+ - **Chores** — test badge floor `12,000+`, `.vault.yaml` techStack `bash`→`nodejs`, CHANGELOG archive split into `docs/changelog/`.
106
+
8
107
  ## [3.17.0] - 2026-07-21
9
108
 
10
109
  Telemetry & curation release. Headline: **opt-in anonymous usage telemetry** (#841) — a
@@ -1152,418 +1251,12 @@ Three vault-sync commits (`a76e180`, `e3c8e47`, `82be589`) landed alongside the
1152
1251
  - Developer prerequisite: Node 20+ and `npm ci` after clone. Existing bash test suite (`scripts/test/run-all.sh`) continues to work on Unix while the foundation stabilizes; Windows users run `npm test` only.
1153
1252
  - No user-visible breakage yet. Hook migrations in later waves will require `npm install` in the plugin directory before hooks fire.
1154
1253
 
1155
- ## [2.0.0] - 2026-04-17
1156
-
1157
- First stable release of the 2.x line. Bundles six betas worth of work into a single stable cut.
1158
-
1159
- ### Added
1160
- - **Bootstrap Gate** (beta.6): non-bypassable Phase-0 check that prevents orchestrator skills from running against unstructured repos. Three tiers (Fast/Standard/Deep), committed `.orchestrator/bootstrap.lock`, new `/bootstrap` command with `--fast`/`--standard`/`--deep`/`--upgrade`/`--retroactive` flags.
1161
- - **Pre-dispatch grounding injection** (beta.5): prepends line-numbered GROUNDING blocks to agent prompts for files with recent `edit-format-friction` stagnation history, reducing Edit-tool retry loops. Per-agent scope, capped at `grounding-injection-max-files` (default 3), gated on `persistence: true`.
1162
- - **Learnings-system efficiency** (beta.4): ranked cap on surfaced learnings (`learnings-surface-top-n`, default 15), passive confidence decay for untouched entries, surface-health telemetry in session-start, and retirement of the legacy split-brain `metrics/learnings.jsonl` path.
1163
- - **Scope and command enforcement hardening** (beta.2): shared `scripts/lib/hardening.sh` module with per-gate toggles (`enforcement-gates`), actionable denial suggestions, stagnation pattern detection (Pagination Spiral, Turn-Key Repetition, Error Echo), and file-level grounding verification (`grounding-check`).
1164
- - **Stagnation telemetry** (beta.2): session-end emits per-agent stagnation events with `pattern` and `error_class` fields; evolve accumulates these into `stagnation-class-frequency` learnings. Error-Class Taxonomy covers six classes.
1165
- - **Clank Event Bus integration** (beta.1): async event emission for session start, stop, and agent stop events via `scripts/lib/events.sh`. Graceful degradation when unconfigured.
1166
- - **Wave execution foundation** (alpha series): role-based wave assignment, adaptive sizing from complexity scoring, cross-session learning system, worktree isolation, circuit breaker with maxTurns and spiral detection, session persistence via STATE.md, PreToolUse enforcement hooks, and deterministic config parsing in `scripts/parse-config.sh`.
1167
-
1168
- ### Changed
1169
- - Marketplace install identifier is `session-orchestrator@kanevry` (renamed from the redundant `session-orchestrator@session-orchestrator` in beta.3).
1170
- - Phase 0 of every orchestrator skill (`/plan`, `/session`, `/go`, `/close`, `/discovery`, `/evolve`) now runs the Bootstrap Gate before any other work.
1171
- - Cross-session learnings are now ranked by confidence and capped before injection; entries that go untouched across sessions decay gradually rather than staying at full weight indefinitely.
1172
-
1173
- ### Security
1174
- - Placeholder substitution in bootstrap public-fallback templates uses Python `argv`, not `sed` string interpolation, to prevent injection via repo names.
1175
- - Explicit file enumeration for `git add` in all bootstrap templates; no `git add -A` in generated commit steps.
1176
- - `glab api` and `gh api` error output is redacted to prevent token leakage in hook logs.
1177
- - Scope enforcement defaults to fail-closed (`strict`) when the `enforcement` field is absent from `wave-scope.json`.
1178
- - `CLAUDE_PROJECT_DIR` is validated to contain a `.claude/` directory before being trusted by enforcement hooks.
1179
-
1180
- ### Migration
1181
- - Consumer repos with a legacy `<state-dir>/metrics/learnings.jsonl` file should run `bash <plugin>/scripts/migrate-legacy-learnings.sh` once after upgrading. The script is idempotent and produces a `.bak` copy of anything it touches.
1182
- - The plugin install command changed in beta.3: use `/plugin marketplace add <source>` and `/plugin install session-orchestrator@kanevry` inside a running Claude Code session. There is no `claude plugin` shell command.
1183
-
1184
- ## [2.0.0-beta.6] — 2026-04-16
1185
-
1186
- Issue #98 (Epic) — Bootstrap Gate. Addresses the "LLM rationalizes past hard-stops" problem: in a new empty repo, Codex bypassed the `/plan` skill's Phase-0 abort by falling back to "pragmatic paths", leaving the repo unstructured. The gate is a state-file-backed, cross-platform (Claude Code / Codex / Cursor), non-bypassable replacement. All 20 test suites pass.
1187
-
1188
- ### Added — Bootstrap Gate (Epic #98)
1189
-
1190
- - **Non-bypassable Bootstrap Gate** (`skills/_shared/bootstrap-gate.md`) runs in Phase 0 of every orchestrator skill (`/plan`, `/session`, `/go`, `/close`, `/discovery`, `/evolve`). If a repo lacks `CLAUDE.md` + `## Session Config` + `.orchestrator/bootstrap.lock`, the gate invokes a new bootstrap flow.
1191
- - **Three intensity tiers** — Fast (demos/spikes), Standard (MVPs/products), Deep (production/team). Each tier is a strict superset of the previous. LLM recommends tier from first user prompt; user confirms with one question.
1192
- - **Public path** for users without a local `projects-baseline`: `claude init` (Claude Code) or plugin-bundled minimal templates (Codex, Cursor). Five archetypes: `_minimal`, `static-html`, `node-minimal`, `nextjs-minimal`, `python-uv`.
1193
- - **Anti-bureaucracy guardrails** — exactly 1 question in normal flow, max 2 in ambiguous public path; idempotent gate check; committed `.orchestrator/bootstrap.lock` as mechanical truth.
1194
- - **New `/bootstrap` command** with `--fast`/`--standard`/`--deep`/`--upgrade <tier>`/`--retroactive` flags.
1195
- - **Six new test scripts** covering gate-check, tiers, upgrade, public path, idempotency, red-team.
1196
-
1197
- ### Changed
1198
-
1199
- - Phase 0 Bootstrap Gate prepended to all 6 orchestrator skills (`plan`, `session-start`, `wave-executor`, `session-end`, `discovery`, `evolve`).
1200
-
1201
- ### Security
1202
-
1203
- - Sanitized placeholder substitution in `skills/bootstrap/public-fallback.md` (Python argv, not sed string interpolation).
1204
- - Explicit file enumeration for `git add` in all bootstrap templates (no `git add -A`).
1205
- - Redacted `glab api` / `gh api` error output to prevent token leakage.
1206
- - Follow-up issues #108 (LOW security) and #109 (MEDIUM+LOW tech-debt) filed for remaining hardening.
1207
-
1208
- ### Motivation
1209
-
1210
- Addresses the "LLM rationalizes past hard-stops" problem: in a new empty repo, Codex bypassed the `/plan` skill's Phase-0 abort by falling back to "pragmatic paths", leaving the repo unstructured. The gate is a state-file-backed, cross-platform (Claude Code / Codex / Cursor), non-bypassable replacement.
1211
-
1212
- ## [2.0.0-beta.5] - 2026-04-15
1213
-
1214
- Issue #85 — pre-dispatch grounding injection for friction-prone files. Direct translation of the Hashline idea from the *Harness Problem* abgleich (gap G3) to wave-executor's layer: when an agent's scope includes a file with recent `edit-format-friction` stagnation history (from #84 telemetry), the agent prompt is prepended with a line-numbered view of that file so the agent references lines stably instead of re-matching character spans. Per-agent scope, capped at `grounding-injection-max-files` (default 3), gated on `persistence: true`. All 14 script test suites remain green; integration fixtures grew from 107 to 122 assertions.
1215
-
1216
- ### Added
1217
- - feat(wave-executor): pre-dispatch grounding injection — prepend a line-numbered GROUNDING block to each agent's prompt for any file in the agent's scope that has recent `edit-format-friction` stagnation history (from #84 telemetry). Reduces Edit-tool retry loops by giving agents stable line-number references. Per-agent scope, capped at `grounding-injection-max-files` (default 3). Helper script `scripts/compute-grounding-injection.sh` (new); gated on `persistence: true`. Addresses Harness Problem gap G3. (#85)
1218
- - feat(session-end): aggregate `grounding_injected` events into sessions.jsonl as `grounding_injections: {count, files, total_lines}`. Omitted when `count == 0`. (#85)
1219
- - config: `grounding-injection-max-files` (integer, default `3`) — cap files injected per agent; set `0` to disable the feature. (#85)
1220
-
1221
- ### Tests
1222
- - test-integration.sh Group 12 (#85): 15 new assertions covering config default/override/disable, helper early-exit, match-and-emit, cap behavior with `grounding_capped=true`, and PERSISTENCE=false no-event-write path. Total integration assertions 107 → 122.
1223
-
1224
- ## [2.0.0-beta.4] - 2026-04-15
1225
-
1226
- Epic #87 — learnings-system efficiency package. Four targeted changes to the cross-session intelligence layer that restore the original design intent: surface the most useful learnings, let irrelevant ones fade naturally, retire the legacy split-brain file, and make the whole thing transparent. Empirical baseline from a consumer repo (85 active learnings, ~13.6k tokens at every session-start) motivated the bundle. All 14 script test suites remain green; integration fixtures grew from 76 to 107 assertions.
1227
-
1228
- ### Added
1229
- - feat(session-start): rank and cap learnings injection — sort active learnings by confidence, slice to `learnings-surface-top-n` (default 15). Reduces Phase 5.6 token consumption on mature consumer repos. Configurable via Session Config key. Addresses Epic #87 / Issue #88. (#88)
1230
- - feat(session-end): passive confidence decay for untouched learnings — subtract `learning-decay-rate` (default `0.05`) from every learning not confirmed, contradicted, or newly-appended this session. Applied before the existing prune step. `0.0` opts out. A learning starting at `0.5` survives ~10 untouched sessions. Addresses Epic #87 / Issue #89. (#89)
1231
- - feat(session-start): "Surface health" sub-section in Project Intelligence — shows active/surfaced/suppressed counts, confidence distribution (high/medium/low), oldest surfaced entry, source file, vault mirror status. Prints an advisory when suppressed > surfaced. Addresses Epic #87 / Issue #91. (#91)
1232
-
1233
- ### Fixed
1234
- - fix(session-start): retire legacy `<state-dir>/metrics/learnings.jsonl` fallback — Phase 5.6 and `_shared/config-reading.md` now read ONLY the canonical `.orchestrator/metrics/learnings.jsonl`. Consumer repos with leftover legacy entries should run `scripts/migrate-legacy-learnings.sh` once. Addresses Epic #87 / Issue #90. (#90)
1235
-
1236
- **MIGRATION**: in each consumer repo, run:
1237
-
1238
- bash <plugin>/scripts/migrate-legacy-learnings.sh
1239
-
1240
- where `<plugin>` is the session-orchestrator plugin directory. The script is idempotent, produces a `.bak` copy of any legacy file it touches, and emits a one-line JSON summary on stdout.
1241
-
1242
- ### Tests
1243
- - Added 31 integration-test assertions across 4 new fixture groups in `scripts/test/test-integration.sh`: Group 8 (cap+rank, #88, 6 assertions incl. equal-confidence tiebreaker), Group 9 (passive decay, #89, 3 assertions incl. IEEE-754 tolerance), Group 10 (surface health, #91, 8 assertions incl. positive + negative advisory), Group 11 (migration helper, #90, 13 assertions incl. empty-canonical, malformed-legacy, idempotency).
1244
- - Added `json_float()` helper to `scripts/parse-config.sh` with regex + awk-based bounds validation (`0.0 ≤ x < 1.0` via strict-less-than max), covered by existing `test-parse-config.sh` suite.
1245
-
1246
- ## [2.0.0-beta.3] - 2026-04-15
1247
-
1248
- Documentation patch release. No runtime code changes — all 16 script test suites remain green. End users and contributors can now successfully install the plugin through Claude Code for the first time since #14 shipped.
1249
-
1250
- ### Changed
1251
- - **Marketplace identifier** renamed from `session-orchestrator` to `kanevry` in `.claude-plugin/marketplace.json`. The plugin name itself remains `session-orchestrator`; this change only affects the suffix after `@` in the install command, so it reads `session-orchestrator@kanevry` instead of the redundant `session-orchestrator@session-orchestrator`. Existing local installs that registered the old marketplace name can remove it with `/plugin marketplace remove session-orchestrator` and re-add.
1252
- - **Version string audit** — bumped every `2.0.0-beta.2` reference in sync: `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json`, `.codex-plugin/plugin.json`, `hooks/hooks.json`, `hooks/hooks-codex.json`, `scripts/mcp-server.sh`, `README.md` version badge, `docs/USER-GUIDE.md` banner example, `CONTRIBUTING.md` hook example. Applies the version-string-drift learning from the beta.2 release-cut.
1253
-
1254
- ### Fixed
1255
- - **Install instructions** across `README.md`, `docs/USER-GUIDE.md`, and `CONTRIBUTING.md` referenced non-existent `claude plugin add` / `claude plugin install` shell commands. Claude Code has no such CLI — plugins install exclusively via the slash commands `/plugin marketplace add <source>` and `/plugin install <name>@<marketplace>` inside a running session. End users following the previous instructions could not install the plugin at all. Docs now show the correct slash-command flow for both GitHub and local-clone installs. This is a follow-up to #14, whose original fix in commit 802d821 introduced the incorrect commands.
1256
-
1257
- ## [2.0.0-beta.2] - 2026-04-13
1258
-
1259
- ### Added
1260
- - **Shared hardening module** (GL#76) — `scripts/lib/hardening.sh` with pure, independently-testable helpers (`require_jq`, `source_platform`, `find_scope_file`, `get_enforcement_level`, `gate_enabled`, `path_matches_pattern`, `command_matches_blocked`, `emit_deny`, `emit_warn`, `suggest_for_*`). All three enforcement hooks now source this module instead of duplicating logic.
1261
- - **test-hardening.sh** — 33 assertions covering path matching (directory prefix, `**`, single-segment glob, exact), command word-boundary matching, scope-file discovery, enforcement-level parsing, gate toggles, and suggestion content.
1262
- - **Per-gate enforcement toggles** (GL#77) — new `enforcement-gates` Session Config field. Object with boolean values for `path-guard`, `command-guard`, `post-edit-validate`. Missing entries default to enabled. Wave-scope.json gains optional `gates` field; `gate_enabled()` in hardening.sh drives skip logic.
1263
- - **Actionable suggestions in hook denials** (GL#78) — `enforce-scope.sh` and `enforce-commands.sh` now include a context-aware suggestion in their denial reason (e.g., force-push denial points to `--force-with-lease`; scope violation lists the allowed paths and next steps).
1264
- - **STATE:/PLAN: structured reasoning** (GL#79) — new `reasoning-output` Session Config field (boolean, default `false`). When enabled, wave-executor appends a STATE/PLAN transparency block to every agent prompt. Opt-in — adds prompt overhead.
1265
- - **Stagnation patterns** (GL#80) — `circuit-breaker.md` documents three new pagination-aware patterns (Pagination Spiral, Turn-Key Repetition, Error Echo) with a decision table mapping each to a recovery action. `wave-loop.md` step 2 hooks the per-agent check into the existing post-wave review. Detection is heuristic (LLM-applied), not executable code. Detection discipline explicitly notes that two different agents reading the same file is coordination, not stagnation.
1266
- - **File-level grounding verification** (GL#81) — `plan-verification.md` § 1.1a compares planned files (union of agent prompt scopes) against actual files (`git diff --name-only $SESSION_START_REF..HEAD`) and reports scope creep + incomplete coverage. Adds a `grounding` field to session metrics JSONL. Gated by the new `grounding-check` Session Config field (boolean, default `true`). Informational only — does not block session close. `wave-loop.md` step 2 also gains a per-wave variant (bullet 3b) using each wave's pre-dispatch HEAD snapshot.
1267
- - **Stagnation telemetry + error-echo classification** (GL#84) — `session-end` now emits per-agent stagnation events to `events.jsonl` with `pattern` + `error_class` fields; `evolve` accumulates these into `stagnation-class-frequency` learnings. `circuit-breaker.md` adds an Error-Class Taxonomy (scope-denied, command-denied, edit-format-friction, test-reality-gap, state-read-failure, unknown) with worked examples.
1268
- - **Design Philosophy section in wave-executor** (GL#82) — 200-word framing between Execution Model and Platform Note explaining why friction is intentional; references `circuit-breaker.md` + `wave-loop.md`.
1269
- - **Stagnation-class-frequency learning type** (GL#83) — shipped in `skills/evolve/SKILL.md:103-110` (redundant with #84 telemetry; issue closed as already-implemented in b238135).
1270
- - **test-stagnation.sh** + **test-grounding.sh** — 27 new assertions covering content structure of the new sections, parse-config round-trip for `grounding-check`, error-path for invalid values, and structural ordering (1.1 < 1.1a < 1.2).
1271
- - **vault-mirror skipped-invalid action** — new action type emitted when a JSONL entry fails field validation (C2 hardening); prevents silent data loss during auto-sync to the Meta-Vault.
1272
- - **daily skill corrupt-file guard** — detects 0-byte or frontmatter-less daily notes and re-creates them; distinct exit codes 2/3/4 for file-missing / corrupt / frontmatter-invalid.
1273
-
1274
- ### Changed
1275
- - `hooks/enforce-scope.sh`, `hooks/enforce-commands.sh`, `hooks/post-edit-validate.sh` refactored to source `scripts/lib/hardening.sh`. Behavior is unchanged in the default configuration; new behavior surfaces only when `enforcement-gates` or `reasoning-output` are set.
1276
- - `scripts/validate-wave-scope.sh` now validates the optional `gates` field (must be an object of booleans).
1277
- - `scripts/parse-config.sh` adds `enforcement-gates`, `reasoning-output`, and `grounding-check` fields; `json_bool_object()` helper coerces string values to real JSON booleans.
1278
- - `docs/session-config-reference.md` documents the new fields in the Persistence & Safety section.
1279
- - `.mcp.json` now falls back to `git rev-parse --show-toplevel` when `$CLAUDE_PLUGIN_ROOT` is unset, allowing local development inside this repo to connect the MCP server without reinstalling as a plugin.
1280
- - `skills/vault-sync/SKILL.md` — Outputs/Inputs sections rewritten to match `validator.mjs` impl; vestigial `--json` flag removed from `validator.sh`.
1281
- - `skills/daily/SKILL.md` — documented VAULT_DIR Session Config resolution; added Exit codes table.
1282
- - `skills/wave-executor/SKILL.md` — added Design Philosophy section (200w) with harness-friction framing.
1283
-
1284
- ### Fixed
1285
- - **vault-mirror C2 field validation** — malformed JSONL lines now produce `skipped-invalid` actions instead of crashing the sync loop.
1286
- - **vault-mirror C3 readline race** — switched to `for await` collect-then-sequential to prevent out-of-order Markdown writes on large JSONL streams.
1287
- - **vault-mirror C4 dry-run mkdir** — removed unconditional `mkdirSync` that leaked directories during `--dry-run`; guarded behind write-mode.
1288
- - **vault-mirror H3/H4** — nested null-checks + `session_id` slug validation with uuid fallback.
1289
- - **session-end C1 broken jq selector** — `.dest` / `written` action selector never matched; corrected to `.path` / `created|updated`. Action list extended with `skipped-invalid`.
1290
- - **daily skill** — 0-byte and frontmatter-less daily notes now re-create cleanly instead of propagating corrupt state.
1291
-
1292
- ### Sanitized
1293
- - Public-surface cleanup: `skills/vault-sync/SKILL.md` and `skills/_shared/model-selection.md` no longer reference private project names or absolute user paths.
1294
- - `.orchestrator/metrics/*.jsonl` removed from git tracking (per-project observability data belongs locally, not in the public repo).
1295
- - `docs/specs/` removed from git tracking (internal design artifacts).
1296
- - `.gitignore` updated accordingly.
1297
-
1298
- ### Tests
1299
- - 328 → 396 passing (33 new in test-hardening.sh, 6 new in test-parse-config.sh, 15 new in test-stagnation.sh, 12 new in test-grounding.sh — including 3 invalid-value error-path assertions, +2 in test-parse-config.sh for `grounding-check`).
1300
- - Bats: `daily.bats` 8 → 10, `vault-mirror.bats` 36 → 40 (+6 assertions across the vault stack).
1301
-
1302
- ## [2.0.0-beta.1] - 2026-04-08 — Beta Release
1303
-
1304
- ### Added
1305
- - **Clank Event Bus integration** (GL#53) — `scripts/lib/events.sh` with `so_emit_event()` function for async event emission to Clank's Event Bus (`events.<internal-host>/api/events`). Bearer-auth via `CLANK_EVENT_SECRET`, graceful degradation when unconfigured.
1306
- - **SessionStart event hook** — `hooks/on-session-start.sh` emits `orchestrator.session.started` with platform and project context
1307
- - **Stop/SubagentStop event emission** — existing hooks now emit `orchestrator.session.stopped` and `orchestrator.agent.stopped` events
1308
- - **Output Styles** (GL#56) — 3 output style definitions (`output-styles/session-report.md`, `wave-summary.md`, `finding-report.md`) for consistent session reporting format
1309
- - **test-events.sh** — 12 assertions covering event library loading, graceful degradation, hook integration, and registration
1310
-
1311
- ### Changed
1312
- - hooks.json + hooks-codex.json: SessionStart now includes async event notification hook
1313
- - Plugin version: alpha.15 → beta.1
1314
- - Tests: 172+ → 184+ passing (12 new event bus assertions)
1315
-
1316
- ### Closed
1317
- - GL#53 (HTTP Hooks — reimplemented as Clank Event Bus integration)
1318
- - GL#56 (Output Styles)
1319
- - GL#47 (Epic: Plugin API Alignment — all sub-issues resolved)
1320
-
1321
- ## [2.0.0-alpha.15] - 2026-04-08 — Plugin API Alignment
1322
-
1323
- ### Added
1324
- - **plugin.json component paths** — `commands`, `agents`, `hooks`, `mcpServers` fields per Plugin API spec
1325
- - **validate-plugin.sh** (GL#48) — 18-check validation script: manifest schema, component path resolution, hooks JSON, agent frontmatter, mcpServers validity
1326
- - **test-validate-plugin.sh** — 17 assertions covering valid plugin, missing fields, invalid JSON, broken paths, bad frontmatter
1327
- - **Stop hook** (GL#52) — `hooks/on-stop.sh` persists session state to metrics on unexpected exit
1328
- - **SubagentStop hook** (GL#52) — `hooks/on-subagent-stop.sh` logs agent completion for wave-executor metrics
1329
- - **MCP Server skeleton** (GL#54) — `.mcp.json` + `scripts/mcp-server.sh` exposing `session_config` and `session_metrics` tools via JSON-RPC 2.0 stdio
1330
-
1331
- ### Changed
1332
- - **Issue triage** (GL#60) — verified all 14 epic issues against actual Plugin API docs: 6 closed (not in API), 2 deferred, 4 implemented, 1 epic tracking
1333
- - hooks.json + hooks-codex.json now include `Stop` and `SubagentStop` event types
1334
- - Tests: 155 → 172+ passing (17 new validate-plugin assertions)
1335
-
1336
- ### Closed (not in Plugin API)
1337
- - GL#49 (`userConfig`), GL#50 (`CLAUDE_PLUGIN_DATA`), GL#51 (agent extended frontmatter), GL#55 (`bin/` auto-PATH), GL#57 (skill `paths`), GL#58 (LLM hook types)
1338
-
1339
- ### Deferred
1340
- - GL#53 (HTTP hooks), GL#56 (output styles)
1341
-
1342
- ## [2.0.0-alpha.14] - 2026-04-07 — Cross-Platform + Housekeeping
1343
-
1344
- ### Added
1345
- - **Codex CLI full support** — platform detection (`scripts/lib/platform.sh`), `.orchestrator/metrics/` shared knowledge layer, `.codex-plugin/` with 3 agent TOMLs (explorer, wave-worker, session-reviewer), hooks-codex.json, codex-setup.md
1346
- - **Cursor IDE rules-based integration** — 9 `.cursor/rules/*.mdc` files, sequential execution model (no Agent() tool), platform.sh cursor detection, cursor-setup.md, hooks-cursor.json, cursor-install.sh
1347
- - **Intelligent agent dispatch** — 3-tier resolution: project agents > plugin agents > general-purpose fallback. 5 domain agents (code-implementer, test-writer, db-specialist, ui-developer, security-reviewer)
1348
- - **Worktree tests** (GL#39) — `scripts/test/test-worktree.sh` with 10 assertions covering create/cleanup/cleanup_all
1349
- - **Platform slow-path tests** (GL#42) — 8 assertions for marker directory detection without env vars
1350
-
1351
- ### Changed
1352
- - **DRY hook scripts** (GL#41) — all 3 hooks now source `platform.sh` instead of duplicating `find_project_root()`
1353
- - **Removed orphan config fields** (GL#40) — `session-types` and `cli-tools` removed from parser, docs, tests, and 23 files total
1354
- - **Codex agent specialization** documented as known limitation (GL#43) — Platform Limitations section in codex-setup.md
1355
- - **Test-writer hardening** — 3 anti-greenwashing rules: hardcoded assertions, mandatory error tests, falsification self-check
1356
- - **Lifecycle Simulation v3** — 37 gaps found across 3-platform trace, 28 fixed (session-end, wave-executor, session-plan, discovery, evolve, hooks, .cursor/rules)
1357
- - All 10 SKILL.md files now include `model-preference-cursor` frontmatter
1358
- - `skills/_shared/platform-tools.md` extended with Cursor column
1359
- - `skills/_shared/config-reading.md` updated with Cursor fallback paths
1360
- - Tests: 130 → 155 passing (10 worktree + 8 platform slow-path + adjustments for removed fields)
1361
-
1362
- ### Fixed
1363
- - **3 discovery issues created** — GL#44 (post-edit-validate.sh JSON injection), GL#45 (Session Config dogfooding), GL#46 (.claudeignore)
1364
-
1365
- ## [2.0.0-alpha.13] - 2026-04-06 — Validate Refactor + Probes Split + PostToolUse Hook
1366
-
1367
- - **refactor:** extract 4 helpers from `validate()` in validate-wave-scope.sh — 109→22 lines (#25)
1368
- - **refactor:** split `probes.md` (943 lines) into 6 category files — code, infra, ui, arch, session + intro (#26)
1369
- - **feat:** PostToolUse hook for incremental typecheck after Edit/Write — informational, never blocks (#20)
1370
- - `hooks/post-edit-validate.sh` — resolves typecheck command from config, 2s timeout, macOS-compatible
1371
- - hooks.json updated with PostToolUse section
1372
- - **test:** 33 new test assertions (wave-scope edge cases + hook test suite)
1373
- - **fix:** macOS `date +%s%3N` compatibility in post-edit-validate.sh (BSD date lacks `%N`)
1374
-
1375
- ## [2.0.0-alpha.12] - 2026-04-06 — /evolve + Skill Splits
1376
-
1377
- - **feat:** `/evolve` command + skill — extract, review, and list cross-session learnings (#21)
1378
- - `analyze` mode: extract patterns from session history (5 learning types), present via AskUserQuestion, atomic write
1379
- - `review` mode: interactive management (boost/reduce/delete/extend) of existing learnings
1380
- - `list` mode: read-only display grouped by type with confidence and expiry summary
1381
- - **refactor:** extract `verification-checklist.md` from session-end SKILL.md Phase 2 (#18)
1382
- - **refactor:** extract `wave-template.md` from session-plan SKILL.md Step 4 (#18)
1383
- - **feat:** seed initial `learnings.jsonl` with 4 learnings from 8-session history (effective-sizing, scope-guidance)
1384
-
1385
- ## [2.0.0-alpha.11] - 2026-04-06 — Deterministic Scripts
1386
-
1387
- - **feat:** `scripts/parse-config.sh` — deterministic Session Config parser with type validation, 36 fields, defaults from reference doc (#19)
1388
- - **feat:** `scripts/run-quality-gate.sh` — 4 quality gate variants (baseline, incremental, full-gate, per-file) with structured JSON output (#19)
1389
- - **feat:** `scripts/validate-wave-scope.sh` — wave-scope.json validator with security checks (path traversal, absolute paths) (#19)
1390
- - **feat:** `scripts/lib/common.sh` — shared library (find_project_root, require_jq, die, warn, resolve_plugin_root)
1391
- - **feat:** 94 bash tests across 3 test suites with 8 fixtures
1392
- - **refactor:** skills updated to reference scripts (session-start, discovery, plan, wave-executor, session-end, quality-gates)
1393
-
1394
- ## [2.0.0-alpha.10] - 2026-04-05
1395
-
1396
- ### v2.0.0-alpha.10
1397
-
1398
- **Quality & Architecture**
1399
-
1400
- - fix: remove hardcoded archetype/style/group mappings in plan mode-new — now discovered dynamically from `$BASELINE_PATH` (#11)
1401
- - feat: shared Session Config reference at `docs/session-config-reference.md` — single source of truth for all 36 fields (#12)
1402
- - refactor: deduplicate Phase 0 config lists across session-start, discovery, and plan skills (#12)
1403
- - refactor: extract session-start Phase 7 presentation template to `presentation-format.md` (#18)
1404
- - refactor: session-start SKILL.md reduced from 290 to 210 lines (28% reduction) (#18)
1405
-
1406
- ## [2.0.0-alpha.9] - 2026-04-05 — Cross-Repo Learnings + Competitive Analysis
1407
-
1408
- - **feat:** cross-repo learnings — anti-pattern detection, skill metadata extraction, confidence-based filtering
1409
- - **feat:** skill frontmatter extended with `tags` and `model-preference` fields
1410
- - **fix:** discovery probe consistency fixes (false positive reduction, deduplication logic)
1411
- - **analysis:** competitive analysis of everything-claude-code, projects-baseline, claude-code-skills repos
1412
-
1413
- ## [2.0.0-alpha.8] - 2026-04-04
1414
-
1415
- ### Fixed
1416
- - **enforce-scope.sh**: default enforcement changed from `warn` (fail-open) to `strict` (fail-closed) when `enforcement` field missing from `wave-scope.json`
1417
- - **enforce-commands.sh**: same fail-closed default applied
1418
- - **enforce-scope.sh**: incomplete regex metacharacter escaping — `+`, `?`, `|`, `[`, `]`, `(`, `)` now escaped before glob→regex conversion
1419
- - **enforce-scope.sh**: symlink bypass — `realpath` canonicalization added for both PROJECT_ROOT and FILE_PATH (directory-level resolution for new files)
1420
- - **enforce-commands.sh**: hardcoded fallback safety blocklist (`rm -rf`, `git push --force`, `git reset --hard`, `DROP TABLE`, `git checkout -- .`) enforced when `blockedCommands` absent from `wave-scope.json`
1421
- - **Both hooks**: `CLAUDE_PROJECT_DIR` environment variable now validated — must contain `.claude/` directory to be trusted
1422
- - **wave-executor**: jq prerequisite check added to Pre-Execution phase (step 4) — warns user if jq missing before wave dispatch
1423
-
1424
- ### Changed
1425
- - Plugin version alpha.7 → alpha.8
1426
- - SECURITY.md expanded with Enforcement Architecture, Prerequisites, Known Limitations, Credential Safety sections
1427
- - README.md: jq listed as prerequisite for enforcement hooks
1428
- - USER-GUIDE.md: credential safety warning added to Session Config section
1429
-
1430
- ## [2.0.0-alpha.7] - 2026-04-04
1431
-
1432
- ### Added
1433
- - **`/plan` skill** — structured project planning & PRD generation (#27)
1434
- - `/plan new` — project kickoff with 3-wave requirement gathering, full PRD, and repo setup
1435
- - `/plan feature` — compact feature PRD with 1-2 wave discovery
1436
- - `/plan retro` — data-driven retrospective from session metrics
1437
- - 3 PRD templates: full (8 sections), feature (5 sections), retro (metrics + actions)
1438
- - PRD reviewer prompt with 6-criteria quality review and max 3 iteration protocol
1439
- - Product Strategist soul identity (`skills/plan/soul.md`)
1440
- - 4 new Session Config fields: `plan-baseline-path`, `plan-default-visibility`, `plan-prd-location`, `plan-retro-location`
1441
-
1442
- ### Changed
1443
- - Plugin version alpha.6 → alpha.7
1444
- - SessionStart hook message updated to include `/plan [new|feature|retro]`
1445
- - Component counts updated: 8→9 skills, 4→5 commands
1446
-
1447
- ## [2.0.0-alpha.6] - 2026-04-04
1448
-
1449
- ### Fixed
1450
- - **Worktree enforcement bypass** — `find_project_root()` fallback added to both hook scripts (#21 prep)
1451
- - **Quality wave scope conflict** — two-phase scope enforcement: simplification agents get production file scope, then test/review agents get test-only scope (#21 prep)
1452
- - **Undefined `<session-start-ref>`** — `SESSION_START_REF` captured at session start, used in 3 locations (#21 prep)
1453
- - **PARTIAL/SPIRAL/FAILED detection** — STATUS reporting protocol with coordinator detection rules and definitions table (#21 prep)
1454
- - **Discovery embedded mode return contract** — JSON schema for findings + stats between discovery and session-end (#21 prep)
1455
- - **Learnings I/O** — in-memory tracking in Phase 3.5a, atomic rewrite in Phase 3.6, explicit conditions (#21 prep)
1456
- - 8 medium/low consistency fixes: subject matching, cross-module scope definition, sort order, gate headers, field naming, enforcement docs (M1-M6, L1-L2)
1457
-
1458
- ### Changed
1459
- - Version bumped alpha.5 → alpha.6 across 5 files
1460
- - Validation checklist expanded from 11 to 17 scenarios
1461
-
1462
- ## [2.0.0-alpha.5] - 2026-04-03
1463
-
1464
- ### Added
1465
- - **Confidence-based scoring for discovery probes** (#22) — 0-100 confidence score per finding based on pattern specificity, file context, and historical signal. Auto-defers low-confidence findings below configurable threshold (`discovery-confidence-threshold`, default: 60). Critical findings never auto-deferred.
1466
- - **Post-implementation simplification pass** (#23) — Quality wave now dispatches simplification agents before test writers, applying `slop-patterns.md` patterns to clean AI-generated code (unnecessary try-catch, over-documentation, redundant boolean logic, re-implemented stdlib functions).
1467
- - **Session-reviewer specialized review sections** (#24) — 3 new review sections: Silent Failure Analysis (catch blocks that swallow errors), Test Depth Check (assertion quality, mock boundaries), Type Design Spot-Check (overly broad types, missing unions). Per-finding confidence scoring (>=80 threshold).
1468
- - **CLAUDE.md quality audit probe** (#25) — New `claude-md-audit` probe in session category: validates Session Config paths, checks rules freshness against codebase, detects stale CLAUDE.md, cross-references technology mentions against package.json.
1469
- - **Session effectiveness tracking** (#26) — Extended `sessions.jsonl` schema with `discovery_stats`, `review_stats`, and `effectiveness` fields. Session-start surfaces completion rate trends, low-value probe detection, and carryover pattern analysis after 5+ sessions.
1470
- - Confidence Scoring Reference section in `probes.md` with per-category guidance
1471
- - Discovery Phase 6 (Capture Discovery Stats) for standalone mode
1472
-
1473
- ## [2.0.0-alpha.4] - 2026-04-03
1474
-
1475
- ### Fixed
1476
- - **enforce-scope.sh**: glob matching now supports `**` recursive patterns via regex conversion (was limited to single-level globs)
1477
- - **enforce-commands.sh**: word-boundary matching prevents false positives (e.g., `rm -rflag` no longer blocked by `rm -rf` pattern)
1478
- - **session_id uniqueness**: format changed from `<branch>-<YYYY-MM-DD>` to `<branch>-<YYYY-MM-DD>-<HHmm>` to prevent same-day collisions
1479
- - **Spiral detection scope**: clarified as per-agent (not per-wave) — two agents editing the same file is expected, not a spiral
1480
- - **Complexity tier boundaries**: rebalanced to Simple (0-1), Moderate (2-3), Complex (4-6) for better distribution
1481
- - **Dynamic scaling threshold**: "fast" defined as under 3 minutes wall-clock (was undefined)
1482
- - **Worktree merge strategy**: defined sequential merge protocol with conflict resolution heuristics
1483
- - **Directory creation**: explicit `mkdir -p` commands instead of prose instructions for STATE.md and metrics
1484
- - **JSONL write safety**: documented POSIX-atomic `>>` append, warned against read-modify-write
1485
- - **USER-GUIDE spiral wording**: corrected "per wave" to "per agent" to match authoritative circuit-breaker.md
1486
-
1487
- ### Added
1488
- - `deviation-pattern` learning type — session-end now reads STATE.md deviations for cross-session pattern extraction
1489
- - Discovery role enforcement: `allowedPaths: []` + read-only prompt instruction
1490
- - Quality role scope restriction: `allowedPaths` limited to test file patterns (`**/*.test.*`, `**/*.spec.*`, `**/__tests__/**`)
1491
- - Role combination verification example (Discovery+Impl-Core → Incremental checks)
1492
- - 6+ wave splitting criteria (by module/dependency boundary)
1493
- - jq prerequisite documentation in USER-GUIDE.md with install commands
1494
- - Integration test reference config (`docs/examples/integration-test-config.md`) covering all 30 Session Config fields
1495
- - Validation checklist (`docs/validation-checklist.md`) mapping to #21's 11 test plan items
1496
-
1497
- ### Changed
1498
- - Hook jq-missing warnings now explicitly state that enforcement is fully disabled
1499
- - `enforce-scope.sh` matching has 4 branches: directory prefix → recursive glob → simple glob → exact match
1500
-
1501
- ## [2.0.0-alpha.3] - 2026-04-03
1502
-
1503
- ### Added
1504
- - Session metrics tracking — wall-clock time, agent counts, files changed per wave (#8)
1505
- - Historical trend display in session-start showing last 5 sessions
1506
- - Adaptive wave sizing with complexity scoring (simple/moderate/complex tiers) (#19)
1507
- - Dynamic agent scaling between waves based on performance signals
1508
- - Cross-session learning system with confidence scoring (#20)
1509
- - Project Intelligence sections in session-start and session-plan from accumulated learnings
1510
- - Structured quality-gates output format (JSON) for metrics integration
1511
-
1512
- ### Changed
1513
- - Circuit breaker and worktree isolation extracted to `circuit-breaker.md` sub-reference
1514
- - session-plan steps renumbered (new Step 3: Complexity Assessment)
1515
- - session-end Final Report expanded with per-wave metrics breakdown and learnings summary
1516
- - Quality gates Variants 2 and 3 have structured JSON output specifications
1517
-
1518
- ## [2.0.0-alpha.2] - 2026-04-03
1519
-
1520
- ### Added
1521
- - Hybrid session persistence via STATE.md lifecycle (init/update/clear) + session memory files (#16)
1522
- - PreToolUse hook enforcement: enforce-scope.sh (Edit/Write), enforce-commands.sh (Bash) (#17)
1523
- - Circuit breaker with maxTurns limit and spiral detection (#18)
1524
- - Worktree isolation for parallel agent execution (#18)
1525
- - 5 new Session Config fields: persistence, memory-cleanup-threshold, enforcement, isolation, max-turns
1526
- - SESSION-START Phase 0.5 (Session Continuity) and Phase 5.5 (Memory Recall)
1527
-
1528
- ### Changed
1529
- - USER-GUIDE.md: 2 new sections (Session Persistence, Safety Features) + config fields + cheat sheet
1530
- - wave-executor: STATE.md initialization, post-wave updates, scope manifest, circuit breaker
1531
-
1532
- ## [2.0.0-alpha] - 2026-04-02
1533
-
1534
- ### Added
1535
- - quality-gates reference skill — canonical commands for typecheck, test, lint with 4 variants (Baseline, Incremental, Full Gate, Per-File)
1536
- - 9 new Session Config fields: test-command, typecheck-command, lint-command, ssot-freshness-days, plugin-freshness-days, recent-commits, issue-limit, stale-branch-days, stale-issue-days
1537
- - Role-to-wave mapping table — waves dynamically map to 5 roles (Discovery, Impl-Core, Impl-Polish, Quality, Finalization) based on configured wave count (3-6+)
1538
- - discovery skill with /discovery command — systematic quality audit with 22 probes across 5 categories (code, infra, ui, arch, session)
1539
- - 4 new Session Config fields for discovery: discovery-on-close, discovery-probes, discovery-exclude-paths, discovery-severity-threshold
1540
-
1541
- ### Changed
1542
- - gitlab-ops is now the single source of truth for all VCS operations — consuming skills reference it instead of duplicating commands (#11)
1543
- - Quality checks across all skills now reference quality-gates instead of hardcoding commands (#12)
1544
- - Session Config documentation consolidated — USER-GUIDE.md Section 4 is the authoritative field reference (#13)
1545
- - All hardcoded thresholds (SSOT freshness, plugin age, stale branches, etc.) are now configurable via Session Config (#14)
1546
- - Wave execution model rewritten from hardcoded wave numbers to role-based assignment (#15)
1547
- - Pencil design review triggers now reference Impl-Core and Impl-Polish roles instead of Wave 2/3
1548
- - Label taxonomy in CONTRIBUTING.md and USER-GUIDE.md now points to gitlab-ops as SSOT
1254
+ ---
1549
1255
 
1550
- ### Removed
1551
- - ~80 lines of duplicated VCS detection/command logic across 4 skills
1552
- - ~30 lines of duplicated quality check commands across 4 skills
1553
- - ~60 lines of duplicated Session Config documentation across 3 files
1554
- - All hardcoded "Wave 1/2/3/4/5" references in favor of role names
1256
+ ## Older versions
1555
1257
 
1556
- ## [1.0.0] - 2026-04-02
1258
+ To keep this file focused on the current **3.x** major line, changelog entries for the
1259
+ earlier release lines have been archived:
1557
1260
 
1558
- ### Added
1559
- - 6 skills: session-start, session-plan, wave-executor, session-end, ecosystem-health, gitlab-ops
1560
- - 3 commands: /session, /go, /close
1561
- - 1 agent: session-reviewer (inter-wave quality gate)
1562
- - SessionStart hook with startup notification
1563
- - Soul personality system (soul.md)
1564
- - VCS auto-detection with dual GitLab + GitHub support
1565
- - 5-wave execution pattern with configurable agent counts
1566
- - Inter-wave Pencil design-code alignment reviews
1567
- - Ecosystem health monitoring (service endpoints + cross-repo scanning)
1568
- - Session Config system with 13 configurable fields
1569
- - User Guide, CONTRIBUTING guide, and example Session Configs
1261
+ - [`docs/changelog/v2.md`](docs/changelog/v2.md) — the **2.x** line (2.0.0 and its alpha/beta pre-releases, 2026-04-02 -> 2026-04-17)
1262
+ - [`docs/changelog/v1.md`](docs/changelog/v1.md) the **1.x** line (1.0.0, 2026-04-02)