peaks-loop 3.1.2 → 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 (301) hide show
  1. package/.claude-plugin/marketplace.json +62 -12
  2. package/CHANGELOG.md +50 -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 +5 -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 +8 -8
  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-resource-snapshot.js +29 -1
  61. package/dist/src/services/memory/project-memory-service.js +1 -1
  62. package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
  63. package/dist/src/services/migrate-skill-name/migrate.js +152 -0
  64. package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
  65. package/dist/src/services/migrate-skill-name/schema.js +25 -0
  66. package/dist/src/services/observability/aggregation.d.ts +1 -1
  67. package/dist/src/services/observability/aggregation.js +1 -1
  68. package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
  69. package/dist/src/services/perf/perf-baseline-service.js +1 -1
  70. package/dist/src/services/prd/handoff-types.d.ts +1 -1
  71. package/dist/src/services/prd/handoff-types.js +1 -1
  72. package/dist/src/services/progress/progress-service.d.ts +1 -1
  73. package/dist/src/services/progress/progress-service.js +1 -1
  74. package/dist/src/services/rd/standards-diagnostic.js +1 -1
  75. package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
  76. package/dist/src/services/sc/sc-service.js +1 -1
  77. package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
  78. package/dist/src/services/sediment/dispose-confirm.js +5 -0
  79. package/dist/src/services/sediment/json-schema.d.ts +247 -0
  80. package/dist/src/services/sediment/json-schema.js +26 -0
  81. package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
  82. package/dist/src/services/sediment/manifest-lint.js +11 -0
  83. package/dist/src/services/sediment/pool-paths.d.ts +22 -0
  84. package/dist/src/services/sediment/pool-paths.js +25 -0
  85. package/dist/src/services/sediment/pool-read.d.ts +20 -0
  86. package/dist/src/services/sediment/pool-read.js +73 -0
  87. package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
  88. package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
  89. package/dist/src/services/sediment/pool-write.d.ts +14 -0
  90. package/dist/src/services/sediment/pool-write.js +25 -0
  91. package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
  92. package/dist/src/services/sediment/promotion-gate.js +20 -0
  93. package/dist/src/services/sediment/types.d.ts +52 -0
  94. package/dist/src/services/sediment/types.js +1 -0
  95. package/dist/src/services/session/binding-store.d.ts +1 -1
  96. package/dist/src/services/session/binding-store.js +1 -1
  97. package/dist/src/services/session/caller-id-types.d.ts +1 -1
  98. package/dist/src/services/session/session-manager.d.ts +1 -1
  99. package/dist/src/services/session/session-manager.js +1 -1
  100. package/dist/src/services/skill/resume-detector.js +1 -1
  101. package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
  102. package/dist/src/services/skill/skill-scheduler.js +1 -1
  103. package/dist/src/services/skillhub/release-diff.d.ts +18 -0
  104. package/dist/src/services/skillhub/release-diff.js +38 -0
  105. package/dist/src/services/skillhub/release-export.d.ts +8 -0
  106. package/dist/src/services/skillhub/release-export.js +31 -0
  107. package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
  108. package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
  109. package/dist/src/services/skillhub/release-import.d.ts +7 -0
  110. package/dist/src/services/skillhub/release-import.js +59 -0
  111. package/dist/src/services/skillhub/release-retain.d.ts +23 -0
  112. package/dist/src/services/skillhub/release-retain.js +89 -0
  113. package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
  114. package/dist/src/services/skillhub/sqlite-store.js +47 -0
  115. package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
  116. package/dist/src/services/skillhub/tar-runtime.js +91 -0
  117. package/dist/src/services/skillhub/types.d.ts +105 -0
  118. package/dist/src/services/skillhub/types.js +1 -0
  119. package/dist/src/services/skills/skill-conformance-service.js +8 -5
  120. package/dist/src/services/skills/skill-presence-service.d.ts +4 -4
  121. package/dist/src/services/skills/skill-presence-service.js +2 -2
  122. package/dist/src/services/skills/skill-registry.js +27 -0
  123. package/dist/src/services/skills/skill-runbook-service.js +2 -2
  124. package/dist/src/services/slice/slice-check-service.js +1 -1
  125. package/dist/src/services/slice/slice-check-types.d.ts +1 -1
  126. package/dist/src/services/slice/slice-check-types.js +1 -1
  127. package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
  128. package/dist/src/services/slice/slice-decompose-types.js +1 -1
  129. package/dist/src/services/solo/auto-compact-orchestrator.d.ts +1 -1
  130. package/dist/src/services/solo/auto-compact-orchestrator.js +2 -2
  131. package/dist/src/services/solo/dag-orchestrator.d.ts +3 -3
  132. package/dist/src/services/solo/dag-orchestrator.js +4 -4
  133. package/dist/src/services/solo/mode-gate.d.ts +2 -2
  134. package/dist/src/services/solo/post-compact-detector.js +2 -2
  135. package/dist/src/services/solo/status-line-renderer.d.ts +4 -4
  136. package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
  137. package/dist/src/services/standards/missing-standards-detector.js +1 -1
  138. package/dist/src/services/standards/project-standards-service.d.ts +1 -1
  139. package/dist/src/services/standards/project-standards-service.js +4 -4
  140. package/dist/src/services/understand/understand-types.d.ts +1 -1
  141. package/dist/src/services/upgrade/1x-detector-service.js +1 -1
  142. package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
  143. package/dist/src/services/upgrade/upgrade-service.js +52 -30
  144. package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
  145. package/dist/src/services/workflow/workflow-router-service.d.ts +1 -1
  146. package/dist/src/services/workflow/workflow-router-service.js +3 -3
  147. package/dist/src/services/workspace/claude-settings-template.d.ts +1 -1
  148. package/dist/src/services/workspace/claude-settings-template.js +2 -2
  149. package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
  150. package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
  151. package/dist/src/services/workspace/workspace-service.d.ts +4 -4
  152. package/dist/src/services/workspace/workspace-service.js +2 -2
  153. package/dist/src/shared/paths.d.ts +1 -1
  154. package/dist/src/shared/paths.js +1 -1
  155. package/dist/src/shared/version.d.ts +1 -1
  156. package/dist/src/shared/version.js +1 -1
  157. package/dist/src/skills/peaks-maker/index.d.ts +5 -0
  158. package/dist/src/skills/peaks-maker/index.js +32 -0
  159. package/package.json +8 -3
  160. package/scripts/install-skills.mjs +29 -4
  161. package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
  162. package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
  163. package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
  164. package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
  165. package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
  166. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
  167. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +1 -1
  168. package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
  169. package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
  170. package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
  171. package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
  172. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +1 -1
  173. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +2 -2
  174. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +1 -1
  175. package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
  176. package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
  177. package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +7 -1
  178. package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +9 -3
  179. package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +11 -5
  180. package/skills/peaks-audit/SKILL.md +1 -1
  181. package/skills/{peaks-solo → peaks-code}/SKILL.md +9 -9
  182. package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
  183. package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +4 -4
  184. package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +2 -2
  185. package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
  186. package/skills/peaks-code/references/command-migration.md +3 -0
  187. package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
  188. package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
  189. package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +1 -1
  190. package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +1 -1
  191. package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +9 -9
  192. package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +12 -12
  193. package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +1 -1
  194. package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +1 -1
  195. package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
  196. package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +1 -1
  197. package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
  198. package/skills/{peaks-solo → peaks-code}/references/runbook.md +5 -5
  199. package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
  200. package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
  201. package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +5 -5
  202. package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +10 -10
  203. package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +7 -7
  204. package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +3 -3
  205. package/skills/peaks-doctor/SKILL.md +1 -1
  206. package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
  207. package/skills/peaks-final-review/SKILL.md +3 -3
  208. package/skills/peaks-final-review/references/4-dimensions.md +1 -1
  209. package/skills/peaks-ide/SKILL.md +1 -1
  210. package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +14 -14
  211. package/skills/peaks-sop/SKILL.md +1 -1
  212. package/skills/{peaks-solo-status → peaks-status}/SKILL.md +13 -13
  213. package/skills/{peaks-solo-test → peaks-test}/SKILL.md +11 -11
  214. package/skills/peaks-solo/references/command-migration.md +0 -3
  215. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
  216. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
  217. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
  218. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
  219. /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
  220. /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
  221. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
  222. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +0 -0
  223. /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
  224. /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
  225. /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
  226. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
  227. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
  228. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
  229. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
  230. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
  231. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
  232. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
  233. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
  234. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
  235. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
  236. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
  237. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
  238. /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
  239. /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
  240. /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
  241. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
  242. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
  243. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
  244. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
  245. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
  246. /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
  247. /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
  248. /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
  249. /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
  250. /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
  251. /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
  252. /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
  253. /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
  254. /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
  255. /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
  256. /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
  257. /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
  258. /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
  259. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
  260. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +0 -0
  261. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
  262. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
  263. /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
  264. /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
  265. /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
  266. /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
  267. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
  268. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
  269. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
  270. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
  271. /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
  272. /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
  273. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
  274. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
  275. /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
  276. /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
  277. /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
  278. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
  279. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
  280. /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
  281. /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
  282. /package/skills/{peaks-solo → peaks-code}/references/boundaries.md +0 -0
  283. /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
  284. /package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +0 -0
  285. /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
  286. /package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +0 -0
  287. /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
  288. /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
  289. /package/skills/{peaks-solo → peaks-code}/references/external-references.md +0 -0
  290. /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
  291. /package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +0 -0
  292. /package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +0 -0
  293. /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
  294. /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
  295. /package/skills/{peaks-solo → peaks-code}/references/job-loop.md +0 -0
  296. /package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +0 -0
  297. /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
  298. /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
  299. /package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +0 -0
  300. /package/skills/{peaks-solo → peaks-code}/references/step-0-8-gate.md +0 -0
  301. /package/skills/{peaks-solo → peaks-code}/references/workflow.md +0 -0
@@ -28,10 +28,10 @@ const SKILL_NAMES = [
28
28
  'peaks-rd',
29
29
  'peaks-qa',
30
30
  'peaks-sc',
31
- 'peaks-solo',
32
- 'peaks-solo-resume',
33
- 'peaks-solo-status',
34
- 'peaks-solo-test',
31
+ 'peaks-code',
32
+ 'peaks-resume',
33
+ 'peaks-status',
34
+ 'peaks-test',
35
35
  'peaks-sop',
36
36
  'peaks-txt',
37
37
  'peaks-doctor'
@@ -85,7 +85,10 @@ export function auditSkillConformance(input) {
85
85
  const skillsDir = join(input.projectRoot, 'skills');
86
86
  const checks = [];
87
87
  for (const skillName of SKILL_NAMES) {
88
- const skillPath = join(skillsDir, skillName, 'SKILL.md');
88
+ // LLM-internal skills live under `skills/bee/<name>/` per spec 2026-07-05.
89
+ const topPath = join(skillsDir, skillName, 'SKILL.md');
90
+ const beePath = join(skillsDir, 'bee', skillName, 'SKILL.md');
91
+ const skillPath = existsSync(topPath) ? topPath : beePath;
89
92
  const fm = readSkillFrontmatter(skillPath);
90
93
  // 1. task-level frontmatter
91
94
  if (fm === null) {
@@ -28,7 +28,7 @@ export type SkillPresence = {
28
28
  * observability consumer that an outer-session swap was observed
29
29
  * on the previous heartbeat. The actual binding rotation is
30
30
  * performed by `ensureSessionWithRotation` (slice 018), not by
31
- * `setSkillPresence`. `peaks-solo`'s Step 0 used to read this
31
+ * `setSkillPresence`. `peaks-code`'s Step 0 used to read this
32
32
  * field and turn it into an AskUserQuestion; that ask is no
33
33
  * longer needed because the rotation already happened by the time
34
34
  * the skill is invoked.
@@ -81,11 +81,11 @@ export declare function getSkillPresence(projectRootOverride?: string): SkillPre
81
81
  * different outer (Claude / harness) session than the one that
82
82
  * is now driving peaks. Most common cause: the LLM closed the
83
83
  * previous Claude session, the next session boots and finds a
84
- * presence leftover from the old one. peaks-solo Step 1 must
84
+ * presence leftover from the old one. peaks-code Step 1 must
85
85
  * AskUserQuestion to confirm the user wants the old mode.
86
86
  *
87
87
  * - `'no-presence'` — there is no presence file on disk.
88
- * Not strictly "stale", but callers (peaks-solo Step 1, `peaks
88
+ * Not strictly "stale", but callers (peaks-code Step 1, `peaks
89
89
  * solo should-pause --step step-1-mode-select`) want to treat
90
90
  * this case as "no opinion yet — must ask". Surfaced as
91
91
  * `stale: true` with reason `'no-presence'` so the ask path is
@@ -130,7 +130,7 @@ export declare function checkStalePresence(opts?: {
130
130
  * Called from `peaks workspace init` immediately after a successful
131
131
  * `outer-session-mismatch` rotation. When the previous session's
132
132
  * presence is still on disk under the OLD outer session id,
133
- * clearing it prevents peaks-solo Step 1 from picking up a stale
133
+ * clearing it prevents peaks-code Step 1 from picking up a stale
134
134
  * `mode` field that the user never explicitly chose.
135
135
  *
136
136
  * Only clears when:
@@ -143,7 +143,7 @@ function getBoundOuterSessionId(projectRootOverride) {
143
143
  * the presence envelope (useful for the statusline to render a stale
144
144
  * marker and for the QA / log consumers to know an outer-session swap
145
145
  * happened), but it no longer carries the implicit "ask the user"
146
- * promise — `peaks-solo`'s Step 0 no longer needs to surface an
146
+ * promise — `peaks-code`'s Step 0 no longer needs to surface an
147
147
  * AskUserQuestion, because the rotation already fired by the time the
148
148
  * skill is invoked.
149
149
  *
@@ -377,7 +377,7 @@ export function checkStalePresence(opts) {
377
377
  * Called from `peaks workspace init` immediately after a successful
378
378
  * `outer-session-mismatch` rotation. When the previous session's
379
379
  * presence is still on disk under the OLD outer session id,
380
- * clearing it prevents peaks-solo Step 1 from picking up a stale
380
+ * clearing it prevents peaks-code Step 1 from picking up a stale
381
381
  * `mode` field that the user never explicitly chose.
382
382
  *
383
383
  * Only clears when:
@@ -13,6 +13,33 @@ export async function loadSkillRegistry(baseDir = skillsDir) {
13
13
  const skills = [];
14
14
  const failures = [];
15
15
  for (const directory of directories) {
16
+ // LLM-internal skills (bees) live under `bee/` per spec 2026-07-05.
17
+ // Recurse one level into `bee/`; treat each child as a separate skill.
18
+ if (directory === 'bee') {
19
+ const subEntries = await listDirectories(join(baseDir, 'bee'));
20
+ for (const subDir of subEntries) {
21
+ const skillPath = join(baseDir, 'bee', subDir, 'SKILL.md');
22
+ if (!(await pathExists(skillPath))) {
23
+ continue;
24
+ }
25
+ try {
26
+ const frontmatter = parseFrontmatter(await readText(skillPath));
27
+ // `directory` is the on-disk skill folder name; for bees that is the
28
+ // basename of the bee child, NOT `bee/<name>` (keeps the
29
+ // doctor skill-name-matches-directory invariant working).
30
+ skills.push({
31
+ name: frontmatter.name,
32
+ description: frontmatter.description,
33
+ directory: subDir,
34
+ skillPath
35
+ });
36
+ }
37
+ catch (error) {
38
+ failures.push({ directory: subDir, skillPath, message: getLoadFailureMessage(error) });
39
+ }
40
+ }
41
+ continue;
42
+ }
16
43
  const skillPath = join(baseDir, directory, 'SKILL.md');
17
44
  if (!(await pathExists(skillPath))) {
18
45
  continue;
@@ -36,7 +36,7 @@ function extractRunbookSection(body) {
36
36
  /**
37
37
  * Load the runbook section, falling back to `references/runbook.md` if the
38
38
  * SKILL.md only has a pointer section. This supports skills (notably
39
- * `peaks-solo`) that extracted their 150-line bash runbook to a sibling
39
+ * `peaks-code`) that extracted their 150-line bash runbook to a sibling
40
40
  * reference to keep SKILL.md under the 800-line cap. The CLI
41
41
  * `peaks skill runbook` command uses the same fallback so a human
42
42
  * reviewer sees the full runbook regardless of where it lives.
@@ -52,7 +52,7 @@ async function loadRunbookSection(skillPath, body) {
52
52
  const inline = extractRunbookSection(body);
53
53
  const skillDir = dirname(skillPath);
54
54
  // Try multiple reference filenames. Convention: each skill may name its
55
- // runbook file `runbook.md` (the generic name, used by peaks-solo), or
55
+ // runbook file `runbook.md` (the generic name, used by peaks-code), or
56
56
  // `<role>-runbook.md` (the role-suffixed name, used by peaks-rd → rd-runbook.md,
57
57
  // peaks-qa → qa-runbook.md, etc.). Prefer the longest extracted section.
58
58
  const refCandidates = [
@@ -297,7 +297,7 @@ export async function sliceCheck(options) {
297
297
  description: 'vitest run (skipped per --skip-tests)',
298
298
  status: 'skipped',
299
299
  durationMs: 0,
300
- detail: 'Skipped: --skip-tests was set. Use the peaks-solo-test skill to run the full suite manually.'
300
+ detail: 'Skipped: --skip-tests was set. Use the peaks-test skill to run the full suite manually.'
301
301
  });
302
302
  unitTestsRunMode = 'skipped';
303
303
  }
@@ -2,7 +2,7 @@
2
2
  * Type envelope for the `peaks slice check` CLI command.
3
3
  *
4
4
  * `peaks slice check` is the boundary check for the RD micro-cycle
5
- * (see `skills/peaks-solo/references/micro-cycle.md`). It bundles the
5
+ * (see `skills/peaks-code/references/micro-cycle.md`). It bundles the
6
6
  * 4 self-checks that must pass at slice end before the slice is handed
7
7
  * off to peaks-qa:
8
8
  *
@@ -2,7 +2,7 @@
2
2
  * Type envelope for the `peaks slice check` CLI command.
3
3
  *
4
4
  * `peaks slice check` is the boundary check for the RD micro-cycle
5
- * (see `skills/peaks-solo/references/micro-cycle.md`). It bundles the
5
+ * (see `skills/peaks-code/references/micro-cycle.md`). It bundles the
6
6
  * 4 self-checks that must pass at slice end before the slice is handed
7
7
  * off to peaks-qa:
8
8
  *
@@ -2,7 +2,7 @@
2
2
  * Type envelope for `peaks slice decompose` and its outputs.
3
3
  *
4
4
  * The slice-decomposition algorithm is a 6-stage deterministic function
5
- * (see `peaks-solo/references/slice-algorithm.md` for the full spec):
5
+ * (see `peaks-code/references/slice-algorithm.md` for the full spec):
6
6
  *
7
7
  * 1. workUnitResolution -- codegraph.query + knowledge_graph.grep
8
8
  * 2. buildDependencyDAG -- real import edges + codegraph.affected fallback
@@ -2,7 +2,7 @@
2
2
  * Type envelope for `peaks slice decompose` and its outputs.
3
3
  *
4
4
  * The slice-decomposition algorithm is a 6-stage deterministic function
5
- * (see `peaks-solo/references/slice-algorithm.md` for the full spec):
5
+ * (see `peaks-code/references/slice-algorithm.md` for the full spec):
6
6
  *
7
7
  * 1. workUnitResolution -- codegraph.query + knowledge_graph.grep
8
8
  * 2. buildDependencyDAG -- real import edges + codegraph.affected fallback
@@ -22,7 +22,7 @@ export interface AutoCompactInput {
22
22
  /**
23
23
  * Slice 2026-06-28-solo-mode-bypass-fix (defect #4): which session
24
24
  * the compact should target. Default `'main'` — the orchestrator
25
- * (peaks-solo body) runs in the main-session Claude Code window and
25
+ * (peaks-code body) runs in the main-session Claude Code window and
26
26
  * wants to compress *its* context. Sub-agent shells pass
27
27
  * `'sub-agent'` to preserve the legacy shell-spawn behaviour.
28
28
  */
@@ -139,7 +139,7 @@ function appendAutoDecisionLog(input) {
139
139
  ''
140
140
  ].join('\n');
141
141
  if (!existsSync(logPath)) {
142
- writeFileSync(logPath, `# peaks-solo auto-decisions log\n${row}`, 'utf8');
142
+ writeFileSync(logPath, `# peaks-code auto-decisions log\n${row}`, 'utf8');
143
143
  return;
144
144
  }
145
145
  const existing = readFileSync(logPath, 'utf8');
@@ -200,7 +200,7 @@ function writePreCompactCheckpoint(input) {
200
200
  recentDecisions: [],
201
201
  recentArtifactPaths: [],
202
202
  gitStatus: '',
203
- skillsActive: ['peaks-solo'],
203
+ skillsActive: ['peaks-code'],
204
204
  todoState: []
205
205
  };
206
206
  writeFileSync(path, JSON.stringify(content, null, 2), 'utf8');
@@ -8,7 +8,7 @@
8
8
  * Design:
9
9
  * - **Pure dispatcher contract**: the orchestrator never calls an LLM
10
10
  * directly; it returns `DispatchSpec[]` per topological level and lets
11
- * the caller (the CLI / peaks-solo LLM) execute the per-IDE tool calls.
11
+ * the caller (the CLI / peaks-code LLM) execute the per-IDE tool calls.
12
12
  * This keeps the orchestrator testable end-to-end with mock sub-agents.
13
13
  * - **Join barrier**: between levels, the orchestrator awaits the
14
14
  * results of all dispatched leaves and refuses to advance if any
@@ -21,7 +21,7 @@
21
21
  * and the next dispatch's prompt is built with `formatContractInjection`.
22
22
  *
23
23
  * Why this lives in `services/solo/`:
24
- * `peaks-solo` is the natural caller. The CLI surface (`peaks sub-agent
24
+ * `peaks-code` is the natural caller. The CLI surface (`peaks sub-agent
25
25
  * dispatch --from-dag`) consumes the planner's output but the planner
26
26
  * itself is a library.
27
27
  */
@@ -123,6 +123,6 @@ export declare function runDag(dag: SliceDag, opts: RunDagOptions): Promise<DagR
123
123
  * cancels in-flight siblings and breaks the loop.
124
124
  *
125
125
  * Pure planner; same I/O contract as `runDag`. The caller (CLI /
126
- * peaks-solo LLM) executes the per-IDE tool calls.
126
+ * peaks-code LLM) executes the per-IDE tool calls.
127
127
  */
128
128
  export declare function runLayeredDag(dag: SliceDag, opts: RunDagOptions): Promise<DagRunResult>;
@@ -8,7 +8,7 @@
8
8
  * Design:
9
9
  * - **Pure dispatcher contract**: the orchestrator never calls an LLM
10
10
  * directly; it returns `DispatchSpec[]` per topological level and lets
11
- * the caller (the CLI / peaks-solo LLM) execute the per-IDE tool calls.
11
+ * the caller (the CLI / peaks-code LLM) execute the per-IDE tool calls.
12
12
  * This keeps the orchestrator testable end-to-end with mock sub-agents.
13
13
  * - **Join barrier**: between levels, the orchestrator awaits the
14
14
  * results of all dispatched leaves and refuses to advance if any
@@ -21,7 +21,7 @@
21
21
  * and the next dispatch's prompt is built with `formatContractInjection`.
22
22
  *
23
23
  * Why this lives in `services/solo/`:
24
- * `peaks-solo` is the natural caller. The CLI surface (`peaks sub-agent
24
+ * `peaks-code` is the natural caller. The CLI surface (`peaks sub-agent
25
25
  * dispatch --from-dag`) consumes the planner's output but the planner
26
26
  * itself is a library.
27
27
  */
@@ -110,7 +110,7 @@ export function buildDispatchSpec(dag, sliceId, contracts, defaultPrompt) {
110
110
  'Handoff protocol (REQUIRED — orchestrator depends on this):',
111
111
  ' 1. Execute the slice to completion.',
112
112
  ` 2. Write your public contract via \`peaks contract write --project <root> --session-id <sid> --slice-id ${sliceId} --exports <...> --types <...> --signatures <...>\`. The orchestrator will pick it up on the next dispatch run.`,
113
- ' 3. Do NOT re-invoke `peaks sub-agent dispatch --from-dag` yourself — the parent orchestrator (peaks-solo) drives level advancement.',
113
+ ' 3. Do NOT re-invoke `peaks sub-agent dispatch --from-dag` yourself — the parent orchestrator (peaks-code) drives level advancement.',
114
114
  '',
115
115
  `After your contract is on disk, the orchestrator will auto-advance to the next topological level (if any) by re-invoking \`peaks sub-agent dispatch --from-dag\` with the same batch-id. Your slice will appear in its ancestors via \`formatContractInjection\`.${ancestorFragment}`
116
116
  ].join('\n');
@@ -214,7 +214,7 @@ export async function runDag(dag, opts) {
214
214
  * cancels in-flight siblings and breaks the loop.
215
215
  *
216
216
  * Pure planner; same I/O contract as `runDag`. The caller (CLI /
217
- * peaks-solo LLM) executes the per-IDE tool calls.
217
+ * peaks-code LLM) executes the per-IDE tool calls.
218
218
  */
219
219
  export async function runLayeredDag(dag, opts) {
220
220
  try {
@@ -43,7 +43,7 @@ export type GatedStepId = 'step-0.5-openspec-opt-in' | 'step-0.6-audit-goal' | '
43
43
  export declare const GATED_STEPS: readonly GatedStepId[];
44
44
  /**
45
45
  * Slice 2026-06-28-solo-mode-bypass-fix: the kind of gate that
46
- * produced this decision. The LLM-side caller (peaks-solo body) reads
46
+ * produced this decision. The LLM-side caller (peaks-code body) reads
47
47
  * this to distinguish "you paused because the user must choose the
48
48
  * mode" (`mode-selection-itself`) from "you paused because the mode
49
49
  * you already chose is assisted/strict" (`mode-driven`) from "you
@@ -98,7 +98,7 @@ export declare function shouldAutoProceed(mode: SoloMode): boolean;
98
98
  /**
99
99
  * v2.15.0 slice 002 AC-4: the 5 action identifiers that qualify as
100
100
  * commit-boundary side effects. Matched by the LLM-side caller
101
- * (peaks-solo body / peaks-rd fork agent) when it is about to run a
101
+ * (peaks-code body / peaks-rd fork agent) when it is about to run a
102
102
  * Bash command that maps to one of these. Set `commitBoundaryAction:
103
103
  * true` on the `shouldPauseAtGate` call to trigger the hard-floor
104
104
  * override.
@@ -146,7 +146,7 @@ export async function detectPostCompactResume(opts) {
146
146
  };
147
147
  }
148
148
  // Active skill check (D7.a.4). Defaults to reading from skill presence.
149
- const expectedActiveSkill = 'peaks-solo';
149
+ const expectedActiveSkill = 'peaks-code';
150
150
  const observedActiveSkill = opts.activeSkill ?? readActiveSkillName(opts.projectRoot);
151
151
  if (observedActiveSkill !== expectedActiveSkill) {
152
152
  return {
@@ -154,7 +154,7 @@ export async function detectPostCompactResume(opts) {
154
154
  reason: 'active-skill-mismatch',
155
155
  checkpointPath: file.path,
156
156
  checkpointMtime: file.mtime.toISOString(),
157
- warnings: [`active skill "${observedActiveSkill ?? 'unset'}" is not peaks-solo`]
157
+ warnings: [`active skill "${observedActiveSkill ?? 'unset'}" is not peaks-code`]
158
158
  };
159
159
  }
160
160
  // Mode: prefer the checkpoint's mode; fall back to the presence override
@@ -1,13 +1,13 @@
1
1
  /**
2
- * G6.5 — status line renderer for the peaks-solo batch-sync wait period.
2
+ * G6.5 — status line renderer for the peaks-code batch-sync wait period.
3
3
  *
4
4
  * Single line, 80-120 chars, status-line-friendly. The shape is
5
5
  * documented in PRD §G6.5:
6
6
  *
7
- * [peaks-solo] swarm 3/3 running | rd-planning 45% (12s ago) | qa-test-cases 30% (5s ago) | ui-design 20% (2s ago)
8
- * [peaks-solo] swarm 3/3 running | rd-planning 70% (8s ago) | qa-test-cases 50% (3s ago) | ui-design 30% (6s ago)
7
+ * [peaks-code] swarm 3/3 running | rd-planning 45% (12s ago) | qa-test-cases 30% (5s ago) | ui-design 20% (2s ago)
8
+ * [peaks-code] swarm 3/3 running | rd-planning 70% (8s ago) | qa-test-cases 50% (3s ago) | ui-design 30% (6s ago)
9
9
  * ...
10
- * [peaks-solo] swarm 3/3 done in 47.3s
10
+ * [peaks-code] swarm 3/3 done in 47.3s
11
11
  *
12
12
  * Pure helper; the poller calls it once per tick. No IO.
13
13
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Slice 2026-06-16-peaks-solo-auto-scaffold (RD#7) — missing-standards-detector.
2
+ * Slice 2026-06-16-peaks-code-auto-scaffold (RD#7) — missing-standards-detector.
3
3
  *
4
4
  * Read-side companion to the `peaks standards init` / `peaks standards update`
5
5
  * writers in `./project-standards-service.ts`. The writer KNOWS how to scaffold
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Slice 2026-06-16-peaks-solo-auto-scaffold (RD#7) — missing-standards-detector.
2
+ * Slice 2026-06-16-peaks-code-auto-scaffold (RD#7) — missing-standards-detector.
3
3
  *
4
4
  * Read-side companion to the `peaks standards init` / `peaks standards update`
5
5
  * writers in `./project-standards-service.ts`. The writer KNOWS how to scaffold
@@ -30,7 +30,7 @@ export type ProjectStandardsSource = {
30
30
  readonly usage: 'curated-baseline-reference';
31
31
  };
32
32
  export type StandardsSkillPreflight = {
33
- readonly appliesTo: readonly ['peaks-rd', 'peaks-qa', 'peaks-solo'];
33
+ readonly appliesTo: readonly ['peaks-rd', 'peaks-qa', 'peaks-code'];
34
34
  readonly summary: string;
35
35
  };
36
36
  export type ProjectStandardsInitPlan = {
@@ -23,8 +23,8 @@ const SOURCE = {
23
23
  usage: 'curated-baseline-reference'
24
24
  };
25
25
  const SKILL_PREFLIGHT = {
26
- appliesTo: ['peaks-rd', 'peaks-qa', 'peaks-solo'],
27
- summary: 'peaks-rd、peaks-qa、peaks-solo 进入代码仓工作流时自动 preflight 项目规范。'
26
+ appliesTo: ['peaks-rd', 'peaks-qa', 'peaks-code'],
27
+ summary: 'peaks-rd、peaks-qa、peaks-code 进入代码仓工作流时自动 preflight 项目规范。'
28
28
  };
29
29
  const SUPPORTED_LANGUAGES = new Set(['generic', 'typescript', 'javascript', 'python', 'go', 'rust']);
30
30
  function normalizeRoot(path) {
@@ -104,7 +104,7 @@ function renderHeader(title) {
104
104
  `# ${title}`,
105
105
  '',
106
106
  'Source: Peaks curated baseline; everything-claude-code reference: https://github.com/affaan-m/everything-claude-code',
107
- 'Scope: project-local standards for peaks-rd, peaks-qa, and peaks-solo workflow preflight.',
107
+ 'Scope: project-local standards for peaks-rd, peaks-qa, and peaks-code workflow preflight.',
108
108
  ''
109
109
  ].join('\n');
110
110
  }
@@ -151,7 +151,7 @@ function renderClaudeMd(language, ctx) {
151
151
  'Peaks workflow automation:',
152
152
  '- peaks-rd checks these standards before RD planning or implementation work.',
153
153
  '- peaks-qa checks code review and security guidance before verification work.',
154
- '- peaks-solo summarizes RD and QA standards preflight before end-to-end code workflows.',
154
+ '- peaks-code summarizes RD and QA standards preflight before end-to-end code workflows.',
155
155
  '',
156
156
  'Rules:',
157
157
  '- Read `.claude/rules/common/coding-style.md` before editing code.',
@@ -33,7 +33,7 @@ export type UnderstandScanReport = {
33
33
  };
34
34
  /**
35
35
  * Slice L3.1 — opt-in prompt payload. When uaPrompt === 'unset' and UA is
36
- * absent, the peaks-solo / peaks-ide layer surfaces this to the user via
36
+ * absent, the peaks-code / peaks-ide layer surfaces this to the user via
37
37
  * AskUserQuestion. The CLI does not prompt directly; it returns this
38
38
  * payload so the LLM-side UX layer can decide.
39
39
  */
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * The canonical implementation lives in the .mjs postinstall
8
8
  * (because the postinstall runs before any TS compile step).
9
- * This TS mirror exists so the peaks-solo skill can call
9
+ * This TS mirror exists so the peaks-code skill can call
10
10
  * `peaks upgrade --detect-1x --project <root> --json` and
11
11
  * read a structured JSON envelope to gate the
12
12
  * AskUserQuestion that prompts the 1.x → 2.0 upgrade.
@@ -1,3 +1,30 @@
1
+ /**
2
+ * Pluggable executor for sub-step command spawns. Production
3
+ * callers omit `executor` on `UpgradeInput`; the default
4
+ * (`defaultSubstepExecutor`) wraps `node:child_process` `spawnSync`.
5
+ * Tests pass a synchronous fake executor to avoid the spawn cost.
6
+ *
7
+ * Contract:
8
+ * - Return `status: 0` for success, non-zero for failure, `null`
9
+ * for synchronous spawn errors (binary not found, EACCES, …).
10
+ * - `stdout` / `stderr` are captured as UTF-8 strings.
11
+ * - `durationMs` is the wall-clock duration of the spawn
12
+ * (caller-facing field on `SubStepResult`).
13
+ */
14
+ export type SubstepExecutor = (command: string, args: readonly string[], timeoutMs: number) => {
15
+ status: number | null;
16
+ stdout: string;
17
+ stderr: string;
18
+ durationMs: number;
19
+ };
20
+ /**
21
+ * Default substep executor — wraps `spawnSync` with the same
22
+ * stdio / encoding / timeout config the umbrella has used since
23
+ * v1. Exported for test coverage: the seam-preservation test
24
+ * imports this directly to verify the normalized return shape
25
+ * on a spawn failure (e.g. a non-existent command).
26
+ */
27
+ export declare const defaultSubstepExecutor: SubstepExecutor;
1
28
  export interface UpgradeInput {
2
29
  readonly projectRoot: string;
3
30
  /**
@@ -14,6 +41,13 @@ export interface UpgradeInput {
14
41
  * install hint in `nextActions` instead.
15
42
  */
16
43
  readonly peaksBin?: string;
44
+ /**
45
+ * Optional injectable executor for sub-step command execution.
46
+ * When omitted, the umbrella uses `defaultSubstepExecutor`
47
+ * (real `spawnSync`). Tests pass a synchronous fake to avoid
48
+ * the per-sub-step `node peaks.js …` spawn cost.
49
+ */
50
+ readonly executor?: SubstepExecutor;
17
51
  }
18
52
  export interface SubStepResult {
19
53
  readonly name: string;
@@ -33,6 +33,38 @@ import { fileURLToPath } from 'node:url';
33
33
  import { runRedLinesAudit } from '../audit/red-lines-service.js';
34
34
  import { savePreferences } from '../preferences/preferences-service.js';
35
35
  import { migrateGitignoreFile } from './gitignore-migrate-service.js';
36
+ /**
37
+ * Default substep executor — wraps `spawnSync` with the same
38
+ * stdio / encoding / timeout config the umbrella has used since
39
+ * v1. Exported for test coverage: the seam-preservation test
40
+ * imports this directly to verify the normalized return shape
41
+ * on a spawn failure (e.g. a non-existent command).
42
+ */
43
+ export const defaultSubstepExecutor = (command, args, timeoutMs) => {
44
+ const start = Date.now();
45
+ try {
46
+ const result = spawnSync(command, args, {
47
+ encoding: 'utf8',
48
+ stdio: ['ignore', 'pipe', 'pipe'],
49
+ timeout: timeoutMs,
50
+ });
51
+ return {
52
+ status: result.status,
53
+ stdout: result.stdout ?? '',
54
+ stderr: result.stderr ?? '',
55
+ durationMs: Date.now() - start,
56
+ };
57
+ }
58
+ catch (err) {
59
+ const message = err instanceof Error ? err.message : String(err);
60
+ return {
61
+ status: null,
62
+ stdout: '',
63
+ stderr: message,
64
+ durationMs: Date.now() - start,
65
+ };
66
+ }
67
+ };
36
68
  const STEPS = [
37
69
  { name: 'config-migrate', args: (p) => ['config', 'migrate', '--project', p, '--apply', '--json'] },
38
70
  { name: 'standards-migrate', args: (p) => ['standards', 'migrate', '--from-claude-rules', '--project', p, '--apply', '--json'] },
@@ -145,8 +177,7 @@ function read1xVersion(cwd) {
145
177
  }
146
178
  return null;
147
179
  }
148
- function runStep(peaksBin, name, args, timeoutMs = 60_000) {
149
- const start = Date.now();
180
+ function runStep(peaksBin, name, args, timeoutMs = 60_000, executor = defaultSubstepExecutor) {
150
181
  // The global `peaks` shim is a `/bin/sh` symlink script (the
151
182
  // npm install postinstall creates `peaks` → `peaks.sh` on
152
183
  // Windows). cmd.exe (the default Windows shell) cannot run
@@ -168,32 +199,18 @@ function runStep(peaksBin, name, args, timeoutMs = 60_000) {
168
199
  command = peaksBin;
169
200
  spawnArgs = args;
170
201
  }
171
- try {
172
- const result = spawnSync(command, spawnArgs, {
173
- encoding: 'utf8',
174
- stdio: ['ignore', 'pipe', 'pipe'],
175
- timeout: timeoutMs,
176
- });
177
- return {
178
- name,
179
- status: result.status === 0 ? 'pass' : 'fail',
180
- exitCode: result.status,
181
- stdout: result.stdout ?? '',
182
- stderr: result.stderr ?? '',
183
- durationMs: Date.now() - start,
184
- };
185
- }
186
- catch (err) {
187
- const message = err instanceof Error ? err.message : String(err);
188
- return {
189
- name,
190
- status: 'fail',
191
- exitCode: null,
192
- stdout: '',
193
- stderr: message,
194
- durationMs: Date.now() - start,
195
- };
196
- }
202
+ // The executor normalizes spawn errors to { status: null, stderr: ... }
203
+ // so no try/catch wrapper is needed here — the call always returns
204
+ // a shaped record. See defaultSubstepExecutor for the reference impl.
205
+ const result = executor(command, spawnArgs, timeoutMs);
206
+ return {
207
+ name,
208
+ status: result.status === 0 ? 'pass' : 'fail',
209
+ exitCode: result.status,
210
+ stdout: result.stdout,
211
+ stderr: result.stderr,
212
+ durationMs: result.durationMs,
213
+ };
197
214
  }
198
215
  function writeUpgradeRecord(projectRoot, result) {
199
216
  try {
@@ -260,6 +277,11 @@ export function runUpgrade(input) {
260
277
  resolve(here, '..', '..', '..', '..', 'bin', 'peaks.js');
261
278
  const fallbackPeaks = 'peaks';
262
279
  const resolvedPeaksBin = existsSync(peaksBin) ? peaksBin : fallbackPeaks;
280
+ // Resolve the executor once at the top of runUpgrade so every
281
+ // sub-step call shares the same instance. Tests pass a fake
282
+ // executor via UpgradeInput.executor; production callers omit
283
+ // it and get the default spawnSync wrapper.
284
+ const executor = input.executor ?? defaultSubstepExecutor;
263
285
  const fromVersion = read1xVersion(input.projectRoot);
264
286
  const steps = [];
265
287
  const warnings = [];
@@ -325,7 +347,7 @@ export function runUpgrade(input) {
325
347
  continue;
326
348
  }
327
349
  const args = ['memory', 'extract', '--project', input.projectRoot, '--artifact', ...artifacts, '--apply', '--json'];
328
- const r = runStep(resolvedPeaksBin, 'memory-extract', args);
350
+ const r = runStep(resolvedPeaksBin, 'memory-extract', args, 60_000, executor);
329
351
  steps.push(r);
330
352
  if (r.status === 'fail') {
331
353
  warnings.push(`memory-extract failed: ${r.stderr.slice(0, 200)}`);
@@ -333,7 +355,7 @@ export function runUpgrade(input) {
333
355
  continue;
334
356
  }
335
357
  const args = step.args(input.projectRoot);
336
- const r = runStep(resolvedPeaksBin, step.name, args);
358
+ const r = runStep(resolvedPeaksBin, step.name, args, 60_000, executor);
337
359
  steps.push(r);
338
360
  if (r.status === 'fail') {
339
361
  warnings.push(`${step.name} failed: ${r.stderr.slice(0, 200)}`);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * peaks-solo multi-signal verdict aggregator (v2.13.1 Group A).
2
+ * peaks-code multi-signal verdict aggregator (v2.13.1 Group A).
3
3
  *
4
4
  * Implements the 4 aggregation rules documented in
5
5
  * `.peaks/project-scan/audit-output-schema.md:66-78` plus 3rd-party
@@ -7,7 +7,7 @@ export type ModelTier = 'top-tier' | 'mid-tier';
7
7
  export type ModelRole = 'strongest' | 'execution';
8
8
  export type WorkflowRoutePolicy = 'solo-broad-multi-model' | 'team-rd-limited-multi-model';
9
9
  export type WorkflowStepStage = 'product-direction' | 'design-direction' | 'tech-direction' | 'tech-review' | 'rd-planning' | 'coding-execution' | 'unit-test-execution' | 'quality-review';
10
- export type WorkflowStepOwner = 'peaks-solo' | 'peaks-rd' | 'peaks-tech' | 'human';
10
+ export type WorkflowStepOwner = 'peaks-code' | 'peaks-rd' | 'peaks-tech' | 'human';
11
11
  export type WorkflowRouterRequest = {
12
12
  sessionId: string;
13
13
  goal: string;
@@ -80,14 +80,14 @@ function annotateSteps(steps, soloMode) {
80
80
  }
81
81
  function createSoloSteps(executionModelId) {
82
82
  return [
83
- step({ id: 'solo-product-direction', stage: 'product-direction', owner: 'peaks-solo', modelTier: 'top-tier', reason: 'Product direction needs strong judgment before execution work is delegated.', dependsOn: [] }, executionModelId),
84
- step({ id: 'solo-design-direction', stage: 'design-direction', owner: 'peaks-solo', modelTier: 'top-tier', reason: 'Design direction uses the recommended default before cheaper implementation work.', dependsOn: ['solo-product-direction'] }, executionModelId),
83
+ step({ id: 'solo-product-direction', stage: 'product-direction', owner: 'peaks-code', modelTier: 'top-tier', reason: 'Product direction needs strong judgment before execution work is delegated.', dependsOn: [] }, executionModelId),
84
+ step({ id: 'solo-design-direction', stage: 'design-direction', owner: 'peaks-code', modelTier: 'top-tier', reason: 'Design direction uses the recommended default before cheaper implementation work.', dependsOn: ['solo-product-direction'] }, executionModelId),
85
85
  step({ id: 'solo-tech-direction', stage: 'tech-direction', owner: 'peaks-tech', modelTier: 'top-tier', reason: 'Technical boundaries and approval gates use the recommended default with high-confidence planning.', dependsOn: ['solo-design-direction'] }, executionModelId),
86
86
  step({ id: 'solo-tech-review', stage: 'tech-review', owner: 'peaks-tech', modelTier: 'top-tier', reason: 'Tech artifacts and gate decisions require strong review and a recommended default path.', dependsOn: ['solo-tech-direction'] }, executionModelId),
87
87
  step({ id: 'solo-rd-planning', stage: 'rd-planning', owner: 'peaks-rd', modelTier: 'top-tier', reason: 'RD task decomposition and acceptance criteria use the recommended default before execution delegation.', dependsOn: ['solo-tech-review'] }, executionModelId),
88
88
  step({ id: 'solo-coding-execution', stage: 'coding-execution', owner: 'peaks-rd', modelTier: executionModelId === STRONGEST_MODEL_ID ? 'top-tier' : 'mid-tier', reason: `Coding and routine refactoring must use the configured execution worker model ${executionModelId}.`, dependsOn: ['solo-rd-planning'] }, executionModelId),
89
89
  step({ id: 'solo-unit-test-execution', stage: 'unit-test-execution', owner: 'peaks-rd', modelTier: executionModelId === STRONGEST_MODEL_ID ? 'top-tier' : 'mid-tier', reason: `Unit test authoring and focused test runs must use the configured execution worker model ${executionModelId}.`, dependsOn: ['solo-coding-execution'] }, executionModelId),
90
- step({ id: 'solo-quality-review', stage: 'quality-review', owner: 'peaks-solo', modelTier: 'top-tier', reason: 'Reducer and final quality gates need strong synthesis and risk review.', dependsOn: ['solo-unit-test-execution'] }, executionModelId)
90
+ step({ id: 'solo-quality-review', stage: 'quality-review', owner: 'peaks-code', modelTier: 'top-tier', reason: 'Reducer and final quality gates need strong synthesis and risk review.', dependsOn: ['solo-unit-test-execution'] }, executionModelId)
91
91
  ];
92
92
  }
93
93
  function createSoloStepsForMode(soloMode, executionModelId) {
@@ -5,7 +5,7 @@
5
5
  * The template is a PreToolUse hook allow-list that bypasses the
6
6
  * Claude Code [Fact-Forcing Gate] for tool calls whose paths target
7
7
  * the peaks-managed `.peaks/` workspace. Without this bypass,
8
- * `peaks workspace init` (Step 0 of every peaks-solo session) is
8
+ * `peaks workspace init` (Step 0 of every peaks-code session) is
9
9
  * unrunnable in a consumer project because the gate blocks the very
10
10
  * first Write.
11
11
  *