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
@@ -0,0 +1,41 @@
1
+ import { resolve } from 'node:path';
2
+ import { migrateSkillName } from '../../services/migrate-skill-name/migrate.js';
3
+ import { getErrorMessage } from '../cli-helpers.js';
4
+ export function registerSessionMigrateSkillNameCommand(session) {
5
+ session
6
+ .command('migrate-skill-name')
7
+ .description('Rewrite skill-name strings under .peaks/_runtime/** (idempotent, dry-run by default). ' +
8
+ 'Use --apply to write through. Skips .peaks/memory/** and .peaks/skills/.system/bees/.')
9
+ .requiredOption('--from <old>', 'old skill name (e.g. peaks-code)')
10
+ .requiredOption('--to <new>', 'new skill name (e.g. peaks-code)')
11
+ .option('--apply', 'write through (default is dry-run)', false)
12
+ .option('--project <path>', 'project root (defaults to current directory)', '.')
13
+ .option('--json', 'emit a JSON envelope to stdout', false)
14
+ .action((opts) => {
15
+ try {
16
+ const projectRoot = resolve(process.cwd(), opts.project ?? '.');
17
+ const result = migrateSkillName({
18
+ projectRoot,
19
+ from: opts.from,
20
+ to: opts.to,
21
+ apply: opts.apply === true,
22
+ });
23
+ if (opts.json === true) {
24
+ process.stdout.write(JSON.stringify(result, null, 2) + '\n');
25
+ }
26
+ else {
27
+ process.stdout.write(`Scanned: ${result.scannedFiles}\n` +
28
+ `Modified: ${result.modifiedFiles}\n` +
29
+ `Key-value replacements: ${result.keyValueReplacements}\n` +
30
+ `String replacements: ${result.stringReplacements}\n` +
31
+ `Skipped: ${result.skipped.length} path(s)\n` +
32
+ `Errors: ${result.errors.length}\n`);
33
+ }
34
+ process.exitCode = result.ok ? 0 : 1;
35
+ }
36
+ catch (error) {
37
+ process.stderr.write(getErrorMessage(error) + '\n');
38
+ process.exitCode = 1;
39
+ }
40
+ });
41
+ }
@@ -0,0 +1,8 @@
1
+ import type { Command } from 'commander';
2
+ export interface SkillVisibility {
3
+ name: string;
4
+ userInvocable: boolean;
5
+ visibility: 'public' | 'internal';
6
+ }
7
+ export declare function listSkillsVisibility(repoRoot: string): SkillVisibility[];
8
+ export declare function registerSkillVisibilityCommand(program: Command, repoRoot: string): void;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * `peaks skill:visibility` — Skill visibility CLI surface.
3
+ *
4
+ * Slice: Task 1 of peaks-code → peaks-code rename plan.
5
+ *
6
+ * Reads `.claude-plugin/marketplace.json`, resolves each skill entry's
7
+ * visibility (public / internal) from the optional `userInvocable`
8
+ * field, and emits either:
9
+ * - a TSV list (`name \t visibility`) for human use
10
+ * - a JSON envelope `{ ok, skills }` for programmatic use
11
+ *
12
+ * Schema contract:
13
+ * - internal: `userInvocable: false`
14
+ * - public (default): `userInvocable` omitted OR `true`
15
+ *
16
+ * The skill list lives at `plugins[0].skills` in marketplace.json;
17
+ * entries are objects of shape `{ name, path?, userInvocable?, description? }`.
18
+ * Older string-array shapes are auto-coerced (each string is treated as
19
+ * a public skill whose name is the basename of the path).
20
+ */
21
+ import { readFileSync } from 'node:fs';
22
+ import { join, basename } from 'node:path';
23
+ export function listSkillsVisibility(repoRoot) {
24
+ const marketplacePath = join(repoRoot, '.claude-plugin', 'marketplace.json');
25
+ const raw = readFileSync(marketplacePath, 'utf-8');
26
+ const parsed = JSON.parse(raw);
27
+ const skills = parsed.plugins?.[0]?.skills ?? [];
28
+ return skills.map((entry) => {
29
+ if (typeof entry === 'string') {
30
+ return {
31
+ name: basename(entry),
32
+ userInvocable: true,
33
+ visibility: 'public',
34
+ };
35
+ }
36
+ const userInvocable = entry.userInvocable !== false;
37
+ return {
38
+ name: entry.name ?? '',
39
+ userInvocable,
40
+ visibility: userInvocable ? 'public' : 'internal',
41
+ };
42
+ });
43
+ }
44
+ export function registerSkillVisibilityCommand(program, repoRoot) {
45
+ const cmd = program
46
+ .command('skill:visibility')
47
+ .description('List skill visibility (public vs internal)')
48
+ .option('--list', 'List all skills')
49
+ .option('--name <name>', 'Query single skill')
50
+ .option('--json', 'JSON output');
51
+ cmd.action((opts) => {
52
+ const all = listSkillsVisibility(repoRoot);
53
+ const filtered = opts.name ? all.filter((s) => s.name === opts.name) : all;
54
+ if (opts.json) {
55
+ process.stdout.write(JSON.stringify({ ok: true, skills: filtered }, null, 2) + '\n');
56
+ }
57
+ else {
58
+ for (const s of filtered) {
59
+ process.stdout.write(`${s.name}\t${s.visibility}\n`);
60
+ }
61
+ }
62
+ });
63
+ }
@@ -26,8 +26,8 @@ export function registerSliceCommands(program, io) {
26
26
  .option('--project <path>', 'target project root', '.')
27
27
  .option('--rid <rid>', 'request id; defaults to the active current-change binding')
28
28
  .option('--refresh-fanout', 're-run the 3-way review fan-out (peaks-rd) even if the review files already exist', false)
29
- .option('--run-tests', 'opt in to the FULL test suite at the boundary (default is the changed-only suite via `vitest run --changed`); use the peaks-solo-test skill to run the full suite standalone', false)
30
- .option('--skip-tests', 'skip the unit-test stage entirely (e.g. docs-only slices); use the peaks-solo-test skill to run the full suite manually if you want a separate check', false)
29
+ .option('--run-tests', 'opt in to the FULL test suite at the boundary (default is the changed-only suite via `vitest run --changed`); use the peaks-test skill to run the full suite standalone', false)
30
+ .option('--skip-tests', 'skip the unit-test stage entirely (e.g. docs-only slices); use the peaks-test skill to run the full suite manually if you want a separate check', false)
31
31
  .option('--allow-pre-existing-failures', 'opt-in: if the unit-test stage fails, report it as `skipped` with a reason naming the failure count (useful when the repo has unrelated pre-existing failures; the long-term fix is to .skip or coverage.exclude those tests). Only meaningful with --run-tests or the default changed-only mode.', false)).action(async (options) => {
32
32
  try {
33
33
  const projectRoot = resolveCanonicalProjectRoot(options.project);
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Slice 2 — `peaks solo [--fast] <change-id>` (peaks-solo fast mode).
2
+ * Slice 2 — `peaks solo [--fast] <change-id>` (peaks-code fast mode).
3
3
  *
4
- * The `peaks-solo` SKILL orchestrates an LLM-side workflow:
4
+ * The `peaks-code` SKILL orchestrates an LLM-side workflow:
5
5
  * load-memory -> standards-preflight -> rd-cycle -> qa-cycle -> emit-txt
6
6
  *
7
7
  * The CLI surface here is intentionally narrow: it builds a SoloPlan and
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Slice 2 — `peaks solo [--fast] <change-id>` (peaks-solo fast mode).
2
+ * Slice 2 — `peaks solo [--fast] <change-id>` (peaks-code fast mode).
3
3
  *
4
- * The `peaks-solo` SKILL orchestrates an LLM-side workflow:
4
+ * The `peaks-code` SKILL orchestrates an LLM-side workflow:
5
5
  * load-memory -> standards-preflight -> rd-cycle -> qa-cycle -> emit-txt
6
6
  *
7
7
  * The CLI surface here is intentionally narrow: it builds a SoloPlan and
@@ -109,7 +109,7 @@ export async function runSoloFast(opts) {
109
109
  export function registerSoloCommands(program, io) {
110
110
  const solo = program
111
111
  .command('solo')
112
- .description('peaks-solo LLM-side workflow planner (slice 2 fast mode)');
112
+ .description('peaks-code LLM-side workflow planner (slice 2 fast mode)');
113
113
  solo
114
114
  .command('plan')
115
115
  .description('Build and print a SoloPlan without executing it')
@@ -238,7 +238,7 @@ export function registerSoloCommands(program, io) {
238
238
  }
239
239
  }, [], [
240
240
  `Recorded outer session id "${stalePresence.recordedOuterSessionId ?? '?'}" does not match current outer session id "${stalePresence.currentOuterSessionId ?? '?'}".`,
241
- `peaks-solo Step 1 must AskUserQuestion to confirm the mode for THIS session (slice 002 AC-2).`
241
+ `peaks-code Step 1 must AskUserQuestion to confirm the mode for THIS session (slice 002 AC-2).`
242
242
  ]), opts.json);
243
243
  return;
244
244
  }
@@ -306,14 +306,14 @@ export function registerSoloCommands(program, io) {
306
306
  .command('post-compact-detect')
307
307
  .description('v2.11.0 D7: detect whether the current invocation is a same-day post-compact resume. ' +
308
308
  'Auto-resumes (no AskUserQuestion) when the most-recent checkpoint is from today, has a mode field, ' +
309
- 'and the active skill is peaks-solo. Falls through to the normal Step 0.7 flow otherwise.')
309
+ 'and the active skill is peaks-code. Falls through to the normal Step 0.7 flow otherwise.')
310
310
  .requiredOption('--project <path>', 'target project root')
311
311
  .option('--session-id <sid>', 'override session id (default: read from active presence)')
312
312
  .option('--active-skill <skill>', 'override active skill (test seam; default: read from presence)')).action(async (opts) => {
313
313
  try {
314
314
  const sessionId = opts.sessionId ?? readActiveSid(opts.project);
315
315
  if (sessionId === null) {
316
- printResult(io, fail('solo.post-compact-detect', 'NO_ACTIVE_SESSION', 'no active session id; pass --session-id or set presence via `peaks skill presence:set peaks-solo`', null, ['Re-run with --session-id <sid>']), opts.json);
316
+ printResult(io, fail('solo.post-compact-detect', 'NO_ACTIVE_SESSION', 'no active session id; pass --session-id or set presence via `peaks skill presence:set peaks-code`', null, ['Re-run with --session-id <sid>']), opts.json);
317
317
  process.exitCode = 1;
318
318
  return;
319
319
  }
@@ -520,7 +520,7 @@ export function registerSoloCommands(program, io) {
520
520
  const projectRoot = opts.project ?? findProjectRoot(process.cwd()) ?? process.cwd();
521
521
  const sessionId = opts.sessionId ?? readActiveSid(projectRoot);
522
522
  if (sessionId === null) {
523
- printResult(io, fail('solo.detect-job', 'NO_ACTIVE_SESSION', 'no active session id; pass --session-id or set presence via `peaks skill presence:set peaks-solo`', null, ['Re-run with --session-id <sid>']), opts.json);
523
+ printResult(io, fail('solo.detect-job', 'NO_ACTIVE_SESSION', 'no active session id; pass --session-id or set presence via `peaks skill presence:set peaks-code`', null, ['Re-run with --session-id <sid>']), opts.json);
524
524
  process.exitCode = 1;
525
525
  return;
526
526
  }
@@ -582,7 +582,7 @@ export function registerSoloCommands(program, io) {
582
582
  const projectRoot = opts.project ?? findProjectRoot(process.cwd()) ?? process.cwd();
583
583
  const sessionId = opts.sessionId ?? readActiveSid(projectRoot);
584
584
  if (sessionId === null) {
585
- printResult(io, fail('solo.read-job-shape', 'NO_ACTIVE_SESSION', 'no active session id; pass --session-id or set presence via `peaks skill presence:set peaks-solo`', null, ['Re-run with --session-id <sid>']), opts.json);
585
+ printResult(io, fail('solo.read-job-shape', 'NO_ACTIVE_SESSION', 'no active session id; pass --session-id or set presence via `peaks skill presence:set peaks-code`', null, ['Re-run with --session-id <sid>']), opts.json);
586
586
  process.exitCode = 1;
587
587
  return;
588
588
  }
@@ -13,7 +13,7 @@
13
13
  * - `sub-agent-shared.ts` — shared types, constants, helpers
14
14
  *
15
15
  * Skill-first / CLI-auxiliary red line (PB-4 / AC-19/20):
16
- * These commands are primitives that the peaks-solo / peaks-rd /
16
+ * These commands are primitives that the peaks-code / peaks-rd /
17
17
  * peaks-qa SKILL.md compose. Users do NOT invoke them directly.
18
18
  */
19
19
  import type { Command } from 'commander';
@@ -9,7 +9,7 @@ export function registerSubAgentCommands(program, io) {
9
9
  const subAgent = program
10
10
  .command('sub-agent')
11
11
  .description('Sub-agent dispatch primitive (skill-first / CLI-auxiliary). ' +
12
- 'These commands are the primitives that peaks-solo / peaks-rd / ' +
12
+ 'These commands are the primitives that peaks-code / peaks-rd / ' +
13
13
  'peaks-qa SKILL.md compose. Users do not invoke this directly.');
14
14
  registerDispatchCommand(subAgent, io);
15
15
  registerHeartbeatCommand(subAgent, io);
@@ -77,7 +77,7 @@ export function registerUnderstandCommands(program, io) {
77
77
  }
78
78
  });
79
79
  // L3.1: opt-in UX subcommand. Returns the AskUserQuestion payload that
80
- // the LLM-side UX layer (peaks-solo / peaks-ide) should surface when
80
+ // the LLM-side UX layer (peaks-code / peaks-ide) should surface when
81
81
  // uaPrompt === 'unset' and UA is absent. When uaPrompt is skip-this-session
82
82
  // or skip-forever, returns a no-op envelope (caller does not prompt).
83
83
  addJsonOption(understand
@@ -13,7 +13,7 @@
13
13
  * hooks-install / skill-sync / audit-verify + write-upgrade-record.
14
14
  *
15
15
  * The `--detect-1x` flag (added in slice 3) is a read-only
16
- * probe that the peaks-solo skill calls to gate the
16
+ * probe that the peaks-code skill calls to gate the
17
17
  * AskUserQuestion that prompts the 1.x → 2.0 upgrade. The
18
18
  * probe returns the JSON envelope from the
19
19
  * 1x-detector-service; it does NOT modify any files.
@@ -8,11 +8,11 @@ import { fail, ok } from '../../shared/result.js';
8
8
  export function registerUpgradeCommands(program, io) {
9
9
  addJsonOption(program
10
10
  .command('upgrade')
11
- .description('Upgrade a peaks-loop 1.x project to 2.0. Umbrella that orquestrates 7 sub-commands: config-migrate / standards-migrate / memory-extract / hooks-install / skill-sync / audit-verify + write-upgrade-record. Per the "one-key completion" tenet, prefer letting `npm i -g peaks-loop@2.0` postinstall run this for you. Use `--detect-1x` for a read-only probe (no file writes) that the peaks-solo skill uses to gate the 1.x → 2.0 AskUserQuestion.')
11
+ .description('Upgrade a peaks-loop 1.x project to 2.0. Umbrella that orquestrates 7 sub-commands: config-migrate / standards-migrate / memory-extract / hooks-install / skill-sync / audit-verify + write-upgrade-record. Per the "one-key completion" tenet, prefer letting `npm i -g peaks-loop@2.0` postinstall run this for you. Use `--detect-1x` for a read-only probe (no file writes) that the peaks-code skill uses to gate the 1.x → 2.0 AskUserQuestion.')
12
12
  .option('--to <version>', 'target version (only "2.0" supported)', '2.0')
13
13
  .option('--project <path>', 'project root to upgrade (default: cwd)')
14
14
  .option('--auto', 'non-interactive: accept soft-fail on any sub-step (used by the postinstall hook)')
15
- .option('--detect-1x', 'read-only probe: returns the 1.x state as JSON (no file writes); consumed by peaks-solo Step 0.55 to gate the AskUserQuestion')
15
+ .option('--detect-1x', 'read-only probe: returns the 1.x state as JSON (no file writes); consumed by peaks-code Step 0.55 to gate the AskUserQuestion')
16
16
  .option('--apply-init', 'slice 4 (slice 2026-06-13-selfheal-claude-settings-template): run initWorkspace so the drift-driven self-heal fires on the consumer-project .claude/settings.local.json and the offline .peaks/.claude-settings-template.json. Idempotent. Use after a peaks-loop version bump if you do not otherwise re-run init. Mutually exclusive with --detect-1x.')).action(async (options) => {
17
17
  const projectRoot = options.project ?? process.cwd();
18
18
  // Branch 1: --detect-1x (read-only probe)
@@ -21,7 +21,7 @@ export function registerUpgradeCommands(program, io) {
21
21
  const state = detect1xProjectState(projectRoot);
22
22
  const nextActions = [];
23
23
  if (state.isOneX) {
24
- nextActions.push(`Detected 1.x state. peaks-solo Step 0.55 should present an AskUserQuestion to invoke \`peaks upgrade --to 2.0 --auto --project ${state.projectRoot ?? projectRoot}\`.`);
24
+ nextActions.push(`Detected 1.x state. peaks-code Step 0.55 should present an AskUserQuestion to invoke \`peaks upgrade --to 2.0 --auto --project ${state.projectRoot ?? projectRoot}\`.`);
25
25
  }
26
26
  else {
27
27
  nextActions.push('No 1.x state detected. Proceed with the standing 2.0 layout.');
@@ -23,7 +23,7 @@ export function registerUserTouchpointCommands(program, io) {
23
23
  // user-touchpoints / commit-boundary-actions.
24
24
  //
25
25
  // We do NOT create a new `peaks solo` CLI command here because that
26
- // would conflict with the peaks-solo skill presence tracking (see
26
+ // would conflict with the peaks-code skill presence tracking (see
27
27
  // `src/services/skills/skill-presence-service.ts`).
28
28
  addJsonOption(program
29
29
  .command('gate-classify')
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Reads the 5 envelope sources under `.peaks/_runtime/<sid>/` for a
5
5
  * given rid, runs `aggregateVerdict()`, and prints the verdict +
6
- * reasons JSON envelope. Used by peaks-solo / peaks-final-review to
6
+ * reasons JSON envelope. Used by peaks-code / peaks-final-review to
7
7
  * cross-check the slice-level verdict without booting the full
8
8
  * 5-skill fanout.
9
9
  *
@@ -10,10 +10,10 @@ const KARPATHY_REL = 'rd/karpathy-review.md';
10
10
  const MUT_REL = 'mut/mut-report.json';
11
11
  const QA_REL = 'qa/test-reports';
12
12
  export function registerVerdictAggregateCommands(program, io) {
13
- const verdict = program.command('verdict').description('Aggregate the 5 envelope sources feeding peaks-solo verdict logic');
13
+ const verdict = program.command('verdict').description('Aggregate the 5 envelope sources feeding peaks-code verdict logic');
14
14
  addJsonOption(verdict
15
15
  .command('aggregate')
16
- .description('Aggregate 5 envelope sources (security / perf / karpathy / mut / qa) and print the verdict + reasons JSON envelope. Used by peaks-solo and peaks-final-review.')
16
+ .description('Aggregate 5 envelope sources (security / perf / karpathy / mut / qa) and print the verdict + reasons JSON envelope. Used by peaks-code and peaks-final-review.')
17
17
  .requiredOption('--from-rid <rid>', 'request id, e.g. 2026-06-27-...')
18
18
  .option('--sid <sid>', 'session id, e.g. 2026-06-27-session-...; default: project default')
19
19
  .option('--project <path>', 'project root (default: cwd)')).action(async (options) => {
@@ -330,7 +330,7 @@ function addAutonomousResumeInitOptions(command) {
330
330
  export function registerWorkflowCommands(program, io) {
331
331
  const refactor = program.command('refactor').description('Plan a Peaks refactor run without modifying code');
332
332
  addJsonOption(refactor
333
- .option('--solo', 'use peaks-solo orchestration mode')
333
+ .option('--solo', 'use peaks-code orchestration mode')
334
334
  .option('--rd', 'use peaks-rd direct mode')
335
335
  .option('--dry-run', 'print gates and required artifacts', true)
336
336
  .option('--no-dry-run', 'unsupported: do not modify code from this command')).action((options) => {
@@ -410,7 +410,7 @@ export function registerWorkflowCommands(program, io) {
410
410
  // because we read, not write, the binding.
411
411
  const sessionId = getSessionId(options.project);
412
412
  if (sessionId === null) {
413
- printResult(io, fail('workflow.skip', 'NO_ACTIVE_SESSION', `project "${options.project}" has no peaks-solo session binding; run \`peaks workspace init --project ${options.project} --json\` first`, { applied: false }, [`peaks workspace init --project ${options.project} --json`]), options.json);
413
+ printResult(io, fail('workflow.skip', 'NO_ACTIVE_SESSION', `project "${options.project}" has no peaks-code session binding; run \`peaks workspace init --project ${options.project} --json\` first`, { applied: false }, [`peaks workspace init --project ${options.project} --json`]), options.json);
414
414
  process.exitCode = 1;
415
415
  return;
416
416
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `peaks workspace init` — slice 006 + 007 + 014 + 018 + 2026-06-16-peaks-solo-auto-scaffold.
2
+ * `peaks workspace init` — slice 006 + 007 + 014 + 018 + 2026-06-16-peaks-code-auto-scaffold.
3
3
  *
4
4
  * Extracted from `src/cli/commands/workspace-commands.ts` (slice
5
5
  * 2026-06-16-workspace-commands-split) to keep that entry file under the
@@ -45,11 +45,11 @@ export type WorkspaceInitOptions = {
45
45
  * (commander `--no-` prefix) is `true`; pass `--no-claude-hooks` to
46
46
  * set this to `false`. The wrapper reads this as `=== false` to
47
47
  * skip the materialization. The bypass is documented in
48
- * `peaks-solo/references/anchoring-and-session-info.md`.
48
+ * `peaks-code/references/anchoring-and-session-info.md`.
49
49
  */
50
50
  claudeHooks?: boolean;
51
51
  /**
52
- * Slice 2026-06-16-peaks-solo-auto-scaffold (RD#7): opt-in flag to
52
+ * Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): opt-in flag to
53
53
  * auto-scaffold `.claude/rules/{common,<language>}/` when missing.
54
54
  * Default `false` — the diagnostic fires but no write happens.
55
55
  * Set to `true` (via `--init-standards`) to also run
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `peaks workspace init` — slice 006 + 007 + 014 + 018 + 2026-06-16-peaks-solo-auto-scaffold.
2
+ * `peaks workspace init` — slice 006 + 007 + 014 + 018 + 2026-06-16-peaks-code-auto-scaffold.
3
3
  *
4
4
  * Extracted from `src/cli/commands/workspace-commands.ts` (slice
5
5
  * 2026-06-16-workspace-commands-split) to keep that entry file under the
@@ -44,7 +44,7 @@ export function registerWorkspaceInitCommand(workspace, io) {
44
44
  return value;
45
45
  })
46
46
  .option('--no-claude-hooks', 'do NOT materialize .claude/settings.local.json (slice 2.0.1-bug3 fact-forcing bypass). Default: hooks installed so tool calls inside .peaks/** are not blocked by the [Fact-Forcing Gate].')
47
- .option('--init-standards', 'slice 2026-06-16-peaks-solo-auto-scaffold: when the consumer project\'s .claude/rules/ is missing or empty, auto-apply `peaks standards init --project <path> --apply` after emitting the diagnostic. Default: diagnostic only (no write).')).action(async (options) => {
47
+ .option('--init-standards', 'slice 2026-06-16-peaks-code-auto-scaffold: when the consumer project\'s .claude/rules/ is missing or empty, auto-apply `peaks standards init --project <path> --apply` after emitting the diagnostic. Default: diagnostic only (no write).')).action(async (options) => {
48
48
  try {
49
49
  // Resolve the session id. Two paths:
50
50
  // - explicit --session-id: use it as the requested binding target
@@ -110,7 +110,7 @@ export function registerWorkspaceInitCommand(workspace, io) {
110
110
  // `false`, so the default is "install hooks" (the bypass is
111
111
  // on). Pass `--no-claude-hooks` to opt out.
112
112
  noClaudeHooks: options.claudeHooks === false,
113
- // Slice 2026-06-16-peaks-solo-auto-scaffold (RD#7): opt-in
113
+ // Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): opt-in
114
114
  // auto-apply for the missing-standards scaffold. Default false
115
115
  // — only the diagnostic is emitted. Pass --init-standards to
116
116
  // also run `executeProjectStandardsInit({ apply: true })`.
@@ -129,7 +129,7 @@ export function registerWorkspaceInitCommand(workspace, io) {
129
129
  `Re-run with --no-rotate-on-outer-mismatch to suppress this rotation.`);
130
130
  // Slice 002 (v2.15.0) AC-1: a presence marker stamped by the
131
131
  // OLD outer session is now stale (defect A from the PRD).
132
- // peaks-solo Step 1 would otherwise pick up the old `mode`
132
+ // peaks-code Step 1 would otherwise pick up the old `mode`
133
133
  // field and silently lock the new session into a mode the
134
134
  // user never explicitly chose. Clear it here so Step 1's
135
135
  // presence:check-stale reports `reason: 'no-presence'` and
@@ -142,7 +142,7 @@ export function registerWorkspaceInitCommand(workspace, io) {
142
142
  });
143
143
  if (presenceClearOutcome.cleared) {
144
144
  nextActions.push(`Auto-cleared stale skill presence (recorded outer id "${presenceClearOutcome.recordedOuter ?? '?'}" did not match the new outer session). ` +
145
- 'peaks-solo Step 1 will now AskUserQuestion to confirm the mode.');
145
+ 'peaks-code Step 1 will now AskUserQuestion to confirm the mode.');
146
146
  }
147
147
  else if (presenceClearOutcome.reason === 'recorded-by-different-outer') {
148
148
  nextActions.push(`Kept skill presence: it was recorded by a different live outer session (id "${presenceClearOutcome.recordedOuter ?? '?'}"). ` +
@@ -227,7 +227,7 @@ export function registerWorkspaceInitCommand(workspace, io) {
227
227
  else if (hooksOutcome.action === 'first-decision' && hooksOutcome.decision === 'skipped') {
228
228
  nextActions.push('Skipped peaks-managed hook install for this project. Re-run with --install-hooks=auto (or peaks hooks install) to install later.');
229
229
  }
230
- // Slice 2026-06-16-peaks-solo-auto-scaffold (RD#7):
230
+ // Slice 2026-06-16-peaks-code-auto-scaffold (RD#7):
231
231
  // - When the consumer project's `.claude/rules/` is missing or
232
232
  // empty, emit the copy-pasteable diagnostic to stderr (via
233
233
  // the JSON envelope `warnings` array) AND surface the
@@ -246,7 +246,7 @@ export function registerWorkspaceInitCommand(workspace, io) {
246
246
  nextActions.push(`Run \`peaks workspace init --init-standards --project ${projectRoot}\` to auto-apply the scaffold, or \`peaks standards init --project ${projectRoot} --apply\` manually.`);
247
247
  }
248
248
  if (report.standardsApplied !== undefined) {
249
- nextActions.push(`Auto-applied .claude/rules/${report.standardsApplied.language}/ scaffold (slice 2026-06-16-peaks-solo-auto-scaffold): ` +
249
+ nextActions.push(`Auto-applied .claude/rules/${report.standardsApplied.language}/ scaffold (slice 2026-06-16-peaks-code-auto-scaffold): ` +
250
250
  `wrote ${report.standardsApplied.writtenFiles.length} file(s), ` +
251
251
  `kept ${report.standardsApplied.skippedFiles.length} existing file(s).`);
252
252
  }
@@ -1,7 +1,7 @@
1
1
  import { readdirSync, existsSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { Command } from 'commander';
4
- import { skillsDir } from '../shared/paths.js';
4
+ import { skillsDir, repoRoot } from '../shared/paths.js';
5
5
  import { CLI_VERSION } from '../shared/version.js';
6
6
  import { registerCoreAndArtifactCommands } from './commands/core-artifact-commands.js';
7
7
  import { registerWorkflowCommands } from './commands/workflow-commands.js';
@@ -76,6 +76,12 @@ import { registerObservabilityCommands } from './commands/observability-commands
76
76
  import { registerCompactCommands } from './commands/compact-command.js';
77
77
  // Slice 2026-07-01-job-m3.1: `peaks job init|status|...` — Job orchestration CLI surface.
78
78
  import { registerJobCommands } from './commands/job-commands.js';
79
+ // Slice 2026-07-04-cli-15a: `peaks skill sediment <verb>` + `peaks skill adapter <verb>`
80
+ // — Task 15a 4-verb subset (add-segment / add-bee / list / rebuild-index).
81
+ // 15b / 15c / 15d will extend sediment-commands.ts with the remaining 14 verbs.
82
+ import { registerSedimentCommands } from './commands/sediment-commands.js';
83
+ import { registerAdapterCommands } from './commands/adapter-commands.js';
84
+ import { registerSkillVisibilityCommand } from './commands/skill-visibility.js';
79
85
  import { applyRetention } from '../services/log/retention.js';
80
86
  import { writeLogEntry, maybeWriteStderr } from '../services/log/logger.js';
81
87
  export { printResult } from './cli-helpers.js';
@@ -315,7 +321,7 @@ Run peaks (no arguments) for a quickstart. You likely want one of:
315
321
  // Slice 2026-06-17-2.5.0-sub-fix-C: `peaks playwright start|ls|stop`
316
322
  // (multi-terminal Playwright MCP lifecycle).
317
323
  registerPlaywrightCommands(program, io);
318
- // Slice 2 (peaks-solo fast mode): `peaks solo plan [--fast] <change-id>`
324
+ // Slice 2 (peaks-code fast mode): `peaks solo plan [--fast] <change-id>`
319
325
  // v2.11.0 Group F (D5 + D7): also registers `peaks solo should-pause` and
320
326
  // `peaks solo post-compact-detect` for runtime-friction probes.
321
327
  registerSoloCommands(program, io);
@@ -347,5 +353,16 @@ Run peaks (no arguments) for a quickstart. You likely want one of:
347
353
  // orchestration CLI surface. M3.1 wires init + status + 2 stubs;
348
354
  // the remaining 5 subcommands land in M3.2.
349
355
  registerJobCommands(program, io);
356
+ // Slice 2026-07-04-cli-15a: `peaks skill sediment <verb>` — Task 15a
357
+ // 4-verb subset. Dispatches to runSediment; remaining verbs land in 15b/15c/15d.
358
+ registerSedimentCommands(program, io);
359
+ // Slice 2026-07-04-cli-15a: `peaks skill adapter <verb>` — adapter list / set-active.
360
+ registerAdapterCommands(program, io);
361
+ // Slice 2026-07-05-peaks-code-to-peaks-code (Task 1): `peaks skill:visibility --list --json`
362
+ // — read .claude-plugin/marketplace.json and report each skill's
363
+ // visibility (public vs internal). Used to surface which skills are
364
+ // user-invocable vs LLM-only internal role skills. See
365
+ // src/cli/commands/skill-visibility.ts.
366
+ registerSkillVisibilityCommand(program, repoRoot);
350
367
  return program;
351
368
  }
@@ -0,0 +1,27 @@
1
+ export interface AdapterSegment {
2
+ name: string;
3
+ skillMd: string;
4
+ scripts: {
5
+ name: string;
6
+ content: string;
7
+ }[];
8
+ }
9
+ export interface AdapterEnvelope {
10
+ preamble: string;
11
+ refs: {
12
+ path: string;
13
+ kind: "file" | "dir" | "script";
14
+ }[];
15
+ }
16
+ export interface Adapter {
17
+ readonly name: "claude" | "codex" | "copilot" | "auto";
18
+ resolveScratchDir(beeName: string): Promise<string>;
19
+ materialize(beeName: string, env: AdapterEnvelope, segments: AdapterSegment[]): Promise<string>;
20
+ publish(scratchDir: string): Promise<string>;
21
+ activate(scratchDir: string): Promise<void>;
22
+ cleanup(scratchDir: string): Promise<void>;
23
+ detect(): Promise<boolean>;
24
+ }
25
+ export declare class ADAPTER_NOT_IMPLEMENTED extends Error {
26
+ constructor(adapter: string, method: string);
27
+ }
@@ -0,0 +1,5 @@
1
+ export class ADAPTER_NOT_IMPLEMENTED extends Error {
2
+ constructor(adapter, method) {
3
+ super(`ADAPTER_NOT_IMPLEMENTED: ${adapter}.${method} — stub until later slice`);
4
+ }
5
+ }
@@ -0,0 +1,11 @@
1
+ import { Adapter } from "./adapter.js";
2
+ type Detectable = Pick<Adapter, "name" | "detect">;
3
+ export declare class AutoAdapter {
4
+ private readonly _o;
5
+ private readonly _adapters;
6
+ constructor(_o: {
7
+ home: string;
8
+ }, _adapters: Detectable[]);
9
+ detectAndPick(): Promise<Detectable>;
10
+ }
11
+ export {};
@@ -0,0 +1,15 @@
1
+ export class AutoAdapter {
2
+ _o;
3
+ _adapters;
4
+ constructor(_o, _adapters) {
5
+ this._o = _o;
6
+ this._adapters = _adapters;
7
+ }
8
+ async detectAndPick() {
9
+ for (const a of this._adapters) {
10
+ if (await a.detect())
11
+ return a;
12
+ }
13
+ throw new Error("No adapter detected. Use `peaks skill adapter set-active <name>` to force one.");
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ import { Adapter, AdapterEnvelope, AdapterSegment } from "./adapter.js";
2
+ export declare class ClaudeAdapter implements Adapter {
3
+ private readonly opts;
4
+ readonly name: "claude";
5
+ constructor(opts: {
6
+ home: string;
7
+ });
8
+ detect(): Promise<boolean>;
9
+ resolveScratchDir(beeName: string): Promise<string>;
10
+ materialize(beeName: string, env: AdapterEnvelope, segments: AdapterSegment[]): Promise<string>;
11
+ publish(scratchDir: string): Promise<string>;
12
+ activate(_scratchDir: string): Promise<void>;
13
+ cleanup(scratchDir: string): Promise<void>;
14
+ }
@@ -0,0 +1,40 @@
1
+ import { writeFileSync, mkdirSync, rmSync, existsSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ export class ClaudeAdapter {
4
+ opts;
5
+ name = "claude";
6
+ constructor(opts) {
7
+ this.opts = opts;
8
+ }
9
+ async detect() {
10
+ return true; /* Claude is the default; ship this slice first */
11
+ }
12
+ async resolveScratchDir(beeName) {
13
+ return join(this.opts.home, ".claude", "skills", `peaks-bee-${beeName}.peaks-generated`);
14
+ }
15
+ async materialize(beeName, env, segments) {
16
+ const dir = await this.resolveScratchDir(beeName);
17
+ if (existsSync(dir))
18
+ rmSync(dir, { recursive: true, force: true });
19
+ mkdirSync(dir, { recursive: true });
20
+ const frontmatter = `---\nname: peaks-bee-${beeName}\ndescription: peaks-loop generated bee ${beeName} — see local SkillHub for source\n---\n\n`;
21
+ const body = `${env.preamble}\n\n` + segments.map((s) => s.skillMd).join("\n\n");
22
+ writeFileSync(join(dir, "SKILL.md"), frontmatter + body);
23
+ mkdirSync(join(dir, "scripts"), { recursive: true });
24
+ for (const s of segments) {
25
+ for (const sc of s.scripts)
26
+ writeFileSync(join(dir, "scripts", sc.name), sc.content);
27
+ }
28
+ return dir;
29
+ }
30
+ async publish(scratchDir) {
31
+ return scratchDir;
32
+ }
33
+ async activate(_scratchDir) {
34
+ /* no-op; runtime picks up by convention */
35
+ }
36
+ async cleanup(scratchDir) {
37
+ if (existsSync(scratchDir))
38
+ rmSync(scratchDir, { recursive: true, force: true });
39
+ }
40
+ }
@@ -0,0 +1,14 @@
1
+ import { Adapter } from "./adapter.js";
2
+ export declare class CodexAdapter implements Pick<Adapter, "name"> {
3
+ private readonly _o;
4
+ readonly name: "codex";
5
+ constructor(_o: {
6
+ home: string;
7
+ });
8
+ detect(): Promise<boolean>;
9
+ resolveScratchDir(): Promise<void>;
10
+ materialize(): Promise<void>;
11
+ publish(): Promise<void>;
12
+ activate(): Promise<void>;
13
+ cleanup(): Promise<void>;
14
+ }
@@ -0,0 +1,14 @@
1
+ import { ADAPTER_NOT_IMPLEMENTED } from "./adapter.js";
2
+ export class CodexAdapter {
3
+ _o;
4
+ name = "codex";
5
+ constructor(_o) {
6
+ this._o = _o;
7
+ }
8
+ async detect() { return false; }
9
+ async resolveScratchDir() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "resolveScratchDir"); }
10
+ async materialize() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "materialize"); }
11
+ async publish() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "publish"); }
12
+ async activate() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "activate"); }
13
+ async cleanup() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "cleanup"); }
14
+ }
@@ -0,0 +1,14 @@
1
+ import { Adapter } from "./adapter.js";
2
+ export declare class CopilotAdapter implements Pick<Adapter, "name"> {
3
+ private readonly _o;
4
+ readonly name: "copilot";
5
+ constructor(_o: {
6
+ home: string;
7
+ });
8
+ detect(): Promise<boolean>;
9
+ resolveScratchDir(): Promise<void>;
10
+ materialize(): Promise<void>;
11
+ publish(): Promise<void>;
12
+ activate(): Promise<void>;
13
+ cleanup(): Promise<void>;
14
+ }