peaks-loop 3.1.1 → 4.0.0-beta

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 (308) hide show
  1. package/.claude-plugin/marketplace.json +62 -12
  2. package/CHANGELOG.md +74 -36
  3. package/README-en.md +58 -240
  4. package/README.md +49 -325
  5. package/agents/karpathy-reviewer.md +3 -3
  6. package/dist/src/cli/cli-helpers.d.ts +18 -0
  7. package/dist/src/cli/cli-helpers.js +8 -0
  8. package/dist/src/cli/commands/adapter-commands.d.ts +30 -0
  9. package/dist/src/cli/commands/adapter-commands.js +35 -0
  10. package/dist/src/cli/commands/context-commands.d.ts +1 -1
  11. package/dist/src/cli/commands/context-commands.js +1 -1
  12. package/dist/src/cli/commands/contract-commands.d.ts +1 -1
  13. package/dist/src/cli/commands/contract-commands.js +1 -1
  14. package/dist/src/cli/commands/core/session-command.js +12 -0
  15. package/dist/src/cli/commands/core/skill-command.js +4 -4
  16. package/dist/src/cli/commands/dispatch-commands.js +2 -2
  17. package/dist/src/cli/commands/job-commands.js +58 -5
  18. package/dist/src/cli/commands/observability-commands.js +1 -1
  19. package/dist/src/cli/commands/perf-audit-commands.js +2 -2
  20. package/dist/src/cli/commands/security-audit-commands.js +2 -2
  21. package/dist/src/cli/commands/sediment-commands.d.ts +80 -0
  22. package/dist/src/cli/commands/sediment-commands.js +640 -0
  23. package/dist/src/cli/commands/session-migrate-skill-name.d.ts +17 -0
  24. package/dist/src/cli/commands/session-migrate-skill-name.js +41 -0
  25. package/dist/src/cli/commands/skill-visibility.d.ts +8 -0
  26. package/dist/src/cli/commands/skill-visibility.js +63 -0
  27. package/dist/src/cli/commands/slice-commands.js +2 -2
  28. package/dist/src/cli/commands/solo-commands.d.ts +2 -2
  29. package/dist/src/cli/commands/solo-commands.js +246 -20
  30. package/dist/src/cli/commands/sub-agent-commands.d.ts +1 -1
  31. package/dist/src/cli/commands/sub-agent-commands.js +1 -1
  32. package/dist/src/cli/commands/understand-commands.js +1 -1
  33. package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
  34. package/dist/src/cli/commands/upgrade-commands.js +3 -3
  35. package/dist/src/cli/commands/user-touchpoint-commands.js +1 -1
  36. package/dist/src/cli/commands/verdict-aggregate-command.d.ts +1 -1
  37. package/dist/src/cli/commands/verdict-aggregate-command.js +2 -2
  38. package/dist/src/cli/commands/workflow-commands.js +2 -2
  39. package/dist/src/cli/commands/workspace/init-command.d.ts +3 -3
  40. package/dist/src/cli/commands/workspace/init-command.js +7 -7
  41. package/dist/src/cli/program.js +19 -2
  42. package/dist/src/services/adapter/adapter.d.ts +27 -0
  43. package/dist/src/services/adapter/adapter.js +5 -0
  44. package/dist/src/services/adapter/auto-adapter.d.ts +11 -0
  45. package/dist/src/services/adapter/auto-adapter.js +15 -0
  46. package/dist/src/services/adapter/claude-adapter.d.ts +14 -0
  47. package/dist/src/services/adapter/claude-adapter.js +40 -0
  48. package/dist/src/services/adapter/codex-adapter.d.ts +14 -0
  49. package/dist/src/services/adapter/codex-adapter.js +14 -0
  50. package/dist/src/services/adapter/copilot-adapter.d.ts +14 -0
  51. package/dist/src/services/adapter/copilot-adapter.js +14 -0
  52. package/dist/src/services/audit/enforcers/solo-code-ban.d.ts +1 -1
  53. package/dist/src/services/audit/enforcers/solo-code-ban.js +2 -2
  54. package/dist/src/services/audit/red-line-catalog.js +1 -1
  55. package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
  56. package/dist/src/services/context/auto-compact-dispatcher.d.ts +1 -1
  57. package/dist/src/services/dispatch/batch-counter.js +1 -1
  58. package/dist/src/services/dispatch/leak-detector.js +1 -1
  59. package/dist/src/services/doctor/doctor-service.js +2 -2
  60. package/dist/src/services/job/job-progress-store.d.ts +60 -0
  61. package/dist/src/services/job/job-progress-store.js +70 -0
  62. package/dist/src/services/job/job-resource-snapshot.js +29 -1
  63. package/dist/src/services/job/job-types.d.ts +4 -4
  64. package/dist/src/services/memory/project-memory-service.js +1 -1
  65. package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
  66. package/dist/src/services/migrate-skill-name/migrate.js +152 -0
  67. package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
  68. package/dist/src/services/migrate-skill-name/schema.js +25 -0
  69. package/dist/src/services/observability/aggregation.d.ts +1 -1
  70. package/dist/src/services/observability/aggregation.js +1 -1
  71. package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
  72. package/dist/src/services/perf/perf-baseline-service.js +1 -1
  73. package/dist/src/services/prd/handoff-types.d.ts +1 -1
  74. package/dist/src/services/prd/handoff-types.js +1 -1
  75. package/dist/src/services/progress/progress-service.d.ts +1 -1
  76. package/dist/src/services/progress/progress-service.js +1 -1
  77. package/dist/src/services/rd/standards-diagnostic.js +1 -1
  78. package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
  79. package/dist/src/services/sc/sc-service.js +1 -1
  80. package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
  81. package/dist/src/services/sediment/dispose-confirm.js +5 -0
  82. package/dist/src/services/sediment/json-schema.d.ts +247 -0
  83. package/dist/src/services/sediment/json-schema.js +26 -0
  84. package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
  85. package/dist/src/services/sediment/manifest-lint.js +11 -0
  86. package/dist/src/services/sediment/pool-paths.d.ts +22 -0
  87. package/dist/src/services/sediment/pool-paths.js +25 -0
  88. package/dist/src/services/sediment/pool-read.d.ts +20 -0
  89. package/dist/src/services/sediment/pool-read.js +73 -0
  90. package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
  91. package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
  92. package/dist/src/services/sediment/pool-write.d.ts +14 -0
  93. package/dist/src/services/sediment/pool-write.js +25 -0
  94. package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
  95. package/dist/src/services/sediment/promotion-gate.js +20 -0
  96. package/dist/src/services/sediment/types.d.ts +52 -0
  97. package/dist/src/services/sediment/types.js +1 -0
  98. package/dist/src/services/session/binding-store.d.ts +1 -1
  99. package/dist/src/services/session/binding-store.js +1 -1
  100. package/dist/src/services/session/caller-id-types.d.ts +1 -1
  101. package/dist/src/services/session/session-manager.d.ts +1 -1
  102. package/dist/src/services/session/session-manager.js +1 -1
  103. package/dist/src/services/skill/resume-detector.js +1 -1
  104. package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
  105. package/dist/src/services/skill/skill-scheduler.js +1 -1
  106. package/dist/src/services/skillhub/release-diff.d.ts +18 -0
  107. package/dist/src/services/skillhub/release-diff.js +38 -0
  108. package/dist/src/services/skillhub/release-export.d.ts +8 -0
  109. package/dist/src/services/skillhub/release-export.js +31 -0
  110. package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
  111. package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
  112. package/dist/src/services/skillhub/release-import.d.ts +7 -0
  113. package/dist/src/services/skillhub/release-import.js +59 -0
  114. package/dist/src/services/skillhub/release-retain.d.ts +23 -0
  115. package/dist/src/services/skillhub/release-retain.js +89 -0
  116. package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
  117. package/dist/src/services/skillhub/sqlite-store.js +47 -0
  118. package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
  119. package/dist/src/services/skillhub/tar-runtime.js +91 -0
  120. package/dist/src/services/skillhub/types.d.ts +105 -0
  121. package/dist/src/services/skillhub/types.js +1 -0
  122. package/dist/src/services/skills/skill-conformance-service.js +8 -5
  123. package/dist/src/services/skills/skill-presence-service.d.ts +4 -4
  124. package/dist/src/services/skills/skill-presence-service.js +2 -2
  125. package/dist/src/services/skills/skill-registry.js +27 -0
  126. package/dist/src/services/skills/skill-runbook-service.js +2 -2
  127. package/dist/src/services/slice/slice-check-service.js +1 -1
  128. package/dist/src/services/slice/slice-check-types.d.ts +1 -1
  129. package/dist/src/services/slice/slice-check-types.js +1 -1
  130. package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
  131. package/dist/src/services/slice/slice-decompose-types.js +1 -1
  132. package/dist/src/services/solo/auto-compact-orchestrator.d.ts +1 -1
  133. package/dist/src/services/solo/auto-compact-orchestrator.js +2 -2
  134. package/dist/src/services/solo/dag-orchestrator.d.ts +3 -3
  135. package/dist/src/services/solo/dag-orchestrator.js +4 -4
  136. package/dist/src/services/solo/emit-handoff.d.ts +49 -0
  137. package/dist/src/services/solo/emit-handoff.js +79 -0
  138. package/dist/src/services/solo/mode-gate.d.ts +2 -2
  139. package/dist/src/services/solo/post-compact-detector.js +2 -2
  140. package/dist/src/services/solo/status-line-renderer.d.ts +4 -4
  141. package/dist/src/services/solo/step-08-gate.d.ts +90 -0
  142. package/dist/src/services/solo/step-08-gate.js +136 -0
  143. package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
  144. package/dist/src/services/standards/missing-standards-detector.js +1 -1
  145. package/dist/src/services/standards/project-standards-service.d.ts +1 -1
  146. package/dist/src/services/standards/project-standards-service.js +4 -4
  147. package/dist/src/services/understand/understand-types.d.ts +1 -1
  148. package/dist/src/services/upgrade/1x-detector-service.js +1 -1
  149. package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
  150. package/dist/src/services/upgrade/upgrade-service.js +52 -30
  151. package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
  152. package/dist/src/services/workflow/workflow-router-service.d.ts +1 -1
  153. package/dist/src/services/workflow/workflow-router-service.js +3 -3
  154. package/dist/src/services/workspace/claude-settings-template.d.ts +7 -2
  155. package/dist/src/services/workspace/claude-settings-template.js +42 -3
  156. package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
  157. package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
  158. package/dist/src/services/workspace/workspace-service.d.ts +4 -4
  159. package/dist/src/services/workspace/workspace-service.js +2 -2
  160. package/dist/src/shared/paths.d.ts +1 -1
  161. package/dist/src/shared/paths.js +1 -1
  162. package/dist/src/shared/version.d.ts +1 -1
  163. package/dist/src/shared/version.js +1 -1
  164. package/dist/src/skills/peaks-maker/index.d.ts +5 -0
  165. package/dist/src/skills/peaks-maker/index.js +32 -0
  166. package/package.json +8 -3
  167. package/scripts/install-skills.mjs +29 -4
  168. package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
  169. package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
  170. package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
  171. package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
  172. package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
  173. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
  174. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +1 -1
  175. package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
  176. package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
  177. package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
  178. package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
  179. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +1 -1
  180. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +2 -2
  181. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +1 -1
  182. package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
  183. package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
  184. package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +7 -1
  185. package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +9 -3
  186. package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +11 -5
  187. package/skills/peaks-audit/SKILL.md +1 -1
  188. package/skills/{peaks-solo → peaks-code}/SKILL.md +53 -104
  189. package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
  190. package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +4 -4
  191. package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +2 -2
  192. package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
  193. package/skills/peaks-code/references/command-migration.md +3 -0
  194. package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
  195. package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
  196. package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +1 -1
  197. package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +1 -1
  198. package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +9 -9
  199. package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +12 -12
  200. package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +1 -1
  201. package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +1 -1
  202. package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
  203. package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +1 -1
  204. package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
  205. package/skills/{peaks-solo → peaks-code}/references/runbook.md +25 -5
  206. package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
  207. package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
  208. package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +5 -5
  209. package/skills/peaks-code/references/step-0-8-gate.md +60 -0
  210. package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +10 -10
  211. package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +7 -7
  212. package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +3 -3
  213. package/skills/peaks-doctor/SKILL.md +1 -1
  214. package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
  215. package/skills/peaks-final-review/SKILL.md +3 -3
  216. package/skills/peaks-final-review/references/4-dimensions.md +1 -1
  217. package/skills/peaks-ide/SKILL.md +1 -1
  218. package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +14 -14
  219. package/skills/peaks-sop/SKILL.md +1 -1
  220. package/skills/{peaks-solo-status → peaks-status}/SKILL.md +13 -13
  221. package/skills/{peaks-solo-test → peaks-test}/SKILL.md +11 -11
  222. package/skills/peaks-solo/references/command-migration.md +0 -3
  223. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
  224. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
  225. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
  226. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
  227. /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
  228. /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
  229. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
  230. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +0 -0
  231. /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
  232. /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
  233. /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
  234. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
  235. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
  236. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
  237. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
  238. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
  239. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
  240. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
  241. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
  242. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
  243. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
  244. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
  245. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
  246. /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
  247. /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
  248. /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
  249. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
  250. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
  251. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
  252. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
  253. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
  254. /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
  255. /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
  256. /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
  257. /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
  258. /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
  259. /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
  260. /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
  261. /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
  262. /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
  263. /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
  264. /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
  265. /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
  266. /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
  267. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
  268. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +0 -0
  269. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
  270. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
  271. /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
  272. /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
  273. /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
  274. /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
  275. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
  276. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
  277. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
  278. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
  279. /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
  280. /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
  281. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
  282. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
  283. /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
  284. /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
  285. /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
  286. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
  287. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
  288. /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
  289. /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
  290. /package/skills/{peaks-solo → peaks-code}/references/boundaries.md +0 -0
  291. /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
  292. /package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +0 -0
  293. /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
  294. /package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +0 -0
  295. /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
  296. /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
  297. /package/skills/{peaks-solo → peaks-code}/references/external-references.md +0 -0
  298. /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
  299. /package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +0 -0
  300. /package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +0 -0
  301. /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
  302. /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
  303. /package/skills/{peaks-solo → peaks-code}/references/job-loop.md +0 -0
  304. /package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +0 -0
  305. /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
  306. /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
  307. /package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +0 -0
  308. /package/skills/{peaks-solo → peaks-code}/references/workflow.md +0 -0
@@ -34,18 +34,68 @@
34
34
  "irreversible-action gates"
35
35
  ],
36
36
  "skills": [
37
- "./skills/peaks-solo",
38
- "./skills/peaks-solo-resume",
39
- "./skills/peaks-solo-status",
40
- "./skills/peaks-solo-test",
41
- "./skills/peaks-prd",
42
- "./skills/peaks-rd",
43
- "./skills/peaks-qa",
44
- "./skills/peaks-ui",
45
- "./skills/peaks-sc",
46
- "./skills/peaks-txt",
47
- "./skills/peaks-sop"
37
+ {
38
+ "name": "peaks-code",
39
+ "path": "./skills/peaks-code",
40
+ "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."
41
+ },
42
+ {
43
+ "name": "peaks-resume",
44
+ "path": "./skills/peaks-resume",
45
+ "description": "Resume an in-flight peaks-code slice in the current session."
46
+ },
47
+ {
48
+ "name": "peaks-status",
49
+ "path": "./skills/peaks-status",
50
+ "description": "Show the current state of the peaks-code orchestrator in a compact summary."
51
+ },
52
+ {
53
+ "name": "peaks-test",
54
+ "path": "./skills/peaks-test",
55
+ "description": "Run the project's test suite on the current repo and report results."
56
+ },
57
+ {
58
+ "name": "peaks-prd",
59
+ "path": "./skills/bee/peaks-prd",
60
+ "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.",
61
+ "userInvocable": false
62
+ },
63
+ {
64
+ "name": "peaks-rd",
65
+ "path": "./skills/bee/peaks-rd",
66
+ "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.",
67
+ "userInvocable": false
68
+ },
69
+ {
70
+ "name": "peaks-qa",
71
+ "path": "./skills/bee/peaks-qa",
72
+ "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.",
73
+ "userInvocable": false
74
+ },
75
+ {
76
+ "name": "peaks-ui",
77
+ "path": "./skills/bee/peaks-ui",
78
+ "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.",
79
+ "userInvocable": false
80
+ },
81
+ {
82
+ "name": "peaks-sc",
83
+ "path": "./skills/bee/peaks-sc",
84
+ "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.",
85
+ "userInvocable": false
86
+ },
87
+ {
88
+ "name": "peaks-txt",
89
+ "path": "./skills/bee/peaks-txt",
90
+ "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.",
91
+ "userInvocable": false
92
+ },
93
+ {
94
+ "name": "peaks-sop",
95
+ "path": "./skills/peaks-sop",
96
+ "description": "Authoring skill for user-defined SOPs in Peaks. Use when a user wants to create, edit, debug, or register their own gated workflow."
97
+ }
48
98
  ]
49
99
  }
50
100
  ]
51
- }
101
+ }
package/CHANGELOG.md CHANGED
@@ -1,10 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ### Renamed
6
+ - **`peaks-code` → `peaks-code`** — the long-running code-domain orchestrator skill (PRD/RD/QA/UI/SC/TXT pipeline) has been renamed to communicate its scope more accurately. The on-disk directory `~/.peaks/skills/.system/bees/peaks-code/` is preserved as a stable install location; only the manifest `id` and `displayName` change (`peaks-code` / `Peaks Code`). All four sibling skills (`peaks-code-resume` → `peaks-resume`, `peaks-code-status` → `peaks-status`, `peaks-code-test` → `peaks-test`) are now top-level primitives rather than child skills of `peaks-code`. Migration: `peaks session migrate-skill-name --from peaks-code --to peaks-code --apply`.
7
+
8
+ ### Changed (Breaking)
9
+ - **`peaks skill presence:set peaks-code` no longer recognized** — the canonical skill name is now `peaks-code`. Existing `.peaks/_runtime/*/active-skill.json` files carrying `skill: "peaks-code"` are migrated by `peaks session migrate-skill-name`. Manual override: edit the file and replace `"skill": "peaks-code"` with `"skill": "peaks-code"`.
10
+ - **CLI surface unchanged** — `peaks solo`, `peaks solo --fast`, and the entire `peaks-code` skill runbook continue to function; only the skill-identification field (`id`, `displayName`, presence `skill` value) changes. The runbook name `peaks solo` is the user-facing verb and remains as-is.
11
+
12
+ ### Added
13
+ - **Manifest id field** — `.peaks/skills/.system/bees/peaks-code/manifest.json` now carries `{ "id": "peaks-code", "displayName": "Peaks Code" }`. The `migrate-skill-name` service explicitly skips this file (test: `session-migrate-skill-name.test.ts:69` "跳过 .peaks/skills/.system/bees/peaks-code/manifest.json") so the canonical id is only ever edited by hand or by an explicit `peaks skill sediment refine-bee` flow, never by bulk migration.
14
+ - **Spec §4.1.1 rewrite** — `docs/superpowers/specs/2026-07-04-peaks-maker-dynamic-skill-sediment-design.md` §4.1.1 has been rewritten from "peaks-code as preserved alias" to "peaks-code as the system-stable code-domain bee (renamed from peaks-code)". The plan's spec-coverage table now references the renamed heading.
15
+ - **Migration helper** — `peaks session migrate-skill-name --from <old> --to <new> [--apply]` is the supported path for renaming skill references in `.peaks/_runtime/`. Idempotent; skip-list includes `.peaks/memory/**` and `.peaks/skills/.system/bees/peaks-code/manifest.json`.
16
+
17
+ ## 3.1.2 — 2026-07-04
18
+
19
+ ### Added — Mechanical Job-mode gates (Step 0.8 enforcement)
20
+
21
+ The v3.1.1 recorder-only design was bypassed twice under load (2026-07-03 35-slice incident, 2026-07-04 3018-file incident): the LLM skipped `peaks solo detect-job` and ran fake-completion narratives instead of Job mode. The v3.1.2 patch converts Step 0.8 from "LLM should call" to "LLM cannot proceed without calling" through four mechanical gates — no LLM interpretation required.
22
+
23
+ - **PreToolUse hook** — `peaks workspace init` now installs a `Bash` matcher in `.claude/settings.local.json` (TEMPLATE_VERSION bumped 1.2.0 → 1.3.0) that runs `peaks solo gate-step-08 --project .` before every Bash call. Exit 0 = allow, exit 2 = block. Existing `Write|Edit|MultiEdit` matcher preserved. Re-running `peaks workspace init` is idempotent (`templateContentMatches`).
24
+ - **`peaks solo gate-step-08`** — new service `src/services/solo/step-08-gate.ts` (~120 LOC) + CLI. Reads `.peaks/_runtime/<sessionId>/job-shape.json`. When `decision.isJob=true` AND `job/<jid>/progress.json` exists, prints `Next: slice #<done+1> of <total> (<currentSlice>)` so the LLM cannot wake up cold. When the file is missing AND the user's prompt (from `--prompt` / `last-prompt.txt`) matches the fail-closed backup regex `/(until|全部|until all done|disavow cost|不用考虑费用|all of them)/i`, exits 2 with `BLOCKED:` on stderr.
25
+ - **Size-fear ban** — `peaks solo emit-handoff`. New service `src/services/solo/emit-handoff.ts` (~70 LOC) + CLI. Under Job mode (`isJob=true`), refuses to emit a final handoff while `remaining > 0`. Codes: `JOB_NOT_INITIALIZED` (no state.json), `JOB_REMAINING_BLOCKED` (remaining > 0), allow when `remaining === 0`, allow under `--force-under-job` override.
26
+ - **Forced auto-compact** — extended `peaks solo context-now` with `--enforce-job-mode` (auto-enabled when `job-shape.json` says `isJob=true`). At `ratio >= 0.85` returns `action: 'auto-compact-now'` (MANDATORY, not advisory); at `ratio >= 0.95` returns `action: 'red-line'`. SKILL.md Step N+2 prose updated: "in Job mode, ≥ 0.85 is MANDATORY auto-compact."
27
+ - **On-disk slice progress** — `peaks job checkpoint --state done` now writes `.peaks/_runtime/<sessionId>/job/<jid>/progress.json` after updating state.json. New `peaks job progress --job-id <jid>` reader. `gate-step-08` reads the same file in its allow-job path so the LLM gets resume context BEFORE any Bash call. SKILL.md Step 0.7 updated: "if progress.json exists, read it FIRST and surface `Next: slice #N of M (<currentSlice>)`."
28
+
29
+ ### Tests (v3.1.2)
30
+
31
+ - `tests/unit/solo/gate-step-08.test.ts` — 9 unit tests covering the 4 paths + Next: slice context injection + backup-regex sanity + prompt-source fallback.
32
+ - `tests/unit/solo/emit-handoff.test.ts` — 10 unit tests covering the 4 paths + `--force-under-job` override + `JOB_NOT_INITIALIZED` + skipped-slices edge case + `--job-id` override.
33
+ - `tests/integration/solo-gate-step-08-hook.test.ts` — 5 integration tests spawning `node bin/peaks.js solo gate-step-08` as a real child process (the hook protocol itself), asserting exit 0 / exit 2 + stderr BLOCKED line + JSON envelope shape.
34
+ - Extended `tests/unit/solo/solo-step-08-block-guard.test.ts` to assert SKILL.md + runbook.md reference `peaks solo gate-step-08`, `peaks solo emit-handoff`, `peaks job progress`, and the Job-mode MANDATORY auto-compact prose.
35
+ - Extended `tests/unit/workspace/workspace-init-claude-hooks.test.ts` case-A to assert both PreToolUse matchers (`Write|Edit|MultiEdit` AND `Bash`) are emitted with the new Bash command invoking `peaks solo gate-step-08`.
36
+
37
+ ### Memory
38
+
39
+ Two consecutive ship-day incidents motivated this release: `2026-07-03-v3-1-0-job-trigger-miss.md` (35-slice app/ batch) + `2026-07-04-v3-1-1-second-incident-3018-files.md` (3018-file UT batch). Lesson: "a skill that says MUST without a mechanical gate is not a real gate." The hook is the difference between "the LLM is told to do X" and "the LLM cannot proceed without X having happened."
40
+
3
41
  ## 3.1.1 — 2026-07-03
4
42
 
5
43
  ### Added — Step 0.8 detector-as-recorder (LLM-judged, CLI-validated)
6
44
 
7
- `peaks-solo` Step 0.8 is no longer prose-only: the LLM makes the Job-shape judgement, the CLI records it. The CLI is a **recorder and gate**, not a detector — no keyword regex anywhere in the service or CLI (the LLM is the source of truth). Downstream steps refuse to proceed until the decision file exists.
45
+ `peaks-code` Step 0.8 is no longer prose-only: the LLM makes the Job-shape judgement, the CLI records it. The CLI is a **recorder and gate**, not a detector — no keyword regex anywhere in the service or CLI (the LLM is the source of truth). Downstream steps refuse to proceed until the decision file exists.
8
46
 
9
47
  - New service: `src/services/solo/job-shape-decision.ts` — `readJobShapeDecision` / `writeJobShapeDecision` / `validateJobShapeDecision`. Persists to `.peaks/_runtime/<sessionId>/job-shape.json`; server-side stamps `decidedAt` so the LLM cannot back-date; throws `JOB_SHAPE_NOT_DECIDED` on missing / unreadable / malformed.
10
48
  - New CLI subcommands:
@@ -22,9 +60,9 @@ Incident + rationale: `.peaks/memory/2026-07-03-v3-1-0-job-trigger-miss.md`. Thi
22
60
 
23
61
  ## 3.1.0 — 2026-07-03
24
62
 
25
- ### Fixed — peaks-solo external-references authority declaration
63
+ ### Fixed — peaks-code external-references authority declaration
26
64
 
27
- - `skills/peaks-solo/SKILL.md` External-references paragraph now ends with `Peaks-Loop Solo gates and artifacts remain authoritative.` to satisfy `tests/unit/skill-external-invocation.test.ts:63` (`PEAKS_AUTHORITATIVE_PATTERN`). One-line surgical patch; no behaviour change.
65
+ - `skills/peaks-code/SKILL.md` External-references paragraph now ends with `Peaks-Loop Solo gates and artifacts remain authoritative.` to satisfy `tests/unit/skill-external-invocation.test.ts:63` (`PEAKS_AUTHORITATIVE_PATTERN`). One-line surgical patch; no behaviour change.
28
66
 
29
67
  ### Added — Peaks-Loop Job
30
68
 
@@ -32,7 +70,7 @@ Incident + rationale: `.peaks/memory/2026-07-03-v3-1-0-job-trigger-miss.md`. Thi
32
70
  - New CLI flag `--main-loop-strategy single|rotating` on `job init`, with rotating-mode hard default for ≥3 slices and `rotateEvery=3` cadence.
33
71
  - New `--watch` poll mode + statusline event stub (`emitJobEvent`) for ambient progress visibility. Real statusline wire-up deferred to a follow-up slice.
34
72
  - Sub-agent wrapper `SubAgentJobWrapper` enforces `--budget-mb 512` default + cleanup gate before slice checkpoint.
35
- - New peaks-solo SKILL.md Steps 0.8 / 0.81 / 0.85 / 0.86 / 0.87 wrapping the existing single-rid runbook for multi-slice jobs.
73
+ - New peaks-code SKILL.md Steps 0.8 / 0.81 / 0.85 / 0.86 / 0.87 wrapping the existing single-rid runbook for multi-slice jobs.
36
74
  - 9 hard-red-line rules embedded in the skill prose (cost re-ask ban, slice-coalesce ban, fake-completion ban, detached-mode ban, cleanup-skip ban, rotate-skip ban, etc).
37
75
 
38
76
  ### New services
@@ -47,7 +85,7 @@ Incident + rationale: `.peaks/memory/2026-07-03-v3-1-0-job-trigger-miss.md`. Thi
47
85
 
48
86
  ### Migration
49
87
 
50
- - Existing single-rid flows are unchanged. The Job is opt-in via peaks-solo Step 0.8 detection; users who do not invoke multi-slice requests see no behavior difference.
88
+ - Existing single-rid flows are unchanged. The Job is opt-in via peaks-code Step 0.8 detection; users who do not invoke multi-slice requests see no behavior difference.
51
89
  - The `peaks session rotate` and `peaks session cycle-summary` subcommands referenced in the spec are NOT shipped in v1; the rotation path uses constructor-injected stub callbacks. M6.5 follow-up will add the real subcommands.
52
90
 
53
91
  ### Spec / plan
@@ -71,7 +109,7 @@ The v2.13.0 auto-compact design shipped `shell-exec` as the only pathway, which
71
109
 
72
110
  ### Fixed — Solo Step N+2 prose (was 75% / "do NOT auto-execute")
73
111
 
74
- - `skills/peaks-solo/SKILL.md` Step N+2 paragraph rewritten: thresholds now 0.85 pre-compact / 0.95 red-line (matches v2.13.0 auto-compact), explicit Karpathy §4 compact-red-line exception cited, `peaks solo context-now --json` is the canonical probe primitive (replaces `peaks context check --prompt-size <bytes>` hand-pass).
112
+ - `skills/peaks-code/SKILL.md` Step N+2 paragraph rewritten: thresholds now 0.85 pre-compact / 0.95 red-line (matches v2.13.0 auto-compact), explicit Karpathy §4 compact-red-line exception cited, `peaks solo context-now --json` is the canonical probe primitive (replaces `peaks context check --prompt-size <bytes>` hand-pass).
75
113
  - `src/services/context/main-session-monitor.ts` — `@deprecated` JSDoc on `evaluateMainSessionThreshold` cross-links to `evaluateCompactTrigger` (0.85/0.95); legacy 4-tier envelope retained for statusline callers (migration to v2.15.0).
76
114
 
77
115
  ### Tests — 4 new suites + 3 modified files
@@ -172,7 +210,7 @@ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced8
172
210
 
173
211
  The Understand Anything (UA) Claude Code plugin and `@colbymchenry/codegraph` are both complementary project-analysis tools. UA provides a high-level knowledge graph (tours, layers, expert prompts); codegraph provides low-level affected-file analysis. Until 3.0.2, peaks-loop consumers had to choose one or the other at the LLM level — there was no service-layer enforcement of either.
174
212
 
175
- This slice adds a single `peaks understand context` subcommand that encapsulates the routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture — see `peaks-solo` SKILL.md). The envelope carries a `source` tag so downstream consumers can audit which evidence contributed to the context.
213
+ This slice adds a single `peaks understand context` subcommand that encapsulates the routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture — see `peaks-code` SKILL.md). The envelope carries a `source` tag so downstream consumers can audit which evidence contributed to the context.
176
214
 
177
215
  **Source routing** (deterministic, decided in `buildUnderstandContext`):
178
216
  - `ua-only` — UA knowledge graph present, no codegraph
@@ -193,7 +231,7 @@ The peak-loop skill-external-invocation audit pattern (capability discovery + re
193
231
 
194
232
  ### Removed — change-id shim (cleanup post v2.17.0 hard-kill, rolled up from v2.19.0)
195
233
 
196
- **PATCH bump from 2.18.3**. Resolves the user-reported "新项目第一次使用 peaks-solo 时初始化完不按流程走、开发效果差、再开 session 后才正常" defect. Two surgical fixes to the first-run Solo gates (3 source files, 1 new test file, 2 test-regression updates; no schema change, no new dependencies, no public API change).
234
+ **PATCH bump from 2.18.3**. Resolves the user-reported "新项目第一次使用 peaks-code 时初始化完不按流程走、开发效果差、再开 session 后才正常" defect. Two surgical fixes to the first-run Solo gates (3 source files, 1 new test file, 2 test-regression updates; no schema change, no new dependencies, no public API change).
197
235
 
198
236
  ### Bugfix — `step-0.55-1x-upgrade` always pauses, even in `full-auto` (P0)
199
237
 
@@ -227,7 +265,7 @@ The 1.x → 2.0 upgrade is an irreversible external side effect (rewrites `~/.pe
227
265
  - AC-2: `peaks solo should-pause --step step-1-mode-select` (no `--mode`) → `ok: true, shouldPause: true` (no "required option" error) ✅
228
266
  - AC-3: `peaks solo should-pause --step step-1-mode-select --mode full-auto` → byte-identical to AC-2 ✅
229
267
  - Cross-mode 4×2 matrix (full-auto / assisted / strict / swarm × step-0.55 / step-1): 8/8 pause ✅
230
- - `peaks-solo` first-run sequence (skill presence:check-stale + upgrade --detect-1x + 4 should-pause steps): 6/6 clean ✅
268
+ - `peaks-code` first-run sequence (skill presence:check-stale + upgrade --detect-1x + 4 should-pause steps): 6/6 clean ✅
231
269
  - vitest 527/527 passed (27 files, 0 failed, 22.61s wallclock)
232
270
  - 5-way fanout audit: code-reviewer PASS / karpathy-reviewer PASS (4 guidelines) / security-reviewer PASS / perf-baseline-reviewer PASS / qa-test-cases-writer PASS (21 TCs)
233
271
  - QA verdict: `pass` (`verdict-2026-06-29-fix-first-run-step-gates.md`)
@@ -533,7 +571,7 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
533
571
 
534
572
  ### Feature — D2 Claude-instance-level hard-exclusive sid
535
573
 
536
- - Same Claude instance keeps one sid across multiple peaks-* skill activations (peaks-solo → peaks-rd → peaks-qa).
574
+ - Same Claude instance keeps one sid across multiple peaks-* skill activations (peaks-code → peaks-rd → peaks-qa).
537
575
  - `/compact` resume: same outer-session-id reuses the same sid (post-compact-resume v2.11.0 D7 alignment).
538
576
 
539
577
  ### Feature — Doctor stale-binding scan (AC-10)
@@ -621,7 +659,7 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
621
659
  ### Documentation
622
660
 
623
661
  - 6 new memory files: `peaks-loop-24h-ai-programmer-positioning` / `user-role-and-tech-decision` / `prd-template-design` / `slice-review-and-qa-perspective` / `fork-sync-and-layered-parallel` / `fast-iteration-quality-loop`
624
- - 4 SKILL.md 校准注: peaks-solo / peaks-prd / peaks-rd / peaks-qa 加 2026-06-28 校准 anchor
662
+ - 4 SKILL.md 校准注: peaks-code / peaks-prd / peaks-rd / peaks-qa 加 2026-06-28 校准 anchor
625
663
  - 12 Gaps 完整定位: 24h 程序员场景 / 唯一蜂群 / 反伪选择 / 业务审阅 / 轻量回归 / 上线观察期等
626
664
 
627
665
  ### Fix
@@ -664,8 +702,8 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
664
702
  - **Reconnect guard** — recorded outer id matches the NEW outer id → do NOT clear (reconnect).
665
703
  - **Live-different-outer guard** — recorded outer id belongs to a different LIVE outer session → do NOT clear (would destroy another user's mode).
666
704
  - **`peaks solo should-pause --step step-1-mode-select`** (MODIFIED) — Now consults `presence:check-stale` automatically. When the presence is stale, returns `shouldPause: true, reason: 'stale-presence — re-ask Step 1'`. The hard-pause on Step 1 itself is preserved (defect #1 from slice 2026-06-28-solo-mode-bypass-fix).
667
- - **`skills/peaks-solo/SKILL.md` Step 1** (MODIFIED) — Wording changed from "if user did not name a profile, AskUserQuestion" to "if user did not name a profile OR presence is stale, AskUserQuestion". Cross-references the new `references/mode-selection-with-stale-presence.md`.
668
- - **`skills/peaks-solo/references/mode-selection-with-stale-presence.md`** (NEW) — Detection protocol + worked example (88b27d defect) + ACL.
705
+ - **`skills/peaks-code/SKILL.md` Step 1** (MODIFIED) — Wording changed from "if user did not name a profile, AskUserQuestion" to "if user did not name a profile OR presence is stale, AskUserQuestion". Cross-references the new `references/mode-selection-with-stale-presence.md`.
706
+ - **`skills/peaks-code/references/mode-selection-with-stale-presence.md`** (NEW) — Detection protocol + worked example (88b27d defect) + ACL.
669
707
  - **`src/services/skills/skill-presence-service.ts`** — New exports: `checkStalePresence`, `clearStalePresenceOnRotation`, types `StalenessCheck`, `StaleReason`.
670
708
 
671
709
  ### Feature — User-feedback → peaks-loop enforcement (defect B fix)
@@ -814,7 +852,7 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
814
852
  会话期间从资深前端 + 后端半盲 + 极致工期 + 24h AI 程序员 + 存量无 UT 的真实场景,沉淀 6 个 memory 文件 + 索引 + 4 个 SKILL.md 校准注。**核心叙事:** `90% 效率 + 80% 质量` > `80% 效率 + 90% 质量`;user 在循环里 = 业务/产品审阅者不参与技术决策;主路径 = 唯一蜂群模式;prd 质量前置 = 4 必填块;QA = 业务视角 + 轻量回归 + 上线观察期。
815
853
 
816
854
  - **6 new memory files** — `.peaks/memory/peaks-loop-{24h-ai-programmer-positioning, user-role-and-tech-decision, prd-template-design, slice-review-and-qa-perspective, fork-sync-and-layered-parallel, fast-iteration-quality-loop}.md` (warm.project index 18 → 24)
817
- - **4 SKILL.md 校准注** — peaks-solo / peaks-prd / peaks-rd / peaks-qa 各加精简 anchor(均通过 25KB cap,只引用 memory 不重复内容)
855
+ - **4 SKILL.md 校准注** — peaks-code / peaks-prd / peaks-rd / peaks-qa 各加精简 anchor(均通过 25KB cap,只引用 memory 不重复内容)
818
856
  - **不触动** transition gates / hard contracts / Karpathy 4 / 模式枚举 / mode-gate.ts / sub-agent 协议
819
857
 
820
858
  ### Fix — 2 pre-existing bugs (2026-06-28 follow-up)
@@ -1136,11 +1174,11 @@ v2.13.1 shipped with a BLOCKER bug found via post-release dogfood: `aggregateVer
1136
1174
 
1137
1175
  ---
1138
1176
 
1139
- ## [2.13.1] — 2026-06-27 — Verdict reasoning layer (multi-signal convergence for peaks-solo)
1177
+ ## [2.13.1] — 2026-06-27 — Verdict reasoning layer (multi-signal convergence for peaks-code)
1140
1178
 
1141
1179
  **PATCH bump from 2.13.0** (slice `2026-06-27-verdict-aggregator`, red-line scope 3 source files + 4 new test files + 2 updated test files).
1142
1180
 
1143
- peaks-solo previously received 5 heterogeneous signals (security-audit, perf-audit, karpathy-reviewer, peaks-mut, peaks-qa) but had no convergence layer. The v2.12.0 audit-output schema documented 4 aggregation rules (`.peaks/project-scan/audit-output-schema.md:66-78`) but they were never implemented; the `mut-report.json` was consumed by peaks-qa internally with `loadMutReport() === null → gate=skipped` (soft consumption), and `micro-cycle.md` had no verdict-reasoning surface. v2.13.1 fills the gap without unifying envelope schemas (deferred to v2.14) and without changing any verdict string.
1181
+ peaks-code previously received 5 heterogeneous signals (security-audit, perf-audit, karpathy-reviewer, peaks-mut, peaks-qa) but had no convergence layer. The v2.12.0 audit-output schema documented 4 aggregation rules (`.peaks/project-scan/audit-output-schema.md:66-78`) but they were never implemented; the `mut-report.json` was consumed by peaks-qa internally with `loadMutReport() === null → gate=skipped` (soft consumption), and `micro-cycle.md` had no verdict-reasoning surface. v2.13.1 fills the gap without unifying envelope schemas (deferred to v2.14) and without changing any verdict string.
1144
1182
 
1145
1183
  ### Features
1146
1184
 
@@ -1152,7 +1190,7 @@ peaks-solo previously received 5 heterogeneous signals (security-audit, perf-aud
1152
1190
 
1153
1191
  - `src/services/verdict/verdict-aggregator.ts` (NEW, 223 lines) — pure `aggregateVerdict()` + locally-defined `KarpathyEnvelope` / `MutEnvelope` / `QaEnvelope` types (surgeon scope; v2.14 will move them to shared if a unification pass lands).
1154
1192
  - `src/services/artifacts/artifact-prerequisites.ts` — added `MUT_REPORT` constant (32 lines) + wired into `FEATURE_TABLE['rd:qa-handoff']` (line 276) and `BUGFIX_TABLE['rd:qa-handoff']` (line 303); `REFACTOR_TABLE` inherits via reference (line 312); `MINIMAL_TABLE` / `CONFIG_TABLE` exempt.
1155
- - `skills/peaks-solo/references/micro-cycle.md` — added `## Verdict reasoning (v2.13.1)` section (91 lines) after the unchanged repair-cycle cap rule.
1193
+ - `skills/peaks-code/references/micro-cycle.md` — added `## Verdict reasoning (v2.13.1)` section (91 lines) after the unchanged repair-cycle cap rule.
1156
1194
  - `tests/unit/artifact-prerequisites/mut-report-prereq.test.ts` (NEW, 4 cases).
1157
1195
  - `tests/unit/services/verdict/verdict-aggregator.test.ts` (NEW, 13 cases).
1158
1196
  - `tests/unit/skills/solo/micro-cycle-verdict-reasoning.test.ts` (NEW, 4 cases).
@@ -1200,7 +1238,7 @@ peaks-solo previously received 5 heterogeneous signals (security-audit, perf-aud
1200
1238
 
1201
1239
  **MINOR bump from 2.12.0** (slice `v2-13-0-auto-compact-protocol`, 5-sub-task plan AC-1..AC-5, red-line scope ~6 source files + 2 IDE adapter fields).
1202
1240
 
1203
- peaks-solo now autonomously drives context compaction so the LLM-runner stays alive with context < 95% on **any AI CLI**, with **zero human / zero LLM intervention**. Two-tier threshold model:
1241
+ peaks-code now autonomously drives context compaction so the LLM-runner stays alive with context < 95% on **any AI CLI**, with **zero human / zero LLM intervention**. Two-tier threshold model:
1204
1242
 
1205
1243
  - **85% pre-compact zone** — peaks-loop writes a pre-compact checkpoint + convergence plan + auto-decisions log + IDE-side compact dispatch (async-friendly).
1206
1244
  - **95% RED LINE** — peaks-loop refuses sub-agent dispatch and forces synchronous IDE compact; mandatory, LLM cannot opt out.
@@ -1249,12 +1287,12 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
1249
1287
 
1250
1288
  ### Out-of-scope (NOT changed)
1251
1289
 
1252
- - `src/services/code-review/ecc-bridge.ts` + `src/services/dispatch/sub-agent-dispatcher.ts` + `src/services/agent/ecc-agent-service.ts` + `src/services/prd/handoff-service.ts` + `project-scan-reader.ts` + `src/services/rd/{strategic,tactical,strategy,impl,ast-gate,types}.ts` + `peaks-qa/` + `peaks-solo/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.13.0 red-line scope.
1290
+ - `src/services/code-review/ecc-bridge.ts` + `src/services/dispatch/sub-agent-dispatcher.ts` + `src/services/agent/ecc-agent-service.ts` + `src/services/prd/handoff-service.ts` + `project-scan-reader.ts` + `src/services/rd/{strategic,tactical,strategy,impl,ast-gate,types}.ts` + `peaks-qa/` + `peaks-code/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.13.0 red-line scope.
1253
1291
 
1254
1292
  ### Known limitations (carry-forward to v2.13.1)
1255
1293
 
1256
1294
  - **Ad-hoc Claude Code runner cannot be externally compacted.** The v2.13.0-alpha.1 shell-exec pathway spawns the IDE's compact command via `child_process.spawn` — a separate child process. The current Claude Code runner that invoked `auto-compact` is unaffected; its own context window stays at 100% until that runner's own compact logic kicks in (Claude Code's own auto-compact or a user-issued `/compact` slash command). Follow-up slice: register a PreToolUse hook via `peaks hooks install` that intercepts the next Bash call and writes a stderr hint when ratio ≥ 0.95 — fills the already-reserved `ide-native` compact pathway.
1257
- - **`peaks-solo` Step N+2 prose update** — `skills/peaks-solo/SKILL.md` should mention `peaks solo context-now` + `auto-compact` so LLM sessions invoke the autonomous loop instead of `--prompt-size` hand-passing.
1295
+ - **`peaks-code` Step N+2 prose update** — `skills/peaks-code/SKILL.md` should mention `peaks solo context-now` + `auto-compact` so LLM sessions invoke the autonomous loop instead of `--prompt-size` hand-passing.
1258
1296
 
1259
1297
  ---
1260
1298
 
@@ -1316,7 +1354,7 @@ Each Group A→D ran the full RD→QA loop independently. Group C final QA: 14/1
1316
1354
 
1317
1355
  ### Out-of-scope (NOT changed)
1318
1356
 
1319
- `src/services/code-review/ecc-bridge.ts` + `src/services/dispatch/sub-agent-dispatcher.ts` + `src/services/agent/ecc-agent-service.ts` + `src/services/prd/handoff-service.ts` + `project-scan-reader.ts` + `src/services/rd/{strategic,tactical,strategy,impl,ast-gate,types}.ts` + `peaks-qa/` + `peaks-solo/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.12.0 red-line scope.
1357
+ `src/services/code-review/ecc-bridge.ts` + `src/services/dispatch/sub-agent-dispatcher.ts` + `src/services/agent/ecc-agent-service.ts` + `src/services/prd/handoff-service.ts` + `project-scan-reader.ts` + `src/services/rd/{strategic,tactical,strategy,impl,ast-gate,types}.ts` + `peaks-qa/` + `peaks-code/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.12.0 red-line scope.
1320
1358
 
1321
1359
  ---
1322
1360
 
@@ -1331,7 +1369,7 @@ Read-only observability layer on top of the v2.11.0 slice topology + 10/90 parad
1331
1369
  - **`peaks observability status`** (AC-1) — aggregate metrics for active session: total slices, success count, fail count, fanout cost total, repair-cycle peak.
1332
1370
  - **`peaks observability slices`** (AC-2) — per-slice list with rid, state, fanout count, repair-cycle count, duration (ms).
1333
1371
  - **`peaks observability fanout`** (AC-3) — fanout cost breakdown per sub-agent role (rd / qa / code-reviewer / security-reviewer / karpathy-reviewer).
1334
- - **`peaks observability repair-cycles`** (AC-4) — RD→QA repair-cycle count per slice; cap = 3 (peaks-solo repair-loop contract); capHit flag.
1372
+ - **`peaks observability repair-cycles`** (AC-4) — RD→QA repair-cycle count per slice; cap = 3 (peaks-code repair-loop contract); capHit flag.
1335
1373
  - **`peaks observability report --period day|week|month`** (AC-5) — markdown summary (header + status + slice table + fanout table + repair-cycle table + top-5 slowest) suitable for paste into PR descriptions or `.peaks/PROJECT.md` timeline entries.
1336
1374
  - **JSONL persistence** (AC-6) — append-only `.peaks/_runtime/<sessionId>/metrics/slices.jsonl`; zod schema v1; cross-session prune to last 10 session files by mtime.
1337
1375
  - **Hook integration** (AC-7) — metrics emitted from 7 sites: `peaks request transition` (Slice A), `peaks sub-agent dispatch`, `peaks session checkpoint`, D5 mode-gate, D6 context-trigger, D7 post-compact, `peaks request transition` RD→QA prereq (Slice C). All emits fire-and-forget per PRD Q4 (full-auto must never fail-loud).
@@ -1363,7 +1401,7 @@ Read-only observability layer on top of the v2.11.0 slice topology + 10/90 parad
1363
1401
 
1364
1402
  **MINOR bump from 2.10.0** (slice `v2-11-rm-rd-techdoc-immutable-handoff`, 6 multi-CC groups A-F, plan at `.peaks/memory/2026-06-26-v2-11-rm-rd-techdoc-immutable-handoff.md`).
1365
1403
 
1366
- Implements the "metering is value" + "10/90 paradigm" alignment: peaks-prd produces a single immutable handoff that all downstream consumers share; peaks-rd's parallel audit fan-out (now 5-way with ECC code-review + karpathy-reviewer hard gate) owns security/perf review; peaks-qa is trimmed to business-test-only; peaks-txt sediments business knowledge; peaks-solo removes runtime friction (auto-proceed, context monitor, post-compact resume).
1404
+ Implements the "metering is value" + "10/90 paradigm" alignment: peaks-prd produces a single immutable handoff that all downstream consumers share; peaks-rd's parallel audit fan-out (now 5-way with ECC code-review + karpathy-reviewer hard gate) owns security/perf review; peaks-qa is trimmed to business-test-only; peaks-txt sediments business knowledge; peaks-code removes runtime friction (auto-proceed, context monitor, post-compact resume).
1367
1405
 
1368
1406
  ### Features
1369
1407
 
@@ -1390,7 +1428,7 @@ Implements the "metering is value" + "10/90 paradigm" alignment: peaks-prd produ
1390
1428
 
1391
1429
  - **ECC envelope validation** assumes the `everything-claude-code` plugin is installed and exposes a `code-review` agent with the `{ passed, violations[], gateAction }` shape. If the plugin is absent, peaks-rd falls back to inline review (5-state detector + `code-review-ecc-degraded-to-inline` TXT note).
1392
1430
  - **D5 hard-floor categories** (irreversible external side effects / auth-credential / multi-day investment) still pause for AskUserQuestion regardless of mode.
1393
- - **D7 post-compact resume** requires re-invoking `/peaks-solo` in fresh context (Option A — no SessionStart hook in v2.11.0; Option B deferred).
1431
+ - **D7 post-compact resume** requires re-invoking `/peaks-code` in fresh context (Option A — no SessionStart hook in v2.11.0; Option B deferred).
1394
1432
  - **Migration scope** is text-only — historical `rd/tech-doc.md` files coexist with the new `prd/handoff.md`; prune is a future slice.
1395
1433
 
1396
1434
  ---
@@ -1403,7 +1441,7 @@ Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflo
1403
1441
 
1404
1442
  ### Features
1405
1443
 
1406
- - **Multi-pass slice decomposition** (`peaks slice decompose --granularity=service|file|both|auto`, slice W2/W3): produces a v2 hierarchical topology (`DecompositionResultV2` with `passes[].slices[]` and `granularity` / `parentSliceId` fields) that supports peaks-solo fan-out RD. v1 envelopes continue to read via `SchemaRouter` (`src/services/slice/schema-router.ts`).
1444
+ - **Multi-pass slice decomposition** (`peaks slice decompose --granularity=service|file|both|auto`, slice W2/W3): produces a v2 hierarchical topology (`DecompositionResultV2` with `passes[].slices[]` and `granularity` / `parentSliceId` fields) that supports peaks-code fan-out RD. v1 envelopes continue to read via `SchemaRouter` (`src/services/slice/schema-router.ts`).
1407
1445
  - **LLMArbitrator** (W2 T5): content-hash SHA-256 cache (`<cacheDir>/<hash>.json`), budget cap (`resetArbitratorBudget()`), live/cache/failure-path callId routing.
1408
1446
  - **GranularityDecider** (W2 T6): stop-condition + tie-break for file-vs-service subdivision.
1409
1447
  - **CrossPassEdgeMerger** (W2 T7): static detection (type-shares / fixture-shares / re-exports / import-binding) + LLM fallback; static detection runs UNCONDITIONALLY (W6 fix #1) so it works without an `llmRunner`.
@@ -1413,7 +1451,7 @@ Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflo
1413
1451
  - **peaks slice plan PickedFileRouter** (W6 CC-β): `parsePickedFile()` helper replaces raw `JSON.parse(...)` for `-picked.json` envelope; new `PICKED_ENVELOPE_INVALID` error code on validation failure.
1414
1452
  - **3 new skills** (W4): `peaks-slice-decompose` (v2 schema references), `peaks-audit` (6-dim reference), `peaks-final-review` (4-dim reference).
1415
1453
  - **5 existing skill updates** (W7 CC-α):
1416
- - `peaks-solo` — new Step 0.6 (Audit + Goal gate) and Step N+1 (Final Review gate) between Step 0.5 and Step 0.7.
1454
+ - `peaks-code` — new Step 0.6 (Audit + Goal gate) and Step N+1 (Final Review gate) between Step 0.5 and Step 0.7.
1417
1455
  - `peaks-rd` — new references: `reading-v2-slice-results.md` (SchemaRouter dual-read), `writing-handoff-frontmatter.md` (frontmatter fields + canonical path).
1418
1456
  - `peaks-qa` — new reference: `reading-handoff-frontmatter.md` (cross-check `decisions[]` vs `tests/`, `risks[]` vs `tests/unit/security/`).
1419
1457
  - `peaks-prd` — new reference: `prd-for-multi-pass.md` (AC tagging `[pass-1]` / `[pass-2]`).
@@ -1534,7 +1572,7 @@ Replaced all 20 with a 4-helper API at `src/services/artifacts/artifact-template
1534
1572
  ### Changed
1535
1573
 
1536
1574
  - **`FanoutMode` closed set narrowed to `['fan-out']`.** The `'serial'` member is gone from `src/services/preferences/preferences-types.ts`; any preferences.json file carrying `defaultMode = 'serial'` (or any non-fan-out value) now throws `PREFERENCES_FANOUT_INVALID` at load. The `migratePreferences` path silently rewrites legacy `'serial'` → `'fan-out'` for 2.8.3-era files and surfaces the change in the migration envelope's `changes[]`.
1537
- - **SKILL.md contract flipped.** `peaks-solo` SKILL.md now states "Hard constraint: fan-out is mandatory"; the previous "Fan-out opt-out" subsection is removed.
1575
+ - **SKILL.md contract flipped.** `peaks-code` SKILL.md now states "Hard constraint: fan-out is mandatory"; the previous "Fan-out opt-out" subsection is removed.
1538
1576
  - **Reference docs reorganized.** `references/fanout-opt-out.md` (escape hatch) → `references/fanout-mandatory.md` (hard constraint + migration contract). `references/swarm-dispatch-contract.md` opt-out callout removed.
1539
1577
  - **Test surface refreshed.** `tests/unit/solo/skills-solo-fanout-opt-out.test.ts` → `tests/unit/solo/skills-solo-fanout-mandatory.test.ts`; pins the new hard constraint and verifies the opt-out file is deleted.
1540
1578
 
@@ -1869,7 +1907,7 @@ are unchanged by this release), `pnpm build` clean.
1869
1907
  `src/services/solo/dag-orchestrator.ts` exports `runDag(dag, opts)`:
1870
1908
  topological-layer fan-out, per-layer join barrier, 任一叶子失败整组回退
1871
1909
  (any leaf failure → in-flight sub-agents receive cancel signal → RD
1872
- returns to repair). peaks-solo SKILL.md references the orchestrator.
1910
+ returns to repair). peaks-code SKILL.md references the orchestrator.
1873
1911
  - **5-IDE `awaitBatch` real implementation (slices 1.2 + 1.3 + 1.4)** —
1874
1912
  `SubAgentDispatcher.awaitBatch(batchId, opts): Promise<BatchResult[]>`
1875
1913
  is now implemented across **all 5 IDEs**: claude-code (1.2 MVP) +
@@ -2383,10 +2421,10 @@ are unchanged by this release), `pnpm build` clean.
2383
2421
  skillsActive, todoState, reason, createdAt). Max 10 retained, oldest auto-pruned.
2384
2422
  - **`peaks session resume`** (slice 011) — reads checkpoint JSON, emits structured
2385
2423
  markdown block for skill to prepend on session restart.
2386
- - **peaks-solo Step 0.5** (slice 011) — cross-date session check.
2387
- IDE-agnostic; lives in `skills/peaks-solo/references/cross-date-session-check.md`.
2388
- - **peaks-solo Step 0.75** (slice 011) — checkpoint resume probe.
2389
- - **peaks-solo Step N** (slice 011) — periodic checkpoint guidance.
2424
+ - **peaks-code Step 0.5** (slice 011) — cross-date session check.
2425
+ IDE-agnostic; lives in `skills/peaks-code/references/cross-date-session-check.md`.
2426
+ - **peaks-code Step 0.75** (slice 011) — checkpoint resume probe.
2427
+ - **peaks-code Step N** (slice 011) — periodic checkpoint guidance.
2390
2428
 
2391
2429
  ### Security
2392
2430
 
@@ -2575,12 +2613,12 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
2575
2613
  5+ historical slice records exist; v1.1 will switch to percentile
2576
2614
  lookup.
2577
2615
 
2578
- - **`peaks-solo` Step 0.6** — pre-mode-selection slice decomposition.
2616
+ - **`peaks-code` Step 0.6** — pre-mode-selection slice decomposition.
2579
2617
  Solo runs the algorithm automatically after Step 0.55 (1.x detection)
2580
2618
  returns "fresh". The user picks a profile informed by the
2581
2619
  decomposition's parallel structure.
2582
2620
 
2583
- - **3 new `peaks-solo/references/*.md`** — `slice-algorithm.md`
2621
+ - **3 new `peaks-code/references/*.md`** — `slice-algorithm.md`
2584
2622
  (algorithm spec), `understand-anything-integration.md` (KG consumer
2585
2623
  contract), `fzf-integration.md` (operator-facing fzf usage).
2586
2624
 
@@ -2594,7 +2632,7 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
2594
2632
  now derive from `parallelBatches` (with legacy `--type` lookup as
2595
2633
  the fallback path).
2596
2634
 
2597
- - **Extended `peaks-solo/SKILL.md`** — adds "Peaks-Loop Slice
2635
+ - **Extended `peaks-code/SKILL.md`** — adds "Peaks-Loop Slice
2598
2636
  Decomposition (Step 0.6 — pre-mode-selection)" section.
2599
2637
 
2600
2638
  - **Extended `runbook.md`** — adds "Step 2.5: Slice Decomposition"
@@ -3068,7 +3106,7 @@ subprocess ignores it when peaks-loop's env vars are present).
3068
3106
  write. Soft-fail per sub-step; never blocks the whole upgrade.
3069
3107
 
3070
3108
  - **`peaks upgrade --detect-1x`** — read-only probe returning a JSON
3071
- envelope the peaks-solo skill consumes to gate the AskUserQuestion
3109
+ envelope the peaks-code skill consumes to gate the AskUserQuestion
3072
3110
  in Step 0.55.
3073
3111
 
3074
3112
  - **`peaks standards migrate --from-claude-rules`** — thins `.claude/rules/`