peaks-loop 4.0.0-beta.12 → 4.0.0-beta.15

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 (212) hide show
  1. package/CHANGELOG.md +282 -147
  2. package/README-en.md +1 -1
  3. package/README.md +32 -1
  4. package/bin/peaks.js +0 -0
  5. package/dist/cli/cli-helpers.d.ts +1 -1
  6. package/dist/cli/cli-helpers.js +1 -1
  7. package/dist/cli/commands/adapter-commands-s2a.js +1 -1
  8. package/dist/cli/commands/asset-commands.js +33 -16
  9. package/dist/cli/commands/audit-commands.js +1 -1
  10. package/dist/cli/commands/bee-commands.js +1 -1
  11. package/dist/cli/commands/capability-commands.js +1 -1
  12. package/dist/cli/commands/classify-classify-commands.js +1 -1
  13. package/dist/cli/commands/code-commands.js +1 -1
  14. package/dist/cli/commands/code-review-commands.js +1 -1
  15. package/dist/cli/commands/codegraph-commands.js +1 -1
  16. package/dist/cli/commands/compact-command.js +1 -1
  17. package/dist/cli/commands/complexity-commands.js +1 -1
  18. package/dist/cli/commands/config-commands.js +1 -1
  19. package/dist/cli/commands/context-commands.js +1 -1
  20. package/dist/cli/commands/contract-commands.js +1 -1
  21. package/dist/cli/commands/core/artifacts-command.js +1 -1
  22. package/dist/cli/commands/core/binding-commands.js +1 -1
  23. package/dist/cli/commands/core/doctor-command.js +63 -3
  24. package/dist/cli/commands/core/memory-command.js +1 -1
  25. package/dist/cli/commands/core/profile-command.js +1 -1
  26. package/dist/cli/commands/core/proxy-command.js +1 -1
  27. package/dist/cli/commands/core/session-command.js +1 -1
  28. package/dist/cli/commands/core/skill-command.js +2 -2
  29. package/dist/cli/commands/core/standards-command.js +1 -1
  30. package/dist/cli/commands/dispatch-commands.js +2 -2
  31. package/dist/cli/commands/dispatch-from-dag.js +1 -1
  32. package/dist/cli/commands/doc-commands.js +1 -1
  33. package/dist/cli/commands/ecc-commands.js +2 -2
  34. package/dist/cli/commands/evolution-commands.js +1 -1
  35. package/dist/cli/commands/feedback-commands.js +1 -1
  36. package/dist/cli/commands/final-review-commands.js +1 -1
  37. package/dist/cli/commands/fixture-commands.js +1 -1
  38. package/dist/cli/commands/fork-commands.js +1 -1
  39. package/dist/cli/commands/gate-commands.js +1 -1
  40. package/dist/cli/commands/heartbeat-commands.js +1 -1
  41. package/dist/cli/commands/hook-handle.js +1 -1
  42. package/dist/cli/commands/hooks-commands.js +1 -1
  43. package/dist/cli/commands/ide-commands.js +1 -1
  44. package/dist/cli/commands/impact-commands.js +1 -1
  45. package/dist/cli/commands/job-commands.js +1 -1
  46. package/dist/cli/commands/legacy-commands.js +1 -1
  47. package/dist/cli/commands/log-commands.js +1 -1
  48. package/dist/cli/commands/loop-commands.js +1 -1
  49. package/dist/cli/commands/loop-eval-commands.js +1 -1
  50. package/dist/cli/commands/memory-commands.js +1 -1
  51. package/dist/cli/commands/migrate-1-4-1-command.js +1 -1
  52. package/dist/cli/commands/migrate-v2-10-to-v2-11-command.js +1 -1
  53. package/dist/cli/commands/mut-commands.d.ts +1 -1
  54. package/dist/cli/commands/mut-commands.js +1 -5
  55. package/dist/cli/commands/observability-commands.js +1 -1
  56. package/dist/cli/commands/openspec-commands.js +2 -2
  57. package/dist/cli/commands/perf-audit-commands.js +2 -2
  58. package/dist/cli/commands/perf-commands.js +1 -1
  59. package/dist/cli/commands/polyrepo-commands.js +1 -1
  60. package/dist/cli/commands/prd-blocks-commands.js +1 -1
  61. package/dist/cli/commands/prd-commands.js +1 -1
  62. package/dist/cli/commands/project-commands.js +1 -1
  63. package/dist/cli/commands/qa-business-review-commands.js +1 -1
  64. package/dist/cli/commands/qa-commands.d.ts +1 -1
  65. package/dist/cli/commands/qa-commands.js +2 -2
  66. package/dist/cli/commands/release-commands.js +1 -1
  67. package/dist/cli/commands/request-commands.js +1 -1
  68. package/dist/cli/commands/retrospective-commands.js +1 -1
  69. package/dist/cli/commands/reviewer-commands.js +1 -1
  70. package/dist/cli/commands/role-commands.js +1 -1
  71. package/dist/cli/commands/runtime-commands.js +1 -2
  72. package/dist/cli/commands/sc-commands.js +1 -1
  73. package/dist/cli/commands/scan-commands.js +1 -1
  74. package/dist/cli/commands/security-audit-commands.js +2 -2
  75. package/dist/cli/commands/sediment-commands.js +10 -1
  76. package/dist/cli/commands/share-commands.d.ts +19 -0
  77. package/dist/cli/commands/share-commands.js +121 -2
  78. package/dist/cli/commands/skill-conformance-commands.js +1 -1
  79. package/dist/cli/commands/skill-loop-engineering-readiness-commands.js +1 -1
  80. package/dist/cli/commands/skill-search-commands.js +1 -1
  81. package/dist/cli/commands/slice-commands.js +1 -1
  82. package/dist/cli/commands/slice-integrate-commands.js +1 -1
  83. package/dist/cli/commands/slice-review-commands.js +1 -1
  84. package/dist/cli/commands/smoke-commands.js +1 -1
  85. package/dist/cli/commands/sop-commands.js +1 -1
  86. package/dist/cli/commands/statusline-commands.js +1 -1
  87. package/dist/cli/commands/sub-agent-commands.js +2 -1
  88. package/dist/cli/commands/understand-commands.js +1 -1
  89. package/dist/cli/commands/upgrade-commands.js +1 -1
  90. package/dist/cli/commands/user-touchpoint-commands.js +1 -1
  91. package/dist/cli/commands/verdict-aggregate-command.js +1 -1
  92. package/dist/cli/commands/workflow-commands.js +1 -1
  93. package/dist/cli/commands/workflow-plan-commands.js +1 -1
  94. package/dist/cli/commands/workspace/init-command.js +1 -1
  95. package/dist/cli/commands/workspace/migrate-command.js +1 -1
  96. package/dist/cli/commands/workspace/reconcile-command.js +1 -1
  97. package/dist/cli/index.js +1 -1
  98. package/dist/cli/program.js +2 -2
  99. package/dist/services/artifacts/artifact-prerequisites.js +1 -1
  100. package/dist/services/artifacts/request-artifact-service.js +1 -1
  101. package/dist/services/artifacts/workspace-service.js +1 -1
  102. package/dist/services/code/auto-compact-orchestrator.js +5 -2
  103. package/dist/services/code-review/ocr-service.d.ts +1 -1
  104. package/dist/services/code-review/ocr-service.js +6 -3
  105. package/dist/services/config/config-types.js +1 -1
  106. package/dist/services/dashboard/project-dashboard-service.js +2 -2
  107. package/dist/services/dispatch/batch-counter.js +1 -1
  108. package/dist/services/dispatch/dispatch-record-writer.js +1 -1
  109. package/dist/services/job/job-progress-store.d.ts +2 -2
  110. package/dist/services/job/job-types.d.ts +27 -27
  111. package/dist/services/log/retention.js +1 -1
  112. package/dist/services/openspec/openspec-archive-service.js +1 -1
  113. package/dist/services/openspec/openspec-bridge-service.js +1 -1
  114. package/dist/services/openspec/openspec-init-service.js +1 -1
  115. package/dist/services/openspec/openspec-propose-from-doctor-service.js +1 -1
  116. package/dist/services/openspec/openspec-render-service.js +1 -1
  117. package/dist/services/openspec/openspec-scan-service.js +1 -1
  118. package/dist/services/openspec/openspec-validate-service.js +1 -1
  119. package/dist/services/scan/acceptance-coverage-service.js +1 -1
  120. package/dist/services/scan/archetype-service.js +1 -1
  121. package/dist/services/scan/existing-system-service.js +1 -1
  122. package/dist/services/scan/libraries-service.js +1 -1
  123. package/dist/services/skill/skill-search-service.d.ts +5 -5
  124. package/dist/services/skill/skill-search-service.js +2 -2
  125. package/dist/services/skillhub/migrations/001-initial.sql +71 -0
  126. package/dist/services/skillhub/migrations/002-loop-release.sql +32 -0
  127. package/dist/services/skillhub/migrations/003-loop-bee-relation.sql +35 -0
  128. package/dist/services/skillhub/migrations/004-loop-bee-extension.sql +65 -0
  129. package/dist/services/skillhub/migrations/005-evolution-evaluation.sql +81 -0
  130. package/dist/services/skillhub/migrations/006-crystallization-event.sql +92 -0
  131. package/dist/services/skills/skill-registry.js +2 -2
  132. package/dist/services/skills/skill-runbook-service.js +1 -1
  133. package/dist/services/slice/slice-check-service.js +1 -1
  134. package/dist/services/understand/understand-hybrid-service.js +1 -1
  135. package/dist/services/understand/understand-scan-service.js +2 -2
  136. package/dist/services/upgrade/upgrade-service.js +4 -3
  137. package/dist/services/verdict/envelopes.d.ts +2 -2
  138. package/dist/services/verdict/envelopes.js +2 -2
  139. package/dist/services/verdict/verdict-aggregator.d.ts +3 -3
  140. package/dist/services/workflow/autonomous-resume-writer.js +1 -1
  141. package/dist/services/workflow/plan-reader.d.ts +1 -1
  142. package/dist/services/workflow/plan-reader.js +1 -1
  143. package/dist/services/workflow/plan-refresher.d.ts +1 -1
  144. package/dist/services/workflow/plan-refresher.js +1 -1
  145. package/dist/services/workflow/plan-trigger-detector.d.ts +1 -1
  146. package/dist/services/workflow/plan-trigger-detector.js +1 -1
  147. package/dist/services/workflow/workflow-router-service.js +11 -9
  148. package/dist/services/workspace/migrate-service.js +1 -1
  149. package/dist/services/workspace/workspace-service.js +1 -1
  150. package/package.json +14 -8
  151. package/scripts/copy-templates.mjs +16 -0
  152. package/scripts/sync-version.mjs +8 -1
  153. package/skills/bee/peaks-rd/SKILL.md +14 -1
  154. package/skills/peaks-code/SKILL.md +44 -0
  155. package/skills/peaks-code/references/sub-agent-dispatch.md +30 -0
  156. package/dist/services/agent/ecc-cache-service.d.ts +0 -97
  157. package/dist/services/agent/ecc-cache-service.js +0 -491
  158. package/dist/services/audit-independent/perf-audit-service.d.ts +0 -151
  159. package/dist/services/audit-independent/perf-audit-service.js +0 -316
  160. package/dist/services/audit-independent/security-audit-service.d.ts +0 -155
  161. package/dist/services/audit-independent/security-audit-service.js +0 -316
  162. package/dist/services/context/dispatch-context-guard.d.ts +0 -27
  163. package/dist/services/context/dispatch-context-guard.js +0 -192
  164. package/dist/services/context/shared-channel.d.ts +0 -93
  165. package/dist/services/context/shared-channel.js +0 -308
  166. package/dist/services/crystallization/crystallization-service.d.ts +0 -239
  167. package/dist/services/crystallization/crystallization-service.js +0 -397
  168. package/dist/services/crystallization/crystallization-store.d.ts +0 -75
  169. package/dist/services/crystallization/crystallization-store.js +0 -193
  170. package/dist/services/crystallization/crystallization-types.d.ts +0 -313
  171. package/dist/services/crystallization/crystallization-types.js +0 -299
  172. package/dist/services/crystallization/evidence-brief-builder.d.ts +0 -237
  173. package/dist/services/crystallization/evidence-brief-builder.js +0 -240
  174. package/dist/services/doctor/doctor-service.d.ts +0 -149
  175. package/dist/services/doctor/doctor-service.js +0 -929
  176. package/dist/services/filesystem/file-lock.d.ts +0 -11
  177. package/dist/services/filesystem/file-lock.js +0 -152
  178. package/dist/services/final-review/final-review-service.d.ts +0 -12
  179. package/dist/services/final-review/final-review-service.js +0 -52
  180. package/dist/services/final-review/final-review-types.d.ts +0 -42
  181. package/dist/services/final-review/final-review-types.js +0 -18
  182. package/dist/services/job/job-resource-snapshot.d.ts +0 -7
  183. package/dist/services/job/job-resource-snapshot.js +0 -75
  184. package/dist/services/mut/assert-scanner.d.ts +0 -6
  185. package/dist/services/mut/assert-scanner.js +0 -116
  186. package/dist/services/mut/index.d.ts +0 -8
  187. package/dist/services/mut/index.js +0 -7
  188. package/dist/services/mut/mut-runner.d.ts +0 -39
  189. package/dist/services/mut/mut-runner.js +0 -29
  190. package/dist/services/mut/production-stryker.d.ts +0 -2
  191. package/dist/services/mut/production-stryker.js +0 -75
  192. package/dist/services/mut/report-builder.d.ts +0 -11
  193. package/dist/services/mut/report-builder.js +0 -110
  194. package/dist/services/mut/report-loader.d.ts +0 -31
  195. package/dist/services/mut/report-loader.js +0 -78
  196. package/dist/services/mut/thresholds.d.ts +0 -21
  197. package/dist/services/mut/thresholds.js +0 -22
  198. package/dist/services/mut/types.d.ts +0 -336
  199. package/dist/services/mut/types.js +0 -59
  200. package/dist/shared/fs.d.ts +0 -4
  201. package/dist/shared/fs.js +0 -26
  202. package/dist/shared/paths.d.ts +0 -6
  203. package/dist/shared/paths.js +0 -50
  204. package/dist/shared/result.d.ts +0 -22
  205. package/dist/shared/result.js +0 -46
  206. package/dist/shared/version.d.ts +0 -1
  207. package/dist/shared/version.js +0 -1
  208. package/examples/video-demo/README.md +0 -142
  209. package/examples/video-demo/out/en-closing-960.png +0 -0
  210. package/examples/video-demo/out/zh-closing-960.png +0 -0
  211. package/examples/video-demo/preview/peaks-loop-demo-en.mp4 +0 -0
  212. package/examples/video-demo/preview/peaks-loop-demo.mp4 +0 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,104 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5d01343: Monorepo extraction: peaks-loop 4.0.0-beta.15 ships the new pnpm
8
+ workspace shell with 6 independent packages extracted from the main
9
+ repo as Tier-A zero/low-coupling domains:
10
+
11
+ - peaks-loop-shared (4 utils: fs / paths / result / version)
12
+ - peaks-loop-mut (mutation testing + ECC cache)
13
+ - peaks-loop-doctor (project health check)
14
+ - peaks-loop-crystallization (crystallization pipeline)
15
+ - peaks-loop-final-review (4-dim business review)
16
+ - peaks-loop-audit-independent (security + perf audit)
17
+
18
+ Each subpackage has its own typecheck / build / vitest pipeline; they
19
+ are wired back into the main peaks-loop CLI via workspace:_ protocol.
20
+ Trusted Publishing (OIDC) is wired via .github/workflows/publish.yml
21
+ on push tags v_._._ — no NPM_TOKEN required.
22
+
23
+ Also:
24
+
25
+ - D21: peaks sub-agent finalize command (LLM-side completion signal
26
+ to mark dispatch records done/failed/cancelled; without it records
27
+ would stay queued forever).
28
+ - Trusted Publishing via OIDC — npmjs.com trusted publisher
29
+ configured; npm token removed from ~/.npmrc.
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [5d01343]
34
+ - peaks-loop-shared@0.1.0
35
+ - peaks-loop-mut@0.1.0
36
+ - peaks-loop-doctor@0.1.0
37
+ - peaks-loop-crystallization@0.1.0
38
+ - peaks-loop-final-review@0.1.0
39
+ - peaks-loop-audit-independent@0.1.0
40
+
3
41
  ## [Unreleased]
4
42
 
43
+ ## 4.0.0-beta.14 — 2026-07-16
44
+
45
+ ### Status: RELEASED (D-019: copy-templates.mjs + package.json files[])
46
+
47
+ > **This release fixes D-019 (full end-to-end)**:
48
+ >
49
+ > 1. `scripts/copy-templates.mjs` now copies
50
+ > `src/services/skillhub/migrations/*.sql` into `dist/services/skillhub/migrations/`.
51
+ > 2. `package.json` `"files"` whitelist now includes `dist/**/*.sql`
52
+ > (previously the whitelist was `dist/**/*.js | .d.ts | .md` only,
53
+ > so the migrations were filtered out of the npm tarball even
54
+ > after being copied to `dist/`).
55
+ >
56
+ > Without this fix, the published `peaks-loop` tarball shipped without
57
+ > the SkillHub SQLite schema, breaking any downstream consumer's first
58
+ > `peaks skill sediment <verb>` with `no such table: bee_release`.
59
+ >
60
+ > **Verdict**: `pnpm build` copies 6 migrations; tarball includes them.
61
+ > In-process vitest tests were always green (they use tsx + source tree
62
+ > directly, not `dist/`), so no test count change. Combined with
63
+ > 4.0.0-beta.13's D-018 path fix, the published tarball is now
64
+ > correct end-to-end.
65
+
66
+ ## 4.0.0-beta.13 — 2026-07-16
67
+
68
+ ### Status: RELEASED (D-018: state.db path relocation)
69
+
70
+ > **This release fixes the SQLite `state.db` location** to match the
71
+ > original peaks-loop design contract: `PEAKS_HOME/.peaks/skills/state.db`
72
+ > (PEAKS_HOME defaults to `~/.peaks`). Previously, the code resolved
73
+ > `home` to `process.cwd()` when invoked from a project root, producing
74
+ > `<project>/.peaks/state.db` — wrong location for loop engineering
75
+ >
76
+ > - bee sediment data.
77
+ >
78
+ > **Fix**: `src/cli/commands/sediment-commands.ts:664-665` now uses
79
+ > `peaksHome()` from `src/services/sop/sop-paths.ts:29` (which honors
80
+ > `PEAKS_HOME` override for test isolation). The downstream
81
+ > `resolveStateDbPath({ home })` (in `src/services/sediment/pool-paths.ts:15`)
82
+ > already correctly returned `{home}/.peaks/skills/state.db`; only the
83
+ > `home` resolution was broken.
84
+ >
85
+ > **Side bug found but out of scope**: `src/services/skillhub/migrations/*.sql`
86
+ > is not copied to `dist/` by `scripts/copy-templates.mjs`. This is a
87
+ > pre-existing build-config issue separate from D-018. Tracked as
88
+ > follow-up; tests still pass because the tests use vitest + tsx
89
+ > (which sees the source tree directly), but the published
90
+ > `peaks-loop@4.0.0-beta.13` will hit `no such table: bee_release` until
91
+ > a D-019 follow-up adds `.sql` to the copy-templates extensions.
92
+ >
93
+ > **Verdict**: 27/27 AC PASS (beta.12 verdict preserved; D-018 is
94
+ > architecture fix, no AC change). Old `<peaks-loop>/.peaks/state.db`
95
+ > discarded (beta phase, single user).
96
+
5
97
  ## 4.0.0-beta.12 — 2026-07-16
6
98
 
7
99
  ### Status: RELEASED (follow-up to `4.0.0-beta.11`; D-013 wrapper exit-code fix)
8
100
 
9
- > **This CHANGELOG entry documents the D-013 follow-up release.
101
+ > \*\*This CHANGELOG entry documents the D-013 follow-up release.
10
102
  > Same source tree as `4.0.0-beta.11`; pure fix for the wrapper
11
103
  > exit-code bug that previously caused `peaks <unknown>` and
12
104
  > `peaks <unknown> --help` to exit 0 with the help banner.
@@ -15,14 +107,14 @@
15
107
  > `COMMAND_NOT_FOUND` JSON envelope. ice-cola baseline 27/27 PASS
16
108
  > (AC3.9/AC3.10 now functionally correct).
17
109
 
18
- > **This CHANGELOG entry documents the SHIPPED 4.0.0-beta.11.
110
+ > \*\*This CHANGELOG entry documents the SHIPPED 4.0.0-beta.11.
19
111
  > It is the post-implementation release of the 4.0.0-beta.10 contract
20
112
  > documented at `docs/release/4.0.0-beta.10.md` (runbook filename
21
113
  > preserved for cross-reference stability).
22
114
  >
23
115
  > The 3 slices (del-minimax-worker, hide-role-skills, on-demand-ecc)
24
116
  > all landed PASS in this branch — see `peaks workflow verify-pipeline
25
- > --rid 2026-07-15-cli-surface-cleanup` and the Slice 1/2/3 sediment
117
+ --rid 2026-07-15-cli-surface-cleanup` and the Slice 1/2/3 sediment
26
118
  > memories in `.peaks/memory/`.
27
119
  >
28
120
  > **Version bump rationale** (D-016): 4.0.0-beta.10 was the pre-impl
@@ -90,15 +182,16 @@
90
182
  > spawn `<cached>/ecc agent run <name> --json` as a subprocess.
91
183
  > RD sub-agent triggered **Gate S3-0**: affaan-m/everything-claude-code
92
184
  > has no `ecc` binary; its real structure is `agents/*.md` flat
93
- > + SKILL.md descriptors. User chose Option B — drop the subprocess
94
- > model entirely.
185
+ >
186
+ > - SKILL.md descriptors. User chose Option B — drop the subprocess
187
+ > model entirely.
95
188
 
96
189
  - **`peaks ecc install`** — downloads affaan-m/everything-claude-code
97
190
  from GitHub releases to `~/.peaks/cache/ecc-<sha>/`. Selective
98
191
  tarball extraction: ONLY `agents/` subtree (skip `rules/`,
99
192
  `commands/`, `settings/`, `docs/`, `README.md`).
100
193
  - **`peaks ecc status`** — reads cache manifest, reports version + sha
101
- + agent count.
194
+ - agent count.
102
195
  - **`peaks ecc ls`** — lists cached agents by parsing `agents/*.md`
103
196
  frontmatter.
104
197
  - **`peaks ecc show <name>`** — outputs the agent's SKILL.md body
@@ -216,7 +309,7 @@ all present after a fresh workspace init.
216
309
  audit/business templates (default: skip if present).
217
310
  - **5-template boot** — every `peaks workspace init` materialises
218
311
  `.peaks/project-scan/{project-scan.md, business-knowledge.md,
219
- security-template.md, perf-template.md, audit-output-schema.md}`.
312
+ security-template.md, perf-template.md, audit-output-schema.md}`.
220
313
  The 4 audit/business templates are bundled at
221
314
  `src/services/workspace/templates/project-scan/*.md` and copied
222
315
  verbatim by `scripts/copy-templates.mjs` (post-`tsc` step; tsc
@@ -328,15 +421,15 @@ exposed two follow-on bugs that the unit suite missed:
328
421
 
329
422
  ### Sediment (Step 11) — 7 lessons in `.peaks/memory/`
330
423
 
331
- | File | Topic |
332
- |---|---|
333
- | `z-code-peaks-loop-9-ide-adapter-vendor-neutrality-adapter.md` | z-code 9th IDE + vendor-neutrality adapter pattern |
334
- | `peaks-loop-install-model-getstrongestmodelid-fallback.md` | install no longer hardcodes default model |
335
- | `desktop-application-ide-adapter-z-code-cli.md` | desktop-app IDE adapter field-degradation decision |
336
- | `peaks-code-runbook-4-0-0-beta-6-skill-md-cli-d-001-d-002-d-003-d-010.md` | 4 SKILL.md / CLI drift points |
337
- | `2026-07-09-zcode-adapter-overview.md` | RID 003 overall summary (project record) |
338
- | `peaks-ide-runtime-detect-zcode-only.md` | `peaks ide model --current` z-code 4-tier priority chain |
339
- | `ide-adapter-detectcurrentmodel-optional-interface-pattern.md` | optional interface field extension pattern |
424
+ | File | Topic |
425
+ | ------------------------------------------------------------------------- | -------------------------------------------------------- |
426
+ | `z-code-peaks-loop-9-ide-adapter-vendor-neutrality-adapter.md` | z-code 9th IDE + vendor-neutrality adapter pattern |
427
+ | `peaks-loop-install-model-getstrongestmodelid-fallback.md` | install no longer hardcodes default model |
428
+ | `desktop-application-ide-adapter-z-code-cli.md` | desktop-app IDE adapter field-degradation decision |
429
+ | `peaks-code-runbook-4-0-0-beta-6-skill-md-cli-d-001-d-002-d-003-d-010.md` | 4 SKILL.md / CLI drift points |
430
+ | `2026-07-09-zcode-adapter-overview.md` | RID 003 overall summary (project record) |
431
+ | `peaks-ide-runtime-detect-zcode-only.md` | `peaks ide model --current` z-code 4-tier priority chain |
432
+ | `ide-adapter-detectcurrentmodel-optional-interface-pattern.md` | optional interface field extension pattern |
340
433
 
341
434
  ### Known follow-ups (S3-cleanup backlog)
342
435
 
@@ -353,7 +446,7 @@ None. All 8 pre-existing adapters continue to load without changes. CLI subcomma
353
446
 
354
447
  ### Added — peaks-solo dispatcher (分诊员)
355
448
 
356
- - **`peaks-solo` skill** — `skills/peaks-solo/SKILL.md` + 3 references (triage / fallback / sediment). Natural-language front door for the Peaks-Loop skill family. Use when the user describes a task in NL and does not know which peaks-* skill fits. 0 breaking change: 3.x / 4.x `/peaks-code` / `/peaks-content` / `/peaks-doctor` etc. continue to work.
449
+ - **`peaks-solo` skill** — `skills/peaks-solo/SKILL.md` + 3 references (triage / fallback / sediment). Natural-language front door for the Peaks-Loop skill family. Use when the user describes a task in NL and does not know which peaks-\* skill fits. 0 breaking change: 3.x / 4.x `/peaks-code` / `/peaks-content` / `/peaks-doctor` etc. continue to work.
357
450
  - **`peaks skill search` CLI** — `src/services/skill/skill-search-service.ts` + `src/cli/commands/skill-search-commands.ts`. Query / tag / domain filters; substring match; structured JSON output. Used by `peaks-solo` to find the right leaf skill. Available as a top-level primitive (not dispatcher-specific).
358
451
  - **Sub-skills unchanged** — `peaks-code / peaks-content / peaks-doctor / peaks-issue-fix-orchestrator / peaks-sop / etc.` are NOT modified. peaks-solo sits alongside, not on top.
359
452
 
@@ -394,9 +487,9 @@ Loop Engineering crystallization is now the product surface. The 4.0.0-beta.3 li
394
487
 
395
488
  - **`.peaks/standards/loop-engineering-guidelines.md`** — the single source of truth for the 10 red lines RL-0..RL-9, each in the four-section karpathy form (Failure modes / Rewrite / Self-check / Out-of-scope). Co-equal karpathy × darwin layers (RL-0).
396
489
  - **`peaks standards lint --category loop-engineering`** — `src/services/standards/loop-engineering-lint.ts`. Parses the guideline file and asserts every red line has all four sections, fails closed otherwise.
397
- - **`peaks skill lint --category loop-engineering-readiness --path <skill-dir>`** — `src/services/standards/loop-engineering-readiness-lint.ts` + `src/cli/commands/skill-loop-engineering-readiness-commands.ts`. Asserts a peaks-* SKILL.md (a) references `.peaks/standards/loop-engineering-guidelines.md`, (b) does not introduce a CLI verb the user is meant to type, (c) does not introduce a JSON / manifest hand-authoring surface. Alias verb: `peaks skill ready --category loop-engineering-readiness --path <skill-dir>`.
490
+ - **`peaks skill lint --category loop-engineering-readiness --path <skill-dir>`** — `src/services/standards/loop-engineering-readiness-lint.ts` + `src/cli/commands/skill-loop-engineering-readiness-commands.ts`. Asserts a peaks-\* SKILL.md (a) references `.peaks/standards/loop-engineering-guidelines.md`, (b) does not introduce a CLI verb the user is meant to type, (c) does not introduce a JSON / manifest hand-authoring surface. Alias verb: `peaks skill ready --category loop-engineering-readiness --path <skill-dir>`.
398
491
  - **Unit guard** — `tests/unit/standards/loop-engineering-guidelines.test.ts` enforces the four-section shape for every red line in the file.
399
- - **peaks-code domain boundary (RL-8)** — `skills/peaks-code/SKILL.md` self-declares as the code-domain long-task loop engineering orchestrator and is NOT a general-purpose orchestrator. Cross-domain peaks-* skills (peaks-content, peaks-issue-fix-orchestrator) import the shared guideline file and pass the readiness lint.
492
+ - **peaks-code domain boundary (RL-8)** — `skills/peaks-code/SKILL.md` self-declares as the code-domain long-task loop engineering orchestrator and is NOT a general-purpose orchestrator. Cross-domain peaks-\* skills (peaks-content, peaks-issue-fix-orchestrator) import the shared guideline file and pass the readiness lint.
400
493
 
401
494
  ### Added — Bundle share + desktop extension surface (§7A, AC-24 / AC-25 / AC-26)
402
495
 
@@ -410,6 +503,7 @@ Loop Engineering crystallization is now the product surface. The 4.0.0-beta.3 li
410
503
  ### Added — SkillHub expansion (5 new tables / non-breaking)
411
504
 
412
505
  The 6+ relation table layout is preserved. 5 new tables added under `.peaks/_runtime/<sessionId>/`:
506
+
413
507
  - `loop_release` (002)
414
508
  - `loop_bee_relation` (003)
415
509
  - loop↔bee share / desktop extension columns (004)
@@ -449,13 +543,16 @@ Migration is non-breaking: every new column has a DEFAULT and the new tables sit
449
543
  ## 4.0.0-beta.2 — 2026-07-07
450
544
 
451
545
  ### Renamed
546
+
452
547
  - **`peaks-solo` → `peaks-code`** — the long-running code-domain orchestrator skill (PRD/RD/QA/UI/SC/TXT pipeline) has been renamed to communicate its scope more accurately. The on-disk directory `~/.peaks/skills/.system/bees/peaks-code/` is preserved as a stable install location; only the manifest `id` and `displayName` change (`peaks-code` / `Peaks Code`). All four sibling skills (`peaks-solo-resume` → `peaks-resume`, `peaks-solo-status` → `peaks-status`, `peaks-solo-test` → `peaks-test`) are now top-level primitives rather than child skills of `peaks-solo`. Migration: `peaks session migrate-skill-name --from peaks-solo --to peaks-code --apply`.
453
548
 
454
549
  ### Changed (Breaking)
550
+
455
551
  - **`peaks skill presence:set peaks-solo` no longer recognized** — the canonical skill name is now `peaks-code`. Existing `.peaks/_runtime/*/active-skill.json` files carrying `skill: "peaks-solo"` are migrated by `peaks session migrate-skill-name`. Manual override: edit the file and replace `"skill": "peaks-solo"` with `"skill": "peaks-code"`.
456
552
  - **CLI surface unchanged** — `peaks code`, `peaks code --fast`, and the entire `peaks-code` skill runbook continue to function; only the skill-identification field (`id`, `displayName`, presence `skill` value) changes. The runbook name `peaks code` is the user-facing verb and remains as-is.
457
553
 
458
554
  ### Fixed (post-rename polish)
555
+
459
556
  - **Rule name normalization** — `Code Code-Change Red Line` → `Code Commit Ban Red Line` (8 occurrences across `src/services/audit/enforcers/code-ban.ts`, `src/cli/commands/hook-handle.ts`, and the audit tests). Aligns with `red-line-catalog.ts` entry `rl-code-ban-001` / `Code Commit Ban`.
460
557
  - **Wire-format error code rename** — `SOLO_MODE_REQUIRES_SOLO_WORKFLOW` → `CODE_MODE_REQUIRES_CODE_WORKFLOW` and `UNSUPPORTED_SOLO_MODE` → `UNSUPPORTED_CODE_MODE` in `src/cli/commands/workflow-commands.ts` (4 test sites updated).
461
558
  - **Test local consts** — `soloResult/soloOutput` → `codeResult/codeOutput` in `tests/unit/cli-program.workflow.test.ts`; `SOLO_PATH/soloAbsPath` → `CODE_PATH/codeAbsPath` in `tests/unit/code/skills-subagent-scope-dir.test.ts`; `SOLO_REF/SOLO_FANOUT_REF` → `CODE_REF/CODE_FANOUT_REF` in `tests/unit/dispatch/dispatch-fanout-mandatory.test.ts`.
@@ -466,11 +563,13 @@ Migration is non-breaking: every new column has a DEFAULT and the new tables sit
466
563
  - **Video demo copy** — `examples/video-demo/src/copy.ts` `skillWas: 'peaks-solo'` → `skillWas: 'peaks-code'` (legacy label, both locales).
467
564
 
468
565
  ### Added
566
+
469
567
  - **Manifest id field** — `.peaks/skills/.system/bees/peaks-code/manifest.json` now carries `{ "id": "peaks-code", "displayName": "Peaks Code" }`. The `migrate-skill-name` service explicitly skips this file (test: `session-migrate-skill-name.test.ts:69` "跳过 .peaks/skills/.system/bees/peaks-code/manifest.json") so the canonical id is only ever edited by hand or by an explicit `peaks skill sediment refine-bee` flow, never by bulk migration.
470
568
  - **Spec §4.1.1 rewrite** — `docs/superpowers/specs/2026-07-04-peaks-maker-dynamic-skill-sediment-design.md` §4.1.1 has been rewritten from "peaks-code as preserved alias" to "peaks-code as the system-stable code-domain bee (renamed from peaks-code)". The plan's spec-coverage table now references the renamed heading.
471
569
  - **Migration helper** — `peaks session migrate-skill-name --from <old> --to <new> [--apply]` is the supported path for renaming skill references in `.peaks/_runtime/`. Idempotent; skip-list includes `.peaks/memory/**` and `.peaks/skills/.system/bees/peaks-code/manifest.json`.
472
570
 
473
571
  ### Verification
572
+
474
573
  - `tsc --noEmit` zero errors
475
574
  - Full `vitest run` exit 0 (all 30 touched test files / 265 directly-tested assertions pass)
476
575
  - `silent-warning-detector` OK on 481 files
@@ -589,10 +688,11 @@ Validated on `C:/Users/smallMark/Desktop/peaksclaw/ice-cola` (consumer project).
589
688
  ## [3.0.2] — 2026-07-02 — change-id shim retirement (v2.19.0) + Understand Anything hybrid context (3.0.2)
590
689
 
591
690
  **PATCH bump from 3.0.1**. Two independent slices bundled into one release:
691
+
592
692
  - **v2.19.0 change-id shim retirement** — full removal of the peaks-loop change-id axis (filesystem axis, code shim, envelope JSON slug, CLI flags). The change-id was a no-op post-v2.17.0 hard-kill; this slice retires the v2.17.0 shim half-life. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched.
593
693
  - **3.0.2 Understand Anything hybrid context** — new `peaks understand context` subcommand that encapsulates the UA-first / codegraph-fallback / hybrid-union routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture). Consumers no longer pick one or the other at the LLM level.
594
694
 
595
- The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced835e`, `7ee9d8f`, plus follow-up tests) but was never formally released. v2.19.0 is therefore *not* a separate release line — its changes are rolled forward into 3.0.2. Future releases resume numeric sequence from 3.0.3.
695
+ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced835e`, `7ee9d8f`, plus follow-up tests) but was never formally released. v2.19.0 is therefore _not_ a separate release line — its changes are rolled forward into 3.0.2. Future releases resume numeric sequence from 3.0.3.
596
696
 
597
697
  ### Removed — change-id shim (cleanup post v2.17.0 hard-kill)
598
698
 
@@ -615,7 +715,7 @@ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced8
615
715
  - 12 JSDoc references to the deleted `src/shared/change-id.ts` file scrubbed across `src/services/session/session-binding-bridge.ts`, `src/services/session/session-manager.ts`, `src/shared/path-safety.ts`, `tests/unit/session-manager.test.ts`, `tests/vitest.setup.ts`. The 3 pre-slim `tests/fixtures/skills/pre-slim/*.SKILL.md` fixtures preserve the historical reference per the FROZEN EVIDENCE rule.
616
716
  - 2 weakened `tests/unit/rd/repair-cycle-2-cli-wiring.test.ts` cases restored with real assertions: the test now bootstraps a real session via `peaks workspace init` then drives `peaks swarm plan` end-to-end, asserting `standardsErrorCode`, `standardsDiagnostic`, and `process.exitCode` (no `expect(true).toBe(true)`, no `.skip`).
617
717
 
618
- ### Round 3 — change-id彻底根治
718
+ ### Round 3 — change-id 彻底根治
619
719
 
620
720
  - All 275 internal `changeId` field references in `src/` renamed to `sessionId` across 35 source files (cli/commands, services/workflow, services/tech, services/workspace, services/sc, services/rd, services/prd, services/audit, services/fixture, services/slice, services/mut, services/providers, services/artifacts, services/openspec-adjacent callers). The 65 remaining `changeId` hits are EXCLUSIVELY in `src/cli/commands/openspec-commands.ts` and `src/services/openspec/*.ts` — L4 OpenSpec vocabulary (positional `<change-id>` arg, `openspec/changes/<change-id>/` dir name, OpenSpec spec/proposal markdown tokens). The rename preserves L4 per PRD §Non-Goals.
621
721
  - `WorkspaceInitOptions.changeId?: string` field REMOVED entirely (was a no-op post-v2.17.0; the slice deletes the binding-file legacy and the inline lstatSync guard now scopes the v2.8.3 hard-ban to date-stamped top-level siblings at `.peaks/<YYYY-MM-DD-*>/` only).
@@ -631,6 +731,7 @@ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced8
631
731
  - `pnpm build` regenerated `dist/` to drop the dead `migrate-change-scope` JS. AC-15 (`node bin/peaks.js workspace migrate-change-scope`) now reports `error: unknown command 'migrate-change-scope'`.
632
732
 
633
733
  ### Round 4 — change-id full root-out (fix 55 test regressions)
734
+
634
735
  - Fixed 55 unit tests failing across 15 files (regressions from round-3 rename script + incomplete code paths).
635
736
  - `peaks request *` dry-run mode no longer creates `.peaks/_runtime/<sid>/` dir eagerly (test updated to assert the canonical single-axis scope dir at apply-time only).
636
737
  - Observability event hook restored on `peaks request transition` (3 tests): root cause was `readSummary` returning the scope fragment (`_runtime/<sid>`) as the bare session id, so `emitObservabilityEvent` landed at `.peaks/_runtime/_runtime/<sid>/metrics/slices.jsonl`. Fix strips the `_runtime[\\/]` prefix when storing the summary's sessionId.
@@ -663,10 +764,11 @@ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced8
663
764
  ## [3.0.2] — 2026-07-02 — change-id shim retirement (v2.19.0) + Understand Anything hybrid context (3.0.2)
664
765
 
665
766
  **PATCH bump from 3.0.1**. Two independent slices bundled into one release:
767
+
666
768
  - **v2.19.0 change-id shim retirement** — full removal of the peaks-loop change-id axis (filesystem axis, code shim, envelope JSON slug, CLI flags). The change-id was a no-op post-v2.17.0 hard-kill; this slice retires the v2.17.0 shim half-life. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched.
667
769
  - **3.0.2 Understand Anything hybrid context** — new `peaks understand context` subcommand that encapsulates the UA-first / codegraph-fallback / hybrid-union routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture). Consumers no longer pick one or the other at the LLM level.
668
770
 
669
- The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced835e`, `7ee9d8f`, plus follow-up tests) but was never formally released. v2.19.0 is therefore *not* a separate release line — its changes are rolled forward into 3.0.2. Future releases resume numeric sequence from 3.0.3.
771
+ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced835e`, `7ee9d8f`, plus follow-up tests) but was never formally released. v2.19.0 is therefore _not_ a separate release line — its changes are rolled forward into 3.0.2. Future releases resume numeric sequence from 3.0.3.
670
772
 
671
773
  ### Added — `peaks understand context` (3.0.2 user-facing feature)
672
774
 
@@ -675,12 +777,14 @@ The Understand Anything (UA) Claude Code plugin and `@colbymchenry/codegraph` ar
675
777
  This slice adds a single `peaks understand context` subcommand that encapsulates the routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture — see `peaks-code` SKILL.md). The envelope carries a `source` tag so downstream consumers can audit which evidence contributed to the context.
676
778
 
677
779
  **Source routing** (deterministic, decided in `buildUnderstandContext`):
780
+
678
781
  - `ua-only` — UA knowledge graph present, no codegraph
679
782
  - `ua-missing-fallback-codegraph` — UA absent, codegraph produced evidence
680
783
  - `ua-and-codegraph-hybrid` — both present, both contribute (parallel `Promise.all`)
681
784
  - `both-missing` — neither produced evidence, exit code 2
682
785
 
683
786
  **Added files (5):**
787
+
684
788
  - `src/services/understand/understand-hybrid-service.ts` (133L, new): `buildUnderstandContext({projectRoot, files?, sampleSize?, artifactDir?, codegraphRunner?})` uses `Promise.all` to run UA scan and codegraph affected in parallel; total wall-clock = `max(uaMs, codegraphMs)`, not sum. Failures are caught into `warnings[]` (best-effort); the main envelope is always returned so consumers can audit missing evidence.
685
789
  - `src/services/understand/hybrid-types.ts` (39L, new): `UnderstandContextResult` envelope + 4-value source enum + `CodegraphContextBlock`.
686
790
  - `src/cli/commands/understand-commands.ts` (208L, +51L net): new `peaks understand context` subcommand at base path `admin/audit-logs` (the only 3rd CLI surface in the understand module family). The subcommand accepts `--project --files --sample --artifact-dir` and emits the envelope as JSON or human-readable summary.
@@ -827,12 +931,12 @@ The 1.x → 2.0 upgrade is an irreversible external side effect (rewrites `~/.pe
827
931
 
828
932
  The split methodology follows the v2.18.0 `session-binding-bridge.ts` pattern: identify a natural seam (state/helpers vs business logic, types vs impl, etc.), extract the chosen section into a new sibling file, and re-export the moved symbols from the original module so external imports are unchanged. Internal references are routed through a local `import { ... }` so the body of the original module continues to compile and behave identically.
829
933
 
830
- | # | File | Before | After (orig + sibling) | New sibling | Seam |
831
- |---|------|-------:|-----------------------:|-------------|------|
832
- | 1 | `src/services/artifacts/request-artifact-service.ts` | 783 | 649 + 153 | `request-artifact-state-helpers.ts` | `RequestArtifactState` type, `ALLOWED_STATES_PER_ROLE`, `allowedStatesForRole`, 4 transition error classes, `updateStatusBlock` frontmatter mutator |
833
- | 2 | `src/services/slice/slice-decompose-service.ts` | 775 | 632 + 178 | `slice-decompose-runners.ts` | 3 default runner factories (`defaultCodegraphRunner`, `defaultUnderstandRunner`, `defaultImportEdgeRunner`) + `runCodegraph` shell-out helper |
834
- | 3 | `src/services/workflow/workflow-autonomous-service.ts` | 774 | 465 + 337 | `workflow-autonomous-resume-helpers.ts` | Resume validation pipeline (`getResumeRequiredArtifacts`, `readResumeArtifact`, `stripChangeScopePrefix`, JSON / frontmatter parsers, `getResumeArtifactsStatus`, `createResumePlan`) + `MAX_RESUME_ARTIFACT_BYTES` const |
835
- | 4 | `src/services/workspace/workspace-service.ts` | 742 | 550 + 217 | `workspace-claude-settings-materializer.ts` | Consumer `.claude/settings.local.json` materialization (`materializeClaudeSettingsLocal`, `writeOfflineTemplateCopy`, `upsertPeaksGitignoreSnippet`) + `PEAKS_GITIGNORE_*` constants |
934
+ | # | File | Before | After (orig + sibling) | New sibling | Seam |
935
+ | --- | ------------------------------------------------------ | -----: | ---------------------: | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
936
+ | 1 | `src/services/artifacts/request-artifact-service.ts` | 783 | 649 + 153 | `request-artifact-state-helpers.ts` | `RequestArtifactState` type, `ALLOWED_STATES_PER_ROLE`, `allowedStatesForRole`, 4 transition error classes, `updateStatusBlock` frontmatter mutator |
937
+ | 2 | `src/services/slice/slice-decompose-service.ts` | 775 | 632 + 178 | `slice-decompose-runners.ts` | 3 default runner factories (`defaultCodegraphRunner`, `defaultUnderstandRunner`, `defaultImportEdgeRunner`) + `runCodegraph` shell-out helper |
938
+ | 3 | `src/services/workflow/workflow-autonomous-service.ts` | 774 | 465 + 337 | `workflow-autonomous-resume-helpers.ts` | Resume validation pipeline (`getResumeRequiredArtifacts`, `readResumeArtifact`, `stripChangeScopePrefix`, JSON / frontmatter parsers, `getResumeArtifactsStatus`, `createResumePlan`) + `MAX_RESUME_ARTIFACT_BYTES` const |
939
+ | 4 | `src/services/workspace/workspace-service.ts` | 742 | 550 + 217 | `workspace-claude-settings-materializer.ts` | Consumer `.claude/settings.local.json` materialization (`materializeClaudeSettingsLocal`, `writeOfflineTemplateCopy`, `upsertPeaksGitignoreSnippet`) + `PEAKS_GITIGNORE_*` constants |
836
940
 
837
941
  The original 4 files land at 465-649 LOC (well below the 800 cap; target range 600-650). The 4 new sibling files are 153-337 LOC. Total LOC across the 8 files is unchanged (3074) — this is a structural refactor only, not a deletion or compression.
838
942
 
@@ -903,12 +1007,12 @@ Each original file gets a sibling `import { ... } from './X-helpers.js'` + `expo
903
1007
 
904
1008
  ### Dogfood
905
1009
 
906
- | # | Scenario | Verdict | Evidence |
907
- |---|---|---|---|
908
- | A | v2.18.1 verify-pipeline happy-path (session-axis) | PASS | `.peaks/_runtime/2026-06-29-session-9cac8e/{rd,qa}/...` resolves as canonical; `data.changeId` slug preserved in envelope |
909
- | B | v2.18.1 verify-pipeline missing-evidence | PASS | Clear `RD evidence missing: ...` violations, no `ReferenceError` |
910
- | C | v2.18.1 prd check-blocks well-formed PRD | PASS | `report.ok: true`, all 4 blocks pass, JSON envelope `{ 业务场景: 'pass', 边界 case: 'pass', UI 装配意图: 'pass' }` |
911
- | D | v2.18.1 prd check-blocks missing 业务场景 block | PASS | `report.ok: false`, `issues: ["Missing required block: 业务场景"]`, no `ReferenceError` |
1010
+ | # | Scenario | Verdict | Evidence |
1011
+ | --- | ------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
1012
+ | A | v2.18.1 verify-pipeline happy-path (session-axis) | PASS | `.peaks/_runtime/2026-06-29-session-9cac8e/{rd,qa}/...` resolves as canonical; `data.changeId` slug preserved in envelope |
1013
+ | B | v2.18.1 verify-pipeline missing-evidence | PASS | Clear `RD evidence missing: ...` violations, no `ReferenceError` |
1014
+ | C | v2.18.1 prd check-blocks well-formed PRD | PASS | `report.ok: true`, all 4 blocks pass, JSON envelope `{ 业务场景: 'pass', 边界 case: 'pass', UI 装配意图: 'pass' }` |
1015
+ | D | v2.18.1 prd check-blocks missing 业务场景 block | PASS | `report.ok: false`, `issues: ["Missing required block: 业务场景"]`, no `ReferenceError` |
912
1016
 
913
1017
  ### Commits
914
1018
 
@@ -939,7 +1043,7 @@ Each original file gets a sibling `import { ... } from './X-helpers.js'` + `expo
939
1043
  - `src/services/session/binding-store.ts:259` — `ownerHint` field is now `${envSignal}#${pid}` (was bare env signal). Preserves the existing v2.17.0 field shape; only the value format changes.
940
1044
  - `registerInstance` distinguishes instances by `(callerId, pid)` tuple, not by `ownerHint` alone. Same pid + same callerId → auto-resume (D2 Claude-instance-level hard-exclusive sid preserved); same callerId + different pid → distinct sids.
941
1045
  - `/compact` resume: same outer-session-id + same pid → reuses sid (verified by new Case B test). Different pid (rare, but possible if the harness restarts) → new sid (safe default, not a stale resume).
942
- - Sub-agent dispatch: sub-agents inherit parent's `CLAUDE_CODE_SESSION_ID` but run in the same Node process → same pid → same callerId → same sid (D2 sid-aggregation across peaks-* skill activations preserved).
1046
+ - Sub-agent dispatch: sub-agents inherit parent's `CLAUDE_CODE_SESSION_ID` but run in the same Node process → same pid → same callerId → same sid (D2 sid-aggregation across peaks-\* skill activations preserved).
943
1047
  - 6 new test cases in `tests/unit/services/session/binding-store.test.ts:151-242`:
944
1048
  - **Case A:** 2 instances, same `callerId`, different `pid` → 2 distinct sids
945
1049
  - **Case B:** 2 instances, same `callerId`, same `pid`, same outer-session-id → 1 sid (auto-resume)
@@ -977,12 +1081,12 @@ Each original file gets a sibling `import { ... } from './X-helpers.js'` + `expo
977
1081
 
978
1082
  ### Dogfood (ice-cola NestJS project, 2026-06-29-session-2e81dc)
979
1083
 
980
- | # | Scenario | Verdict | Evidence |
981
- |---|---|---|---|
982
- | A | P0 fix verification (binding file format) | PASS | `callerId: 5fa8a7d8-...#13472` matches shell pid 13472; pre-existing instance pid 3876 ≠ current shell — fix works in production-shape data |
983
- | B | peaks doctor stale-binding scan | PASS | 0 stale bindings, ttl=300000ms, v2.16.0 schema surface intact |
984
- | C | peaks code smoke (4 sub-commands) | PARTIAL | 3/4 pass; `peaks request lint --project .` is invalid syntax (needs `<rid>` + `--role`); not a v2.18.0 regression |
985
- | D | env-collision simulation (single shell, 2 envs) | PASS | `fake-session-A#20984` + `fake-session-B#20984` → 2 distinct sids (fupv8b / xnntb1); transposed axis (same pid, different env) verified; primary 2-Claude-windows scenario needs CI integration test with 2 child node processes |
1084
+ | # | Scenario | Verdict | Evidence |
1085
+ | --- | ----------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1086
+ | A | P0 fix verification (binding file format) | PASS | `callerId: 5fa8a7d8-...#13472` matches shell pid 13472; pre-existing instance pid 3876 ≠ current shell — fix works in production-shape data |
1087
+ | B | peaks doctor stale-binding scan | PASS | 0 stale bindings, ttl=300000ms, v2.16.0 schema surface intact |
1088
+ | C | peaks code smoke (4 sub-commands) | PARTIAL | 3/4 pass; `peaks request lint --project .` is invalid syntax (needs `<rid>` + `--role`); not a v2.18.0 regression |
1089
+ | D | env-collision simulation (single shell, 2 envs) | PASS | `fake-session-A#20984` + `fake-session-B#20984` → 2 distinct sids (fupv8b / xnntb1); transposed axis (same pid, different env) verified; primary 2-Claude-windows scenario needs CI integration test with 2 child node processes |
986
1090
 
987
1091
  **Dogfood verdict:** 3.5 / 4 pass; `recommend_v2.18.0_commit: true`.
988
1092
 
@@ -1021,7 +1125,7 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
1021
1125
  ### Feature — binding-store v2 sentinel (v2.16.0-alpha + v2.17.0)
1022
1126
 
1023
1127
  - `src/services/session/binding-store.ts` — zod-validated multi-instance binding schema with auto-migration from legacy `{ sessionId, createdAt, projectRoot }`. New shape: `{ ownerHint, pid, lastHeartbeat, scope, instances: Record<sid, InstanceRecord> }`.
1024
- - `InstanceRecord` = `{ startedAt, roles: string[], callerId, lastHeartbeat }` — `roles` accumulates as the Claude instance activates multiple peaks-* skills (solos → rd → qa all share one sid).
1128
+ - `InstanceRecord` = `{ startedAt, roles: string[], callerId, lastHeartbeat }` — `roles` accumulates as the Claude instance activates multiple peaks-\* skills (solos → rd → qa all share one sid).
1025
1129
  - Auto-resume: same callerId reuses the same sid; different callers get different sids in the same `instances` map.
1026
1130
  - `dropStale(projectRoot, ttlMs)` for Doctor integration.
1027
1131
 
@@ -1033,7 +1137,7 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
1033
1137
 
1034
1138
  ### Feature — D2 Claude-instance-level hard-exclusive sid
1035
1139
 
1036
- - Same Claude instance keeps one sid across multiple peaks-* skill activations (peaks-code → peaks-rd → peaks-qa).
1140
+ - Same Claude instance keeps one sid across multiple peaks-\* skill activations (peaks-code → peaks-rd → peaks-qa).
1037
1141
  - `/compact` resume: same outer-session-id reuses the same sid (post-compact-resume v2.11.0 D7 alignment).
1038
1142
 
1039
1143
  ### Feature — Doctor stale-binding scan (AC-10)
@@ -1066,7 +1170,7 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
1066
1170
 
1067
1171
  Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-session-88411f/txt/handoff-2026-06-29-v2-17-0.md` for details):
1068
1172
 
1069
- 1. **Multi-Claude parallel提速**: open 2 Claude instances in the same project, run `peaks code <different goal>` in each. Verify both bindings coexist with distinct sids.
1173
+ 1. **Multi-Claude parallel 提速**: open 2 Claude instances in the same project, run `peaks code <different goal>` in each. Verify both bindings coexist with distinct sids.
1070
1174
  2. **D1 conflict detection**: 2 instances both targeting the same source file. Verify each writes to its own session-scoped artifact directory.
1071
1175
  3. **`/compact` resume**: run `peaks code <goal>`, `/compact`, continue. Verify same sid reused.
1072
1176
  4. **Doctor stale**: kill -9 a Claude instance, run `peaks doctor`, verify stale binding listed + `--cleanup-stale` works.
@@ -1182,11 +1286,13 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
1182
1286
  - **Per the user-given rule** `.peaks/memory/2026-06-28-full-auto-boundary.md`: "full-auto 只做到 commit 就是,push 不用". The commit-boundary hard-floor is the machine enforcement of that advisory rule.
1183
1287
 
1184
1288
  ### Test results
1289
+
1185
1290
  - 4 new test files: `presence-staleness.test.ts` (12), `stale-presence-detection.test.ts` (9), `feedback-promotion.test.ts` (18), `commit-boundary-hard-floor.test.ts` (247). Total new cases: **286**.
1186
1291
  - Existing code tests (mode-gate × 81, post-compact × 11) pass unchanged.
1187
1292
  - Full unit suite baseline 4394 → 4680 passing (286 added). 0 new failures; pre-existing 7 unrelated failures unchanged.
1188
1293
 
1189
1294
  ### Out-of-scope
1295
+
1190
1296
  - Push / tag / npm publish — full-auto boundary = commit only; the commit-boundary hard-floor now BLOCKS these in full-auto (was advisory). User must explicitly confirm via AskUserQuestion to proceed.
1191
1297
  - `peaks hooks install` — slice is code-only. Hooks remain user-only.
1192
1298
  - Cleaning the 88b27d session's stale presence on disk — slice ships the detection + auto-clear, does NOT proactively touch the live tree.
@@ -1209,12 +1315,14 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1209
1315
  4 个 PRD + 4 个 service + 4 个 CLI 文件 + 4 个 test 文件,共 **17 个新命令 + 63 个新测试通过**。
1210
1316
 
1211
1317
  **G11 上游 tag 同步**(slice-2026-06-28-fork-cli):
1318
+
1212
1319
  - 5 commands: `peaks fork status` / `upstream-check` / `sync-plan` / `sync` / `sync-verify`
1213
1320
  - 持久化 `.peaks/fork-state.json` (baseline + history)
1214
1321
  - `recommendStableTags` 过滤 pre-release 标签(alpha/beta/rc/dev/preview)
1215
1322
  - 15 tests pass
1216
1323
 
1217
1324
  **G13 存量影响面扫描**(slice-2026-06-28-impact-cli):
1325
+
1218
1326
  - 2 commands: `peaks impact scan --files <list>` / `peaks impact must-check --files <list>`
1219
1327
  - 手写 glob 匹配(`**` / `*`),无 AST 依赖
1220
1328
  - 10 个默认业务流(用户管理 / 权限校验 / 登录流程 / Skill 权限 / 数据列表 / API 网关 / DB schema / ...)
@@ -1222,6 +1330,7 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1222
1330
  - 13 tests pass
1223
1331
 
1224
1332
  **G14 轻量回归 critical-paths**(slice-2026-06-28-smoke-cli):
1333
+
1225
1334
  - 4 commands: `peaks smoke define` / `run` / `run-and-repair` / `add-path`
1226
1335
  - 持久化 `.peaks/smoke-paths.json`
1227
1336
  - 5 个 source (prd-business-scenario / boss-stated / historical-incident / impact-must-check / manual)
@@ -1229,6 +1338,7 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1229
1338
  - 16 tests pass
1230
1339
 
1231
1340
  **G15 上线观察期状态机**(slice-2026-06-28-release-cli):
1341
+
1232
1342
  - 7 commands: `peaks release plan` / `canary` / `promote` / `watch` / `done` / `rollback` / `hotfix`
1233
1343
  - 8 阶段状态机: planned → canary-10 → canary-50 → promoted → watching → done
1234
1344
  - side branches: → rolled-back (from any pre-done), → hotfixed (from watching)
@@ -1239,6 +1349,7 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1239
1349
  **触动:** 新增 4 个 service / 4 个 CLI / 4 个 test 文件 = **12 个新文件**。CLI 注册全在 `src/cli/program.ts`,**不触动** transition gates / hard contracts / Karpathy 4 / sub-agent 协议 / mode-gate。
1240
1350
 
1241
1351
  **已知未实现**(后续切片):
1352
+
1242
1353
  - 真实 git fetch + merge(G11)
1243
1354
  - 真实 Playwright 路径执行(G14)
1244
1355
  - 真实 k8s rollout / LB config / 监控集成(G15)
@@ -1248,23 +1359,27 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1248
1359
  4 个 service + 4 个 CLI 文件 + 4 个 test 文件,共 **16 个新命令 + 40+ 个新测试通过**。所有 CLI 都遵循 12 Gaps 核心原则: user 在循环里 = 业务/产品审阅,不参与技术决策。
1249
1360
 
1250
1361
  **G3 prd 4 必填块**(slice-2026-06-28-prd-blocks):
1362
+
1251
1363
  - `peaks prd check-blocks <rid>` — 验证 4 必填块(业务场景/边界/UI 装配/上游基线)+ 业务禁区子节
1252
1364
  - 上游基线仅在 fork 项目上 required(检测 `.peaks/fork-state.json`)
1253
1365
  - 8 tests pass
1254
1366
 
1255
1367
  **G4 user touchpoint classifier**(slice-2026-06-28-user-touchpoints):
1368
+
1256
1369
  - 3 commands: `peaks code gate-classify` / `peaks code user-touchpoints` / `peaks code commit-boundary-actions`
1257
1370
  - 14 个 Code gate 静态分类: business / tech / mode-selection / commit-boundary / commit-floor
1258
1371
  - `userShouldReview`: always / business-only / never
1259
1372
  - 7 tests pass
1260
1373
 
1261
1374
  **G1 slice 业务审阅**(slice-2026-06-28-slice-review):
1375
+
1262
1376
  - 4 commands: `peaks slice review` / `score` / `accept` / `reject`
1263
1377
  - 4 个默认 review item: business-match / boundary-cases / ui-assembly / mergeable
1264
1378
  - 12 Gaps 阈值: avg >= 3 AND no item <= 2 → accepted
1265
1379
  - 16 tests pass
1266
1380
 
1267
1381
  **G5 QA 业务视角验收**(slice-2026-06-28-qa-business):
1382
+
1268
1383
  - 4 commands: `peaks qa business-review` / `business-score` / `business-accept` / `business-reject`
1269
1384
  - 6 个默认 review item: business-flow / req-coverage / boundary-cases / ui-assembly / exception-tone / mergeable
1270
1385
  - 同一阈值(avg >= 3, no item <= 2)
@@ -1277,29 +1392,35 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1277
1392
  5 个 PRD 一次性收尾剩余 5 个 Gaps。每 G 一个 service + CLI + test,**10 个新文件 + 30+ 个新测试通过**。
1278
1393
 
1279
1394
  **G6 跨 slice 集成**(slice-2026-06-28-slice-integrate):
1395
+
1280
1396
  - `peaks slice-integrate --slices <id1,id2,...>` — 验证多个 slice 的公共契约不冲突(重复 export / signature drift)
1281
1397
  - 5 tests pass
1282
1398
 
1283
1399
  **G7 文档自动化**(slice-2026-06-28-doc):
1400
+
1284
1401
  - `peaks doc generate-skill --name --from <commands-dir>` — 扫描 program.command() 自动生成 SKILL.md skeleton
1285
1402
  - `peaks doc changelog-suggest --since <ref>` — git log 解析 conventional commit + 生成 [Unreleased] 块
1286
1403
  - 6 tests pass
1287
1404
 
1288
1405
  **G8 存量代码 smell 扫描**(slice-2026-06-28-legacy):
1406
+
1289
1407
  - `peaks legacy-detect --dir <path>` — TODO/FIXME/HACK/console.log/any-type/large-file/ts-ignore 启发式扫描
1290
1408
  - 5 tests pass
1291
1409
 
1292
1410
  **G9 角色 RBAC**(slice-2026-06-28-role):
1411
+
1293
1412
  - `peaks role list/add/grant/check` — 4 命令,持久化 .peaks/role-registry.json
1294
1413
  - `--preset senior-fe` 一键预置 12 Gaps 高级前端权限
1295
1414
  - 5 tests pass
1296
1415
 
1297
1416
  **G10 复杂度估算**(slice-2026-06-28-complexity):
1417
+
1298
1418
  - `peaks complexity-estimate --files <list>` — 按 LOC + exports + async 估算 trivial/simple/complex
1299
1419
  - 与 G2 字段(complexity tier)对齐,驱动 user-attended vs overnight 排程
1300
1420
  - 5 tests pass
1301
1421
 
1302
1422
  **Dogfood 验证(ice-cola NestJS 项目):**
1423
+
1303
1424
  - peaks legacy-detect (164 文件, smells=high, 406 个 any-type, 15 个 large-file)
1304
1425
  - peaks role add senior-fe --preset senior-fe + role list + role check (granted/not)
1305
1426
  - peaks complexity-estimate (auth files → complex, 41 lines + hasAsync)
@@ -1324,6 +1445,7 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1324
1445
  - `tests/unit/services/context/tokenizer.test.ts:23` — `fetchedAt` 硬编码 `2026-06-21` 距今 7 天触发 `timeDecayScore 0.886 < 0.9` 期望,改 `new Date().toISOString()` 符合"fresh fetch"测试意图
1325
1446
 
1326
1447
  **测试结果:**
1448
+
1327
1449
  - silent-warning-detector: 2 violations → 0
1328
1450
  - `tests/unit/services/context/`: 49/50 → 50/50
1329
1451
  - 全量 vitest 4819 tests:3 failed → 2 failed(剩下 2 个是并发 race condition,单跑 context 50/50 全过,pre-existing)
@@ -1335,19 +1457,23 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1335
1457
  **PATCH bump from 2.14.1** (slice `2026-06-28-tilde-peaks-p3p4`). Closes P3 + P4 from `.peaks/memory/2026-06-28-tilde-peaks-inventory.md`.
1336
1458
 
1337
1459
  ### Cleanup
1460
+
1338
1461
  - **`skills/peaks-companion/`** — REMOVED. Skill was dead: SKILL.md documented `peaks companion status/install/setup/start` but no CLI implementation existed (`src/services/companion/` not present, `peaks --help` had no companion entry). Empty `~/.peaks/companion/` directory is no longer expected to receive `cc-connect.log` writes.
1339
1462
  - **`tests/unit/skills/peaks-companion.test.ts`** — REMOVED (9 cases). The companion skill-count assertion (19 → 18 skills) is now verified by `tests/unit/skills/skill-count.test.ts` (already covers the meta count, not companion specifically).
1340
1463
  - **`.peaks/memory/peaks-companion-*.md`** — REMOVED (4 files: `cc-connect-dogfood-2026-06-15`, `qr-autoopen-2026-06-15`, `qr-inline-display-2026-06-15`, `watcher-ecs-url-config`). Historical dogfood records, no longer relevant.
1341
1464
 
1342
1465
  ### Refactor
1466
+
1343
1467
  - **`~/.peaks/providers.json`** (NEW sidecar) — MiniMax provider config migrated from deprecated `~/.peaks/config.json.providers` to canonical `~/.peaks/providers.json` per `provider-service.ts` schema. The slim `config.json` (per `config-types.ts`) no longer carries the `providers` field.
1344
1468
  - **MiniMax model field preserved** — `~/.peaks/providers.json.providers.minimax.model = "minimax-2.7"`; `peaks config provider minimax get/status` continue to report correctly via the back-compat fallback in `provider-service.ts`.
1345
1469
 
1346
1470
  ### Test results
1471
+
1347
1472
  - `pnpm vitest run tests/unit/doctor.test.ts` — 50/50 pass
1348
1473
  - `pnpm vitest run` full unit suite — `peaks-companion.test.ts` no longer runs; total cases drop from 4418 → 4409. Pre-existing failures (`doctor.test.ts` × 0, `tokenizer.test.ts` × 1, `35-checks-aggregate.test.ts` × 1) unchanged.
1349
1474
 
1350
1475
  ### Out-of-scope
1476
+
1351
1477
  - Push / tag / npm publish — full-auto mode boundary = commit only; user-only.
1352
1478
  - Re-implementing peaks-companion CLI — user chose delete over revive.
1353
1479
  - Cleaning `~/.peaks/companion/` empty dir — left in place; harmless.
@@ -1359,14 +1485,17 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
1359
1485
  **PATCH bump from 2.14.0** (carry-forward from v2.13.3 AC-2 partial fix + npm 11.x config rename).
1360
1486
 
1361
1487
  ### Bug fixes
1488
+
1362
1489
  - `scripts/prepublish-build.mjs` — use `execFileSync('pnpm', ['run', 'build'])` (no shell) with Windows fallback to `prepublish-build.ps1` (proven dogfood). Eliminates the v2.13.4 partial-fix `spawnSync cmd.exe ENOENT` on Node 22 + Windows native.
1363
1490
  - `.npmrc` (NEW, repo-local template) — documents that `https_proxy` (underscore) is NO LONGER VALID in npm 11.x; use `https-proxy` or `proxy`. User-global `~/.npmrc` may still have `https_proxy`; npm 11.x warns, npm 12 will error.
1364
1491
 
1365
1492
  ### Test results
1493
+
1366
1494
  - `tests/unit/scripts/prepublish-build.test.ts` (NEW, 6 cases) — covers execFile happy path + Windows ps1 fallback + error propagation + version validation + ENOENT regression
1367
1495
  - `node scripts/prepublish-build.mjs` end-to-end: `[prepublish-build] build OK` exit 0 (verified on this Windows session)
1368
1496
 
1369
1497
  ### Out-of-scope
1498
+
1370
1499
  - Do NOT modify user-global `~/.npmrc` (user-only boundary); user must run `npm config delete https_proxy` themselves if they want to silence the warning before npm 12.
1371
1500
 
1372
1501
  ---
@@ -1487,7 +1616,7 @@ The four defects all stem from the v2.13.0 two-axis convention landing debt: the
1487
1616
 
1488
1617
  **PATCH bump from 2.13.2** (slice `2026-06-27-verdict-aggregator-v2-12-debt`, red-line scope 7 source files + 3 test files modified + 3 new scripts + 1 package.json hook).
1489
1618
 
1490
- 2.13.2 dogfood surfaced 4 bugs that all stem from v2.12.0 envelope-schema落地 debt: the v2.12.0 audit artifacts (`audit/security.md`, `audit/perf.md`) are YAML-frontmatter + markdown, but v2.13.2's `parseSecurityEnvelope` / `parsePerfEnvelope` used `JSON.parse` (which is the wrong shape). v2.13.3 also fixes a cross-version publish-pipeline issue (`bin/peaks.js` was shipping a Jun 13 stale dist because `prepublishOnly` was never wired) and adds a soft-block-warning surface in the CLI so users can see v2.13.2's `mut-report-missing-deprecated-in-v2.14.0` warning instead of having it silently downgraded in service-layer.
1619
+ 2.13.2 dogfood surfaced 4 bugs that all stem from v2.12.0 envelope-schema 落地 debt: the v2.12.0 audit artifacts (`audit/security.md`, `audit/perf.md`) are YAML-frontmatter + markdown, but v2.13.2's `parseSecurityEnvelope` / `parsePerfEnvelope` used `JSON.parse` (which is the wrong shape). v2.13.3 also fixes a cross-version publish-pipeline issue (`bin/peaks.js` was shipping a Jun 13 stale dist because `prepublishOnly` was never wired) and adds a soft-block-warning surface in the CLI so users can see v2.13.2's `mut-report-missing-deprecated-in-v2.14.0` warning instead of having it silently downgraded in service-layer.
1491
1620
 
1492
1621
  ### Bug fixes
1493
1622
 
@@ -1523,9 +1652,9 @@ The four defects all stem from the v2.13.0 two-axis convention landing debt: the
1523
1652
 
1524
1653
  ### Multi-CC commit boundaries
1525
1654
 
1526
- | Commit tag | Scope |
1527
- |---|---|
1528
- | v2.13.3 | 4 bug fixes (parser / publish pipeline / CLI warnings / handoff sha256) + 3 new scripts + 4 new test cases + package.json prepublishOnly + README publish note + CHANGELOG + version bump + ship-state memory |
1655
+ | Commit tag | Scope |
1656
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1657
+ | v2.13.3 | 4 bug fixes (parser / publish pipeline / CLI warnings / handoff sha256) + 3 new scripts + 4 new test cases + package.json prepublishOnly + README publish note + CHANGELOG + version bump + ship-state memory |
1529
1658
 
1530
1659
  ### Verified (peaks code dogfood + QA on this session)
1531
1660
 
@@ -1601,9 +1730,9 @@ v2.13.1 shipped with a BLOCKER bug found via post-release dogfood: `aggregateVer
1601
1730
 
1602
1731
  ### Multi-CC commit boundaries
1603
1732
 
1604
- | Commit tag | Scope |
1605
- |---|---|
1606
- | v2.13.2 | `aggregateVerdict()` dedup bug fix + `peaks verdict aggregate` CLI + `envelopes.ts` unification + `prd/handoff.md` auto-regen + `MUT_REPORT` soft-block window + 4 new test files + 4 updated test files + CHANGELOG + version bump + ship-state memory |
1733
+ | Commit tag | Scope |
1734
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1735
+ | v2.13.2 | `aggregateVerdict()` dedup bug fix + `peaks verdict aggregate` CLI + `envelopes.ts` unification + `prd/handoff.md` auto-regen + `MUT_REPORT` soft-block window + 4 new test files + 4 updated test files + CHANGELOG + version bump + ship-state memory |
1607
1736
 
1608
1737
  ### Verified (peaks code dogfood + QA on this session)
1609
1738
 
@@ -1665,9 +1794,9 @@ peaks-code previously received 5 heterogeneous signals (security-audit, perf-aud
1665
1794
 
1666
1795
  ### Multi-CC commit boundaries
1667
1796
 
1668
- | Commit tag | Scope |
1669
- |---|---|
1670
- | v2.13.1 | MUT_REPORT prereq + `aggregateVerdict()` service + `## Verdict reasoning` section + 4 new test files + 2 updated test files + CHANGELOG + version bump + ship-state memory |
1797
+ | Commit tag | Scope |
1798
+ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1799
+ | v2.13.1 | MUT_REPORT prereq + `aggregateVerdict()` service + `## Verdict reasoning` section + 4 new test files + 2 updated test files + CHANGELOG + version bump + ship-state memory |
1671
1800
 
1672
1801
  ### Verified (peaks code dogfood on this session)
1673
1802
 
@@ -1731,10 +1860,10 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
1731
1860
 
1732
1861
  ### Multi-CC commit boundaries
1733
1862
 
1734
- | Commit tag | Scope |
1735
- |---|---|
1863
+ | Commit tag | Scope |
1864
+ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1736
1865
  | v2.13.0-alpha.1 (`edffc33`) | Two-tier threshold + auto-compact types + reader + dispatcher + orchestrator + Claude Code MVP adapter + `peaks code context-now` + `peaks code auto-compact` CLI |
1737
- | `a8b9804` | In-session dogfood limitation documented (current ad-hoc Claude Code session cannot be externally compacted — reserved for follow-up PreToolUse-hook slice) |
1866
+ | `a8b9804` | In-session dogfood limitation documented (current ad-hoc Claude Code session cannot be externally compacted — reserved for follow-up PreToolUse-hook slice) |
1738
1867
 
1739
1868
  ### Verified (peaks code dogfood on this session)
1740
1869
 
@@ -1745,7 +1874,7 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
1745
1874
  - `post-compact-detect` after pre-compact: `shouldAutoResume: true`, `reason: post-compact-match` ✓
1746
1875
  - Trae IDE (no `compact` profile): `ratio: 0` + `source: conservative-fallback` + `below-threshold` (no auto-fire on missing signal — by design) ✓
1747
1876
  - `pnpm tsc --noEmit`: clean
1748
- - `pnpm vitest run` (full suite): `4317 / 4317` pass + 17 skipped (2 pre-existing baseline failures on session-checkpoint + _archive-removal-guard unchanged)
1877
+ - `pnpm vitest run` (full suite): `4317 / 4317` pass + 17 skipped (2 pre-existing baseline failures on session-checkpoint + \_archive-removal-guard unchanged)
1749
1878
 
1750
1879
  ### Out-of-scope (NOT changed)
1751
1880
 
@@ -1802,17 +1931,17 @@ v2.13.0 hard-deletes the legacy paths.
1802
1931
 
1803
1932
  ### Multi-CC commit boundaries
1804
1933
 
1805
- | Group | Tiers | Commit tag | Scope |
1806
- |---|---|---|---|
1807
- | A | 1+2+3 | v2.12.0-alpha.1 | Templates + new skills (fa082f5) |
1808
- | B | 4+5 | v2.12.0-alpha.2 | 5→3 fanout collapse + prereq migration (6485f1c) |
1809
- | C | 6 | v2.12.0-alpha.3 | peaks-txt sediment extension (ab2757b) |
1810
- | D | 7 | v2.12.0-alpha.4 | fan-out SKILL.md updates (b6c4fae) |
1811
- | E | 8+9 | v2.12.0 (release) | Decision records + migration + CHANGELOG + version bump (this commit) |
1934
+ | Group | Tiers | Commit tag | Scope |
1935
+ | ----- | ----- | ----------------- | --------------------------------------------------------------------- |
1936
+ | A | 1+2+3 | v2.12.0-alpha.1 | Templates + new skills (fa082f5) |
1937
+ | B | 4+5 | v2.12.0-alpha.2 | 5→3 fanout collapse + prereq migration (6485f1c) |
1938
+ | C | 6 | v2.12.0-alpha.3 | peaks-txt sediment extension (ab2757b) |
1939
+ | D | 7 | v2.12.0-alpha.4 | fan-out SKILL.md updates (b6c4fae) |
1940
+ | E | 8+9 | v2.12.0 (release) | Decision records + migration + CHANGELOG + version bump (this commit) |
1812
1941
 
1813
1942
  ### Zero regression (verified per group)
1814
1943
 
1815
- Each Group A→D ran the full RD→QA loop independently. Group C final QA: 14/14 sediment tests pass + 39/39 prd service tests pass; 9 pre-existing baseline failures unchanged (doctor / _archive-removal-guard / request-commands / observability / session-checkpoint / tech-service / workflow-autonomous-resume / jsonl-store / 35-checks-aggregate — all unrelated to v2.12.0). Group D final QA: 35/35 fan-out SKILL.md contract tests pass; same 9 pre-existing baseline failures.
1944
+ Each Group A→D ran the full RD→QA loop independently. Group C final QA: 14/14 sediment tests pass + 39/39 prd service tests pass; 9 pre-existing baseline failures unchanged (doctor / \_archive-removal-guard / request-commands / observability / session-checkpoint / tech-service / workflow-autonomous-resume / jsonl-store / 35-checks-aggregate — all unrelated to v2.12.0). Group D final QA: 35/35 fan-out SKILL.md contract tests pass; same 9 pre-existing baseline failures.
1816
1945
 
1817
1946
  ### Out-of-scope (NOT changed)
1818
1947
 
@@ -1993,6 +2122,7 @@ LLM was creating top-level `.peaks/_runtime/<change-id>/` siblings of `.peaks/_r
1993
2122
  - Bumps `package.json#version` from 2.9.1 to 2.9.2
1994
2123
 
1995
2124
  **Pre-existing violations preserved as-is** (intentional historical/forbidden documentation, all explicitly labeled):
2125
+
1996
2126
  - 6 ban-explanation memory files under `.peaks/memory/` (slice 005 / 2.8.3 / 2.7.1 lessons)
1997
2127
  - 28 historic session files under `.peaks/_runtime/2026-06-*/`
1998
2128
  - 5 historic dispatch records under `.peaks/_sub_agents/`
@@ -2089,37 +2219,37 @@ the four-step recipe; no data is lost.
2089
2219
  final root-out of a 2.8.0-era orphan (`.peaks/2026-06-22-cc-connect-orphan-cleanup/`,
2090
2220
  4 files, 28 KB, untracked) and pins the rule across FOUR layers so a
2091
2221
  regression cannot survive:
2092
- 1. **`.gitignore` fnmatch rule** —
2093
- `.peaks/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-*/` blocks any
2094
- future untracked date-prefix sibling at `.peaks/_runtime/<seg>/`. Path-anchored
2095
- so it does not over-match (`.peaks/_runtime/<date>/` is still ignored
2096
- by the existing `.peaks/_runtime/` rule, not this one).
2097
- 2. **Vitest guard** at
2098
- `tests/unit/workspace/top-level-change-id-guard.test.ts` (8 cases)
2099
- pins the gitignore rule literal, asserts fnmatch matches a synthetic
2100
- candidate, asserts it does NOT match `.peaks/_runtime/-nested`
2101
- candidates, scans the live working tree for orphan date-prefix
2102
- siblings, scans `git ls-files` for tracked escapes, asserts both
2103
- `CLAUDE.md` and `.peaks/PROJECT.md` carry the ban wording, AND
2104
- asserts the CLI help text (`init-command.ts`) teaches the
2105
- `.peaks/_runtime/current-change` binding path + the four
2106
- migration verbs (inspect / move / delete / unlink / re-run).
2107
- 3. **Source-code redirect** —
2108
- `src/shared/change-id.ts#setCurrentChangeId` now defaults to
2109
- `{ form: 'file' }` (was `'symlink'`); the file form writes ONLY
2110
- `.peaks/_runtime/current-change` and never creates
2111
- `.peaks/_runtime/<changeId>/`. The legacy `'symlink'` form is kept for
2112
- back-compat reads but is no longer written by `peaks workspace init`.
2113
- `src/services/workspace/workspace-service.ts#initWorkspace`
2114
- pre-flights the existence of `.peaks/_runtime/<changeId>/` and throws
2115
- `LegacyChangeIdSiblingError` if found.
2116
- 4. **CLI help-text guard** — `src/cli/commands/workspace/init-command.ts`
2117
- rewrites the `init` command description and `--change-id` option
2118
- description so an LLM reading `peaks workspace init --help` is
2119
- taught the correct path (`.peaks/_runtime/current-change`) instead
2120
- of the legacy `.peaks/_runtime/<change-id>/` sibling dir. A new catch block
2121
- surfaces `LegacyChangeIdSiblingError` with the 4-step migration
2122
- recipe in the JSON envelope.
2222
+ 1. **`.gitignore` fnmatch rule** —
2223
+ `.peaks/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-*/` blocks any
2224
+ future untracked date-prefix sibling at `.peaks/_runtime/<seg>/`. Path-anchored
2225
+ so it does not over-match (`.peaks/_runtime/<date>/` is still ignored
2226
+ by the existing `.peaks/_runtime/` rule, not this one).
2227
+ 2. **Vitest guard** at
2228
+ `tests/unit/workspace/top-level-change-id-guard.test.ts` (8 cases)
2229
+ pins the gitignore rule literal, asserts fnmatch matches a synthetic
2230
+ candidate, asserts it does NOT match `.peaks/_runtime/-nested`
2231
+ candidates, scans the live working tree for orphan date-prefix
2232
+ siblings, scans `git ls-files` for tracked escapes, asserts both
2233
+ `CLAUDE.md` and `.peaks/PROJECT.md` carry the ban wording, AND
2234
+ asserts the CLI help text (`init-command.ts`) teaches the
2235
+ `.peaks/_runtime/current-change` binding path + the four
2236
+ migration verbs (inspect / move / delete / unlink / re-run).
2237
+ 3. **Source-code redirect** —
2238
+ `src/shared/change-id.ts#setCurrentChangeId` now defaults to
2239
+ `{ form: 'file' }` (was `'symlink'`); the file form writes ONLY
2240
+ `.peaks/_runtime/current-change` and never creates
2241
+ `.peaks/_runtime/<changeId>/`. The legacy `'symlink'` form is kept for
2242
+ back-compat reads but is no longer written by `peaks workspace init`.
2243
+ `src/services/workspace/workspace-service.ts#initWorkspace`
2244
+ pre-flights the existence of `.peaks/_runtime/<changeId>/` and throws
2245
+ `LegacyChangeIdSiblingError` if found.
2246
+ 4. **CLI help-text guard** — `src/cli/commands/workspace/init-command.ts`
2247
+ rewrites the `init` command description and `--change-id` option
2248
+ description so an LLM reading `peaks workspace init --help` is
2249
+ taught the correct path (`.peaks/_runtime/current-change`) instead
2250
+ of the legacy `.peaks/_runtime/<change-id>/` sibling dir. A new catch block
2251
+ surfaces `LegacyChangeIdSiblingError` with the 4-step migration
2252
+ recipe in the JSON envelope.
2123
2253
  - **`CLI_VERSION`** sync bumped 2.8.2 → 2.8.3 (regenerated via
2124
2254
  `scripts/sync-version.mjs` from `package.json#version`).
2125
2255
 
@@ -2245,7 +2375,7 @@ are unchanged by this release), `pnpm build` clean.
2245
2375
  `src/services/companion/*` module + `src/cli/commands/companion.ts`
2246
2376
  CLI + 14 `tests/unit/companion/*` test files are removed
2247
2377
  (~7,700 lines deleted, 0 added). The `peaks companion install|setup|
2248
- start|stop|bind|status|restart|verify|token|qr` command tree is gone
2378
+ start|stop|bind|status|restart|verify|token|qr` command tree is gone
2249
2379
  along with the `peaks scan companion-binary` sub-command and the
2250
2380
  `capability:companion-binary-resolution` doctor check. Companion
2251
2381
  types (`CompanionConfig`, `CompanionWeixinConfig`, `CompanionChannel`,
@@ -2273,7 +2403,7 @@ are unchanged by this release), `pnpm build` clean.
2273
2403
  - **`@alibaba-group/open-code-review` is now a peer dependency** —
2274
2404
  moved from `optionalDependencies` to `peerDependencies` with
2275
2405
  `peerDependenciesMeta."@alibaba-group/open-code-review".optional =
2276
- true`. The peer hint lets npm skip the optional resolution entirely
2406
+ true`. The peer hint lets npm skip the optional resolution entirely
2277
2407
  during global install; users who want second-opinion reviews via
2278
2408
  `peaks code-review run-ocr` install it manually with
2279
2409
  `npm i -g @alibaba-group/open-code-review`. Install hint copy in
@@ -2305,8 +2435,8 @@ are unchanged by this release), `pnpm build` clean.
2305
2435
  - **Defense-in-depth comment cites H6 verbatim (Plan 5 R1-W3 MED)** —
2306
2436
  `src/services/rd/impl.ts` defense-in-depth check now cites spec H6
2307
2437
  (CLI 计算裁决) directly. The accompanying `docs/superpowers/specs/
2308
- 2026-06-21-context-audit-redesign-design.md` gained a new §4.3
2309
- *战术审计* subsection that consolidates §3.2 / §3.3 / H6 / H8 / Phase 3
2438
+ 2026-06-21-context-audit-redesign-design.md` gained a new §4.3
2439
+ _战术审计_ subsection that consolidates §3.2 / §3.3 / H6 / H8 / Phase 3
2310
2440
  AC-2 into a single canonical anchor (previous code references to
2311
2441
  `§4.2` updated to `§4.3`).
2312
2442
 
@@ -2323,7 +2453,7 @@ are unchanged by this release), `pnpm build` clean.
2323
2453
  is in the test name, not just the body.
2324
2454
 
2325
2455
  - **Atomic-write crash test (Plan 5 R1-W5 LOW)** — new test
2326
- *unlinks .tmp when rename throws* pins the catch→unlink fallback in
2456
+ _unlinks .tmp when rename throws_ pins the catch→unlink fallback in
2327
2457
  `writeImpl` (EISDIR-triggered real-rename failure). Mutation probe
2328
2458
  KILLED: commenting out the unlink makes the test fail at the
2329
2459
  `existsSync(tmp)` assertion.
@@ -2425,7 +2555,7 @@ are unchanged by this release), `pnpm build` clean.
2425
2555
  `C:\Users\name\.trae\agents` and a Mac user gets
2426
2556
  `/Users/name/.trae/agents`. No hardcoded `/Users/...` or `C:\...` in
2427
2557
  any 5-IDE `awaitBatch` path. The 4 new IDE paths (`trae / trae-cn /
2428
- codex / cursor`) follow the same discipline.
2558
+ codex / cursor`) follow the same discipline.
2429
2559
  - **`runDag` cancel-on-fail correctness (slice 1.2.c)** — when any leaf
2430
2560
  fails, in-flight sub-agents in the same batch receive a cancel signal
2431
2561
  at the envelope level; the orchestrator no longer waits for them to
@@ -2516,11 +2646,11 @@ are unchanged by this release), `pnpm build` clean.
2516
2646
  4. `scanExportsInFile` now matches `export default function name()`
2517
2647
  and `export default class Name`; `importedNameCount` now treats
2518
2648
  re-exports (`export { x } from './y'`, `export type { T } from
2519
- './y'`) as consumer references.
2520
- Bonus: `OrphanScanOptions.baseRef` lets the scan diff against an
2521
- arbitrary git ref (default: `HEAD`) for branch-vs-main reviews.
2649
+ './y'`) as consumer references.
2650
+ Bonus: `OrphanScanOptions.baseRef` lets the scan diff against an
2651
+ arbitrary git ref (default: `HEAD`) for branch-vs-main reviews.
2522
2652
  - **karpathy-service code-fence skip (Slice 2.6.1.B)** — `peaks scan
2523
- karpathy` no longer flags anti-pattern phrases (TODO, "should be
2653
+ karpathy` no longer flags anti-pattern phrases (TODO, "should be
2524
2654
  fine", "maybe", "probably") when they appear inside fenced markdown
2525
2655
  code blocks. Illustrative code snippets were eroding trust in the
2526
2656
  structural scanner. The 4 guideline-marker tests
@@ -2543,7 +2673,7 @@ are unchanged by this release), `pnpm build` clean.
2543
2673
  byte-identical.
2544
2674
  - **KARPATHY_REVIEW heading-anchored gate (Slice 2.6.1.F)** — the L3
2545
2675
  LOW (the 4 guideline `mustContain` substring markers could be
2546
- spoofed by any file that just *mentioned* the marker names as
2676
+ spoofed by any file that just _mentioned_ the marker names as
2547
2677
  prose) is fixed by a new `headingMustContain: string[]` field on
2548
2678
  `ArtifactPrerequisite`. `KARPATHY_REVIEW` now requires each of
2549
2679
  the 4 guidelines to appear as an actual markdown heading
@@ -2560,8 +2690,7 @@ are unchanged by this release), `pnpm build` clean.
2560
2690
 
2561
2691
  - **L2-install dogfood verification (Slice 2.6.1.D)** — confirmed
2562
2692
  end-to-end on a temp HOME that the 2.6.0 tarball's `postinstall`
2563
- creates `~/.claude/agents/karpathy-reviewer.md` (15.4 KB, mode
2564
- 0600) and the matching `.peaks-managed` marker (245 bytes, JSON
2693
+ creates `~/.claude/agents/karpathy-reviewer.md` (15.4 KB, mode 0600) and the matching `.peaks-managed` marker (245 bytes, JSON
2565
2694
  with `version`, `kind`, `agentName`, `sourcePath`, `contentSha256`).
2566
2695
  The 8-platform skill fan-out also confirmed (codex, cursor, trae,
2567
2696
  trae-cn, qoder, tongyi-lingma, hermes, openclaw). After Slice E,
@@ -2591,7 +2720,7 @@ are unchanged by this release), `pnpm build` clean.
2591
2720
  title-case section markers (Think Before Coding / Simplicity First /
2592
2721
  Surgical Changes / Goal-Driven Execution). CLI error code
2593
2722
  `PREREQUISITES_MISSING`. Escape hatch: `peaks request transition
2594
- --allow-incomplete --confirm` (assisted mode).
2723
+ --allow-incomplete --confirm` (assisted mode).
2595
2724
  - **Karpathy prompt-injection across the full RD surface** (slice 1) —
2596
2725
  4-layer guard: SKILL.md body + 3 reference docs
2597
2726
  (`mandatory-tech-doc.md`, `rd-fanout-contracts.md`,
@@ -2613,7 +2742,7 @@ are unchanged by this release), `pnpm build` clean.
2613
2742
  endpoints / components / stores / mocks in the consumer project
2614
2743
  before any new code is written. `--project --format --scope --max-per-kind`
2615
2744
  options; output feeds the tech-doc's `## Existing API or Component
2616
- Inventory` section. New service
2745
+ Inventory` section. New service
2617
2746
  `src/services/scan/api-surface-service.ts` (~280 lines).
2618
2747
  - **`peaks scan orphan` CLI** (slice 4) — 4-kind orphan detection
2619
2748
  (exportOrphan / importOrphan / cliSubcommandOrphan /
@@ -2730,8 +2859,8 @@ are unchanged by this release), `pnpm build` clean.
2730
2859
  `references/checkpoint-resume.md` + `references/periodic-checkpoint.md`, but
2731
2860
  SKILL.md body only mentioned them in a single line. New Claude Code sessions
2732
2861
  that load SKILL.md never learned the optimization existed. `### Peaks-Loop
2733
- Step 0.75: Resume from checkpoint` and `### Peaks-Loop Step N: Periodic
2734
- checkpoint` headings are now in the body (≥ 5 lines each), with explicit
2862
+ Step 0.75: Resume from checkpoint` and `### Peaks-Loop Step N: Periodic
2863
+ checkpoint` headings are now in the body (≥ 5 lines each), with explicit
2735
2864
  `peaks session checkpoint` / `peaks session resume` CLI mentions and
2736
2865
  reference-doc pointers. Byte cap bumped 22K → 24K (precedent: 18K → 20K → 22K).
2737
2866
  - **`peaks test <pattern...>` CLI with smart cache** (sub-fix B) — new CLI
@@ -2840,7 +2969,7 @@ are unchanged by this release), `pnpm build` clean.
2840
2969
  (~/.claude/skills + ~/.claude/output-styles)" and writes to
2841
2970
  `~/.claude/skills/`.
2842
2971
  - Byte-stability: `git diff
2843
- src/services/ide/adapters/{claude-code,trae}-adapter.ts` returns
2972
+ src/services/ide/adapters/{claude-code,trae}-adapter.ts` returns
2844
2973
  empty (AC8 / AC15 ✓). Dispatch chokepoints `resource-profile.ts` /
2845
2974
  `ide-aware-standards-service.ts` / `install-skills.mjs` untouched
2846
2975
  (R6 inverse rule ✓).
@@ -2935,6 +3064,7 @@ are unchanged by this release), `pnpm build` clean.
2935
3064
  registered SOP gate.
2936
3065
 
2937
3066
  Concrete changes:
3067
+
2938
3068
  - `src/services/workspace/claude-settings-template.ts` — deleted
2939
3069
  `PEAKS_SUBCOMMAND_ALLOWLIST`, `buildBashHookCommand()`. The
2940
3070
  template now emits only the `Write|Edit|MultiEdit` matcher.
@@ -2987,11 +3117,12 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
2987
3117
  - **`headroom-ai` preferences resolver** — `src/services/context/headroom-prefs.ts` with
2988
3118
  `resolveHeadroomOptions` and `shouldCompressResults` (pure functions, no IO). Sub-agent
2989
3119
  dispatch now reads `loadPreferences().headroom` and:
2990
- - Hard-blocks `--use-headroom` when `headroom.enabled = false` (new error code
2991
- `HEADROOM_DISABLED_BY_PREFERENCE`, exit 1).
2992
- - Respects `--headroom-mode <m>` CLI override > `perTouchpoint.subAgentDispatch` >
2993
- `defaultMode` precedence.
2994
- - Falls back to G7 metadata-only on any preferences load failure (no dispatch break).
3120
+
3121
+ - Hard-blocks `--use-headroom` when `headroom.enabled = false` (new error code
3122
+ `HEADROOM_DISABLED_BY_PREFERENCE`, exit 1).
3123
+ - Respects `--headroom-mode <m>` CLI override > `perTouchpoint.subAgentDispatch` >
3124
+ `defaultMode` precedence.
3125
+ - Falls back to G7 metadata-only on any preferences load failure (no dispatch break).
2995
3126
 
2996
3127
  - **New preferences fields** — `headroom.perTouchpoint.subAgentDispatch` and
2997
3128
  `headroom.compressMinBytes` (default 4096). Shallow-merge on existing
@@ -3121,7 +3252,7 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
3121
3252
 
3122
3253
  - The "one rid = one feature" pattern. From 2.1.1 onward, the
3123
3254
  recommended workflow is: PRD -> `peaks slice decompose` -> `peaks
3124
- slice pick` (interactive) -> `peaks slice plan` -> N child rids.
3255
+ slice pick` (interactive) -> `peaks slice plan` -> N child rids.
3125
3256
  Legacy `--type`-based fan-out still works as a fallback for rids
3126
3257
  that pre-date the algorithm.
3127
3258
 
@@ -3199,10 +3330,10 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
3199
3330
  (canonical home: proxy-service.ts).
3200
3331
  - `~/.peaks/workspaces.json` — registered workspaces + current-workspace
3201
3332
  pointer (canonical home: workspace-state-service.ts).
3202
- On-disk legacy bloat is auto-detected and promoted to the correct
3203
- sidecar on next CLI invocation; the slim `config.json` is then
3204
- rewritten. The migration is **idempotent and silent** — no user
3205
- action required.
3333
+ On-disk legacy bloat is auto-detected and promoted to the correct
3334
+ sidecar on next CLI invocation; the slim `config.json` is then
3335
+ rewritten. The migration is **idempotent and silent** — no user
3336
+ action required.
3206
3337
  - **`peaks config migrate --apply` distributes legacy fields across
3207
3338
  their canonical homes.** `economyMode` / `swarmMode` continue to
3208
3339
  forward to `<project>/.peaks/preferences.json`; `providers` /
@@ -3221,9 +3352,9 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
3221
3352
 
3222
3353
  - **New `src/services/config/sidecar-store.ts`** — path helpers
3223
3354
  (`providersConfigPath()`, `proxyConfigPath()`, `workspacesConfigPath()`)
3224
- + generic `readSidecarJson<T>` / `writeSidecarJson` with the same
3225
- hardened-fs guarantees as `config-safety.ts` (symlink / hardlink
3226
- guards, atomic temp-file rename, 0o600 mode).
3355
+ - generic `readSidecarJson<T>` / `writeSidecarJson` with the same
3356
+ hardened-fs guarantees as `config-safety.ts` (symlink / hardlink
3357
+ guards, atomic temp-file rename, 0o600 mode).
3227
3358
  - **New `src/services/config/provider-service.ts`** —
3228
3359
  `getMiniMaxProviderConfig()`, `setMiniMaxProviderConfig()`,
3229
3360
  `getMiniMaxProviderStatus()`, `getAllProviders()`,
@@ -3342,10 +3473,10 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
3342
3473
  call; a missing or anonymous caller-id is rejected.
3343
3474
  3. **Mandatory `--reason`** — the CLI rejects `--reason ""`; the
3344
3475
  reason is persisted into the slice record for the retrospective.
3345
- Three rules, not one: each rule is independently fail-closed, so a
3346
- misuse in any one of them blocks the bypass. The classifier is the
3347
- pure function `canSkipSlice(slice, callerId, reason)` so the rule
3348
- set is testable in isolation.
3476
+ Three rules, not one: each rule is independently fail-closed, so a
3477
+ misuse in any one of them blocks the bypass. The classifier is the
3478
+ pure function `canSkipSlice(slice, callerId, reason)` so the rule
3479
+ set is testable in isolation.
3349
3480
  - **`peaks workflow verify-pipeline --gate-skipped`** — reporting
3350
3481
  flag that surfaces slices that completed via the skip classifier
3351
3482
  during a pipeline run. The default `verify-pipeline` output hides
@@ -3382,27 +3513,29 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
3382
3513
  bash saw literal `const c=process.argv[1]...` and tripped
3383
3514
  `syntax error near unexpected token`. Net effect on every 2.0.3
3384
3515
  install on Windows + macOS + Linux:
3516
+
3385
3517
  - Every Bash tool call (peaks CLI or otherwise) was rejected.
3386
3518
  - Every Write / Edit / MultiEdit call was rejected.
3387
3519
  - The [Fact-Forcing Gate] bypass that `peaks workspace init` was
3388
3520
  supposed to install was therefore self-defeating — the bypass
3389
3521
  broke the gate itself, and the gate could not be reached to fix
3390
3522
  it.
3391
- Recovery required the user to delete `.claude/settings.local.json`
3392
- manually (losing the bypass permanently) or hand-patch the
3393
- `command` field (drift vs the template).
3394
- The fix wraps both builders' JS payloads in a real shell-evaluable
3395
- `node -e "<js>"` form via a new `wrapAsNodeOneLiner` helper in
3396
- `src/services/workspace/claude-settings-template.ts`. Inner `"`
3397
- are escaped to `\"`; backslashes pass through unchanged so regex
3398
- literals like `/\.peaks\//` still match correctly. `process.argv[1]`
3399
- is the correct slot under `-e` per Node.js docs
3400
- (https://nodejs.org/api/process.html#processargv) — consistent
3401
- across Windows, macOS, and Linux. The docstring is reconciled
3402
- with the implementation (the previous docstring incorrectly said
3403
- `argv[2]`).
3523
+ Recovery required the user to delete `.claude/settings.local.json`
3524
+ manually (losing the bypass permanently) or hand-patch the
3525
+ `command` field (drift vs the template).
3526
+ The fix wraps both builders' JS payloads in a real shell-evaluable
3527
+ `node -e "<js>"` form via a new `wrapAsNodeOneLiner` helper in
3528
+ `src/services/workspace/claude-settings-template.ts`. Inner `"`
3529
+ are escaped to `\"`; backslashes pass through unchanged so regex
3530
+ literals like `/\.peaks\//` still match correctly. `process.argv[1]`
3531
+ is the correct slot under `-e` per Node.js docs
3532
+ (https://nodejs.org/api/process.html#processargv) — consistent
3533
+ across Windows, macOS, and Linux. The docstring is reconciled
3534
+ with the implementation (the previous docstring incorrectly said
3535
+ `argv[2]`).
3404
3536
 
3405
3537
  Regression tests cover:
3538
+
3406
3539
  - `buildBashHookCommand()` and `buildWriteHookCommand()` return
3407
3540
  `node -e "..."` form.
3408
3541
  - Inner `"` are escaped to `\"`.
@@ -3517,6 +3650,7 @@ config surface.
3517
3650
  > `optionalDependencies`; everything else in this section
3518
3651
  > (env-var injection, `config-template` CLI, `missingKeys`,
3519
3652
  > source-of-truth under `peaksConfig.ocr.llm`) is unchanged.
3653
+
3520
3654
  - **`detectOcr` / `runOcrReview` no longer read `~/.opencodereview/config.json`.**
3521
3655
  The source of truth is `peaksConfig.ocr.llm` (parsed by
3522
3656
  `getOcrLlmConfig()` in `config-service.ts`). Missing fields surface
@@ -3578,7 +3712,7 @@ subprocess ignores it when peaks-loop's env vars are present).
3578
3712
  supported IDE platforms in one command.
3579
3713
 
3580
3714
  - **`peaks audit red-lines`** — L2 catalog audit (P0/P1/P2-a/P2-b
3581
- enforcers) for skills/SKILL.md, references/*.md, and the agent shield.
3715
+ enforcers) for skills/SKILL.md, references/\*.md, and the agent shield.
3582
3716
 
3583
3717
  - **`peaks agent run`** — ECC 64 agents soft-optional integration
3584
3718
  (spec §7.2). When the L3 stack is installed, peaks delegates to it;
@@ -3613,6 +3747,7 @@ subprocess ignores it when peaks-loop's env vars are present).
3613
3747
  expands globs on disk before spawning.
3614
3748
 
3615
3749
  - **(2026-06-12) Three bugs surfaced by real-world ice-cola dogfood:**
3750
+
3616
3751
  - memory-extract was called without `--apply` → always dry-ran, never
3617
3752
  actually wrote.
3618
3753
  - `.claude/skills/**/SKILL.md` (the standard Claude-Code consumer
@@ -3736,7 +3871,7 @@ call-to-action text differ.
3736
3871
  Chinese tagline: `peaks-loop: 跨 AI IDE 的工程门禁与编排`).
3737
3872
  - `README-en.md` synced to mirror the new layout (typing animation
3738
3873
  uses the English tagline: `peaks-loop: cross-AI-IDE engineering
3739
- gates & orchestration`).
3874
+ gates & orchestration`).
3740
3875
  - Card anchors renamed to ASCII-friendly slugs on the English file
3741
3876
  (`30-seconds-to-running`, `5-minute-onboarding`, `11-skills-in-the-family`,
3742
3877
  `killer-feature-un-bypassable-gates`) so the README renders