peaks-loop 4.1.1 → 4.1.3

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 (1066) hide show
  1. package/.claude-plugin/marketplace.json +136 -47
  2. package/CHANGELOG.md +106 -0
  3. package/README-en.md +4 -4
  4. package/README.md +25 -4
  5. package/bin/node-floor.mjs +59 -0
  6. package/bin/peaks.js +13 -0
  7. package/config/eslint/tsconfig.lint.json +2 -1
  8. package/contracts/readonly-argv-whitelist.json +211 -0
  9. package/dist/cli/cli-helpers.d.ts +0 -1
  10. package/dist/cli/cli-helpers.js +0 -1
  11. package/dist/cli/commands/_cli-error-envelope.js +0 -3
  12. package/dist/cli/commands/adapter-commands-s2a.d.ts +0 -1
  13. package/dist/cli/commands/adapter-commands.d.ts +0 -1
  14. package/dist/cli/commands/api-diff-commands.d.ts +0 -1
  15. package/dist/cli/commands/api-diff-commands.js +0 -1
  16. package/dist/cli/commands/audit-artifact-runners.d.ts +16 -0
  17. package/dist/cli/commands/audit-artifact-runners.js +170 -0
  18. package/dist/cli/commands/audit-command-shared.d.ts +97 -0
  19. package/dist/cli/commands/audit-command-shared.js +60 -0
  20. package/dist/cli/commands/audit-commands.d.ts +7 -31
  21. package/dist/cli/commands/audit-commands.js +65 -477
  22. package/dist/cli/commands/audit-goal-runners.d.ts +17 -0
  23. package/dist/cli/commands/audit-goal-runners.js +114 -0
  24. package/dist/cli/commands/audit-red-lines-runners.d.ts +11 -0
  25. package/dist/cli/commands/audit-red-lines-runners.js +43 -0
  26. package/dist/cli/commands/audit-refusal-data.d.ts +23 -0
  27. package/dist/cli/commands/audit-refusal-data.js +69 -0
  28. package/dist/cli/commands/audit-static-runners.d.ts +13 -0
  29. package/dist/cli/commands/audit-static-runners.js +139 -0
  30. package/dist/cli/commands/autonomous-swarm-commands.js +0 -1
  31. package/dist/cli/commands/await-runners.d.ts +11 -0
  32. package/dist/cli/commands/await-runners.js +148 -0
  33. package/dist/cli/commands/bee-commands.d.ts +0 -2
  34. package/dist/cli/commands/bee-commands.js +0 -2
  35. package/dist/cli/commands/best-practice-scan-command.d.ts +0 -1
  36. package/dist/cli/commands/best-practice-scan-helpers.js +0 -1
  37. package/dist/cli/commands/changeset-commands.d.ts +0 -2
  38. package/dist/cli/commands/changeset-commands.js +0 -2
  39. package/dist/cli/commands/code-auto-compact-command.d.ts +3 -0
  40. package/dist/cli/commands/code-auto-compact-command.js +124 -0
  41. package/dist/cli/commands/code-auto-compact-envelope.d.ts +22 -0
  42. package/dist/cli/commands/code-auto-compact-envelope.js +39 -0
  43. package/dist/cli/commands/code-commands.d.ts +0 -3
  44. package/dist/cli/commands/code-commands.js +0 -3
  45. package/dist/cli/commands/code-context-audit-command.d.ts +3 -0
  46. package/dist/cli/commands/code-context-audit-command.js +68 -0
  47. package/dist/cli/commands/code-context-now-command.d.ts +3 -0
  48. package/dist/cli/commands/code-context-now-command.js +124 -0
  49. package/dist/cli/commands/code-context-now-envelope.d.ts +66 -0
  50. package/dist/cli/commands/code-context-now-envelope.js +136 -0
  51. package/dist/cli/commands/code-context-now-mapping.d.ts +27 -0
  52. package/dist/cli/commands/code-context-now-mapping.js +43 -0
  53. package/dist/cli/commands/code-emit-handoff-command.d.ts +3 -0
  54. package/dist/cli/commands/code-emit-handoff-command.js +99 -0
  55. package/dist/cli/commands/code-gate-command.d.ts +0 -1
  56. package/dist/cli/commands/code-gate-command.js +0 -1
  57. package/dist/cli/commands/code-gate-step-08-command.d.ts +3 -0
  58. package/dist/cli/commands/code-gate-step-08-command.js +139 -0
  59. package/dist/cli/commands/code-job-shape-commands-read-job-shape.d.ts +0 -1
  60. package/dist/cli/commands/code-job-shape-commands-read-job-shape.js +0 -1
  61. package/dist/cli/commands/code-job-shape-commands.d.ts +0 -2
  62. package/dist/cli/commands/code-job-shape-commands.js +0 -3
  63. package/dist/cli/commands/code-mode-gate-commands.d.ts +0 -2
  64. package/dist/cli/commands/code-mode-gate-commands.js +0 -3
  65. package/dist/cli/commands/code-mode-gate-should-pause-command.js +0 -4
  66. package/dist/cli/commands/code-mode-gate-should-pause-envelope.d.ts +0 -1
  67. package/dist/cli/commands/code-mode-gate-should-pause-envelope.js +0 -2
  68. package/dist/cli/commands/code-mode-status-command.d.ts +0 -1
  69. package/dist/cli/commands/code-mode-status-command.js +0 -1
  70. package/dist/cli/commands/code-orchestrator-can-do.d.ts +0 -1
  71. package/dist/cli/commands/code-orchestrator-can-do.js +0 -1
  72. package/dist/cli/commands/code-post-compact-detect-command.d.ts +3 -0
  73. package/dist/cli/commands/code-post-compact-detect-command.js +50 -0
  74. package/dist/cli/commands/code-run-command.js +0 -1
  75. package/dist/cli/commands/code-runtime-commands.d.ts +9 -46
  76. package/dist/cli/commands/code-runtime-commands.js +20 -687
  77. package/dist/cli/commands/code-runtime-session.d.ts +1 -0
  78. package/dist/cli/commands/code-runtime-session.js +15 -0
  79. package/dist/cli/commands/codegraph-command-runtime.d.ts +6 -0
  80. package/dist/cli/commands/codegraph-command-runtime.js +19 -7
  81. package/dist/cli/commands/codegraph-commands.js +20 -193
  82. package/dist/cli/commands/codegraph-init-command.d.ts +8 -0
  83. package/dist/cli/commands/codegraph-init-command.js +162 -0
  84. package/dist/cli/commands/codegraph-status-command.js +5 -6
  85. package/dist/cli/commands/compact-command.d.ts +6 -3
  86. package/dist/cli/commands/compact-command.js +12 -563
  87. package/dist/cli/commands/compact-dry-run-command.d.ts +3 -0
  88. package/dist/cli/commands/compact-dry-run-command.js +87 -0
  89. package/dist/cli/commands/compact-force-command.d.ts +3 -0
  90. package/dist/cli/commands/compact-force-command.js +98 -0
  91. package/dist/cli/commands/compact-harness-window-command.d.ts +3 -0
  92. package/dist/cli/commands/compact-harness-window-command.js +174 -0
  93. package/dist/cli/commands/compact-history-command.d.ts +3 -0
  94. package/dist/cli/commands/compact-history-command.js +89 -0
  95. package/dist/cli/commands/compact-read-commands.d.ts +3 -0
  96. package/dist/cli/commands/compact-read-commands.js +123 -0
  97. package/dist/cli/commands/compact-settle-command.d.ts +3 -0
  98. package/dist/cli/commands/compact-settle-command.js +130 -0
  99. package/dist/cli/commands/compact-shared.d.ts +9 -0
  100. package/dist/cli/commands/compact-shared.js +26 -0
  101. package/dist/cli/commands/container-commands.d.ts +0 -1
  102. package/dist/cli/commands/container-commands.js +0 -1
  103. package/dist/cli/commands/context-commands.d.ts +0 -1
  104. package/dist/cli/commands/context-commands.js +0 -1
  105. package/dist/cli/commands/core/doctor-command.d.ts +0 -1
  106. package/dist/cli/commands/core/doctor-command.js +0 -9
  107. package/dist/cli/commands/core/memory-command.js +0 -1
  108. package/dist/cli/commands/core/session-command.js +0 -14
  109. package/dist/cli/commands/core/skill-command.d.ts +1 -44
  110. package/dist/cli/commands/core/skill-command.js +13 -550
  111. package/dist/cli/commands/core/skill-context-verdict.d.ts +38 -0
  112. package/dist/cli/commands/core/skill-context-verdict.js +63 -0
  113. package/dist/cli/commands/core/skill-generated-config-notice.d.ts +41 -0
  114. package/dist/cli/commands/core/skill-generated-config-notice.js +75 -0
  115. package/dist/cli/commands/core/skill-heartbeat-commands.d.ts +3 -0
  116. package/dist/cli/commands/core/skill-heartbeat-commands.js +50 -0
  117. package/dist/cli/commands/core/skill-presence-commands.d.ts +3 -0
  118. package/dist/cli/commands/core/skill-presence-commands.js +123 -0
  119. package/dist/cli/commands/core/skill-presence-housekeeping-commands.d.ts +3 -0
  120. package/dist/cli/commands/core/skill-presence-housekeeping-commands.js +165 -0
  121. package/dist/cli/commands/core/skill-registry-commands.d.ts +3 -0
  122. package/dist/cli/commands/core/skill-registry-commands.js +117 -0
  123. package/dist/cli/commands/core/skill-runbook-command.d.ts +3 -0
  124. package/dist/cli/commands/core/skill-runbook-command.js +29 -0
  125. package/dist/cli/commands/core-artifact-commands.d.ts +0 -1
  126. package/dist/cli/commands/core-artifact-commands.js +0 -1
  127. package/dist/cli/commands/cron-commands-actions.d.ts +0 -1
  128. package/dist/cli/commands/cron-commands-actions.js +0 -2
  129. package/dist/cli/commands/cron-commands-schedule.d.ts +0 -3
  130. package/dist/cli/commands/cron-commands-schedule.js +0 -1
  131. package/dist/cli/commands/cron-commands.d.ts +0 -1
  132. package/dist/cli/commands/cron-commands.js +0 -2
  133. package/dist/cli/commands/cron-scheduler-commands.d.ts +0 -1
  134. package/dist/cli/commands/cron-scheduler-commands.js +0 -1
  135. package/dist/cli/commands/cron-scheduler-persist.d.ts +0 -5
  136. package/dist/cli/commands/cron-scheduler-persist.js +0 -5
  137. package/dist/cli/commands/dashboard-summary.d.ts +0 -1
  138. package/dist/cli/commands/dispatch-command-spec.d.ts +2 -0
  139. package/dist/cli/commands/dispatch-command-spec.js +62 -0
  140. package/dist/cli/commands/dispatch-commands.d.ts +0 -1
  141. package/dist/cli/commands/dispatch-commands.js +159 -802
  142. package/dist/cli/commands/dispatch-detached-branch.d.ts +3 -0
  143. package/dist/cli/commands/dispatch-detached-branch.js +58 -0
  144. package/dist/cli/commands/dispatch-envelope.d.ts +36 -0
  145. package/dist/cli/commands/dispatch-envelope.js +104 -0
  146. package/dist/cli/commands/dispatch-from-dag.js +0 -4
  147. package/dist/cli/commands/dispatch-isolation-lease.d.ts +17 -0
  148. package/dist/cli/commands/dispatch-isolation-lease.js +149 -0
  149. package/dist/cli/commands/dispatch-preflight.d.ts +7 -0
  150. package/dist/cli/commands/dispatch-preflight.js +105 -0
  151. package/dist/cli/commands/dispatch-prompt-blocks.d.ts +10 -0
  152. package/dist/cli/commands/dispatch-prompt-blocks.js +56 -0
  153. package/dist/cli/commands/dispatch-prompt-composition.d.ts +30 -0
  154. package/dist/cli/commands/dispatch-prompt-composition.js +171 -0
  155. package/dist/cli/commands/dispatch-record-write.d.ts +24 -0
  156. package/dist/cli/commands/dispatch-record-write.js +96 -0
  157. package/dist/cli/commands/dispatch-tool-call.d.ts +15 -0
  158. package/dist/cli/commands/dispatch-tool-call.js +128 -0
  159. package/dist/cli/commands/doctor/invoke-from-code.js +0 -1
  160. package/dist/cli/commands/e2e-verify.d.ts +0 -1
  161. package/dist/cli/commands/ecc-commands.d.ts +0 -1
  162. package/dist/cli/commands/evolution-command-shared.d.ts +78 -0
  163. package/dist/cli/commands/evolution-command-shared.js +107 -0
  164. package/dist/cli/commands/evolution-commands.d.ts +11 -2
  165. package/dist/cli/commands/evolution-commands.js +19 -351
  166. package/dist/cli/commands/evolution-evaluate-command.d.ts +24 -0
  167. package/dist/cli/commands/evolution-evaluate-command.js +138 -0
  168. package/dist/cli/commands/evolution-propose-command.d.ts +23 -0
  169. package/dist/cli/commands/evolution-propose-command.js +145 -0
  170. package/dist/cli/commands/evolution-status-command.d.ts +17 -0
  171. package/dist/cli/commands/evolution-status-command.js +41 -0
  172. package/dist/cli/commands/evolution-verdict-commands.d.ts +30 -0
  173. package/dist/cli/commands/evolution-verdict-commands.js +100 -0
  174. package/dist/cli/commands/feedback-commands.d.ts +0 -1
  175. package/dist/cli/commands/feedback-commands.js +0 -2
  176. package/dist/cli/commands/finalize-accumulator.d.ts +44 -0
  177. package/dist/cli/commands/finalize-accumulator.js +55 -0
  178. package/dist/cli/commands/finalize-branches.d.ts +34 -0
  179. package/dist/cli/commands/finalize-branches.js +119 -0
  180. package/dist/cli/commands/finalize-runners.d.ts +3 -0
  181. package/dist/cli/commands/finalize-runners.js +92 -0
  182. package/dist/cli/commands/finalize-selection.d.ts +65 -0
  183. package/dist/cli/commands/finalize-selection.js +35 -0
  184. package/dist/cli/commands/fixture-commands.d.ts +0 -2
  185. package/dist/cli/commands/fresh-context-commands.d.ts +0 -1
  186. package/dist/cli/commands/gate-commands-enforce.d.ts +0 -3
  187. package/dist/cli/commands/gate-commands-enforce.js +0 -4
  188. package/dist/cli/commands/gate-commands.js +26 -10
  189. package/dist/cli/commands/governance-classify-contract-commands.d.ts +0 -3
  190. package/dist/cli/commands/governance-classify-contract-commands.js +0 -4
  191. package/dist/cli/commands/heartbeat-commands-action.js +0 -6
  192. package/dist/cli/commands/heartbeat-commands-validation.d.ts +0 -2
  193. package/dist/cli/commands/heartbeat-commands-validation.js +0 -2
  194. package/dist/cli/commands/heartbeat-commands.d.ts +0 -1
  195. package/dist/cli/commands/heartbeat-commands.js +0 -1
  196. package/dist/cli/commands/hooks-commands.js +0 -11
  197. package/dist/cli/commands/ide-commands.d.ts +0 -1
  198. package/dist/cli/commands/job-add-slice-command.d.ts +0 -2
  199. package/dist/cli/commands/job-add-slice-command.js +0 -2
  200. package/dist/cli/commands/job-checkpoint-commands.d.ts +3 -0
  201. package/dist/cli/commands/job-checkpoint-commands.js +157 -0
  202. package/dist/cli/commands/job-command-shared.d.ts +109 -0
  203. package/dist/cli/commands/job-command-shared.js +72 -0
  204. package/dist/cli/commands/job-commands.d.ts +4 -64
  205. package/dist/cli/commands/job-commands.js +42 -556
  206. package/dist/cli/commands/job-cost-check-command.d.ts +3 -0
  207. package/dist/cli/commands/job-cost-check-command.js +41 -0
  208. package/dist/cli/commands/job-init-status-commands.d.ts +3 -0
  209. package/dist/cli/commands/job-init-status-commands.js +149 -0
  210. package/dist/cli/commands/job-run-commands.d.ts +3 -0
  211. package/dist/cli/commands/job-run-commands.js +97 -0
  212. package/dist/cli/commands/job-state-root.d.ts +35 -0
  213. package/dist/cli/commands/job-state-root.js +76 -0
  214. package/dist/cli/commands/lease-metrics-commands.d.ts +0 -1
  215. package/dist/cli/commands/lease-metrics-commands.js +0 -1
  216. package/dist/cli/commands/lease-stats-commands.d.ts +0 -1
  217. package/dist/cli/commands/lease-stats-commands.js +0 -1
  218. package/dist/cli/commands/log-commands.d.ts +0 -2
  219. package/dist/cli/commands/log-commands.js +0 -3
  220. package/dist/cli/commands/loop-eval-capture-index.d.ts +4 -0
  221. package/dist/cli/commands/loop-eval-capture-index.js +44 -0
  222. package/dist/cli/commands/loop-eval-commands.d.ts +8 -5
  223. package/dist/cli/commands/loop-eval-commands.js +12 -629
  224. package/dist/cli/commands/loop-eval-eval-command.d.ts +3 -0
  225. package/dist/cli/commands/loop-eval-eval-command.js +168 -0
  226. package/dist/cli/commands/loop-eval-monotonic-command.d.ts +3 -0
  227. package/dist/cli/commands/loop-eval-monotonic-command.js +90 -0
  228. package/dist/cli/commands/loop-eval-parents.d.ts +7 -0
  229. package/dist/cli/commands/loop-eval-parents.js +20 -0
  230. package/dist/cli/commands/loop-eval-run-code.d.ts +7 -0
  231. package/dist/cli/commands/loop-eval-run-code.js +40 -0
  232. package/dist/cli/commands/loop-eval-run-command.d.ts +3 -0
  233. package/dist/cli/commands/loop-eval-run-command.js +113 -0
  234. package/dist/cli/commands/loop-eval-spec-commands.d.ts +3 -0
  235. package/dist/cli/commands/loop-eval-spec-commands.js +165 -0
  236. package/dist/cli/commands/loop-eval-spec-lint-command.d.ts +3 -0
  237. package/dist/cli/commands/loop-eval-spec-lint-command.js +42 -0
  238. package/dist/cli/commands/loop-eval-workflow-commands.d.ts +3 -0
  239. package/dist/cli/commands/loop-eval-workflow-commands.js +141 -0
  240. package/dist/cli/commands/mcp-commands.d.ts +10 -0
  241. package/dist/cli/commands/mcp-commands.js +157 -0
  242. package/dist/cli/commands/memory-commands.d.ts +0 -1
  243. package/dist/cli/commands/memory-commands.js +0 -1
  244. package/dist/cli/commands/observability-commands.d.ts +0 -6
  245. package/dist/cli/commands/observability-commands.js +0 -6
  246. package/dist/cli/commands/outer-cache-commands.js +0 -2
  247. package/dist/cli/commands/playwright-commands.d.ts +0 -1
  248. package/dist/cli/commands/playwright-commands.js +0 -1
  249. package/dist/cli/commands/polyrepo-commands.d.ts +0 -1
  250. package/dist/cli/commands/prd-commands.d.ts +0 -1
  251. package/dist/cli/commands/prd-commands.js +0 -2
  252. package/dist/cli/commands/preferences-commands.js +0 -2
  253. package/dist/cli/commands/primer-command.d.ts +0 -1
  254. package/dist/cli/commands/primer-command.js +0 -1
  255. package/dist/cli/commands/project-commands.js +0 -1
  256. package/dist/cli/commands/qa-commands.d.ts +0 -1
  257. package/dist/cli/commands/qa-commands.js +0 -2
  258. package/dist/cli/commands/release-commands.js +0 -9
  259. package/dist/cli/commands/request-command-options.d.ts +49 -0
  260. package/dist/cli/commands/request-command-options.js +1 -0
  261. package/dist/cli/commands/request-commands.d.ts +3 -10
  262. package/dist/cli/commands/request-commands.js +17 -532
  263. package/dist/cli/commands/request-format-helpers.d.ts +0 -1
  264. package/dist/cli/commands/request-format-helpers.js +0 -2
  265. package/dist/cli/commands/request-init-command.d.ts +3 -0
  266. package/dist/cli/commands/request-init-command.js +100 -0
  267. package/dist/cli/commands/request-lint-command.d.ts +3 -0
  268. package/dist/cli/commands/request-lint-command.js +50 -0
  269. package/dist/cli/commands/request-list-command.d.ts +10 -0
  270. package/dist/cli/commands/request-list-command.js +53 -0
  271. package/dist/cli/commands/request-repair-status-command.d.ts +3 -0
  272. package/dist/cli/commands/request-repair-status-command.js +61 -0
  273. package/dist/cli/commands/request-show-command.d.ts +3 -0
  274. package/dist/cli/commands/request-show-command.js +56 -0
  275. package/dist/cli/commands/request-transition-command.d.ts +3 -0
  276. package/dist/cli/commands/request-transition-command.js +122 -0
  277. package/dist/cli/commands/request-transition-failures.d.ts +8 -0
  278. package/dist/cli/commands/request-transition-failures.js +90 -0
  279. package/dist/cli/commands/request-transition-hooks.d.ts +50 -0
  280. package/dist/cli/commands/request-transition-hooks.js +115 -0
  281. package/dist/cli/commands/request-transition-preflight.d.ts +10 -0
  282. package/dist/cli/commands/request-transition-preflight.js +107 -0
  283. package/dist/cli/commands/runtime-commands.d.ts +0 -1
  284. package/dist/cli/commands/sc-commands.js +0 -1
  285. package/dist/cli/commands/scan-command-shared.d.ts +96 -0
  286. package/dist/cli/commands/scan-command-shared.js +83 -0
  287. package/dist/cli/commands/scan-commands.d.ts +3 -2
  288. package/dist/cli/commands/scan-commands.js +23 -463
  289. package/dist/cli/commands/scan-inventory-commands.d.ts +3 -0
  290. package/dist/cli/commands/scan-inventory-commands.js +96 -0
  291. package/dist/cli/commands/scan-project-commands.d.ts +3 -0
  292. package/dist/cli/commands/scan-project-commands.js +65 -0
  293. package/dist/cli/commands/scan-scope-commands.d.ts +3 -0
  294. package/dist/cli/commands/scan-scope-commands.js +149 -0
  295. package/dist/cli/commands/scan-scope-helpers.d.ts +8 -0
  296. package/dist/cli/commands/scan-scope-helpers.js +54 -0
  297. package/dist/cli/commands/scan-structural-commands.d.ts +3 -0
  298. package/dist/cli/commands/scan-structural-commands.js +113 -0
  299. package/dist/cli/commands/session-24h-mode.d.ts +0 -1
  300. package/dist/cli/commands/session-24h-mode.js +0 -2
  301. package/dist/cli/commands/session-checkpoint-command.d.ts +0 -1
  302. package/dist/cli/commands/session-checkpoint-command.js +0 -1
  303. package/dist/cli/commands/session-resume-command.d.ts +0 -1
  304. package/dist/cli/commands/session-resume-command.js +0 -1
  305. package/dist/cli/commands/shadcn-commands.js +0 -2
  306. package/dist/cli/commands/share-commands.d.ts +12 -71
  307. package/dist/cli/commands/share-commands.js +47 -569
  308. package/dist/cli/commands/share-error-hints.d.ts +14 -0
  309. package/dist/cli/commands/share-error-hints.js +38 -0
  310. package/dist/cli/commands/share-identity.d.ts +13 -0
  311. package/dist/cli/commands/share-identity.js +22 -0
  312. package/dist/cli/commands/share-record-paths.d.ts +37 -0
  313. package/dist/cli/commands/share-record-paths.js +68 -0
  314. package/dist/cli/commands/share-runners.d.ts +3 -0
  315. package/dist/cli/commands/share-runners.js +158 -0
  316. package/dist/cli/commands/shared-read-runners.d.ts +3 -0
  317. package/dist/cli/commands/shared-read-runners.js +51 -0
  318. package/dist/cli/commands/skill-search-commands.d.ts +0 -2
  319. package/dist/cli/commands/slice-check-command.d.ts +3 -0
  320. package/dist/cli/commands/slice-check-command.js +54 -0
  321. package/dist/cli/commands/slice-commands.d.ts +2 -22
  322. package/dist/cli/commands/slice-commands.js +18 -519
  323. package/dist/cli/commands/slice-decompose-artifacts.d.ts +18 -0
  324. package/dist/cli/commands/slice-decompose-artifacts.js +79 -0
  325. package/dist/cli/commands/slice-decompose-command.d.ts +3 -0
  326. package/dist/cli/commands/slice-decompose-command.js +123 -0
  327. package/dist/cli/commands/slice-integrate-commands.js +0 -1
  328. package/dist/cli/commands/slice-list-commands.d.ts +3 -0
  329. package/dist/cli/commands/slice-list-commands.js +182 -0
  330. package/dist/cli/commands/slice-pick-command.d.ts +3 -0
  331. package/dist/cli/commands/slice-pick-command.js +60 -0
  332. package/dist/cli/commands/slice-plan-command.d.ts +24 -0
  333. package/dist/cli/commands/slice-plan-command.js +111 -0
  334. package/dist/cli/commands/spill-demo-command.d.ts +0 -1
  335. package/dist/cli/commands/statusline-commands.js +0 -4
  336. package/dist/cli/commands/sub-agent/detached.js +0 -2
  337. package/dist/cli/commands/sub-agent-commands.d.ts +0 -3
  338. package/dist/cli/commands/sub-agent-shared.d.ts +0 -8
  339. package/dist/cli/commands/sub-agent-shared.js +0 -5
  340. package/dist/cli/commands/sub-agent-shutdown-commands.d.ts +0 -1
  341. package/dist/cli/commands/tech-commands.d.ts +0 -4
  342. package/dist/cli/commands/tech-commands.js +0 -4
  343. package/dist/cli/commands/vendor-detect.d.ts +0 -3
  344. package/dist/cli/commands/vendor-detect.js +0 -2
  345. package/dist/cli/commands/verdict-aggregate-command.d.ts +0 -1
  346. package/dist/cli/commands/verdict-aggregate-command.js +0 -7
  347. package/dist/cli/commands/vm-commands.d.ts +0 -1
  348. package/dist/cli/commands/vm-commands.js +5 -29
  349. package/dist/cli/commands/vm-hypervisor-probe.d.ts +27 -0
  350. package/dist/cli/commands/vm-hypervisor-probe.js +78 -0
  351. package/dist/cli/commands/vm-status-command.d.ts +3 -0
  352. package/dist/cli/commands/vm-status-command.js +50 -0
  353. package/dist/cli/commands/wave-plan-commands.d.ts +0 -1
  354. package/dist/cli/commands/web-lifecycle-commands.d.ts +0 -1
  355. package/dist/cli/commands/workflow-commands.d.ts +10 -1
  356. package/dist/cli/commands/workflow-commands.js +6 -608
  357. package/dist/cli/commands/workflow-gate-commands.d.ts +3 -0
  358. package/dist/cli/commands/workflow-gate-commands.js +116 -0
  359. package/dist/cli/commands/workflow-plan-commands-actions.js +0 -2
  360. package/dist/cli/commands/workflow-plan-commands-session.js +0 -2
  361. package/dist/cli/commands/workflow-plan-commands.d.ts +0 -1
  362. package/dist/cli/commands/workflow-plan-helpers.d.ts +48 -0
  363. package/dist/cli/commands/workflow-plan-helpers.js +103 -0
  364. package/dist/cli/commands/workflow-planning-commands.d.ts +3 -0
  365. package/dist/cli/commands/workflow-planning-commands.js +56 -0
  366. package/dist/cli/commands/workflow-swarm-actions.d.ts +7 -0
  367. package/dist/cli/commands/workflow-swarm-actions.js +109 -0
  368. package/dist/cli/commands/workflow-swarm-commands.d.ts +3 -0
  369. package/dist/cli/commands/workflow-swarm-commands.js +138 -0
  370. package/dist/cli/commands/workflow-tech-actions.d.ts +10 -0
  371. package/dist/cli/commands/workflow-tech-actions.js +150 -0
  372. package/dist/cli/commands/workspace/clean-command.d.ts +0 -1
  373. package/dist/cli/commands/workspace/clean-command.js +0 -1
  374. package/dist/cli/commands/workspace/helpers.d.ts +0 -1
  375. package/dist/cli/commands/workspace/helpers.js +0 -1
  376. package/dist/cli/commands/workspace/init-actions.d.ts +10 -0
  377. package/dist/cli/commands/workspace/init-actions.js +199 -0
  378. package/dist/cli/commands/workspace/init-codegraph-stake.d.ts +10 -0
  379. package/dist/cli/commands/workspace/init-codegraph-stake.js +54 -0
  380. package/dist/cli/commands/workspace/init-command.d.ts +8 -130
  381. package/dist/cli/commands/workspace/init-command.js +59 -640
  382. package/dist/cli/commands/workspace/init-context.d.ts +58 -0
  383. package/dist/cli/commands/workspace/init-context.js +121 -0
  384. package/dist/cli/commands/workspace/init-envelope.d.ts +3 -0
  385. package/dist/cli/commands/workspace/init-envelope.js +34 -0
  386. package/dist/cli/commands/workspace/init-failures.d.ts +3 -0
  387. package/dist/cli/commands/workspace/init-failures.js +84 -0
  388. package/dist/cli/commands/workspace/init-hooks-decision.d.ts +24 -0
  389. package/dist/cli/commands/workspace/init-hooks-decision.js +189 -0
  390. package/dist/cli/commands/workspace/init-options.d.ts +102 -0
  391. package/dist/cli/commands/workspace/init-options.js +1 -0
  392. package/dist/cli/commands/workspace/migrate-command.d.ts +0 -2
  393. package/dist/cli/commands/workspace/migrate-command.js +0 -2
  394. package/dist/cli/commands/workspace/reconcile-command.d.ts +0 -2
  395. package/dist/cli/commands/workspace/reconcile-command.js +0 -3
  396. package/dist/cli/commands/workspace-commands.d.ts +0 -2
  397. package/dist/cli/commands/workspace-commands.js +0 -4
  398. package/dist/cli/commands/worktree-auth-commands.d.ts +0 -1
  399. package/dist/cli/commands/worktree-auth-commands.js +0 -1
  400. package/dist/cli/commands/worktree-auth-grant-command.d.ts +0 -1
  401. package/dist/cli/commands/worktree-auth-grant-command.js +0 -1
  402. package/dist/cli/commands/worktree-auth-manage-commands.d.ts +0 -1
  403. package/dist/cli/commands/worktree-auth-manage-commands.js +0 -1
  404. package/dist/cli/commands/worktree-lease-commands.d.ts +10 -6
  405. package/dist/cli/commands/worktree-lease-commands.js +42 -513
  406. package/dist/cli/commands/worktree-lease-gc-command.d.ts +12 -0
  407. package/dist/cli/commands/worktree-lease-gc-command.js +117 -0
  408. package/dist/cli/commands/worktree-lease-git.d.ts +22 -0
  409. package/dist/cli/commands/worktree-lease-git.js +48 -0
  410. package/dist/cli/commands/worktree-lease-list-command.d.ts +12 -0
  411. package/dist/cli/commands/worktree-lease-list-command.js +100 -0
  412. package/dist/cli/commands/worktree-lease-load.d.ts +37 -0
  413. package/dist/cli/commands/worktree-lease-load.js +28 -0
  414. package/dist/cli/commands/worktree-lease-release-command.d.ts +13 -0
  415. package/dist/cli/commands/worktree-lease-release-command.js +105 -0
  416. package/dist/cli/commands/worktree-lease-renew-command.d.ts +11 -0
  417. package/dist/cli/commands/worktree-lease-renew-command.js +99 -0
  418. package/dist/cli/commands/worktree-lease-session.d.ts +22 -0
  419. package/dist/cli/commands/worktree-lease-session.js +29 -0
  420. package/dist/cli/commands/worktree-lease-spawn-command.d.ts +11 -0
  421. package/dist/cli/commands/worktree-lease-spawn-command.js +119 -0
  422. package/dist/cli/commands/worktree-lease-status-command.d.ts +11 -0
  423. package/dist/cli/commands/worktree-lease-status-command.js +86 -0
  424. package/dist/cli/commands/worktree-lease-store.d.ts +19 -0
  425. package/dist/cli/commands/worktree-lease-store.js +24 -0
  426. package/dist/cli/program.js +5 -7
  427. package/dist/reporters/bdd-reporter.js +0 -1
  428. package/dist/services/24h-mode/auto-engage.d.ts +0 -1
  429. package/dist/services/24h-mode/auto-engage.js +0 -1
  430. package/dist/services/24h-mode/decider.d.ts +0 -3
  431. package/dist/services/24h-mode/decider.js +0 -3
  432. package/dist/services/24h-mode/index.d.ts +0 -2
  433. package/dist/services/24h-mode/index.js +0 -2
  434. package/dist/services/24h-mode/state.d.ts +0 -1
  435. package/dist/services/24h-mode/state.js +0 -1
  436. package/dist/services/24h-mode/store.d.ts +0 -1
  437. package/dist/services/24h-mode/store.js +0 -1
  438. package/dist/services/adapter/adapter-registry.js +0 -1
  439. package/dist/services/artifacts/artifact-prerequisites.d.ts +0 -5
  440. package/dist/services/artifacts/artifact-prerequisites.js +0 -19
  441. package/dist/services/artifacts/artifact-templates.d.ts +0 -1
  442. package/dist/services/artifacts/artifact-templates.js +0 -1
  443. package/dist/services/artifacts/request-artifact-service.d.ts +0 -5
  444. package/dist/services/artifacts/request-artifact-service.js +0 -12
  445. package/dist/services/artifacts/request-artifact-state-helpers.d.ts +0 -1
  446. package/dist/services/artifacts/request-artifact-state-helpers.js +0 -1
  447. package/dist/services/audit/artifact-writer.d.ts +0 -1
  448. package/dist/services/audit/artifact-writer.js +0 -1
  449. package/dist/services/audit/decision-writer.js +3 -1
  450. package/dist/services/audit/enforcer-liveness.js +0 -1
  451. package/dist/services/audit/enforcers/active-skill-resolver.d.ts +0 -2
  452. package/dist/services/audit/enforcers/active-skill-resolver.js +0 -2
  453. package/dist/services/audit/red-line-audit-input.d.ts +11 -0
  454. package/dist/services/audit/red-line-audit-input.js +103 -0
  455. package/dist/services/audit/red-line-catalog-p2-a-bee-runtime.d.ts +0 -1
  456. package/dist/services/audit/red-line-catalog-p2-a.js +0 -9
  457. package/dist/services/audit/types.d.ts +0 -2
  458. package/dist/services/audit/types.js +0 -2
  459. package/dist/services/audit-independent/perf-audit-service.d.ts +0 -2
  460. package/dist/services/audit-independent/security-audit-service.d.ts +0 -5
  461. package/dist/services/audit-independent/security-audit-service.js +0 -2
  462. package/dist/services/autonomous-swarm/autonomous-swarm-service.d.ts +0 -5
  463. package/dist/services/autonomous-swarm/autonomous-swarm-service.js +0 -5
  464. package/dist/services/best-practice/language-detector.js +0 -1
  465. package/dist/services/best-practice/output-formatter.d.ts +0 -1
  466. package/dist/services/best-practice/scan-orchestrator.d.ts +0 -1
  467. package/dist/services/capability-audit-service/types.d.ts +1 -3
  468. package/dist/services/capability-guard-runner/contracts/J08.js +2 -2
  469. package/dist/services/changeset/changeset-check-service.d.ts +0 -3
  470. package/dist/services/changeset/changeset-check-service.js +0 -3
  471. package/dist/services/classify/classify-service.d.ts +0 -1
  472. package/dist/services/classify/classify-service.js +0 -1
  473. package/dist/services/classify/classify-types.d.ts +0 -1
  474. package/dist/services/classify/classify-types.js +0 -1
  475. package/dist/services/code/auto-compact-lifecycle.d.ts +0 -11
  476. package/dist/services/code/auto-compact-lifecycle.js +0 -10
  477. package/dist/services/code/auto-compact-modes.d.ts +0 -3
  478. package/dist/services/code/auto-compact-modes.js +0 -3
  479. package/dist/services/code/auto-compact-orchestrator.d.ts +0 -9
  480. package/dist/services/code/auto-compact-orchestrator.js +0 -29
  481. package/dist/services/code/batch-heartbeat-poller.js +0 -1
  482. package/dist/services/code/compact-event-settle.js +0 -1
  483. package/dist/services/code/dag-orchestrator.d.ts +0 -1
  484. package/dist/services/code/dag-orchestrator.js +0 -1
  485. package/dist/services/code/mode-gate-types.d.ts +0 -2
  486. package/dist/services/code/mode-gate-types.js +0 -1
  487. package/dist/services/code/mode-gate.d.ts +0 -5
  488. package/dist/services/code/mode-gate.js +0 -5
  489. package/dist/services/code/orchestrator-can-do-advisories.d.ts +0 -2
  490. package/dist/services/code/orchestrator-can-do-advisories.js +0 -5
  491. package/dist/services/code/orchestrator-can-do.d.ts +0 -4
  492. package/dist/services/code/orchestrator-can-do.js +0 -3
  493. package/dist/services/code/status-line-renderer.js +0 -1
  494. package/dist/services/code-review/ecc-bridge.d.ts +0 -1
  495. package/dist/services/codegraph/codegraph-autorefresh.js +6 -4
  496. package/dist/services/codegraph/codegraph-backend-advice.d.ts +26 -0
  497. package/dist/services/codegraph/codegraph-backend-advice.js +166 -0
  498. package/dist/services/codegraph/codegraph-config-repair-writer.d.ts +0 -24
  499. package/dist/services/codegraph/codegraph-config-repair-writer.js +32 -73
  500. package/dist/services/codegraph/codegraph-exclude-integrity.d.ts +14 -6
  501. package/dist/services/codegraph/codegraph-exclude-integrity.js +24 -14
  502. package/dist/services/codegraph/codegraph-exclude-reconciler.d.ts +9 -2
  503. package/dist/services/codegraph/codegraph-exclude-reconciler.js +87 -18
  504. package/dist/services/codegraph/codegraph-exclude-repair.d.ts +9 -61
  505. package/dist/services/codegraph/codegraph-exclude-repair.js +67 -139
  506. package/dist/services/codegraph/codegraph-foreign-removal.d.ts +21 -0
  507. package/dist/services/codegraph/codegraph-foreign-removal.js +77 -0
  508. package/dist/services/codegraph/codegraph-index-integrity.d.ts +12 -25
  509. package/dist/services/codegraph/codegraph-index-integrity.js +84 -23
  510. package/dist/services/codegraph/codegraph-preflight-service.js +15 -6
  511. package/dist/services/codegraph/codegraph-project-config.d.ts +35 -0
  512. package/dist/services/codegraph/codegraph-project-config.js +90 -0
  513. package/dist/services/codegraph/codegraph-service.d.ts +1 -2
  514. package/dist/services/codegraph/codegraph-service.js +11 -11
  515. package/dist/services/codegraph/codegraph-upstream-layout.d.ts +24 -0
  516. package/dist/services/codegraph/codegraph-upstream-layout.js +85 -0
  517. package/dist/services/comments/comment-audit.d.ts +15 -4
  518. package/dist/services/comments/comment-audit.js +25 -4
  519. package/dist/services/comments/comment-citations.d.ts +8 -2
  520. package/dist/services/comments/comment-citations.js +31 -33
  521. package/dist/services/comments/comment-hygiene.d.ts +29 -3
  522. package/dist/services/comments/comment-hygiene.js +40 -3
  523. package/dist/services/comments/comment-prune.js +52 -4
  524. package/dist/services/comments/comment-spans.d.ts +30 -0
  525. package/dist/services/comments/comment-spans.js +266 -0
  526. package/dist/services/comments/prune-apply.d.ts +22 -0
  527. package/dist/services/comments/prune-apply.js +69 -2
  528. package/dist/services/compact/decision-tables.d.ts +0 -2
  529. package/dist/services/compact/decision-tables.js +0 -2
  530. package/dist/services/compact/request-transition-hook.js +0 -2
  531. package/dist/services/compact-history/compact-history-service.d.ts +0 -2
  532. package/dist/services/compact-history/compact-history-service.js +0 -1
  533. package/dist/services/compact-statusline/compact-lifecycle-store.js +0 -2
  534. package/dist/services/compact-statusline/compact-lifecycle-types.d.ts +0 -1
  535. package/dist/services/compact-statusline/compact-statusline-service.js +0 -4
  536. package/dist/services/config/config-rollback.js +0 -1
  537. package/dist/services/config/config-safety.d.ts +0 -1
  538. package/dist/services/config/config-safety.js +0 -1
  539. package/dist/services/config/config-service.d.ts +0 -1
  540. package/dist/services/config/config-service.js +0 -1
  541. package/dist/services/config/model-routing.d.ts +0 -3
  542. package/dist/services/config/model-routing.js +0 -5
  543. package/dist/services/container/container-lease.d.ts +0 -1
  544. package/dist/services/container/container-lease.js +0 -1
  545. package/dist/services/context/artifact-meta.js +0 -1
  546. package/dist/services/context/auto-compact-dispatcher-input.d.ts +0 -3
  547. package/dist/services/context/auto-compact-dispatcher.js +0 -14
  548. package/dist/services/context/auto-compact-reader-input.d.ts +0 -1
  549. package/dist/services/context/auto-compact-reader.d.ts +0 -2
  550. package/dist/services/context/auto-compact-reader.js +0 -7
  551. package/dist/services/context/auto-compact-types.d.ts +0 -11
  552. package/dist/services/context/auto-compact-types.js +0 -1
  553. package/dist/services/context/build-dispatch-system-prompt.d.ts +11 -29
  554. package/dist/services/context/build-dispatch-system-prompt.js +8 -27
  555. package/dist/services/context/codegraph-unavailable-block.d.ts +38 -0
  556. package/dist/services/context/codegraph-unavailable-block.js +77 -0
  557. package/dist/services/context/context-audit-hint.d.ts +0 -1
  558. package/dist/services/context/context-audit-hint.js +0 -1
  559. package/dist/services/context/context-audit.d.ts +0 -1
  560. package/dist/services/context/context-audit.js +0 -1
  561. package/dist/services/context/harness-window-config.d.ts +0 -4
  562. package/dist/services/context/harness-window-config.js +0 -4
  563. package/dist/services/context/main-session-monitor.d.ts +0 -2
  564. package/dist/services/context/main-session-monitor.js +0 -2
  565. package/dist/services/context/memory-index-reader.d.ts +0 -2
  566. package/dist/services/context/memory-index-reader.js +0 -1
  567. package/dist/services/context/memory-preflight-config.d.ts +0 -1
  568. package/dist/services/context/memory-preflight-service.d.ts +0 -1
  569. package/dist/services/context/memory-preflight-service.js +0 -3
  570. package/dist/services/context/memory-preflight-support.d.ts +0 -5
  571. package/dist/services/context/post-compact-reinjection.d.ts +0 -1
  572. package/dist/services/context/post-compact-reinjection.js +0 -1
  573. package/dist/services/context/summary-view.d.ts +0 -1
  574. package/dist/services/context/summary-view.js +0 -1
  575. package/dist/services/crystallization/crystallization-service.d.ts +5 -11
  576. package/dist/services/crystallization/crystallization-service.js +3 -11
  577. package/dist/services/crystallization/crystallization-store.d.ts +6 -6
  578. package/dist/services/dispatch/await-batch-helpers.js +0 -3
  579. package/dist/services/dispatch/await-batch.d.ts +0 -1
  580. package/dist/services/dispatch/await-batch.js +0 -4
  581. package/dist/services/dispatch/batch-counter.js +0 -1
  582. package/dist/services/dispatch/conflict-replay.d.ts +0 -1
  583. package/dist/services/dispatch/conflict-replay.js +0 -1
  584. package/dist/services/dispatch/contract-store.d.ts +0 -2
  585. package/dist/services/dispatch/contract-store.js +0 -2
  586. package/dist/services/dispatch/dispatch-record-input-types.d.ts +0 -2
  587. package/dist/services/dispatch/dispatch-record-types.d.ts +0 -10
  588. package/dist/services/dispatch/dispatch-record-upgrade-fields.js +0 -7
  589. package/dist/services/dispatch/dispatch-record-upgrade-guards.js +0 -2
  590. package/dist/services/dispatch/dispatch-record-writer.d.ts +0 -5
  591. package/dist/services/dispatch/dispatch-record-writer.js +0 -21
  592. package/dist/services/dispatch/dispatch-sub-agent.d.ts +0 -1
  593. package/dist/services/dispatch/dispatch-sub-agent.js +0 -1
  594. package/dist/services/dispatch/e2e-fixtures.js +0 -1
  595. package/dist/services/dispatch/file-overlap-wave-planner.d.ts +0 -1
  596. package/dist/services/dispatch/file-overlap-wave-planner.js +0 -1
  597. package/dist/services/dispatch/isolation-lease.d.ts +0 -2
  598. package/dist/services/dispatch/isolation-lease.js +0 -2
  599. package/dist/services/dispatch/service-shutdown.js +0 -1
  600. package/dist/services/dispatch/session-capsule.js +0 -1
  601. package/dist/services/dispatch/slice-dag-types.d.ts +0 -1
  602. package/dist/services/dispatch/slice-dag.js +0 -2
  603. package/dist/services/dispatch/stage-enum.d.ts +0 -1
  604. package/dist/services/dispatch/stage-enum.js +0 -1
  605. package/dist/services/dispatch/startup-timeout.d.ts +0 -1
  606. package/dist/services/dispatch/sub-agent-batch-await.js +0 -3
  607. package/dist/services/dispatch/sub-agent-dispatcher-types.d.ts +0 -1
  608. package/dist/services/dispatch/sub-agent-dispatcher.js +0 -2
  609. package/dist/services/dispatch/test-tool-detection.d.ts +0 -3
  610. package/dist/services/dispatch/test-tool-detection.js +0 -2
  611. package/dist/services/distribution/mcp-install-runner.d.ts +21 -0
  612. package/dist/services/distribution/mcp-install-runner.js +59 -0
  613. package/dist/services/distribution/mcp-install.d.ts +95 -0
  614. package/dist/services/distribution/mcp-install.js +179 -0
  615. package/dist/services/distribution/plugin-manifest.d.ts +97 -0
  616. package/dist/services/distribution/plugin-manifest.js +126 -0
  617. package/dist/services/doctor/doctor-service/checks/codegraph-capability.js +19 -12
  618. package/dist/services/doctor/doctor-service/checks/codegraph-index-integrity.js +1 -2
  619. package/dist/services/doctor/doctor-service/checks/l3-memory-health.d.ts +0 -2
  620. package/dist/services/doctor/doctor-service/checks/l3-memory-health.js +0 -2
  621. package/dist/services/doctor/doctor-service/checks/l3-orphan-sessions.d.ts +0 -1
  622. package/dist/services/doctor/doctor-service/checks/l3-orphan-sessions.js +0 -1
  623. package/dist/services/doctor/doctor-service/checks/multi-binary-drift.d.ts +0 -1
  624. package/dist/services/doctor/doctor-service/checks/multi-binary-drift.js +0 -3
  625. package/dist/services/doctor/doctor-service/checks/workspace-layout.js +0 -2
  626. package/dist/services/doctor/doctor-service/index.d.ts +0 -1
  627. package/dist/services/doctor/doctor-service/index.js +0 -1
  628. package/dist/services/doctor/doctor-service/plugin-registry.d.ts +0 -2
  629. package/dist/services/doctor/doctor-service/plugin-registry.js +0 -2
  630. package/dist/services/doctor/doctor-service/probe-types.d.ts +0 -4
  631. package/dist/services/doctor/doctor-service/report/final-summary.d.ts +0 -1
  632. package/dist/services/doctor/doctor-service/report/final-summary.js +0 -1
  633. package/dist/services/doctor/doctor-service/types.d.ts +0 -5
  634. package/dist/services/doctor/doctor-service/types.js +0 -1
  635. package/dist/services/doctor/doctor-service.d.ts +0 -1
  636. package/dist/services/doctor/doctor-service.js +0 -2
  637. package/dist/services/env/shell-probe.js +0 -1
  638. package/dist/services/evidence/evidence-generator.js +0 -8
  639. package/dist/services/evolution/evolution-constraints.d.ts +0 -2
  640. package/dist/services/evolution/evolution-constraints.js +0 -2
  641. package/dist/services/evolution/evolution-service.d.ts +2 -12
  642. package/dist/services/evolution/evolution-service.js +0 -9
  643. package/dist/services/evolution/evolution-store.d.ts +6 -8
  644. package/dist/services/evolution/evolution-store.js +1 -3
  645. package/dist/services/evolution/evolution-types.d.ts +0 -2
  646. package/dist/services/evolution/evolution-types.js +0 -6
  647. package/dist/services/evolution/independent-evaluator-runner.d.ts +0 -3
  648. package/dist/services/evolution/independent-evaluator-runner.js +0 -1
  649. package/dist/services/evolution/regression-skeptic-runner.d.ts +0 -1
  650. package/dist/services/feedback/feedback-promotion-service.d.ts +0 -8
  651. package/dist/services/feedback/feedback-promotion-service.js +0 -10
  652. package/dist/services/feedback/promotion-artifact-evidence.d.ts +0 -1
  653. package/dist/services/feedback/promotion-artifact-evidence.js +0 -1
  654. package/dist/services/final-review/final-review-evidence-budget.d.ts +0 -3
  655. package/dist/services/final-review/final-review-evidence-budget.js +0 -5
  656. package/dist/services/final-review/final-review-evidence-sources.d.ts +0 -1
  657. package/dist/services/final-review/final-review-evidence-sources.js +0 -1
  658. package/dist/services/final-review/final-review-output-budget.d.ts +0 -1
  659. package/dist/services/final-review/final-review-output-budget.js +0 -3
  660. package/dist/services/final-review/final-review-service.d.ts +0 -1
  661. package/dist/services/final-review/final-review-service.js +0 -1
  662. package/dist/services/fixture/fixture-capture-service.js +0 -1
  663. package/dist/services/fixture/fixture-sanitize-service.d.ts +0 -3
  664. package/dist/services/fixture/fixture-sanitize-service.js +0 -3
  665. package/dist/services/fresh-context/config.js +0 -1
  666. package/dist/services/fresh-context/fresh-context-block.js +0 -1
  667. package/dist/services/fresh-context/trigger-scan.d.ts +0 -1
  668. package/dist/services/fresh-context/trigger-scan.js +0 -1
  669. package/dist/services/fuzzy-matching/fzf-pick-service.d.ts +0 -1
  670. package/dist/services/fuzzy-matching/fzf-pick-service.js +0 -1
  671. package/dist/services/handoff/handoff-parser.d.ts +0 -1
  672. package/dist/services/handoff/handoff-parser.js +0 -1
  673. package/dist/services/handoff/handoff-types.d.ts +0 -1
  674. package/dist/services/handoff/handoff-types.js +0 -1
  675. package/dist/services/handoff/handoff-writer.d.ts +0 -1
  676. package/dist/services/handoff/handoff-writer.js +0 -1
  677. package/dist/services/hooks/auto-compact-hook-install.d.ts +0 -1
  678. package/dist/services/hooks/auto-compact-hook-install.js +0 -1
  679. package/dist/services/hooks/mcp-surface-gate.d.ts +19 -0
  680. package/dist/services/hooks/mcp-surface-gate.js +87 -0
  681. package/dist/services/hooks/output.d.ts +0 -1
  682. package/dist/services/hooks/output.js +0 -1
  683. package/dist/services/hooks/pre-tool-code-gate.d.ts +0 -1
  684. package/dist/services/hooks/pre-tool-code-gate.js +0 -1
  685. package/dist/services/hooks/presence-marker-detector.js +0 -1
  686. package/dist/services/hooks/worktree-authorization-gate.d.ts +0 -3
  687. package/dist/services/hooks/worktree-authorization-gate.js +0 -1
  688. package/dist/services/ide/adapters/claude-code-adapter.d.ts +4 -40
  689. package/dist/services/ide/adapters/claude-code-adapter.js +48 -182
  690. package/dist/services/ide/adapters/claude-code-local-state.d.ts +28 -0
  691. package/dist/services/ide/adapters/claude-code-local-state.js +112 -0
  692. package/dist/services/ide/adapters/claude-code-model-window.d.ts +37 -0
  693. package/dist/services/ide/adapters/claude-code-model-window.js +113 -0
  694. package/dist/services/ide/adapters/qoder-adapter.d.ts +0 -3
  695. package/dist/services/ide/adapters/qoder-adapter.js +0 -5
  696. package/dist/services/ide/adapters/tongyi-lingma-adapter.d.ts +0 -2
  697. package/dist/services/ide/adapters/tongyi-lingma-adapter.js +0 -2
  698. package/dist/services/ide/adapters/trae-adapter.d.ts +0 -3
  699. package/dist/services/ide/adapters/trae-adapter.js +3 -6
  700. package/dist/services/ide/adapters/zcode-adapter.js +0 -2
  701. package/dist/services/ide/current-model-detector.js +0 -1
  702. package/dist/services/ide/hook-protocol.d.ts +0 -2
  703. package/dist/services/ide/hook-protocol.js +0 -2
  704. package/dist/services/ide/ide-compact-types.d.ts +0 -7
  705. package/dist/services/ide/ide-mcp-install-types.d.ts +78 -0
  706. package/dist/services/ide/ide-mcp-install-types.js +104 -0
  707. package/dist/services/ide/ide-types.d.ts +45 -13
  708. package/dist/services/ide/mcp-tool-matcher.d.ts +34 -0
  709. package/dist/services/ide/mcp-tool-matcher.js +84 -0
  710. package/dist/services/ide/resource-profile.d.ts +0 -1
  711. package/dist/services/job/job-commit-verification.d.ts +0 -2
  712. package/dist/services/job/job-commit-verification.js +0 -2
  713. package/dist/services/job/job-orchestrator.d.ts +0 -1
  714. package/dist/services/job/job-orchestrator.js +0 -1
  715. package/dist/services/job/job-progress-store.d.ts +0 -2
  716. package/dist/services/job/job-progress-store.js +0 -3
  717. package/dist/services/job/job-types.js +0 -1
  718. package/dist/services/job-snapshot/snapshot.js +0 -1
  719. package/dist/services/karpathy-cost/karpathy-cost-check-service.js +0 -1
  720. package/dist/services/legacy/legacy-detector.js +0 -1
  721. package/dist/services/lint/npx-resolver.js +7 -0
  722. package/dist/services/log/log-commands-service.d.ts +0 -2
  723. package/dist/services/log/log-commands-service.js +0 -2
  724. package/dist/services/log/logger.d.ts +0 -1
  725. package/dist/services/log/logger.js +0 -1
  726. package/dist/services/log/redact.d.ts +0 -1
  727. package/dist/services/log/redact.js +0 -1
  728. package/dist/services/log/retention.d.ts +0 -1
  729. package/dist/services/log/retention.js +0 -1
  730. package/dist/services/loop/loop-bee-relation-service.d.ts +3 -3
  731. package/dist/services/loop/loop-bee-relation-service.js +14 -13
  732. package/dist/services/loop/loop-bee-relation-store.d.ts +9 -10
  733. package/dist/services/loop/loop-bee-relation-store.js +1 -2
  734. package/dist/services/loop/loop-bee-relation-types.d.ts +1 -1
  735. package/dist/services/loop/loop-bee-relation-types.js +1 -1
  736. package/dist/services/loop/loop-release-service.d.ts +3 -3
  737. package/dist/services/loop/loop-release-service.js +1 -1
  738. package/dist/services/loop/loop-release-store.d.ts +6 -7
  739. package/dist/services/loop/loop-release-store.js +0 -1
  740. package/dist/services/loop/monotonic-guard.d.ts +0 -1
  741. package/dist/services/loop/monotonic-guard.js +0 -1
  742. package/dist/services/mcp/cli-executor.d.ts +36 -0
  743. package/dist/services/mcp/cli-executor.js +97 -0
  744. package/dist/services/mcp/json-rpc.d.ts +81 -0
  745. package/dist/services/mcp/json-rpc.js +116 -0
  746. package/dist/services/mcp/memory-tool.d.ts +3 -0
  747. package/dist/services/mcp/memory-tool.js +62 -0
  748. package/dist/services/mcp/server-main.d.ts +1 -0
  749. package/dist/services/mcp/server-main.js +66 -0
  750. package/dist/services/mcp/server.d.ts +22 -0
  751. package/dist/services/mcp/server.js +152 -0
  752. package/dist/services/mcp/surface.d.ts +62 -0
  753. package/dist/services/mcp/surface.js +198 -0
  754. package/dist/services/mcp/tool-core.d.ts +42 -0
  755. package/dist/services/mcp/tool-core.js +137 -0
  756. package/dist/services/mcp/tools.d.ts +13 -0
  757. package/dist/services/mcp/tools.js +58 -0
  758. package/dist/services/memory/memory-ingest-service.js +0 -1
  759. package/dist/services/memory/project-context-service.d.ts +0 -1
  760. package/dist/services/memory/project-context-service.js +0 -1
  761. package/dist/services/memory/project-memory-service/index/reindex.d.ts +0 -2
  762. package/dist/services/memory/project-memory-service/index/reindex.js +0 -1
  763. package/dist/services/memory/project-memory-service/index/search.d.ts +0 -1
  764. package/dist/services/memory/project-memory-service/index/search.js +0 -1
  765. package/dist/services/memory/project-memory-service/memory-kinds.d.ts +0 -1
  766. package/dist/services/memory/project-memory-service/memory-kinds.js +0 -1
  767. package/dist/services/memory/project-memory-service/parsers/frontmatter.d.ts +0 -1
  768. package/dist/services/memory/project-memory-service/parsers/frontmatter.js +0 -1
  769. package/dist/services/memory/project-memory-service.js +0 -1
  770. package/dist/services/mode/mode-enforcement.js +0 -1
  771. package/dist/services/mode/mode-status-service.d.ts +0 -2
  772. package/dist/services/mode/mode-status-service.js +0 -2
  773. package/dist/services/observability/aggregation.d.ts +0 -4
  774. package/dist/services/observability/aggregation.js +0 -6
  775. package/dist/services/observability/observability-schema.js +0 -1
  776. package/dist/services/observability/observability-service.d.ts +0 -5
  777. package/dist/services/observability/observability-service.js +0 -4
  778. package/dist/services/observability/report-formatter.d.ts +0 -2
  779. package/dist/services/observability/report-formatter.js +0 -2
  780. package/dist/services/openspec/artifact-boundary.d.ts +0 -4
  781. package/dist/services/openspec/artifact-boundary.js +0 -4
  782. package/dist/services/openspec/coverage-evidence-reader.d.ts +0 -1
  783. package/dist/services/openspec/coverage-evidence-reader.js +0 -1
  784. package/dist/services/polyrepo/polyrepo-dispatcher.js +0 -1
  785. package/dist/services/polyrepo/polyrepo-scanner.js +0 -1
  786. package/dist/services/polyrepo/polyrepo-service.js +0 -1
  787. package/dist/services/polyrepo/polyrepo-types.d.ts +0 -1
  788. package/dist/services/prd/best-practice-auto-trigger.d.ts +0 -2
  789. package/dist/services/prd/best-practice-auto-trigger.js +0 -2
  790. package/dist/services/prd/gate-evidence-derivation.d.ts +0 -4
  791. package/dist/services/prd/gate-evidence-derivation.js +0 -5
  792. package/dist/services/prd/handoff-auto-regen.js +0 -5
  793. package/dist/services/prd/handoff-frontmatter-shape.d.ts +0 -2
  794. package/dist/services/prd/handoff-frontmatter-shape.js +0 -2
  795. package/dist/services/prd/handoff-frontmatter.d.ts +0 -1
  796. package/dist/services/prd/handoff-frontmatter.js +0 -2
  797. package/dist/services/prd/handoff-gate-evidence.d.ts +0 -1
  798. package/dist/services/prd/handoff-gate-evidence.js +0 -4
  799. package/dist/services/prd/handoff-path-resolution.d.ts +0 -7
  800. package/dist/services/prd/handoff-path-resolution.js +0 -10
  801. package/dist/services/prd/handoff-service.d.ts +0 -2
  802. package/dist/services/prd/handoff-service.js +0 -2
  803. package/dist/services/prd/handoff-types.d.ts +0 -2
  804. package/dist/services/prd/handoff-types.js +0 -1
  805. package/dist/services/prd/project-scan-bootstrap-service.d.ts +0 -1
  806. package/dist/services/prd/project-scan-bootstrap-service.js +0 -4
  807. package/dist/services/prd/project-scan-types.d.ts +0 -1
  808. package/dist/services/prd/project-scan-types.js +0 -1
  809. package/dist/services/preferences/preferences-service.d.ts +0 -1
  810. package/dist/services/preferences/preferences-service.js +0 -5
  811. package/dist/services/preferences/preferences-types.d.ts +0 -14
  812. package/dist/services/preferences/preferences-types.js +0 -4
  813. package/dist/services/progress/progress-service.js +0 -1
  814. package/dist/services/qa/bdd-test-style-verifier.d.ts +0 -1
  815. package/dist/services/qa/bdd-test-style-verifier.js +0 -1
  816. package/dist/services/qa/browser-event-logger.d.ts +0 -1
  817. package/dist/services/qa/browser-event-logger.js +0 -1
  818. package/dist/services/qa/browser-restart-detector.d.ts +0 -1
  819. package/dist/services/qa/browser-restart-detector.js +0 -1
  820. package/dist/services/qa/browser-reuse-hint.d.ts +0 -1
  821. package/dist/services/qa/browser-reuse-hint.js +0 -1
  822. package/dist/services/qa/qa-business-review-state.js +0 -2
  823. package/dist/services/qa/screenshot-archive-service.d.ts +0 -1
  824. package/dist/services/qa/screenshot-archive-service.js +0 -1
  825. package/dist/services/rd/impl.js +0 -1
  826. package/dist/services/rd/rd-service.d.ts +0 -5
  827. package/dist/services/rd/rd-service.js +0 -5
  828. package/dist/services/rd/reviewer-dispatch-policy.d.ts +0 -4
  829. package/dist/services/rd/reviewer-dispatch-policy.js +0 -4
  830. package/dist/services/rd/standards-diagnostic.js +0 -1
  831. package/dist/services/rd/tactical-stage.js +0 -1
  832. package/dist/services/rd-swarm/rd-swarm-types.d.ts +0 -1
  833. package/dist/services/rd-swarm/rd-swarm-types.js +0 -1
  834. package/dist/services/readonly-surface/argv-guard.d.ts +32 -0
  835. package/dist/services/readonly-surface/argv-guard.js +164 -0
  836. package/dist/services/readonly-surface/readonly-whitelist.d.ts +147 -0
  837. package/dist/services/readonly-surface/readonly-whitelist.js +107 -0
  838. package/dist/services/readonly-surface/whitelist-generator.d.ts +64 -0
  839. package/dist/services/readonly-surface/whitelist-generator.js +212 -0
  840. package/dist/services/recommendations/installed-capability-detector.d.ts +0 -1
  841. package/dist/services/recommendations/installed-capability-detector.js +0 -1
  842. package/dist/services/release/version-precheck-service.d.ts +0 -2
  843. package/dist/services/release/version-precheck-service.js +0 -3
  844. package/dist/services/retrospective/retrospective-index.d.ts +0 -1
  845. package/dist/services/retrospective/retrospective-index.js +0 -1
  846. package/dist/services/retrospective/retrospective-show.d.ts +0 -1
  847. package/dist/services/retrospective/retrospective-show.js +0 -1
  848. package/dist/services/reviewer/model-family.js +0 -1
  849. package/dist/services/reviewer/reviewer-config.js +0 -1
  850. package/dist/services/reviewer/reviewer-service.d.ts +0 -1
  851. package/dist/services/reviewer/reviewer-service.js +0 -3
  852. package/dist/services/reviewer/selection-strategies.js +0 -1
  853. package/dist/services/runtime/runtime-detector.js +0 -1
  854. package/dist/services/runtime/runtime-service.d.ts +0 -2
  855. package/dist/services/runtime/vendor-adapter.d.ts +0 -7
  856. package/dist/services/runtime/vendors/claude-code.js +0 -1
  857. package/dist/services/runtime/vendors/codex.js +0 -1
  858. package/dist/services/runtime/vendors/copilot.js +0 -1
  859. package/dist/services/sc/sc-service.js +0 -6
  860. package/dist/services/scan/acceptance-coverage-service.js +0 -2
  861. package/dist/services/scan/api-diff-recorded.d.ts +0 -1
  862. package/dist/services/scan/api-diff-recorded.js +0 -1
  863. package/dist/services/scan/api-diff-service.d.ts +0 -1
  864. package/dist/services/scan/api-diff-service.js +0 -1
  865. package/dist/services/scan/api-diff-types.d.ts +0 -1
  866. package/dist/services/scan/api-diff-types.js +0 -1
  867. package/dist/services/scan/archetype-service.js +0 -1
  868. package/dist/services/scan/file-size-policy.d.ts +0 -1
  869. package/dist/services/scan/file-size-policy.js +0 -5
  870. package/dist/services/scan/file-size-scan.d.ts +0 -1
  871. package/dist/services/security/safe-settings-path.js +0 -1
  872. package/dist/services/session/binding-store.d.ts +0 -4
  873. package/dist/services/session/binding-store.js +0 -7
  874. package/dist/services/session/caller-binding-service.d.ts +0 -6
  875. package/dist/services/session/caller-binding-service.js +0 -4
  876. package/dist/services/session/caller-id-types.d.ts +0 -3
  877. package/dist/services/session/caller-id-types.js +0 -2
  878. package/dist/services/session/getSessionDir.js +0 -1
  879. package/dist/services/session/index.js +0 -1
  880. package/dist/services/session/platform-fallbacks.d.ts +0 -3
  881. package/dist/services/session/platform-fallbacks.js +0 -3
  882. package/dist/services/session/resolve-caller-id.d.ts +0 -2
  883. package/dist/services/session/resolve-caller-id.js +0 -2
  884. package/dist/services/session/session-binding-bridge.d.ts +0 -2
  885. package/dist/services/session/session-binding-bridge.js +0 -15
  886. package/dist/services/session/session-checkpoint-service.d.ts +0 -1
  887. package/dist/services/session/session-checkpoint-service.js +0 -1
  888. package/dist/services/session/session-manager.d.ts +0 -8
  889. package/dist/services/session/session-manager.js +0 -19
  890. package/dist/services/session/session-resume-service.d.ts +0 -1
  891. package/dist/services/session/session-resume-service.js +0 -1
  892. package/dist/services/share/bundle-reader.d.ts +2 -5
  893. package/dist/services/share/bundle-reader.js +6 -8
  894. package/dist/services/share/bundle-writer.d.ts +2 -2
  895. package/dist/services/skill/resume-detector.js +0 -3
  896. package/dist/services/skill/skill-scheduler.d.ts +0 -1
  897. package/dist/services/skill/skill-scheduler.js +0 -1
  898. package/dist/services/skill/skill-search-service.d.ts +0 -2
  899. package/dist/services/skill/skill-search-service.js +0 -2
  900. package/dist/services/skillhub/release-diff.d.ts +2 -2
  901. package/dist/services/skillhub/release-export.d.ts +2 -2
  902. package/dist/services/skillhub/release-gc-blobs.d.ts +2 -2
  903. package/dist/services/skillhub/release-import.d.ts +2 -2
  904. package/dist/services/skillhub/release-import.js +2 -1
  905. package/dist/services/skillhub/release-retain.d.ts +2 -2
  906. package/dist/services/skillhub/release-retain.js +2 -1
  907. package/dist/services/skillhub/sqlite-store.d.ts +3 -3
  908. package/dist/services/skillhub/sqlite-store.js +4 -5
  909. package/dist/services/skills/hooks-codegate-superpowers.d.ts +1 -3
  910. package/dist/services/skills/hooks-codegate-superpowers.js +26 -14
  911. package/dist/services/skills/hooks-settings-service.d.ts +0 -2
  912. package/dist/services/skills/hooks-settings-service.js +10 -8
  913. package/dist/services/skills/presence-lease-service.d.ts +0 -1
  914. package/dist/services/skills/presence-lease-service.js +0 -1
  915. package/dist/services/skills/session-start-hook-constants.d.ts +0 -4
  916. package/dist/services/skills/session-start-hook-constants.js +0 -4
  917. package/dist/services/skills/skill-presence-service.d.ts +0 -8
  918. package/dist/services/skills/skill-presence-service.js +0 -13
  919. package/dist/services/skills/skill-statusline-model.d.ts +0 -6
  920. package/dist/services/skills/skill-statusline-model.js +1 -4
  921. package/dist/services/skills/skill-statusline-renderer.d.ts +0 -1
  922. package/dist/services/skills/skill-statusline-renderer.js +0 -12
  923. package/dist/services/skills/skill-statusline-service.js +0 -6
  924. package/dist/services/skills/skill-statusline-sid-suffix.d.ts +0 -2
  925. package/dist/services/skills/skill-statusline-sid-suffix.js +0 -2
  926. package/dist/services/skills/statusline-palette.d.ts +0 -2
  927. package/dist/services/skills/statusline-palette.js +0 -3
  928. package/dist/services/slice/slice-archive-service.js +0 -1
  929. package/dist/services/slice/slice-benchmark-service.d.ts +0 -1
  930. package/dist/services/slice/slice-benchmark-service.js +0 -1
  931. package/dist/services/slice/slice-check-service.js +0 -6
  932. package/dist/services/slice/slice-check-types.d.ts +0 -1
  933. package/dist/services/slice/slice-pick-service.d.ts +0 -1
  934. package/dist/services/slice/slice-pick-service.js +0 -1
  935. package/dist/services/slice/slice-review-state.js +0 -2
  936. package/dist/services/sqlite/sqlite-driver.d.ts +118 -0
  937. package/dist/services/sqlite/sqlite-driver.js +159 -0
  938. package/dist/services/standards/ide-aware-standards-service.d.ts +0 -2
  939. package/dist/services/standards/ide-aware-standards-service.js +0 -1
  940. package/dist/services/standards/loop-engineering-readiness-lint.d.ts +0 -1
  941. package/dist/services/standards/loop-engineering-readiness-lint.js +0 -1
  942. package/dist/services/standards/migrate-claude-rules-service.js +0 -3
  943. package/dist/services/standards/migrate-service.d.ts +0 -1
  944. package/dist/services/standards/migrate-service.js +0 -1
  945. package/dist/services/standards/missing-standards-detector.d.ts +0 -2
  946. package/dist/services/standards/missing-standards-detector.js +0 -3
  947. package/dist/services/standards/project-standards-service.d.ts +0 -1
  948. package/dist/services/standards/project-standards-service.js +0 -1
  949. package/dist/services/standards/standards-render.d.ts +0 -1
  950. package/dist/services/standards/standards-render.js +0 -1
  951. package/dist/services/standards/ui-library-dispatch-block.d.ts +0 -1
  952. package/dist/services/standards/ui-library-dispatch-block.js +0 -1
  953. package/dist/services/tech/tech-change-id-service.d.ts +0 -7
  954. package/dist/services/tech/tech-change-id-service.js +0 -7
  955. package/dist/services/tech/tech-service.js +0 -5
  956. package/dist/services/verdict/envelope-parsers.d.ts +0 -2
  957. package/dist/services/verdict/envelope-parsers.js +0 -2
  958. package/dist/services/verdict/envelopes.d.ts +0 -1
  959. package/dist/services/vm/vm-lease.js +0 -1
  960. package/dist/services/web/aria-node.d.ts +0 -1
  961. package/dist/services/web/bounded-output.d.ts +0 -1
  962. package/dist/services/web/bounded-output.js +0 -1
  963. package/dist/services/web/browser-acquire.js +0 -1
  964. package/dist/services/web/browser-cache-probe.js +0 -1
  965. package/dist/services/web/browser-session-manager.js +0 -1
  966. package/dist/services/web/daemon-entry.js +0 -1
  967. package/dist/services/web/daemon-registry.js +0 -1
  968. package/dist/services/web/daemon-supervisor.d.ts +4 -3
  969. package/dist/services/web/daemon-supervisor.js +4 -4
  970. package/dist/services/web/playwright-loader.js +0 -1
  971. package/dist/services/web/playwright-types.d.ts +0 -1
  972. package/dist/services/web/snapshot-pruner.js +0 -1
  973. package/dist/services/web/untrusted-envelope.d.ts +0 -1
  974. package/dist/services/web/web-artifact-paths.js +0 -1
  975. package/dist/services/web/web-client.d.ts +0 -1
  976. package/dist/services/web/web-daemon-service.js +0 -1
  977. package/dist/services/web/web-fallback.d.ts +0 -1
  978. package/dist/services/web/web-fallback.js +0 -1
  979. package/dist/services/web/web-install-service.js +0 -1
  980. package/dist/services/web/web-login-profile.js +0 -1
  981. package/dist/services/web/web-protocol.d.ts +0 -1
  982. package/dist/services/web/web-protocol.js +0 -1
  983. package/dist/services/web/web-status-report.js +0 -1
  984. package/dist/services/workflow/artifact-paths.js +0 -3
  985. package/dist/services/workflow/autonomous-resume-writer.js +0 -2
  986. package/dist/services/workflow/pipeline-verify-gate-support.d.ts +0 -5
  987. package/dist/services/workflow/pipeline-verify-gate-support.js +0 -11
  988. package/dist/services/workflow/pipeline-verify-service.d.ts +0 -2
  989. package/dist/services/workflow/pipeline-verify-service.js +0 -15
  990. package/dist/services/workflow/pipeline-verify-types.d.ts +0 -10
  991. package/dist/services/workflow/pipeline-verify-types.js +0 -2
  992. package/dist/services/workflow/plan-reader.d.ts +0 -1
  993. package/dist/services/workflow/plan-reader.js +0 -5
  994. package/dist/services/workflow/plan-refresher.js +0 -2
  995. package/dist/services/workflow/plan-trigger-detector.d.ts +0 -2
  996. package/dist/services/workflow/plan-trigger-detector.js +0 -3
  997. package/dist/services/workflow/workflow-autonomous-resume-helpers.js +0 -5
  998. package/dist/services/workflow/workflow-autonomous-service.js +0 -2
  999. package/dist/services/workflow/workflow-autonomous-types.d.ts +0 -2
  1000. package/dist/services/workflow/workflow-autonomous-types.js +0 -2
  1001. package/dist/services/workflow/workflow-graph-types.d.ts +0 -1
  1002. package/dist/services/workflow/workflow-graph-types.js +0 -1
  1003. package/dist/services/workflow/workflow-router-service.js +0 -4
  1004. package/dist/services/workflow/workflow-skip-service.d.ts +0 -1
  1005. package/dist/services/workflow/workflow-skip-service.js +0 -1
  1006. package/dist/services/workflow/workflow-spec-lint.d.ts +0 -2
  1007. package/dist/services/workflow/workflow-spec-lint.js +0 -2
  1008. package/dist/services/workflow/workflow-spec-types.d.ts +0 -1
  1009. package/dist/services/workflow/workflow-spec-types.js +0 -1
  1010. package/dist/services/workflow/workflow-spec-yaml.d.ts +0 -2
  1011. package/dist/services/workflow/workflow-spec-yaml.js +0 -2
  1012. package/dist/services/workflow/workflow-spec.js +0 -1
  1013. package/dist/services/workflow/workflow-state-store.js +0 -1
  1014. package/dist/services/workspace/claude-settings-template.d.ts +0 -4
  1015. package/dist/services/workspace/claude-settings-template.js +0 -4
  1016. package/dist/services/workspace/migrate-1-4-1-service.d.ts +0 -1
  1017. package/dist/services/workspace/migrate-1-4-1-service.js +0 -1
  1018. package/dist/services/workspace/migrate-service.js +0 -8
  1019. package/dist/services/workspace/migrate-types.d.ts +0 -4
  1020. package/dist/services/workspace/migrate-types.js +0 -1
  1021. package/dist/services/workspace/reconcile-migrate.d.ts +0 -3
  1022. package/dist/services/workspace/reconcile-migrate.js +0 -5
  1023. package/dist/services/workspace/reconcile-service.d.ts +0 -3
  1024. package/dist/services/workspace/reconcile-service.js +0 -7
  1025. package/dist/services/workspace/reconcile-types.d.ts +0 -5
  1026. package/dist/services/workspace/sid-naming-guard.d.ts +0 -1
  1027. package/dist/services/workspace/sid-naming-guard.js +0 -1
  1028. package/dist/services/workspace/templates/project-scan/index.d.ts +0 -3
  1029. package/dist/services/workspace/templates/project-scan/index.js +0 -3
  1030. package/dist/services/workspace/workspace-claude-settings-materializer.d.ts +0 -1
  1031. package/dist/services/workspace/workspace-claude-settings-materializer.js +0 -4
  1032. package/dist/services/workspace/workspace-service.d.ts +0 -7
  1033. package/dist/services/workspace/workspace-service.js +0 -16
  1034. package/dist/services/worktree/playwright-profile.js +0 -1
  1035. package/dist/services/worktree/worktree-lease-types.d.ts +0 -1
  1036. package/dist/services/worktree/worktree-lease-types.js +0 -1
  1037. package/dist/services/worktree/worktree-lease.d.ts +0 -2
  1038. package/dist/services/worktree/worktree-lease.js +0 -2
  1039. package/dist/shared/format-md-compact.d.ts +0 -2
  1040. package/dist/shared/format-md-compact.js +0 -2
  1041. package/dist/shared/incrementing-number.d.ts +0 -1
  1042. package/dist/shared/incrementing-number.js +0 -1
  1043. package/dist/shared/path-utils.d.ts +0 -1
  1044. package/dist/shared/path-utils.js +0 -1
  1045. package/dist/shared/runtime-root.d.ts +0 -1
  1046. package/dist/shared/runtime-root.js +0 -1
  1047. package/dist/shared/stale-policy.d.ts +0 -1
  1048. package/dist/shared/stale-policy.js +0 -1
  1049. package/package.json +24 -11
  1050. package/scripts/canonical-store-link.mjs +296 -0
  1051. package/scripts/canonical-store-prune.mjs +131 -0
  1052. package/scripts/canonical-store.mjs +298 -0
  1053. package/scripts/install-skills-bundles.mjs +233 -0
  1054. package/scripts/install-skills-fs.mjs +148 -0
  1055. package/scripts/install-skills-ide.mjs +279 -0
  1056. package/scripts/install-skills-output-style-default.mjs +196 -0
  1057. package/scripts/install-skills-output-styles.mjs +121 -0
  1058. package/scripts/install-skills-report.mjs +42 -0
  1059. package/scripts/install-skills-user-config.mjs +198 -0
  1060. package/scripts/install-skills.mjs +41 -1279
  1061. package/scripts/watch-tree.mjs +140 -0
  1062. package/scripts/watch.mjs +4 -126
  1063. package/skills/peaks-audit/SKILL.md +3 -3
  1064. package/skills/peaks-status/SKILL.md +31 -13
  1065. package/dist/services/codegraph/codegraph-include-reconciler.d.ts +0 -10
  1066. package/dist/services/codegraph/codegraph-include-reconciler.js +0 -160
@@ -1,106 +1,195 @@
1
1
  {
2
2
  "metadata": {
3
3
  "pluginRoot": ".",
4
- "version": "2.0.3"
4
+ "version": "4.1.3"
5
5
  },
6
6
  "plugins": [
7
7
  {
8
8
  "name": "peaks-loop",
9
- "description": "Cross-AI-IDE workflow-gating CLI + 11-skill family. Turns LLM improvisation into auditable engineering process. Skills cover PRD / R&D / UI / QA / change-control / context / SOP definition / orchestration. Soft-fail gates block irreversible actions mid-conversation (even under --dangerously-skip-permissions).",
10
- "version": "2.0.3",
9
+ "description": "Loop Engineering CLI — workflow primitive / loop guards / evaluators / slice orchestration",
10
+ "version": "4.1.3",
11
11
  "author": {
12
12
  "name": "SquabbyZ"
13
13
  },
14
14
  "homepage": "https://github.com/SquabbyZ/peaks-loop",
15
15
  "repository": "https://github.com/SquabbyZ/peaks-loop",
16
16
  "license": "MIT",
17
- "tags": [
18
- "workflow",
19
- "gating",
17
+ "keywords": [
18
+ "peaks-loop",
19
+ "loop-engineering",
20
+ "ai-orchestration",
21
+ "ai-coding-agent",
22
+ "ai-programmer",
23
+ "multi-agent",
24
+ "claude-code",
25
+ "codex",
26
+ "z-code",
27
+ "cursor",
28
+ "trae",
29
+ "tongyi-lingma",
30
+ "agent-harness",
31
+ "agentic-engineering",
32
+ "autonomous-workflow",
33
+ "workflow-orchestration",
34
+ "llm-workflow",
35
+ "long-running-task",
36
+ "sub-agent-dispatch",
37
+ "dag-orchestration",
38
+ "slice-decomposition",
20
39
  "sop",
40
+ "openspec",
41
+ "karpathy",
42
+ "darwin",
43
+ "anti-drift",
44
+ "evolution-evaluation",
45
+ "ci-cd",
46
+ "github-actions",
47
+ "trusted-publishing",
48
+ "oidc",
49
+ "monorepo",
50
+ "pnpm",
51
+ "vitest",
21
52
  "code-review",
22
- "agent-team",
23
- "cross-ide",
24
- "claude-code",
25
- "memory",
26
- "second-opinion"
27
- ],
28
- "keywords": [
29
- "AI IDE",
30
- "agent guardrails",
31
- "SOP engine",
32
- "cross-IDE",
33
- "developer workflow",
34
- "irreversible-action gates"
53
+ "tdd",
54
+ "security-scan",
55
+ "lint",
56
+ "typecheck",
57
+ "devtool",
58
+ "cli",
59
+ "developer-tools"
35
60
  ],
61
+ "mcpServers": {
62
+ "peaks": {
63
+ "command": "peaks",
64
+ "args": [
65
+ "mcp",
66
+ "serve"
67
+ ]
68
+ }
69
+ },
36
70
  "skills": [
37
71
  {
38
- "name": "peaks-solo",
39
- "path": "./skills/peaks-solo",
40
- "description": "Dispatcher (分诊员) — 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. NOT for code/content/doctor/issue-fix-orchestrator/SOP work (use the specific skill)."
72
+ "name": "peaks-audit",
73
+ "path": "./skills/peaks-audit",
74
+ "description": "Gate autonomous LLM work on a 6-dimension audit + user-accepted goal. Use IMMEDIATELY after a need is expressed, BEFORE any PRD/RD/QA work starts."
41
75
  },
42
76
  {
43
77
  "name": "peaks-code",
44
78
  "path": "./skills/peaks-code",
45
- "description": "Full-auto orchestration facade for the Peaks-Loop skill family. Use when the user asks Peaks-Loop to handle a project workflow end-to-end."
79
+ "description": "Code-domain loop engineering orchestrator for the Peaks-Loop skill family. Use when the user asks Peaks-Loop to handle a code-repo workflow end-to-end (端到端/全流程/需求开发), especially from a product document (PRD/飞书文档/Feishu doc) through implementation and validation. Coordinates peaks-prd, peaks-rd, peaks-qa, peaks-ui, peaks-sc, and peaks-txt while preserving user confirmation gates. Triggers on `/peaks-code`, \"peaks code\", \"全流程开发\", \"端到端迭代\". General primitives (peaks-resume / peaks-status / peaks-test) are sibling skills, not children."
46
80
  },
47
81
  {
48
- "name": "peaks-resume",
49
- "path": "./skills/peaks-resume",
50
- "description": "Resume an in-flight peaks-code slice in the current session."
82
+ "name": "peaks-content",
83
+ "path": "./skills/peaks-content",
84
+ "description": "Non-code orchestrator for content workflows (draft / edit / publish / archive). Use when a user wants to drive an end-to-end content-production loop (blog post, newsletter, marketing copy, social thread, doc page) where the LLM must coordinate draft / edit / tone / publish / archive stages with explicit gates between them, and where the user only wants to speak natural language and pick options. NOT for free-form chatting; NOT for code review. Reuses the peaks-loop Loop Engineering primitives (Loop Engineering Asset, Bee Asset, Workflow Trace, Evolution Evaluation) but does NOT import peaks-code internals. Triggers on `/peaks-content`, \"peaks content\", \"content workflow\", \"publish this to <channel>\", \"edit the draft\", \"archive the previous version\"."
51
85
  },
52
86
  {
53
- "name": "peaks-status",
54
- "path": "./skills/peaks-status",
55
- "description": "Show the current state of the peaks-code orchestrator in a compact summary."
87
+ "name": "peaks-doctor",
88
+ "path": "./skills/peaks-doctor",
89
+ "description": "Orchestrate peaks-loop's L3 doctor (peaks audit + peaks doctor + peaks openspec from-doctor) for project health. Use when the user asks for a project health check, doctor report, audit, or wants to convert doctor findings into OpenSpec change records. Coordinates the L2 audit framework + the L3.2 doctor + the L3.3 from-doctor proposal generator. Triggers on `/peaks-doctor`, \"peaks doctor\", \"项目健康\", \"doctor report\", \"health check\", \"check the project\", \"audit my repo\".",
90
+ "userInvocable": false
56
91
  },
57
92
  {
58
- "name": "peaks-test",
59
- "path": "./skills/peaks-test",
60
- "description": "Run the project's test suite on the current repo and report results."
93
+ "name": "peaks-final-review",
94
+ "path": "./skills/peaks-final-review",
95
+ "description": "Final-review skill for Peaks. Use when a workflow needs to assemble 4-dimension business-review evidence (functional-completeness, problem-resolution, no-new-bugs, existing-functionality-intact) for human acceptance at the end of an autonomous slice. Triggers on \"/peaks-final-review\", \"prepare final review\", \"4-dim review\", or peaks-code end-of-workflow handoff."
96
+ },
97
+ {
98
+ "name": "peaks-ide",
99
+ "path": "./skills/peaks-ide",
100
+ "description": "Orchestrate peaks-loop's IDE-aware behavior (hooks + statusline + handle) for a user's specific IDE. Detects the current state (which IDE the user is on, what peaks has already installed), plans the install / switch / status / uninstall actions, and invokes the existing peaks CLI primitives. Triggers on `/peaks-ide`, \"set up peaks for my IDE\", \"switch peaks to Trae\", \"what did peaks install\", \"uninstall peaks hooks\". Sits between the user and `peaks hooks install` / `peaks statusline install` / `peaks hook handle` — those are the CLI primitives; this skill is the user-facing surface.",
101
+ "userInvocable": false
102
+ },
103
+ {
104
+ "name": "peaks-issue-fix-orchestrator",
105
+ "path": "./skills/peaks-issue-fix-orchestrator",
106
+ "description": "End-to-end orchestrator that surveys open issues in a target repo, classifies them by difficulty, mines reference merged-PRs, fixes each issue with real commits (with Repository + AI-modified declaration), writes normalized PR description files, and emits a one-line submit script. Use when the user wants to drive a \"fix N open issues and prepare PRs\" run on an upstream repo (any language; primarily Python + TypeScript). Reuses Loop Engineering primitives: 4-layer asset model, Darwin ratchet, karpathy-engineered red lines, Human-NL-Choice-Only. Triggers on `/peaks-issue-fix-orchestrator`, \"fix 30 issues\", \"dogfood on <repo>\", \"open-issue sweep on <repo>\"."
107
+ },
108
+ {
109
+ "name": "peaks-perf-audit",
110
+ "path": "./skills/bee/peaks-perf-audit",
111
+ "description": "Independent performance audit skill. Reads the immutable peaks-prd handoff + the project-level perf-template.md, performs a 6-dimension perf audit, and writes a structured envelope to `.peaks/_runtime/<sessionId>/audit/perf-<rid>.md`. Decoupled from peaks-rd 5-way fan-out per slice v2.12.0 (Group A, Tier 3). Use when the slice introduces CPU-bound hot loops, I/O throughput changes, memory allocation patterns, concurrency model changes, bundle size deltas, or cold-start costs.",
112
+ "userInvocable": false
61
113
  },
62
114
  {
63
115
  "name": "peaks-prd",
64
116
  "path": "./skills/bee/peaks-prd",
65
- "description": "Product and requirement skill for Peaks. Use when a workflow needs PRD, refactor goals, non-goals, behavior preservation, acceptance criteria, product change proposals, or user-confirmable product artifacts.",
117
+ "description": "Product and requirement role for Peaks-Loop (LLM-only internal role; not user-invocable.\nTriggered by peaks-code via `peaks sub-agent dispatch --role prd`.)\nUse when a workflow needs PRD, refactor goals, non-goals, behavior preservation,\nacceptance criteria, product change proposals, or user-confirmable product artifacts.",
118
+ "userInvocable": false
119
+ },
120
+ {
121
+ "name": "peaks-qa",
122
+ "path": "./skills/bee/peaks-qa",
123
+ "description": "QA and verification role for Peaks-Loop (LLM-only internal role; not user-invocable.\nTriggered by peaks-code via `peaks sub-agent dispatch --role qa`.)\nUse when a workflow needs unit-test coverage evidence, regression matrices,\nbaseline reports, validation reports, acceptance checks, or refactor verification gates.",
66
124
  "userInvocable": false
67
125
  },
68
126
  {
69
127
  "name": "peaks-rd",
70
128
  "path": "./skills/bee/peaks-rd",
71
- "description": "Research and development skill for Peaks. Use for engineering analysis, refactor planning, project scanning, code standards, unit-test coverage gates, implementation contracts, task graphs, and RD handoffs. Always use this for Peaks-Loop refactor workflows.",
129
+ "description": "Research and development role for Peaks-Loop (LLM-only internal role; not user-invocable.\nTriggered by peaks-code via `peaks sub-agent dispatch --role rd`.)\nUse for engineering analysis, refactor planning, project scanning, code standards,\nunit-test coverage gates, implementation contracts, task graphs, and RD handoffs.\nAlways use this for Peaks-Loop refactor workflows.",
72
130
  "userInvocable": false
73
131
  },
74
132
  {
75
- "name": "peaks-qa",
76
- "path": "./skills/bee/peaks-qa",
77
- "description": "QA and verification skill for Peaks. Use when a workflow needs unit-test coverage evidence, regression matrices, baseline reports, validation reports, acceptance checks, or refactor verification gates.",
78
- "userInvocable": false
133
+ "name": "peaks-resume",
134
+ "path": "./skills/peaks-resume",
135
+ "description": "Universal resume primitive for any in-flight Peaks-Loop workflow (orchestrator-agnostic). Detects the current session's deepest completed gate and surfaces a resume option via AskUserQuestion. Use when ANY bee (peaks-code, future peaks-research, future peaks-content, …) needs to recover from /compact or session interruption. Triggers on \"/peaks-resume\", \"continue the unfinished work\", \"继续完成\", \"把刚才没做完的收尾\". (Replaces peaks-resume as a top-level primitive.)"
79
136
  },
80
137
  {
81
- "name": "peaks-ui",
82
- "path": "./skills/bee/peaks-ui",
83
- "description": "UI and experience skill for Peaks. Use when a workflow touches UI/UX, interaction design, visual direction, design systems, frontend page behavior, high-fidelity HTML prototypes, or UI regression seeds.",
138
+ "name": "peaks-reviewer",
139
+ "path": "./skills/bee/peaks-reviewer",
140
+ "description": "Third-party independent code-review skill for Peaks. Use as a parallel reviewer to karpathy-reviewer when a workflow needs an out-of-band (non-RD-model) review pass to mitigate single-LLM self-dogfood blind spots. Emits a schema-validated ReviewerEnvelope (no free-form LLM JSON). v2.14.0 G4.",
84
141
  "userInvocable": false
85
142
  },
86
143
  {
87
144
  "name": "peaks-sc",
88
145
  "path": "./skills/bee/peaks-sc",
89
- "description": "Source control, sync, and change-control skill for Peaks. Use when a workflow needs change impact, artifact retention, commit boundaries, GitHub artifact repository pointers, sync state, or rollback evidence.",
146
+ "description": "Source control, sync, and change-control role for Peaks-Loop (LLM-only internal role;\nnot user-invocable. Triggered by peaks-code via `peaks sub-agent dispatch --role sc`.)\nUse when a workflow needs change impact, artifact retention, commit boundaries,\nGitHub artifact repository pointers, sync state, or rollback evidence.",
90
147
  "userInvocable": false
91
148
  },
92
149
  {
93
- "name": "peaks-txt",
94
- "path": "./skills/bee/peaks-txt",
95
- "description": "Context and knowledge skill for Peaks. Use when a workflow needs context capsules, role-specific context slices, decision records, assumptions, discarded options, staleness checks, lessons, or reusable project memory.",
150
+ "name": "peaks-security-audit",
151
+ "path": "./skills/bee/peaks-security-audit",
152
+ "description": "Independent security audit skill. Reads the immutable peaks-prd handoff + the project-level security-template.md, performs an OWASP Top-10 + 8-dimension threat model audit, and writes a structured envelope to `.peaks/_runtime/<sessionId>/audit/security-<rid>.md`. Decoupled from peaks-rd 5-way fan-out per slice v2.12.0 (Group A, Tier 2). Use when the slice introduces authn/authz, secrets, input validation, path/filesystem trust, SQL/NoSQL injection, XSS/content injection, dependency supply chain, or external API surface changes.",
96
153
  "userInvocable": false
97
154
  },
155
+ {
156
+ "name": "peaks-slice-decompose",
157
+ "path": "./skills/peaks-slice-decompose",
158
+ "description": "Run multi-pass slice decomposition on a PRD-ready request and emit a v2 envelope with passes, cross-pass edges, and an LLM-arbitration trace. Use when a PRD is ready and the caller needs service-level and/or file-level cuts in one artifact."
159
+ },
160
+ {
161
+ "name": "peaks-solo",
162
+ "path": "./skills/peaks-solo",
163
+ "description": "Dispatcher (分诊员) for the Peaks-Loop skill family. Use when the user describes a task in natural language and does NOT know which peaks-* skill fits. peaks-solo reads the live skill pool via `peaks skill search`, dispatches to a matching leaf (peaks-code / peaks-content / peaks-doctor / peaks-issue-fix-orchestrator / etc.) or falls back to self-planned execution (deep-search / WebSearch / Bash / Edit markdown) if no leaf matches, and then asks the user whether to sediment the result.\n\nTriggers: 自然语言描述诉求且无明确 peaks-* skill 选择 / \"帮我处理这个\" / \"我不知道该用哪个\" / \"随便都行\".\n\nNOT for: code-specific work (use /peaks-code) / content-specific work (use /peaks-content) / project health check (use /peaks-doctor) / issue sweep (use /peaks-issue-fix-orchestrator) / SOP authoring (use /peaks-sop)."
164
+ },
98
165
  {
99
166
  "name": "peaks-sop",
100
167
  "path": "./skills/peaks-sop",
101
- "description": "Authoring skill for user-defined SOPs in Peaks. Use when a user wants to create, edit, debug, or register their own gated workflow."
168
+ "description": "Authoring skill for user-defined SOPs (standard operating procedures) in Peaks. Use when a user wants to create, edit, debug, or register their own gated workflow — ordered phases plus gates that block advancement until conditions are met — by describing it in natural language instead of hand-writing JSON or memorizing CLI commands. DOMAIN-AGNOSTIC: not just software/release flows — equally for content publishing, compliance and approval checklists, data pipelines, onboarding, ops runbooks, or any personal repeatable procedure, wherever \"don''t enter the next stage until X is true\" applies and X is checkable via a file, file content, or a command."
169
+ },
170
+ {
171
+ "name": "peaks-status",
172
+ "path": "./skills/peaks-status",
173
+ "description": "Universal status primitive for any in-flight Peaks-Loop workflow (orchestrator-agnostic). Reads the existing CLI primitives (peaks skill presence, peaks session list, peaks project dashboard, peaks request show) and renders a 1-screen status table. Use when the user asks \"where are we\", \"现在到哪了\", \"what's the current state\" for ANY bee (peaks-code, future peaks-research, …). Triggers on \"/peaks-status\", \"现在到哪了\", \"what is the current state\", \"show me the dashboard\". (Replaces peaks-status as a top-level primitive.)"
174
+ },
175
+ {
176
+ "name": "peaks-test",
177
+ "path": "./skills/peaks-test",
178
+ "description": "Universal test-runner primitive for any in-flight Peaks-Loop workflow (orchestrator-agnostic). Runs the project's test suite on the current repo and reports results. Use when the user asks \"run the tests\", \"跑一下 test\", \"跑测试\" for ANY bee (peaks-code, future peaks-research, …). Triggers on \"/peaks-test\", \"跑一下 test\", \"跑测试\", \"run the tests\", \"test now\". (Replaces peaks-test as a top-level primitive.)"
179
+ },
180
+ {
181
+ "name": "peaks-txt",
182
+ "path": "./skills/bee/peaks-txt",
183
+ "description": "Context and knowledge role for Peaks-Loop (LLM-only internal role; not user-invocable.\nTriggered by peaks-code via `peaks sub-agent dispatch --role txt`.)\nUse when a workflow needs context capsules, role-specific context slices, decision records,\nassumptions, discarded options, staleness checks, lessons, or reusable project memory.",
184
+ "userInvocable": false
185
+ },
186
+ {
187
+ "name": "peaks-ui",
188
+ "path": "./skills/bee/peaks-ui",
189
+ "description": "UI and experience role for Peaks-Loop (LLM-only internal role; not user-invocable.\nTriggered by peaks-code via `peaks sub-agent dispatch --role ui`.)\nUse when a workflow touches UI/UX, interaction design, visual direction, design systems,\nfrontend page behavior, high-fidelity HTML prototypes, or UI regression seeds.",
190
+ "userInvocable": false
102
191
  }
103
192
  ]
104
193
  }
105
194
  ]
106
- }
195
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,111 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.1.3 — 2026-10-09 (只读 MCP 能力面首次发布:把"只读"做成可证伪的东西;两处"工具在说假话"的修复;三批尺寸债,以及门禁自己被加固)
4
+
5
+ **版本级别**: 未发布区间 `v4.1.2..HEAD` 共 **20 个 commit**(2 feat / 3 fix / 4 refactor / 2 chore(gate) / 2 merge / 其余 docs+memory)。取 **patch**,依维护者 2026-07-22 的常设规则"默认版本新增采用最小的版本位"。
6
+
7
+ **但此处必须如实记一笔**:本版**确实新增了命令族**(`peaks mcp serve|install|uninstall`)。4.1.2 那条写的是"取 patch:本版不新增命令",本版**不适用那句**——取 patch 是常设规则的默认,不是"没有新增命令"。按严格语义化版本,新增用户可见命令应当取 minor。4 个 workspace 包各 +1 patch(shared 0.0.91→0.0.92、internal-runtime 0.0.42→0.0.43、mut 0.1.56→0.1.57、shared-channel 0.0.59→0.0.60),`CLI_VERSION` 与 `RUNTIME_VERSION` 由 `scripts/sync-version.mjs` 同步(`bump-version.mjs` 只管清单,两者都在 tag 之前,否则 publish.yml 的 `gate-cli-version` 会在 `npm publish` 前中止)。
8
+
9
+ ### 1. 只读 MCP 能力面(2 feat)——核心不是"能调用",而是"只读这件事被证明过"
10
+
11
+ `peaks mcp serve` 把既有的非 gate 能力以 MCP stdio 暴露给 AI Harness;`peaks mcp install|uninstall` 把它注册进 harness。**CLI 不删**,MCP 是并列的一条调用路径。
12
+
13
+ **"只读"不是一句声明,是一条可证伪的断言。** 分类键是**完整 argv**(含 flag),不是命令名——13 个命令族全部读写成对存在,有些**默认就是写**,只看命令名会把写当成读。白名单是手写真源(`contracts/readonly-surface.json`)+ 生成物(`contracts/readonly-argv-whitelist.json`),生成物才是运行时读的那个。
14
+
15
+ 证明分三层:(A) 文件系统 + state-store 快照差分;(B) 进程内对 `child_process` / `fetch` / `http(s).request` 的测试替身拦截;(C) CI-only 的无网络只读挂载沙箱。执行面分 L1–L4 四层,其中 L3 是 PreToolUse matcher 覆盖,**MCP 分支 fail-closed**(与 Bash 分支的 fail-open 相反)——这条分支被刻意放在强制链最前面,因为 MCP 工具名既不匹配 Bash matcher 也不是 worktree 工具,放在后面会被直接放行。
16
+
17
+ **客户端那一跳已实测**:真 Claude Code 2.1.295 上 `claude mcp add … peaks -- <node> <bin/peaks.js> mcp serve` 被原样接受,`claude mcp list` 报 `✔ Connected`,即 harness 真的 spawn 了 server 并完成握手。这是本能力**唯一无法在离线环境推断**的一步,也是这一版敢发出来的理由。
18
+
19
+ **注意**:`peaks mcp install` 会**写用户的 `~/.claude.json`**(user scope),卸载会扫掉全部已声明 scope。这是本仓第一次发出去会改用户环境的命令。
20
+
21
+ ### 2. 两处"工具在说假话"(2 fix + 1 fix(baseline))
22
+
23
+ **`peaks mcp uninstall` 在删不掉时返回 `ok: true` 并断言"no registration was present"。** 实测:注册项仍在(`claude mcp get peaks` 仍 `✔ Connected`),harness 配置前后逐字节相同,而移除命令**超时被杀**。根因是 `runMcpUninstallPlan` 把**任何**失败的移除都归入 `absent`,然后无条件 `ok: true`。安装侧容忍失败的移除是对的(紧接着就要写,旧项在不在无关紧要),卸载侧不成立——移除**就是**那个操作。修法只划一条**不需要读 harness 输出**的界(读它的英文是 vendor-specific,本仓禁止):`exit 0` → 已移除;`exit ≠ 0` → 它**表了态**(absent,不变);**超时/未启动 → 它从未给出裁决**(`unknown`,`ok: false`)。`detail` 从此只在所有 scope 都表了态且都没找到时才说"没有注册项"。
24
+
25
+ **同一分支还漏了信息**:失败信封的 `data` 只带 `{ ide }`,整份 report 被丢掉——而这条分支在本次改动之前**不可达**(卸载恒为 `ok:true`),所以这个信息丢失是本版引入并本版修掉的。R3 场景(一个 scope 移除成功、另一个从未答复)下,`--json` 的消费者现在看得见 `removed`。
26
+
27
+ **`npx` / `npm` 解析器差一级目录。** `locateNpmCliScript` 在 win32 上从 `process.execPath` 往上找**两级**,而标准 Windows 布局(MSI、zip、nvm-for-windows)都是**一级**。在第 3 个硬编码候选(`C:/Program Files/nodejs`)也不存在的机器上,它找不到 `npm-cli.js` / `npx-cli.js`,**静默回退到裸名 `npx`/`npm`**——正是这个模块被写出来专门要绕开的那个 `.cmd` shim。长期不可见是因为那个硬编码候选恰好命中默认安装与 CI 的 `windows-latest`。
28
+
29
+ ### 3. 门禁自己被加固(2 chore(gate))
30
+
31
+ **两条不会失败的门被修成会失败。** `peaks-gate staged`(无参)曾打印 `EMPTY CHANGE SET — NOTHING WAS CHECKED` 却 **exit 0**;`format:check` 与 pre-commit 的范围本就不一致而 CI 根本没跑它。后者接进 CI 时被写成**集合包含**棘轮而非计数棘轮——一个计数看不见**替换**(删一个、加一个,计数不变)。
32
+
33
+ **单调守卫的第一个、也是唯一一个例外**:`fileSizeOverCap`(文件数)与 `fileSizeExcessLines`(超出行数)各自独立棘轮,而规则是"任一 key 高于基线即拒"。于是把 1125 行拆成 2 份、每份仍 >300 时 `overCap 1→2` 被拒——一个**把超出行数降下来的改动**被挡住。新政策:`overCap` 允许上涨,**仅当**同一次变更中 `excess` 严格下降;双升则拒。
34
+
35
+ **基线生成器在本版拒绝过两次,两次都是改源码而不是抬 ceiling**:一次 `commentNarrativeLines: 22 → 24`(新模块头注释写了切片名,而 `rid-id` 是 8 个 NARRATIVE_MARKER 之一),一次 `comment narrative: 63 > ceiling 22 (+41)`。这条拒绝路径在本版内**真的被执行过**,不是事后补的说辞。
36
+
37
+ ### 4. 三批尺寸债(4 refactor)——能降 ceiling 的只有 `src/`
38
+
39
+ `src/cli/commands` 从 10 个最严重的文件拆成 110 个模块(三批),`scripts/` 4 个文件拆成 16 个模块。**四个 ceiling 全部下降,无一上升**:
40
+
41
+ ```
42
+ eslintFindings 2055 -> 1951 fileSizeOverCap 122 -> 112
43
+ eslintErrors 770 -> 709 fileSizeExcessLines 35536 -> 30352
44
+ ```
45
+
46
+ **配方是"拆分与压函数必须在同一次交付里完成"**,这条是血换来的:第一批只拆,`eslintFindings`/`eslintErrors` 被**推高** +23/+19(把一个长函数切成 helper 之后,原函数在压缩前必然仍超 50 行),被拒后第二遍才把 51 个函数压到 0;第二、三批一次做完,分别 −61 和 −43。
47
+
48
+ **`scripts/**` 与 `tests/**` 是 shadow 人口,不受任何 file-size ceiling 约束**(`gate/legs.mjs` 只 check `partition.gated`)。拆它们**不移动任何 ceiling**——实测前后均为 `117 / 32979`,移动的只有 census 与 shadow 块。它们是被 owner(2026-10-03)刻意排除在 ceiling 之外的,本版如实记录这一点,而不是把"拆了 4 个文件"说成还了 ceiling 的债。
49
+
50
+ ### 5. 未验证(记录而非隐瞒)
51
+
52
+ - **C 层沙箱从未实跑**(CI-only,本仓无 runner);`format:check` job 同样**从未在 runner 上跑过**。
53
+ - **L3 端到端未验**:PATH 上的 `peaks` 是已安装构建而非工作树。
54
+ - **S1 政策例外的端到端触发未验**:机制只在纯函数层被测,"允许涨" ≠ "已经涨过"。
55
+ - **MCP 只读证明的白名单覆盖面**:分类键是完整 argv,但白名单是手写枚举;一条新命令若忘记分类会落到默认分支。`_no-mcp-source-import-scan` 守着"服务层不得 import MCP"这条不变量,但**不守**白名单本身的完备性。
56
+ - **`scripts/**` 的债是自愿还的**,没有任何门会因为不还而变红(见 §4)。
57
+ - **发布路径的一处结构性冲突(过程,非产品)**:`git push origin <tag>` 单独推送**永远过不了本仓 pre-push 门**——只推 tag 时 `origin/main...HEAD` 为空,而门在空变更集上按设计拒绝("nothing to compare ≠ compared and clean")。也就是说**每一次发布都必须靠一次 `--no-verify`**,恰是本仓钩子注释里警告过的形状。本版未修(属门机器,须单独立项)。
58
+
59
+ ## 4.1.2 — 2026-10-08 (资产真源落地: 升级不再静默冻结入口; codegraph 换上 1.6.2 的包模型, 顺带照出一条从未响过的失败路径)
60
+
61
+ **版本级别**: 未发布区间 `v4.1.1..HEAD` 共 **14 个 commit**(6 feat / 3 fix / 1 refactor / 1 test / 3 docs)。取 **patch**:本版不新增命令,不改变任何既有命令的输入输出形状 —— 两件主要工作都是"让已经承诺的行为真的发生"。4 个 workspace 包各 +1 patch(shared 0.0.90→0.0.91、internal-runtime 0.0.41→0.0.42、mut 0.1.55→0.1.56、shared-channel 0.0.58→0.0.59),与 `scripts/bump-version.mjs` 的 lockstep 规则(每个可发布包跟随根版本 +1 patch)一致;实测子包自身的 `version` 字段**不进** `pnpm-lock.yaml`(workspace 依赖在 lock 里是 `link:` 形态、importer 条目为 `packages/peaks-loop-shared: {}`,无版本行),故本版**不需要**改 lockfile。
62
+
63
+ ### 1. 资产真源:升级不再静默冻结入口(4 feat + 1 refactor + 1 test)
64
+
65
+ 原先三个安装器(`installBundledSkills` / `installBundledAgents` / `installBundledOutputStyles`)把归属判断写成 `resolve(marker.sourcePath) === resolve(sourcePath)`,比对的原件是**装它的那个版本**的包路径。实测这条路径里带 node 版本号(`…\nvm\v24.21.0\node_modules\…`),于是这个判断本身就是一个"版本内有效"的事实:一次 node 升级之后的第一次 `npm i -g peaks-loop@latest`,此后每一次运行都会**跳过**该条目 —— 既不更新,也不报错。而唯一的修复路径 `reconcileJunctions` postinstall 从不传入,其余所有情况都落到一个**无声的** `skipped`:升级既不修旧链,也不说没修。本机实测:8 个 IDE 目录 × 44 个 `peaks-*` 条目,全部解析进同一个包路径。
66
+
67
+ 现在三族都走真源(skills 原本已走,agents / output-styles 在 `4e1bd85a` 补齐):`~/.peaks/{skills,agents,output-styles}/<name>` 放真副本,IDE 侧入口指向它 —— 升级变成**重写一份副本,而不是重指 176 条链**。归属由 `.peaks-managed` 边车 + 两侧 `realpath` 决定,**绝不用字符串相等**(Windows junction 的 `readlinkSync` 拼写不保证,这正是旧安装器里那处脆弱点,新模块不许抄它);旧的 JSON 边车按两条臂之一收养 —— 记录的包路径已不再解析(更早一次安装),或那个路径**就是**正在安装的这个包(原地升级);记录的路径解析到**另一个活的包**则原样不动 —— 那是第二份安装,不是陈旧的。
68
+
69
+ Windows 不给**文件**符号链接(没有开发者模式或管理员时),而 skills 用的 junction 从不需要这个权限。宿主拒绝时写实体副本(保留"每次运行都保持最新"的语义),并在返回值与 stderr 上说明这次拒绝 —— `copied` 与 `skipped` 现在各自说得出自己是哪一个;一次不带理由的降级与一次成功无法区分。
70
+
71
+ `dbf91c25` 把真源根从 `~/.agents` 改成 `~/.peaks`(owner 在本次 job 内改的决定):`~/.agents` 是**共享命名空间**(`npx skills`、agentrecall、agentlink 都往那里写),而 `~/.peaks` 是 peaks-loop 自己的家且**已在使用**(实测 `~/.peaks/agents/` 存在并持有 `ecc`);共享约定唯一的好处(给原生读它的工具省一条软链)本次**没有任何测量**证明过。环境变量复用 `PEAKS_HOME`(`peaksHome()`,`src/services/sop/sop-paths.ts:29`)而非新造一个 —— 一个目录两个旋钮就是一对可以互相矛盾的值。
72
+
73
+ `e08dc4af` 补上最后一块:安装器此前**只会加**。把某个 skill 从包里删掉,它的真源副本、各 IDE 目录里的链、`.peaks-managed` 边车会永远留在用户机器上 —— 这与"更新"的含义不符。新的 `canonical-store-prune.mjs` 删真源条目 / IDE 链 / 边车,凡是 `isManagedEntry` **证明不了**是自己的一律保留;顺带把 `ensureCanonicalCopy` 原先无条件的 `rmSync` 换成 `action: 'unmanaged'`(→ `skipped`)—— 那正是根目录搬迁时记下的隐患:`~/.peaks/agents/` 真的有一个 peaks-loop 自己建的 69 条目 `ecc/`,一个同名捆绑资产本会把它静默删掉。**负控是本片重点**:用户自建的真目录 `peaks-gamma`(无边车)同时放进真源与 IDE 目录,`pruned: []`,两者逐字节存活;把 `isManagedEntry` 强制成 `return true` 则三臂转红。端到端实测(一次性 HOME / USERPROFILE / PEAKS_HOME):装 alpha 与 beta、从包里去掉 alpha、重跑 —— `pruned: ["skills/peaks-alpha", "…\.claude\skills/peaks-alpha"]`,四件产物全消失,beta 未动。
74
+
75
+ **发布白名单是本版反复咬人的一处。** `package.json#files` 是 npm 发布白名单,而仓库里**没有任何东西读它** —— 一个不在里面的模块会让每一个已发布包的用户在 `ERR_MODULE_NOT_FOUND` 上崩掉,而整个测试套件保持全绿。本分支三次踩到(`canonical-store.mjs`、`canonical-store-prune.mjs`、`canonical-store-link.mjs`):slice 1 加文件时无人导入,`npm pack --dry-run` 给出 `canonical-store shipped: false`,直到 slice 2 接上 import 才暴露。`87d2b86b` 把一条"枚举两个模块名"的守卫(第三个模块出现就会放行)换成 `install-skills-published-modules.test.ts` —— 从安装器自己的相对 import 里**读出规则**,没有表要维护;解析器先断言解析结果非空,再用同一份解析器跑 fixture 文本,于是"解析器退化成空转"会被它自己的读法抓住,而不是被它恰好指向的文件抓住。
76
+
77
+ **本版未测(记录而非隐瞒)**:trae / codex / cursor 是否跟随文件符号链接(只探过 Claude Code 2.1.292);以及一次自然发生的、无开发者模式下的 EPERM。**记录未修**:手工删掉一条链会让对应 IDE 边车变成孤儿,prune 不扫这种情况(有意的范围限制);nvm 用户保留旧 node 版本时那条包路径仍可解析,条目会两条收养臂都不落,现在报在 stderr 上(此前无声)。
78
+
79
+ ### 2. codegraph 升到 1.6.2:包模型换了骨,配置轴反了向(2 feat + 1 fix)
80
+
81
+ `0.7.10` → `1.6.2` 的升级**不是**表面工作。在 Node v24.21.0(ABI 137)上 `better-sqlite3@11.10.0` 没有预编译二进制,0.7.10 的原生后端在本机根本建不起来,`prebuild-install` 落到 `node-gyp`(需要 Visual Studio),于是退到 `node-sqlite3-wasm` —— 而它打不开 WAL 模式的数据库(带对照实测:DELETE 模式打开、WAL 模式报 `unable to open database file`)。也就是说 codegraph 在这台机器上**已经死了好几天**,每一次 RD 派发都在静默降级。1.6.2 是自包含的,直接用 Node 内建的 `node:sqlite`,完整 WAL。
82
+
83
+ **包模型**:1.6.2 的主包 `dist/` 下**没有可执行 JavaScript**(只有 `.d.ts`)加两个 shim,代码在一个自带 `node.exe` 的平台子包里。于是 `dist/types.js`、`dist/extraction/grammars.js`、`dist/bin/codegraph.js` 全是 MODULE_NOT_FOUND —— 正是 peaks-loop 全部的 spawn 目标。新的 `codegraph-upstream-layout.ts` 是这四个触点的**唯一**定位器:先探 `<平台包>/lib/dist/bin/codegraph.js`(1.6.x),再退回 `<主包>/dist/...`(0.7.x);必须经 `createRequire(<主包>/package.json)` 解析,因为平台包只链在主包自己的 `node_modules/` 里。
84
+
85
+ **配置轴是一个陷阱**:1.6.2 不只是把配置文件从 `.codegraph/config.json` 搬到 `<root>/codegraph.json`,它把 `include` 的**语义反了**。0.7.x 里 `include` 是白名单;1.6.x 里它的意思是"即使被 .gitignore 丢掉也强行纳入索引",准入模型是 `force-include`。只换路径的改法会把**每一个**受支持的 tracked 文件报成缺口 —— 一个看起来像绿的、方向相反的失败。新的 `codegraph-project-config.ts` 通过探测上游同时定出**源**与**模型**,两条臂都对着真实的 0.7.10 与 1.6.2 安装测过。
86
+
87
+ 两个 reconciler 的处置都写明而不是暗示:`codegraph-include-reconciler.ts` **删除** —— 它的前提是上游那份 32 条默认模板(1.6.2 已无),它的动作是往 `include` 追加 78 条 `**/*.ext`,在 1.6.x 下会把 gitignore 掉的源码**强行塞进**索引;只重定向读会留下这条写路径仍是活的,那是更坏的结果。`codegraph-exclude-reconciler.ts` **保留、但把范围收窄**到项目自撰的 `exclude`,读写两端都搬到真实源。**顺带修掉一条活的缺陷**:exclude reconciler 原先用 `include` 做预过滤,而 1.6.x 下 `include` 什么都不准入,于是这道闸**从来不会触发** —— 在那种组合存在多久,它就无声了多久。
88
+
89
+ `e60948bf` 明确**推迟**验收判据 1(`peaks codegraph status` 在 1.6.2 下退出 76,因为完整性轴读 `.codegraph/config.json`,那是 1.6.2 从不写的文件;在**新初始化的真实 git 仓库**上复现:`init` 退出 0,`status` 退出 76 并报 `ENOENT`),`c61bf331` 把它关掉:现在退出 0,且该轴是**真的被求值**而不是被跳过 —— 一个全新的 1.6.2 git 仓库上 `--peaks-json` 给出 `indexIntegrityVerdict: "clean"`、`admissionModel: "force-include"`、`trackedSourceCount: 2`、`admittedTrackedCount: 2`、`indexedFileCount: 2`、`gap: false`、`includeGap: []`、`deadRows: []`,这些数字与那个仓库里的两个文件相符,是量出来的而不是默认值。
90
+
91
+ **一条因为上游而非并发而闪的臂**:1.6.2 自己会在约 **1.3%** 的 `init` 调用上以 `0xC0000005` 中止进程,而且是**串行**的 —— 一个只做单次 spawn、不用 vitest 的最小工装实测 458 次里 6 次中止,stdout 每次都停在同一字节,那里 `extraction/index.js` 正在建一个 8 线程的 `ParseWorkerPool`;`status`(该臂真正的主语)从不中止(0/80)。上游的 `--liftoff-only` 启动器形态修不了它(1/318,Fisher p≈0.13),所以**不许**在生产调用里粉饰。修复只落在测试里:**只**重试 setup 那次 spawn、只认那一个退出码、上限三次、每次换新项目目录;`status` 永远只 spawn 一次;每条漂移断言逐字节未动;另有一条对照臂钉住"只有一个退出码可重试"。残余 ≈ 2.2e-6 每次运行。**仍然敞开并记录在案**:生产有同样的 ~1.3% `init` 暴露面(每一个消费者的 `peaks codegraph init` 都会以那个频率中止),真正的修复属于 `src/services/codegraph/`,本片被划在范围之外。
92
+
93
+ **失败原因进入 dispatch(`33fdefdf`)**:RD 派发块读的是 `preflight.available ? preflight.block : null`,于是 codegraph 一旦失败,preflight 的 `note`(上游原因的唯一载体)就被丢掉,提示词退回一句常量"codegraph unavailable — proceeding on project-scan only"。失败分支因此渲染出一段**读起来与正常状态一模一样**的块,每个 dispatch 记录里,坏索引与健康索引无法区分 —— codegraph 在这台机器上坏了这么久没被注意到,就是这么来的:上游一直在说 `Failed to index: unable to open database file`,而派发路径上没有任何东西复述它。新的 `codegraph-unavailable-block.ts` 负责渲染原因,退回常量改成"没拿到原因"而不是暗示"没有原因";手臂同时判别**有**与**无**(一条断言该块**不**包含裸露的上游行),所以"渲染了某个 note"不能满足它们。修复前把四个源文件回退到 HEAD、只留新模块,观察到的是一次断言失败而非加载错误:6 failed / 4 passed。
94
+
95
+ ### 3. 两次"新文件对门禁不可见"(2 fix)
96
+
97
+ `.husky/` 的 census 腿走的是 `git ls-files`,所以新文件在未 track 时**门禁看不见** —— 本分支两次踩到(`f8073e1f` 对 slice 1 的四个新文件,`b88c4056` 对 tripwire 的三个)。两次都发生在 RD 报告与全量套件都跑了、都报绿的状态下;是 commit 让文件可见,下一次运行就有三个失败。第二次发生在这条教训**已经写进** `sediment-backlog.md` 一小时之后,所以它被记成"必须改的做法"而不是一条事实:一片的验收运行必须在文件已提交的状态下取,或者那次运行必须自己声明是未 track 时取的。`b88c4056` 用 `node .husky/peaks-gate-baseline.mjs` 重生成基线(该生成器只在有人要求抬高上限时拒绝)。
98
+
99
+ `f8073e1f` 还含一行不显眼的配置:`config/eslint/tsconfig.lint.json` 加上 `../../scripts/canonical-store.mjs`。这不是装饰 —— `.mjs` 会被同名的 `.d.mts` 在 TypeScript 的扩展名优先级组 `[.mts, .d.mts, .mjs]` 里遮蔽,`include` glob 于是**静默丢掉**那个 `.mjs`;`.js` 被 `.d.ts` 遮蔽有豁免,`.mjs` 没有。
100
+
101
+ ### 4. 文档与记忆(3 docs)
102
+
103
+ `2a70a651` 补上 `.peaks/docs/canonical-store.md`(真源模型、升级会发生什么、怎么验证与回退,含 4.1.1 升级 runbook)—— 一个跨四个 slice 落地的机制此前没有一页描述它,而它引入的两条行为是用户会**不被告知**就遇上的;README 加上短版与指针。`backlog.md` §2.56 记录缺陷:边车用字符串比较安装版本的包路径来判定归属,那是一条带 node 版本号的路径,所以这个判断是"版本内有效"的事实。页面里每一条行为断言都带代码引用,共 17 处,逐条对着它点名的行核过。`594be46f` 沉淀三条教训(后端被换掉之后要查能力而不是查标签;census 守卫看不见未 track 的文件,所以 pre-commit 绿不是绿;不带理由的降级与成功无法区分),索引到 448 files / 106 lessons。`17c7e2a8` 沉淀"守卫点了规则的名、却只查了名单"这一次:规则读取型守卫需要两条防御 —— 先断言解析非空(否则"什么都没找到"会以"对零个元素循环"的形式通过),以及把同一份解析器喂给 fixture 文本。
104
+
105
+ ### 5. 本版验证
106
+
107
+ `tsc --noEmit -p tsconfig.json` 退出 0;`pnpm build` 退出 0;`pnpm test:unit` 退出 0 —— **406 files / 4238 passed / 3 skipped / 0 failed**(与改动前逐字相同);版本 parity `shared-dist`(`OK (via import) CLI_VERSION=4.1.2`)与 `runtime-src`(`OK (via extract) RUNTIME_VERSION=4.1.2`)双双退出 0;`peaks changeset check --project . --json` 返回 `ok: true`(`state: staged-empty`),`.changeset/` 仍**只有** `config.json`;`peaks baseline diff --project . --json` 退出 0(15 行);**`peaks baseline audit --project . --json` verdict 为 `consistent`**(15/15 journey,crossCheck `guardVsAudit: agree`,`findings: []`)。README 两版的**版本徽章行**更新到 `4.1.2(2026-10-08)` / `4.1.2 (2026-10-08)`,而 `README.md:107` 正文那句"从 4.1.1 升级时会发生什么"是**有意保留的历史陈述,未改动**。
108
+
3
109
  ## 4.1.1 — 2026-10-05 (一次"闸自己坏了整整一个版本"、注释债第一次进棘轮、以及五个从真实使用里捞出来的缺陷)
4
110
 
5
111
  **版本级别**: 未发布区间 `v4.1.0..HEAD` 共 **14 个 commit**(6 fix / 4 feat / 1 test / 1 refactor / 1 docs / 1 chore)。**取 patch,而不是按 4.1.0 自己写下的判据取 minor** —— 这条判据不是被推翻,而是被有意收窄:本版新增的两条命令(`peaks comments audit` / `peaks comments prune`)是**仓库自己的维护表面**,只读或只动本仓注释,不改变任何既有命令的输入输出,也不要求下游做任何事;对外承诺的内容全是修复(其中一条是门禁崩溃)。`^4.1.0` 的下游直接匹配本版。4 个 workspace 包各 +1 patch(internal-runtime 0.0.40→0.0.41、mut 0.1.54→0.1.55、shared 0.0.89→0.0.90、shared-channel 0.0.57→0.0.58),顺带把"本地 manifest 比 registry 新"(mut 的 0.1.54 从未发布)这个坑一次清掉:`scripts/release-pack.mjs` 按拓扑序把 5 个包在同一次 CI 运行里一起发出去,`pnpm pack` 把 `workspace:*` 重写成精确 pin,实测 tarball 内 `CLI_VERSION` 为 4.1.1。
package/README-en.md CHANGED
@@ -155,7 +155,7 @@ Every lane opens with **one slash command**.
155
155
 
156
156
  | | |
157
157
  | --- | --- |
158
- | **Latest** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.1.1 (2026-10-05) |
158
+ | **Latest** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.1.3 (2026-10-09) |
159
159
  | **Domains** | Code (`peaks-code`) · Content (`peaks-content`) · Project health (`peaks-doctor`) · Issue sweep (`peaks-issue-fix-orchestrator`) · Custom SOP (`peaks-sop`) · Cross-domain primitives (`peaks-solo` dispatcher · `peaks-resume` · `peaks-status` · `peaks-test` · `peaks-slice-decompose`) |
160
160
  | **Sediment pool** | `~/.peaks/` local pool · twice-clean runs auto-promote to a bee · broken runs come back for you to redefine · the bee grows with your taste |
161
161
  | **Test suite** | 285+ cases · 4 packages (peaks-loop / peaks-loop-mut / peaks-loop-shared-channel / peaks-loop-shared) · **0 timeouts** · 14 BDD caller-binding edge cases |
@@ -292,10 +292,10 @@ It changes, but **the gates hold**. Audit fails = nothing ships. QA fails = noth
292
292
 
293
293
  If you maintain a project that depends on `peaks-loop` (or that runs `npm install peaks-loop` as part of CI / contributor onboarding), three behaviors are worth pinning in your head:
294
294
 
295
- - **`codegraph` is a transitive dependency.** `peaks-loop` pins `@colbymchenry/codegraph@0.7.10` in its `dependencies`, so `npm install` / `pnpm install` will pull it automatically. The CLI command group `peaks codegraph …` (status / init / index / query / files / context / affected) is shipped inside `dist/services/codegraph/`. No extra install step required.
295
+ - **`codegraph` is a transitive dependency.** `peaks-loop` pins `@colbymchenry/codegraph@1.6.2` in its `dependencies`, so `npm install` / `pnpm install` will pull it automatically. The CLI command group `peaks codegraph …` (status / init / index / query / files / context / affected) is shipped inside `dist/services/codegraph/`. No extra install step required.
296
296
  - **`.codegraph/` directory ownership is shared.** Tools like aider, cody, and similar agents also create a top-level `.codegraph/`. `peaks codegraph init` will refuse to overwrite a foreign schema and exits with code 73 + a `CODEGRAPH_INIT_CONFLICT` envelope. If your project already has a `.codegraph/` from another tool, move / rename it (or remove it if you no longer need it) before running `peaks codegraph init`.
297
297
  - **Session binding lives under `.peaks/_runtime/<sessionId>/`.** Codegraph orchestration context (and other per-session evidence) is written there by RD / QA slices. Add `.peaks/_runtime/` to your project's `.gitignore` to avoid committing local session state. A missing / unbound session produces a graceful skip-with-warning, never a crash.
298
- - **Doctor fallback for yarn-pnp / pnpm-strict.** `peaks doctor` falls back to a filesystem walk when `require.resolve('@colbymchenry/codegraph/package.json')` throws, so downstream installs under strict resolution modes still get a green check (or a `severity: 'warning'` if the version drifted from the pinned `0.7.10`).
298
+ - **Doctor fallback for yarn-pnp / pnpm-strict.** `peaks doctor` falls back to a filesystem walk when `require.resolve('@colbymchenry/codegraph/package.json')` throws, so downstream installs under strict resolution modes still get a green check (or a `severity: 'warning'` if the version drifted from the pinned `1.6.2`).
299
299
  - **Tarball size / verify.** Each release ships the codegraph service under `dist/services/codegraph/`. Per-release verification lives at `scripts/verify-codegraph-tarball.mjs` (run `node scripts/verify-codegraph-tarball.mjs` locally before tagging a release). Exit 0 means the whitelist is intact; exit 1 means the tarball is missing the codegraph service files.
300
300
 
301
301
  Install snippet (typical consumer):
@@ -315,7 +315,7 @@ npx peaks doctor --project .
315
315
  Three common pitfalls:
316
316
 
317
317
  1. **`peaks codegraph init` exits 73** — your project has a pre-existing `.codegraph/` from another tool. Move it out of the way (or remove it), then re-run.
318
- 2. **`peaks doctor` warns about codegraph version drift** — your lockfile resolved a different `@colbymchenry/codegraph` version than the pinned `0.7.10`. Pin to `0.7.10` in your lockfile; the warning does not flip the doctor exit code.
318
+ 2. **`peaks doctor` warns about codegraph version drift** — your lockfile resolved a different `@colbymchenry/codegraph` version than the pinned `1.6.2`. Pin to `1.6.2` in your lockfile; the warning does not flip the doctor exit code.
319
319
  3. **Session-bound artifacts under `.peaks/_runtime/` are noisy in `git status`** — add the path to your project's `.gitignore`. The `peaks-loop` repo already does this; consumers should mirror the rule.
320
320
 
321
321
  ---
package/README.md CHANGED
@@ -88,6 +88,27 @@ npm i -g peaks-loop
88
88
 
89
89
  ---
90
90
 
91
+ ## 装上以后,文件放在哪
92
+
93
+ `npm i -g` 之后,三类资产(**skills / agents / output-styles**)的**实体只存一份**,放在你自己 home 下的
94
+ `~/.peaks/{skills,agents,output-styles}`;每个 IDE 目录里(`~/.claude/…`、`~/.trae/…` 等)的条目都是**指向它的链接**
95
+ (目录用 junction,单个 `.md` 文件用符号链接)。所以升级 `peaks-loop` 时链接目标不变、不需要重建,也不会因为
96
+ 包路径(里面嵌着 node 版本号)变化而静默断裂。
97
+
98
+ 两件会直接影响你的事:
99
+
100
+ - **受管入口会在升级时被覆盖。** 由 peaks-loop 装进去的入口(比如 `~/.claude/agents/karpathy-reviewer.md`)旁边有一份
101
+ `.peaks-managed` 边车标记归属,升级时内容会被更新。**想换成你自己的版本,删掉那份额边车即可** —— 没有标记的入口
102
+ 一律视为你自己建的,**永不被替换、也永不被删除**。
103
+ - **有些 Windows 机器上会退化成实体副本。** 没有开发者模式、也不是管理员时,建不出**文件**符号链接(目录用的 junction
104
+ 不受影响),安装器会写实体副本并在 stderr 明说 `installed as REAL COPIES because this host refused a symlink`。
105
+ 内容照样跟着升级走,只是不再与真源共享同一份。
106
+
107
+ 真源根可用环境变量 `PEAKS_HOME` 重定向。完整的模型、从 4.1.1 升级时会发生什么、怎么验证与回退 →
108
+ [`.peaks/docs/canonical-store.md`](./.peaks/docs/canonical-store.md)。
109
+
110
+ ---
111
+
91
112
  ## 它能为你做什么
92
113
 
93
114
  代码、内容、项目健康、issue 修复、自定义工作流 —— **4.x 已经覆盖五条域**,每条域都有专门编排器,按"门禁不通过就停"的纪律一条一条跑。
@@ -154,7 +175,7 @@ npm i -g peaks-loop
154
175
 
155
176
  | | |
156
177
  | --- | --- |
157
- | **最新版本** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.1.1(2026-10-05) |
178
+ | **最新版本** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.1.3(2026-10-09) |
158
179
  | **覆盖域** | 代码(`peaks-code`) · 内容(`peaks-content`) · 项目健康(`peaks-doctor`) · 批量修 issue(`peaks-issue-fix-orchestrator`) · 自定义 SOP(`peaks-sop`) · 通用原语(`peaks-solo` 分诊 / `peaks-resume` 续 / `peaks-status` 看 / `peaks-test` 测 / `peaks-slice-decompose` 切片) |
159
180
  | **沉淀池** | `~/.peaks/` 本地池 · 跑两次自动晋升成 bee · 跑翻车让你重定义 · bee 跟着你的口味长 |
160
181
  | **测试套件** | 1096 cases · 4 packages (peaks-loop 1015 / runtime 39 / mut 22 / shared-channel 20) · **CI 首次全绿**(ubuntu + windows) · 14 BDD caller-binding coverage |
@@ -292,10 +313,10 @@ winget install Python.Python.3.12
292
313
 
293
314
  如果你的项目依赖 `peaks-loop`(或者把 `npm install peaks-loop` 写进 CI / 协作者 onboarding),有三件事需要先记清:
294
315
 
295
- - **`codegraph` 是传递依赖。** `peaks-loop` 在 `dependencies` 里硬钉 `@colbymchenry/codegraph@0.7.10`,所以 `npm install` / `pnpm install` 会自动拉取。CLI 命令组 `peaks codegraph …`(status / init / index / query / files / context / affected)打包在 `dist/services/codegraph/`,无需额外安装步骤。
316
+ - **`codegraph` 是传递依赖。** `peaks-loop` 在 `dependencies` 里硬钉 `@colbymchenry/codegraph@1.6.2`,所以 `npm install` / `pnpm install` 会自动拉取。CLI 命令组 `peaks codegraph …`(status / init / index / query / files / context / affected)打包在 `dist/services/codegraph/`,无需额外安装步骤。
296
317
  - **`.codegraph/` 目录归属是共享的。** aider / cody 等类似工具也会在项目根创建 `.codegraph/`。`peaks codegraph init` 拒绝覆盖外源 schema,以 exit code 73 + `CODEGRAPH_INIT_CONFLICT` 凭据退出。如果你的项目里已经有其他工具建的 `.codegraph/`,跑 `peaks codegraph init` 之前先移走 / 改名(或确认不再需要后删除)。
297
318
  - **session 绑定落在 `.peaks/_runtime/<sessionId>/`。** codegraph 编排上下文(以及其他 session 级证据)由 RD / QA 切片写入。把 `.peaks/_runtime/` 加进项目的 `.gitignore`,避免误提交本地 session 状态。session 缺失 / 未绑定时优雅降级为「跳过 + 警告」,绝不 crash。
298
- - **yarn-pnp / pnpm-strict 的 doctor 兜底。** `peaks doctor` 在 `require.resolve('@colbymchenry/codegraph/package.json')` 抛错时回退到文件系统遍历,因此严格解析模式下的下游安装也能拿到绿色 check(若版本偏离钉死的 `0.7.10` 则降级为 `severity: 'warning'`)。
319
+ - **yarn-pnp / pnpm-strict 的 doctor 兜底。** `peaks doctor` 在 `require.resolve('@colbymchenry/codegraph/package.json')` 抛错时回退到文件系统遍历,因此严格解析模式下的下游安装也能拿到绿色 check(若版本偏离钉死的 `1.6.2` 则降级为 `severity: 'warning'`)。
299
320
  - **tarball 大小 / 自检。** 每次发布都把 codegraph service 打进 `dist/services/codegraph/`。逐版本自检脚本见 `scripts/verify-codegraph-tarball.mjs`(发布前本地跑 `node scripts/verify-codegraph-tarball.mjs`)。exit 0 表示 whitelist 完好,exit 1 表示 tarball 漏了 codegraph service 文件。
300
321
 
301
322
  典型下游安装片段:
@@ -314,7 +335,7 @@ npx peaks doctor --project .
314
335
  三个常见坑:
315
336
 
316
337
  1. **`peaks codegraph init` 退出码 73** —— 项目里已有外源 `.codegraph/`(aider / cody 等)。把它挪开(或删掉)再重跑。
317
- 2. **`peaks doctor` 报 codegraph 版本漂移** —— 你的 lockfile 解到了一个跟钉死 `0.7.10` 不同的版本。在 lockfile 里钉到 `0.7.10`;这条 warning 不会让 doctor 退出码翻红。
338
+ 2. **`peaks doctor` 报 codegraph 版本漂移** —— 你的 lockfile 解到了一个跟钉死 `1.6.2` 不同的版本。在 lockfile 里钉到 `1.6.2`;这条 warning 不会让 doctor 退出码翻红。
318
339
  3. **`.peaks/_runtime/` 下的 session 产物在 `git status` 里嘈杂** —— 把这条路径加进项目的 `.gitignore`。`peaks-loop` 仓库已经这样做;下游消费者应当镜像这条规则。
319
340
 
320
341
  ---
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The Node version floor, checked by `bin/peaks.js` before it imports the app.
3
+ *
4
+ * WHY THIS FILE IS NEXT TO THE SHIM AND NOT IN `src/`. Every store now imports
5
+ * `node:sqlite`, so on a Node that predates that builtin the failure is raised while
6
+ * resolving the import graph — `ERR_UNKNOWN_BUILTIN_MODULE`, before one line of our code
7
+ * runs. A check inside the CLI would be compiled into the very graph that cannot load.
8
+ * `bin/peaks.js` is already the place that translates pre-app Node failures (a stale
9
+ * `dist/`) into sentences, so the floor lives with it.
10
+ *
11
+ * WHY 24. `node:sqlite` exists in 22.5+ but not as something this code can import
12
+ * unconditionally; 24 is the line measured on the developer host that started this change,
13
+ * where `import { DatabaseSync } from 'node:sqlite'` works with no flag and no warning.
14
+ * The number is asserted against `package.json#engines.node` by
15
+ * `tests/unit/cli/node-floor.test.ts`, because two spellings of one boundary is this
16
+ * repository's oldest defect class.
17
+ *
18
+ * WHAT IT REFUSES TO GUESS. An empty version string is not evidence of an old Node, so it
19
+ * does not block anyone; a NON-empty string that cannot be parsed fails loudly instead,
20
+ * because a wrong "you're fine" costs a crash two commands later and a wrong "too old"
21
+ * costs one confusing message.
22
+ */
23
+
24
+ /** The major version at which `node:sqlite` is importable with no flag. */
25
+ export const MIN_NODE_MAJOR = 24;
26
+
27
+ /**
28
+ * A short reason string when `version` is below the floor, undefined when it is not.
29
+ *
30
+ * Returns the reason rather than printing it so the caller decides the stream and the exit
31
+ * code, and so the predicate is testable at every version without spawning a Node per case.
32
+ */
33
+ export function nodeFloorProblem(version) {
34
+ if (typeof version !== 'string' || version.length === 0) return undefined;
35
+ const major = Number.parseInt(version.replace(/^v/, ''), 10);
36
+ if (!Number.isFinite(major)) {
37
+ return `the running Node version could not read as a version: "${version}"`;
38
+ }
39
+ if (major >= MIN_NODE_MAJOR) return undefined;
40
+ return `Node ${version} predates the builtin SQLite module`;
41
+ }
42
+
43
+ /** The full operator-facing message: what is wrong, and what to do about it. */
44
+ export function nodeFloorSentence(version) {
45
+ return (
46
+ `peaks-loop requires Node >=${String(MIN_NODE_MAJOR)}.0.0 — found ${version || 'unknown'}.\n` +
47
+ ' why: the stores read and write through `node:sqlite`, a Node builtin. It replaced\n' +
48
+ ' a native SQLite addon so that installing this CLI needs no C++ toolchain and\n' +
49
+ ' no prebuilt binary matching your Node ABI.\n' +
50
+ ' fix: switch to Node ' +
51
+ String(MIN_NODE_MAJOR) +
52
+ '.x (nvm install ' +
53
+ String(MIN_NODE_MAJOR) +
54
+ ' && nvm use ' +
55
+ String(MIN_NODE_MAJOR) +
56
+ '),\n' +
57
+ ' then re-run the same command.\n'
58
+ );
59
+ }
package/bin/peaks.js CHANGED
@@ -20,6 +20,19 @@
20
20
  */
21
21
  import { fileURLToPath } from 'node:url';
22
22
 
23
+ import { nodeFloorProblem, nodeFloorSentence } from './node-floor.mjs';
24
+
25
+ /**
26
+ * Checked before the app is imported, because the thing it checks is an import: the stores
27
+ * load `node:sqlite` at module scope, so below the floor the process dies resolving the
28
+ * graph and never reaches a check written inside the CLI.
29
+ */
30
+ const floorProblem = nodeFloorProblem(process.versions.node);
31
+ if (floorProblem !== undefined) {
32
+ process.stderr.write(nodeFloorSentence(process.versions.node));
33
+ process.exit(1);
34
+ }
35
+
23
36
  const PACKAGE_ROOT = fileURLToPath(new URL('..', import.meta.url));
24
37
 
25
38
  /** Workspace-internal packages whose absence always means "stale build". */
@@ -33,7 +33,8 @@
33
33
  "../../scripts/dist-freshness.mjs",
34
34
  "../../scripts/install-skills.mjs",
35
35
  "../../scripts/packages-build-prerequisite.mjs",
36
- "../../scripts/verify-version-parity.mjs"
36
+ "../../scripts/verify-version-parity.mjs",
37
+ "../../scripts/canonical-store.mjs"
37
38
  ],
38
39
  "include": [
39
40
  "../../src/**/*",