peaks-loop 4.1.2 → 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 (323) hide show
  1. package/.claude-plugin/marketplace.json +136 -47
  2. package/CHANGELOG.md +56 -0
  3. package/README-en.md +1 -1
  4. package/README.md +1 -1
  5. package/contracts/readonly-argv-whitelist.json +211 -0
  6. package/dist/cli/commands/audit-artifact-runners.d.ts +16 -0
  7. package/dist/cli/commands/audit-artifact-runners.js +170 -0
  8. package/dist/cli/commands/audit-command-shared.d.ts +97 -0
  9. package/dist/cli/commands/audit-command-shared.js +60 -0
  10. package/dist/cli/commands/audit-commands.d.ts +7 -31
  11. package/dist/cli/commands/audit-commands.js +64 -473
  12. package/dist/cli/commands/audit-goal-runners.d.ts +17 -0
  13. package/dist/cli/commands/audit-goal-runners.js +114 -0
  14. package/dist/cli/commands/audit-red-lines-runners.d.ts +11 -0
  15. package/dist/cli/commands/audit-red-lines-runners.js +43 -0
  16. package/dist/cli/commands/audit-refusal-data.d.ts +23 -0
  17. package/dist/cli/commands/audit-refusal-data.js +69 -0
  18. package/dist/cli/commands/audit-static-runners.d.ts +13 -0
  19. package/dist/cli/commands/audit-static-runners.js +139 -0
  20. package/dist/cli/commands/await-runners.d.ts +11 -0
  21. package/dist/cli/commands/await-runners.js +148 -0
  22. package/dist/cli/commands/code-auto-compact-command.d.ts +3 -0
  23. package/dist/cli/commands/code-auto-compact-command.js +124 -0
  24. package/dist/cli/commands/code-auto-compact-envelope.d.ts +22 -0
  25. package/dist/cli/commands/code-auto-compact-envelope.js +39 -0
  26. package/dist/cli/commands/code-context-audit-command.d.ts +3 -0
  27. package/dist/cli/commands/code-context-audit-command.js +68 -0
  28. package/dist/cli/commands/code-context-now-command.d.ts +3 -0
  29. package/dist/cli/commands/code-context-now-command.js +124 -0
  30. package/dist/cli/commands/code-context-now-envelope.d.ts +66 -0
  31. package/dist/cli/commands/code-context-now-envelope.js +136 -0
  32. package/dist/cli/commands/code-context-now-mapping.d.ts +27 -0
  33. package/dist/cli/commands/code-context-now-mapping.js +43 -0
  34. package/dist/cli/commands/code-emit-handoff-command.d.ts +3 -0
  35. package/dist/cli/commands/code-emit-handoff-command.js +99 -0
  36. package/dist/cli/commands/code-gate-step-08-command.d.ts +3 -0
  37. package/dist/cli/commands/code-gate-step-08-command.js +139 -0
  38. package/dist/cli/commands/code-post-compact-detect-command.d.ts +3 -0
  39. package/dist/cli/commands/code-post-compact-detect-command.js +50 -0
  40. package/dist/cli/commands/code-runtime-commands.d.ts +9 -43
  41. package/dist/cli/commands/code-runtime-commands.js +20 -672
  42. package/dist/cli/commands/code-runtime-session.d.ts +1 -0
  43. package/dist/cli/commands/code-runtime-session.js +15 -0
  44. package/dist/cli/commands/compact-command.d.ts +6 -2
  45. package/dist/cli/commands/compact-command.js +12 -559
  46. package/dist/cli/commands/compact-dry-run-command.d.ts +3 -0
  47. package/dist/cli/commands/compact-dry-run-command.js +87 -0
  48. package/dist/cli/commands/compact-force-command.d.ts +3 -0
  49. package/dist/cli/commands/compact-force-command.js +98 -0
  50. package/dist/cli/commands/compact-harness-window-command.d.ts +3 -0
  51. package/dist/cli/commands/compact-harness-window-command.js +174 -0
  52. package/dist/cli/commands/compact-history-command.d.ts +3 -0
  53. package/dist/cli/commands/compact-history-command.js +89 -0
  54. package/dist/cli/commands/compact-read-commands.d.ts +3 -0
  55. package/dist/cli/commands/compact-read-commands.js +123 -0
  56. package/dist/cli/commands/compact-settle-command.d.ts +3 -0
  57. package/dist/cli/commands/compact-settle-command.js +130 -0
  58. package/dist/cli/commands/compact-shared.d.ts +9 -0
  59. package/dist/cli/commands/compact-shared.js +26 -0
  60. package/dist/cli/commands/core/skill-command.d.ts +1 -44
  61. package/dist/cli/commands/core/skill-command.js +13 -541
  62. package/dist/cli/commands/core/skill-context-verdict.d.ts +38 -0
  63. package/dist/cli/commands/core/skill-context-verdict.js +63 -0
  64. package/dist/cli/commands/core/skill-generated-config-notice.d.ts +41 -0
  65. package/dist/cli/commands/core/skill-generated-config-notice.js +75 -0
  66. package/dist/cli/commands/core/skill-heartbeat-commands.d.ts +3 -0
  67. package/dist/cli/commands/core/skill-heartbeat-commands.js +50 -0
  68. package/dist/cli/commands/core/skill-presence-commands.d.ts +3 -0
  69. package/dist/cli/commands/core/skill-presence-commands.js +123 -0
  70. package/dist/cli/commands/core/skill-presence-housekeeping-commands.d.ts +3 -0
  71. package/dist/cli/commands/core/skill-presence-housekeeping-commands.js +165 -0
  72. package/dist/cli/commands/core/skill-registry-commands.d.ts +3 -0
  73. package/dist/cli/commands/core/skill-registry-commands.js +117 -0
  74. package/dist/cli/commands/core/skill-runbook-command.d.ts +3 -0
  75. package/dist/cli/commands/core/skill-runbook-command.js +29 -0
  76. package/dist/cli/commands/dispatch-command-spec.d.ts +2 -0
  77. package/dist/cli/commands/dispatch-command-spec.js +62 -0
  78. package/dist/cli/commands/dispatch-commands.js +159 -775
  79. package/dist/cli/commands/dispatch-detached-branch.d.ts +3 -0
  80. package/dist/cli/commands/dispatch-detached-branch.js +58 -0
  81. package/dist/cli/commands/dispatch-envelope.d.ts +36 -0
  82. package/dist/cli/commands/dispatch-envelope.js +104 -0
  83. package/dist/cli/commands/dispatch-isolation-lease.d.ts +17 -0
  84. package/dist/cli/commands/dispatch-isolation-lease.js +149 -0
  85. package/dist/cli/commands/dispatch-preflight.d.ts +7 -0
  86. package/dist/cli/commands/dispatch-preflight.js +105 -0
  87. package/dist/cli/commands/dispatch-prompt-blocks.d.ts +10 -0
  88. package/dist/cli/commands/dispatch-prompt-blocks.js +56 -0
  89. package/dist/cli/commands/dispatch-prompt-composition.d.ts +30 -0
  90. package/dist/cli/commands/dispatch-prompt-composition.js +171 -0
  91. package/dist/cli/commands/dispatch-record-write.d.ts +24 -0
  92. package/dist/cli/commands/dispatch-record-write.js +96 -0
  93. package/dist/cli/commands/dispatch-tool-call.d.ts +15 -0
  94. package/dist/cli/commands/dispatch-tool-call.js +128 -0
  95. package/dist/cli/commands/evolution-command-shared.d.ts +78 -0
  96. package/dist/cli/commands/evolution-command-shared.js +107 -0
  97. package/dist/cli/commands/evolution-commands.d.ts +11 -1
  98. package/dist/cli/commands/evolution-commands.js +19 -350
  99. package/dist/cli/commands/evolution-evaluate-command.d.ts +24 -0
  100. package/dist/cli/commands/evolution-evaluate-command.js +138 -0
  101. package/dist/cli/commands/evolution-propose-command.d.ts +23 -0
  102. package/dist/cli/commands/evolution-propose-command.js +145 -0
  103. package/dist/cli/commands/evolution-status-command.d.ts +17 -0
  104. package/dist/cli/commands/evolution-status-command.js +41 -0
  105. package/dist/cli/commands/evolution-verdict-commands.d.ts +30 -0
  106. package/dist/cli/commands/evolution-verdict-commands.js +100 -0
  107. package/dist/cli/commands/finalize-accumulator.d.ts +44 -0
  108. package/dist/cli/commands/finalize-accumulator.js +55 -0
  109. package/dist/cli/commands/finalize-branches.d.ts +34 -0
  110. package/dist/cli/commands/finalize-branches.js +119 -0
  111. package/dist/cli/commands/finalize-runners.d.ts +3 -0
  112. package/dist/cli/commands/finalize-runners.js +92 -0
  113. package/dist/cli/commands/finalize-selection.d.ts +65 -0
  114. package/dist/cli/commands/finalize-selection.js +35 -0
  115. package/dist/cli/commands/gate-commands.js +26 -8
  116. package/dist/cli/commands/job-checkpoint-commands.d.ts +3 -0
  117. package/dist/cli/commands/job-checkpoint-commands.js +157 -0
  118. package/dist/cli/commands/job-command-shared.d.ts +109 -0
  119. package/dist/cli/commands/job-command-shared.js +72 -0
  120. package/dist/cli/commands/job-commands.d.ts +4 -64
  121. package/dist/cli/commands/job-commands.js +42 -552
  122. package/dist/cli/commands/job-cost-check-command.d.ts +3 -0
  123. package/dist/cli/commands/job-cost-check-command.js +41 -0
  124. package/dist/cli/commands/job-init-status-commands.d.ts +3 -0
  125. package/dist/cli/commands/job-init-status-commands.js +149 -0
  126. package/dist/cli/commands/job-run-commands.d.ts +3 -0
  127. package/dist/cli/commands/job-run-commands.js +97 -0
  128. package/dist/cli/commands/job-state-root.d.ts +35 -0
  129. package/dist/cli/commands/job-state-root.js +76 -0
  130. package/dist/cli/commands/loop-eval-capture-index.d.ts +4 -0
  131. package/dist/cli/commands/loop-eval-capture-index.js +44 -0
  132. package/dist/cli/commands/loop-eval-commands.d.ts +8 -5
  133. package/dist/cli/commands/loop-eval-commands.js +12 -626
  134. package/dist/cli/commands/loop-eval-eval-command.d.ts +3 -0
  135. package/dist/cli/commands/loop-eval-eval-command.js +168 -0
  136. package/dist/cli/commands/loop-eval-monotonic-command.d.ts +3 -0
  137. package/dist/cli/commands/loop-eval-monotonic-command.js +90 -0
  138. package/dist/cli/commands/loop-eval-parents.d.ts +7 -0
  139. package/dist/cli/commands/loop-eval-parents.js +20 -0
  140. package/dist/cli/commands/loop-eval-run-code.d.ts +7 -0
  141. package/dist/cli/commands/loop-eval-run-code.js +40 -0
  142. package/dist/cli/commands/loop-eval-run-command.d.ts +3 -0
  143. package/dist/cli/commands/loop-eval-run-command.js +113 -0
  144. package/dist/cli/commands/loop-eval-spec-commands.d.ts +3 -0
  145. package/dist/cli/commands/loop-eval-spec-commands.js +165 -0
  146. package/dist/cli/commands/loop-eval-spec-lint-command.d.ts +3 -0
  147. package/dist/cli/commands/loop-eval-spec-lint-command.js +42 -0
  148. package/dist/cli/commands/loop-eval-workflow-commands.d.ts +3 -0
  149. package/dist/cli/commands/loop-eval-workflow-commands.js +141 -0
  150. package/dist/cli/commands/mcp-commands.d.ts +10 -0
  151. package/dist/cli/commands/mcp-commands.js +157 -0
  152. package/dist/cli/commands/request-command-options.d.ts +49 -0
  153. package/dist/cli/commands/request-command-options.js +1 -0
  154. package/dist/cli/commands/request-commands.d.ts +3 -9
  155. package/dist/cli/commands/request-commands.js +17 -522
  156. package/dist/cli/commands/request-init-command.d.ts +3 -0
  157. package/dist/cli/commands/request-init-command.js +100 -0
  158. package/dist/cli/commands/request-lint-command.d.ts +3 -0
  159. package/dist/cli/commands/request-lint-command.js +50 -0
  160. package/dist/cli/commands/request-list-command.d.ts +10 -0
  161. package/dist/cli/commands/request-list-command.js +53 -0
  162. package/dist/cli/commands/request-repair-status-command.d.ts +3 -0
  163. package/dist/cli/commands/request-repair-status-command.js +61 -0
  164. package/dist/cli/commands/request-show-command.d.ts +3 -0
  165. package/dist/cli/commands/request-show-command.js +56 -0
  166. package/dist/cli/commands/request-transition-command.d.ts +3 -0
  167. package/dist/cli/commands/request-transition-command.js +122 -0
  168. package/dist/cli/commands/request-transition-failures.d.ts +8 -0
  169. package/dist/cli/commands/request-transition-failures.js +90 -0
  170. package/dist/cli/commands/request-transition-hooks.d.ts +50 -0
  171. package/dist/cli/commands/request-transition-hooks.js +115 -0
  172. package/dist/cli/commands/request-transition-preflight.d.ts +10 -0
  173. package/dist/cli/commands/request-transition-preflight.js +107 -0
  174. package/dist/cli/commands/scan-command-shared.d.ts +96 -0
  175. package/dist/cli/commands/scan-command-shared.js +83 -0
  176. package/dist/cli/commands/scan-commands.d.ts +3 -2
  177. package/dist/cli/commands/scan-commands.js +23 -463
  178. package/dist/cli/commands/scan-inventory-commands.d.ts +3 -0
  179. package/dist/cli/commands/scan-inventory-commands.js +96 -0
  180. package/dist/cli/commands/scan-project-commands.d.ts +3 -0
  181. package/dist/cli/commands/scan-project-commands.js +65 -0
  182. package/dist/cli/commands/scan-scope-commands.d.ts +3 -0
  183. package/dist/cli/commands/scan-scope-commands.js +149 -0
  184. package/dist/cli/commands/scan-scope-helpers.d.ts +8 -0
  185. package/dist/cli/commands/scan-scope-helpers.js +54 -0
  186. package/dist/cli/commands/scan-structural-commands.d.ts +3 -0
  187. package/dist/cli/commands/scan-structural-commands.js +113 -0
  188. package/dist/cli/commands/share-commands.d.ts +12 -68
  189. package/dist/cli/commands/share-commands.js +47 -556
  190. package/dist/cli/commands/share-error-hints.d.ts +14 -0
  191. package/dist/cli/commands/share-error-hints.js +38 -0
  192. package/dist/cli/commands/share-identity.d.ts +13 -0
  193. package/dist/cli/commands/share-identity.js +22 -0
  194. package/dist/cli/commands/share-record-paths.d.ts +37 -0
  195. package/dist/cli/commands/share-record-paths.js +68 -0
  196. package/dist/cli/commands/share-runners.d.ts +3 -0
  197. package/dist/cli/commands/share-runners.js +158 -0
  198. package/dist/cli/commands/shared-read-runners.d.ts +3 -0
  199. package/dist/cli/commands/shared-read-runners.js +51 -0
  200. package/dist/cli/commands/slice-check-command.d.ts +3 -0
  201. package/dist/cli/commands/slice-check-command.js +54 -0
  202. package/dist/cli/commands/slice-commands.d.ts +2 -22
  203. package/dist/cli/commands/slice-commands.js +18 -517
  204. package/dist/cli/commands/slice-decompose-artifacts.d.ts +18 -0
  205. package/dist/cli/commands/slice-decompose-artifacts.js +79 -0
  206. package/dist/cli/commands/slice-decompose-command.d.ts +3 -0
  207. package/dist/cli/commands/slice-decompose-command.js +123 -0
  208. package/dist/cli/commands/slice-list-commands.d.ts +3 -0
  209. package/dist/cli/commands/slice-list-commands.js +182 -0
  210. package/dist/cli/commands/slice-pick-command.d.ts +3 -0
  211. package/dist/cli/commands/slice-pick-command.js +60 -0
  212. package/dist/cli/commands/slice-plan-command.d.ts +24 -0
  213. package/dist/cli/commands/slice-plan-command.js +111 -0
  214. package/dist/cli/commands/workflow-commands.d.ts +10 -1
  215. package/dist/cli/commands/workflow-commands.js +6 -594
  216. package/dist/cli/commands/workflow-gate-commands.d.ts +3 -0
  217. package/dist/cli/commands/workflow-gate-commands.js +116 -0
  218. package/dist/cli/commands/workflow-plan-helpers.d.ts +48 -0
  219. package/dist/cli/commands/workflow-plan-helpers.js +103 -0
  220. package/dist/cli/commands/workflow-planning-commands.d.ts +3 -0
  221. package/dist/cli/commands/workflow-planning-commands.js +56 -0
  222. package/dist/cli/commands/workflow-swarm-actions.d.ts +7 -0
  223. package/dist/cli/commands/workflow-swarm-actions.js +109 -0
  224. package/dist/cli/commands/workflow-swarm-commands.d.ts +3 -0
  225. package/dist/cli/commands/workflow-swarm-commands.js +138 -0
  226. package/dist/cli/commands/workflow-tech-actions.d.ts +10 -0
  227. package/dist/cli/commands/workflow-tech-actions.js +150 -0
  228. package/dist/cli/commands/workspace/init-actions.d.ts +10 -0
  229. package/dist/cli/commands/workspace/init-actions.js +199 -0
  230. package/dist/cli/commands/workspace/init-codegraph-stake.d.ts +10 -0
  231. package/dist/cli/commands/workspace/init-codegraph-stake.js +54 -0
  232. package/dist/cli/commands/workspace/init-command.d.ts +8 -124
  233. package/dist/cli/commands/workspace/init-command.js +59 -623
  234. package/dist/cli/commands/workspace/init-context.d.ts +58 -0
  235. package/dist/cli/commands/workspace/init-context.js +121 -0
  236. package/dist/cli/commands/workspace/init-envelope.d.ts +3 -0
  237. package/dist/cli/commands/workspace/init-envelope.js +34 -0
  238. package/dist/cli/commands/workspace/init-failures.d.ts +3 -0
  239. package/dist/cli/commands/workspace/init-failures.js +84 -0
  240. package/dist/cli/commands/workspace/init-hooks-decision.d.ts +24 -0
  241. package/dist/cli/commands/workspace/init-hooks-decision.js +189 -0
  242. package/dist/cli/commands/workspace/init-options.d.ts +102 -0
  243. package/dist/cli/commands/workspace/init-options.js +1 -0
  244. package/dist/cli/commands/worktree-lease-commands.d.ts +10 -6
  245. package/dist/cli/commands/worktree-lease-commands.js +42 -512
  246. package/dist/cli/commands/worktree-lease-gc-command.d.ts +12 -0
  247. package/dist/cli/commands/worktree-lease-gc-command.js +117 -0
  248. package/dist/cli/commands/worktree-lease-git.d.ts +22 -0
  249. package/dist/cli/commands/worktree-lease-git.js +48 -0
  250. package/dist/cli/commands/worktree-lease-list-command.d.ts +12 -0
  251. package/dist/cli/commands/worktree-lease-list-command.js +100 -0
  252. package/dist/cli/commands/worktree-lease-load.d.ts +37 -0
  253. package/dist/cli/commands/worktree-lease-load.js +28 -0
  254. package/dist/cli/commands/worktree-lease-release-command.d.ts +13 -0
  255. package/dist/cli/commands/worktree-lease-release-command.js +105 -0
  256. package/dist/cli/commands/worktree-lease-renew-command.d.ts +11 -0
  257. package/dist/cli/commands/worktree-lease-renew-command.js +99 -0
  258. package/dist/cli/commands/worktree-lease-session.d.ts +22 -0
  259. package/dist/cli/commands/worktree-lease-session.js +29 -0
  260. package/dist/cli/commands/worktree-lease-spawn-command.d.ts +11 -0
  261. package/dist/cli/commands/worktree-lease-spawn-command.js +119 -0
  262. package/dist/cli/commands/worktree-lease-status-command.d.ts +11 -0
  263. package/dist/cli/commands/worktree-lease-status-command.js +86 -0
  264. package/dist/cli/commands/worktree-lease-store.d.ts +19 -0
  265. package/dist/cli/commands/worktree-lease-store.js +24 -0
  266. package/dist/cli/program.js +5 -0
  267. package/dist/services/distribution/mcp-install-runner.d.ts +21 -0
  268. package/dist/services/distribution/mcp-install-runner.js +59 -0
  269. package/dist/services/distribution/mcp-install.d.ts +95 -0
  270. package/dist/services/distribution/mcp-install.js +179 -0
  271. package/dist/services/distribution/plugin-manifest.d.ts +97 -0
  272. package/dist/services/distribution/plugin-manifest.js +126 -0
  273. package/dist/services/hooks/mcp-surface-gate.d.ts +19 -0
  274. package/dist/services/hooks/mcp-surface-gate.js +87 -0
  275. package/dist/services/ide/adapters/claude-code-adapter.d.ts +4 -35
  276. package/dist/services/ide/adapters/claude-code-adapter.js +48 -171
  277. package/dist/services/ide/adapters/claude-code-local-state.d.ts +28 -0
  278. package/dist/services/ide/adapters/claude-code-local-state.js +112 -0
  279. package/dist/services/ide/adapters/claude-code-model-window.d.ts +37 -0
  280. package/dist/services/ide/adapters/claude-code-model-window.js +113 -0
  281. package/dist/services/ide/ide-mcp-install-types.d.ts +78 -0
  282. package/dist/services/ide/ide-mcp-install-types.js +104 -0
  283. package/dist/services/ide/ide-types.d.ts +45 -1
  284. package/dist/services/ide/mcp-tool-matcher.d.ts +34 -0
  285. package/dist/services/ide/mcp-tool-matcher.js +84 -0
  286. package/dist/services/lint/npx-resolver.js +7 -0
  287. package/dist/services/mcp/cli-executor.d.ts +36 -0
  288. package/dist/services/mcp/cli-executor.js +97 -0
  289. package/dist/services/mcp/json-rpc.d.ts +81 -0
  290. package/dist/services/mcp/json-rpc.js +116 -0
  291. package/dist/services/mcp/memory-tool.d.ts +3 -0
  292. package/dist/services/mcp/memory-tool.js +62 -0
  293. package/dist/services/mcp/server-main.d.ts +1 -0
  294. package/dist/services/mcp/server-main.js +66 -0
  295. package/dist/services/mcp/server.d.ts +22 -0
  296. package/dist/services/mcp/server.js +152 -0
  297. package/dist/services/mcp/surface.d.ts +62 -0
  298. package/dist/services/mcp/surface.js +198 -0
  299. package/dist/services/mcp/tool-core.d.ts +42 -0
  300. package/dist/services/mcp/tool-core.js +137 -0
  301. package/dist/services/mcp/tools.d.ts +13 -0
  302. package/dist/services/mcp/tools.js +58 -0
  303. package/dist/services/readonly-surface/argv-guard.d.ts +32 -0
  304. package/dist/services/readonly-surface/argv-guard.js +164 -0
  305. package/dist/services/readonly-surface/readonly-whitelist.d.ts +147 -0
  306. package/dist/services/readonly-surface/readonly-whitelist.js +107 -0
  307. package/dist/services/readonly-surface/whitelist-generator.d.ts +64 -0
  308. package/dist/services/readonly-surface/whitelist-generator.js +212 -0
  309. package/dist/services/skills/hooks-codegate-superpowers.d.ts +1 -0
  310. package/dist/services/skills/hooks-codegate-superpowers.js +26 -0
  311. package/dist/services/skills/hooks-settings-service.js +10 -2
  312. package/package.json +17 -6
  313. package/scripts/install-skills-bundles.mjs +233 -0
  314. package/scripts/install-skills-fs.mjs +148 -0
  315. package/scripts/install-skills-ide.mjs +279 -0
  316. package/scripts/install-skills-output-style-default.mjs +196 -0
  317. package/scripts/install-skills-output-styles.mjs +121 -0
  318. package/scripts/install-skills-report.mjs +42 -0
  319. package/scripts/install-skills-user-config.mjs +198 -0
  320. package/scripts/install-skills.mjs +36 -1066
  321. package/scripts/watch-tree.mjs +140 -0
  322. package/scripts/watch.mjs +4 -126
  323. package/skills/peaks-status/SKILL.md +31 -13
@@ -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,61 @@
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
+
3
59
  ## 4.1.2 — 2026-10-08 (资产真源落地: 升级不再静默冻结入口; codegraph 换上 1.6.2 的包模型, 顺带照出一条从未响过的失败路径)
4
60
 
5
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。
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.2 (2026-10-08) |
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 |
package/README.md CHANGED
@@ -175,7 +175,7 @@ npm i -g peaks-loop
175
175
 
176
176
  | | |
177
177
  | --- | --- |
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.2(2026-10-08) |
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) |
179
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` 切片) |
180
180
  | **沉淀池** | `~/.peaks/` 本地池 · 跑两次自动晋升成 bee · 跑翻车让你重定义 · bee 跟着你的口味长 |
181
181
  | **测试套件** | 1096 cases · 4 packages (peaks-loop 1015 / runtime 39 / mut 22 / shared-channel 20) · **CI 首次全绿**(ubuntu + windows) · 14 BDD caller-binding coverage |
@@ -0,0 +1,211 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "contracts/readonly-surface.json",
4
+ "readOnlyDefinition": "readOnly = no persistent-state write AND no network AND no LLM billing AND no CLI->external process spawn (output constancy over time is deliberately NOT part of it)",
5
+ "entries": [
6
+ {
7
+ "id": "skill-presence",
8
+ "tool": "peaks_status",
9
+ "commandPath": [
10
+ "skill",
11
+ "presence"
12
+ ],
13
+ "argv": [
14
+ {
15
+ "kind": "literal",
16
+ "value": "skill"
17
+ },
18
+ {
19
+ "kind": "literal",
20
+ "value": "presence"
21
+ },
22
+ {
23
+ "kind": "literal",
24
+ "value": "--json"
25
+ }
26
+ ],
27
+ "params": {},
28
+ "introspection": {
29
+ "optionTokens": [
30
+ "--json"
31
+ ],
32
+ "positionalCount": 0
33
+ }
34
+ },
35
+ {
36
+ "id": "session-list",
37
+ "tool": "peaks_status",
38
+ "commandPath": [
39
+ "session",
40
+ "list"
41
+ ],
42
+ "argv": [
43
+ {
44
+ "kind": "literal",
45
+ "value": "session"
46
+ },
47
+ {
48
+ "kind": "literal",
49
+ "value": "list"
50
+ },
51
+ {
52
+ "kind": "literal",
53
+ "value": "--json"
54
+ }
55
+ ],
56
+ "params": {},
57
+ "introspection": {
58
+ "optionTokens": [
59
+ "--json"
60
+ ],
61
+ "positionalCount": 0
62
+ }
63
+ },
64
+ {
65
+ "id": "request-show",
66
+ "tool": "peaks_status",
67
+ "commandPath": [
68
+ "request",
69
+ "show"
70
+ ],
71
+ "argv": [
72
+ {
73
+ "kind": "literal",
74
+ "value": "request"
75
+ },
76
+ {
77
+ "kind": "literal",
78
+ "value": "show"
79
+ },
80
+ {
81
+ "kind": "param",
82
+ "name": "rid"
83
+ },
84
+ {
85
+ "kind": "literal",
86
+ "value": "--role"
87
+ },
88
+ {
89
+ "kind": "param",
90
+ "name": "role"
91
+ },
92
+ {
93
+ "kind": "literal",
94
+ "value": "--json"
95
+ },
96
+ {
97
+ "kind": "literal",
98
+ "value": "--project"
99
+ },
100
+ {
101
+ "kind": "param",
102
+ "name": "project"
103
+ }
104
+ ],
105
+ "params": {
106
+ "rid": {
107
+ "type": "slug",
108
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
109
+ "binding": {
110
+ "kind": "positional",
111
+ "token": "request-id",
112
+ "required": true
113
+ },
114
+ "constraintSource": "handwritten"
115
+ },
116
+ "role": {
117
+ "type": "enum",
118
+ "values": [
119
+ "prd",
120
+ "ui",
121
+ "rd",
122
+ "qa",
123
+ "sc"
124
+ ],
125
+ "binding": {
126
+ "kind": "option",
127
+ "token": "--role",
128
+ "required": true
129
+ },
130
+ "constraintSource": "handwritten"
131
+ },
132
+ "project": {
133
+ "type": "path",
134
+ "binding": {
135
+ "kind": "option",
136
+ "token": "--project",
137
+ "required": true
138
+ },
139
+ "constraintSource": "handwritten"
140
+ }
141
+ },
142
+ "introspection": {
143
+ "optionTokens": [
144
+ "--role",
145
+ "--json",
146
+ "--project"
147
+ ],
148
+ "positionalCount": 1
149
+ }
150
+ },
151
+ {
152
+ "id": "memory-search",
153
+ "tool": "peaks_memory_search",
154
+ "commandPath": [
155
+ "memory",
156
+ "search"
157
+ ],
158
+ "argv": [
159
+ {
160
+ "kind": "literal",
161
+ "value": "memory"
162
+ },
163
+ {
164
+ "kind": "literal",
165
+ "value": "search"
166
+ },
167
+ {
168
+ "kind": "param",
169
+ "name": "query"
170
+ },
171
+ {
172
+ "kind": "literal",
173
+ "value": "--limit"
174
+ },
175
+ {
176
+ "kind": "param",
177
+ "name": "limit"
178
+ }
179
+ ],
180
+ "params": {
181
+ "query": {
182
+ "type": "token",
183
+ "binding": {
184
+ "kind": "positional",
185
+ "token": "query",
186
+ "required": true
187
+ },
188
+ "constraintSource": "handwritten"
189
+ },
190
+ "limit": {
191
+ "type": "integer",
192
+ "min": 1,
193
+ "max": 50,
194
+ "default": 6,
195
+ "binding": {
196
+ "kind": "option",
197
+ "token": "--limit",
198
+ "required": false
199
+ },
200
+ "constraintSource": "handwritten"
201
+ }
202
+ },
203
+ "introspection": {
204
+ "optionTokens": [
205
+ "--limit"
206
+ ],
207
+ "positionalCount": 1
208
+ }
209
+ }
210
+ ]
211
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * `peaks audit artifact` runners — first-class CLI surface for the 4 audit
3
+ * artifact types. Replaces the 2026-06-22 "hand `git add` into
4
+ * .peaks/memory/" anti-pattern that left 4 orphan files. Each kind routes to
5
+ * exactly one writer in artifact-writer.ts; the writer enforces canonical
6
+ * frontmatter, so the memory-shape guard never fires for new writes.
7
+ *
8
+ * The action body moved out of `audit-commands.ts` verbatim; the registrar now
9
+ * only wires the commands and delegates. Every envelope, error code and hint
10
+ * string is unchanged.
11
+ */
12
+ import { type ProgramIO } from '../cli-helpers.js';
13
+ import { type ArtifactWriteOptions } from './audit-command-shared.js';
14
+ export declare const ARTIFACT_GROUP_DESCRIPTION = "Manage audit artifacts (decision / prompt / machine-output / narrative) under .peaks/memory/";
15
+ export declare const ARTIFACT_WRITE_DESCRIPTION = "Persist a single audit artifact to .peaks/memory/ via the artifact-writer (canonical frontmatter)";
16
+ export declare function runArtifactWrite(options: ArtifactWriteOptions, io: ProgramIO): void;