peaks-loop 3.1.2 → 4.0.0-beta.2

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 (344) hide show
  1. package/.claude-plugin/marketplace.json +62 -12
  2. package/CHANGELOG.md +148 -116
  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/{solo-commands.d.ts → code-commands.d.ts} +25 -25
  11. package/dist/src/cli/commands/{solo-commands.js → code-commands.js} +82 -82
  12. package/dist/src/cli/commands/context-commands.d.ts +1 -1
  13. package/dist/src/cli/commands/context-commands.js +1 -1
  14. package/dist/src/cli/commands/contract-commands.d.ts +1 -1
  15. package/dist/src/cli/commands/contract-commands.js +1 -1
  16. package/dist/src/cli/commands/core/session-command.js +12 -0
  17. package/dist/src/cli/commands/core/skill-command.js +4 -4
  18. package/dist/src/cli/commands/dispatch-commands.js +2 -2
  19. package/dist/src/cli/commands/dispatch-from-dag.js +1 -1
  20. package/dist/src/cli/commands/hook-handle.js +7 -7
  21. package/dist/src/cli/commands/job-commands.js +7 -7
  22. package/dist/src/cli/commands/observability-commands.js +1 -1
  23. package/dist/src/cli/commands/perf-audit-commands.js +2 -2
  24. package/dist/src/cli/commands/security-audit-commands.js +2 -2
  25. package/dist/src/cli/commands/sediment-commands.d.ts +80 -0
  26. package/dist/src/cli/commands/sediment-commands.js +640 -0
  27. package/dist/src/cli/commands/session-auto-compact-hook-command.js +2 -2
  28. package/dist/src/cli/commands/session-migrate-skill-name.d.ts +17 -0
  29. package/dist/src/cli/commands/session-migrate-skill-name.js +41 -0
  30. package/dist/src/cli/commands/skill-visibility.d.ts +8 -0
  31. package/dist/src/cli/commands/skill-visibility.js +63 -0
  32. package/dist/src/cli/commands/slice-commands.js +2 -2
  33. package/dist/src/cli/commands/sub-agent-commands.d.ts +1 -1
  34. package/dist/src/cli/commands/sub-agent-commands.js +1 -1
  35. package/dist/src/cli/commands/sub-agent-shared.d.ts +1 -1
  36. package/dist/src/cli/commands/understand-commands.js +1 -1
  37. package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
  38. package/dist/src/cli/commands/upgrade-commands.js +3 -3
  39. package/dist/src/cli/commands/user-touchpoint-commands.d.ts +4 -4
  40. package/dist/src/cli/commands/user-touchpoint-commands.js +15 -15
  41. package/dist/src/cli/commands/verdict-aggregate-command.d.ts +1 -1
  42. package/dist/src/cli/commands/verdict-aggregate-command.js +2 -2
  43. package/dist/src/cli/commands/workflow-commands.js +23 -23
  44. package/dist/src/cli/commands/workspace/init-command.d.ts +3 -3
  45. package/dist/src/cli/commands/workspace/init-command.js +7 -7
  46. package/dist/src/cli/program.js +24 -7
  47. package/dist/src/services/adapter/adapter.d.ts +27 -0
  48. package/dist/src/services/adapter/adapter.js +5 -0
  49. package/dist/src/services/adapter/auto-adapter.d.ts +11 -0
  50. package/dist/src/services/adapter/auto-adapter.js +15 -0
  51. package/dist/src/services/adapter/claude-adapter.d.ts +14 -0
  52. package/dist/src/services/adapter/claude-adapter.js +40 -0
  53. package/dist/src/services/adapter/codex-adapter.d.ts +14 -0
  54. package/dist/src/services/adapter/codex-adapter.js +14 -0
  55. package/dist/src/services/adapter/copilot-adapter.d.ts +14 -0
  56. package/dist/src/services/adapter/copilot-adapter.js +14 -0
  57. package/dist/src/services/artifacts/repair-cycle-service.js +1 -1
  58. package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +1 -1
  59. package/dist/src/services/audit/enforcers/active-skill-resolver.js +1 -1
  60. package/dist/src/services/audit/enforcers/{solo-code-ban.d.ts → code-ban.d.ts} +6 -6
  61. package/dist/src/services/audit/enforcers/{solo-code-ban.js → code-ban.js} +6 -6
  62. package/dist/src/services/audit/red-line-catalog.d.ts +2 -2
  63. package/dist/src/services/audit/red-line-catalog.js +6 -6
  64. package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
  65. package/dist/src/services/audit/types.d.ts +2 -2
  66. package/dist/src/services/{solo → code}/auto-compact-orchestrator.d.ts +2 -2
  67. package/dist/src/services/{solo → code}/auto-compact-orchestrator.js +5 -5
  68. package/dist/src/services/{solo → code}/dag-orchestrator.d.ts +4 -4
  69. package/dist/src/services/{solo → code}/dag-orchestrator.js +5 -5
  70. package/dist/src/services/{solo → code}/emit-handoff.d.ts +1 -1
  71. package/dist/src/services/{solo → code}/emit-handoff.js +1 -1
  72. package/dist/src/services/{solo → code}/job-shape-decision.d.ts +1 -1
  73. package/dist/src/services/{solo → code}/job-shape-decision.js +5 -5
  74. package/dist/src/services/{solo → code}/mode-gate.d.ts +11 -11
  75. package/dist/src/services/{solo → code}/mode-gate.js +5 -5
  76. package/dist/src/services/{solo → code}/post-compact-detector.d.ts +3 -3
  77. package/dist/src/services/{solo → code}/post-compact-detector.js +6 -6
  78. package/dist/src/services/{solo → code}/status-line-renderer.d.ts +4 -4
  79. package/dist/src/services/{solo → code}/step-08-gate.d.ts +4 -4
  80. package/dist/src/services/{solo → code}/step-08-gate.js +4 -4
  81. package/dist/src/services/{solo → code}/user-touchpoint-classifier.d.ts +1 -1
  82. package/dist/src/services/{solo → code}/user-touchpoint-classifier.js +1 -1
  83. package/dist/src/services/context/auto-compact-dispatcher.d.ts +3 -3
  84. package/dist/src/services/context/auto-compact-dispatcher.js +2 -2
  85. package/dist/src/services/context/auto-compact-types.d.ts +1 -1
  86. package/dist/src/services/dispatch/batch-counter.js +1 -1
  87. package/dist/src/services/dispatch/leak-detector.js +1 -1
  88. package/dist/src/services/dispatch/slice-dag.d.ts +2 -2
  89. package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
  90. package/dist/src/services/dispatch/test-tool-detection.js +1 -1
  91. package/dist/src/services/doctor/doctor-service.js +2 -2
  92. package/dist/src/services/feedback/feedback-promotion-service.js +2 -2
  93. package/dist/src/services/job/job-progress-store.d.ts +1 -1
  94. package/dist/src/services/job/job-progress-store.js +1 -1
  95. package/dist/src/services/job/job-resource-snapshot.js +29 -1
  96. package/dist/src/services/memory/project-memory-service.js +1 -1
  97. package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
  98. package/dist/src/services/migrate-skill-name/migrate.js +152 -0
  99. package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
  100. package/dist/src/services/migrate-skill-name/schema.js +25 -0
  101. package/dist/src/services/observability/aggregation.d.ts +1 -1
  102. package/dist/src/services/observability/aggregation.js +1 -1
  103. package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
  104. package/dist/src/services/perf/perf-baseline-service.js +1 -1
  105. package/dist/src/services/prd/handoff-types.d.ts +1 -1
  106. package/dist/src/services/prd/handoff-types.js +1 -1
  107. package/dist/src/services/preferences/preferences-service.d.ts +1 -1
  108. package/dist/src/services/preferences/preferences-types.d.ts +1 -1
  109. package/dist/src/services/progress/progress-service.d.ts +1 -1
  110. package/dist/src/services/progress/progress-service.js +1 -1
  111. package/dist/src/services/rd/standards-diagnostic.d.ts +1 -1
  112. package/dist/src/services/rd/standards-diagnostic.js +3 -3
  113. package/dist/src/services/recommendations/capability-seed-items.js +1 -1
  114. package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
  115. package/dist/src/services/recommendations/recommendation-service.js +1 -1
  116. package/dist/src/services/refactor/refactor-service.d.ts +1 -1
  117. package/dist/src/services/sc/sc-service.js +1 -1
  118. package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
  119. package/dist/src/services/sediment/dispose-confirm.js +5 -0
  120. package/dist/src/services/sediment/json-schema.d.ts +247 -0
  121. package/dist/src/services/sediment/json-schema.js +26 -0
  122. package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
  123. package/dist/src/services/sediment/manifest-lint.js +11 -0
  124. package/dist/src/services/sediment/pool-paths.d.ts +22 -0
  125. package/dist/src/services/sediment/pool-paths.js +25 -0
  126. package/dist/src/services/sediment/pool-read.d.ts +20 -0
  127. package/dist/src/services/sediment/pool-read.js +73 -0
  128. package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
  129. package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
  130. package/dist/src/services/sediment/pool-write.d.ts +14 -0
  131. package/dist/src/services/sediment/pool-write.js +25 -0
  132. package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
  133. package/dist/src/services/sediment/promotion-gate.js +20 -0
  134. package/dist/src/services/sediment/types.d.ts +52 -0
  135. package/dist/src/services/sediment/types.js +1 -0
  136. package/dist/src/services/session/binding-store.d.ts +1 -1
  137. package/dist/src/services/session/binding-store.js +1 -1
  138. package/dist/src/services/session/caller-id-types.d.ts +1 -1
  139. package/dist/src/services/session/session-manager.d.ts +1 -1
  140. package/dist/src/services/session/session-manager.js +1 -1
  141. package/dist/src/services/signal/cancel-handler.js +3 -3
  142. package/dist/src/services/skill/resume-detector.js +2 -2
  143. package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
  144. package/dist/src/services/skill/skill-scheduler.js +1 -1
  145. package/dist/src/services/skillhub/release-diff.d.ts +18 -0
  146. package/dist/src/services/skillhub/release-diff.js +38 -0
  147. package/dist/src/services/skillhub/release-export.d.ts +8 -0
  148. package/dist/src/services/skillhub/release-export.js +31 -0
  149. package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
  150. package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
  151. package/dist/src/services/skillhub/release-import.d.ts +7 -0
  152. package/dist/src/services/skillhub/release-import.js +59 -0
  153. package/dist/src/services/skillhub/release-retain.d.ts +23 -0
  154. package/dist/src/services/skillhub/release-retain.js +89 -0
  155. package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
  156. package/dist/src/services/skillhub/sqlite-store.js +47 -0
  157. package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
  158. package/dist/src/services/skillhub/tar-runtime.js +91 -0
  159. package/dist/src/services/skillhub/types.d.ts +105 -0
  160. package/dist/src/services/skillhub/types.js +1 -0
  161. package/dist/src/services/skills/skill-conformance-service.js +8 -5
  162. package/dist/src/services/skills/skill-presence-service.d.ts +5 -5
  163. package/dist/src/services/skills/skill-presence-service.js +2 -2
  164. package/dist/src/services/skills/skill-registry.js +27 -0
  165. package/dist/src/services/skills/skill-runbook-service.js +2 -2
  166. package/dist/src/services/slice/slice-check-service.js +1 -1
  167. package/dist/src/services/slice/slice-check-types.d.ts +1 -1
  168. package/dist/src/services/slice/slice-check-types.js +1 -1
  169. package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
  170. package/dist/src/services/slice/slice-decompose-types.js +1 -1
  171. package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
  172. package/dist/src/services/standards/missing-standards-detector.js +1 -1
  173. package/dist/src/services/standards/project-standards-service.d.ts +1 -1
  174. package/dist/src/services/standards/project-standards-service.js +4 -4
  175. package/dist/src/services/understand/understand-types.d.ts +1 -1
  176. package/dist/src/services/upgrade/1x-detector-service.js +2 -2
  177. package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
  178. package/dist/src/services/upgrade/upgrade-service.js +52 -30
  179. package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
  180. package/dist/src/services/workflow/pipeline-verify-service.d.ts +1 -1
  181. package/dist/src/services/workflow/pipeline-verify-service.js +3 -3
  182. package/dist/src/services/workflow/workflow-autonomous-service.d.ts +3 -3
  183. package/dist/src/services/workflow/workflow-autonomous-service.js +2 -2
  184. package/dist/src/services/workflow/workflow-router-service.d.ts +7 -7
  185. package/dist/src/services/workflow/workflow-router-service.js +33 -33
  186. package/dist/src/services/workspace/claude-settings-template.d.ts +2 -2
  187. package/dist/src/services/workspace/claude-settings-template.js +7 -7
  188. package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
  189. package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
  190. package/dist/src/services/workspace/workspace-service.d.ts +4 -4
  191. package/dist/src/services/workspace/workspace-service.js +2 -2
  192. package/dist/src/shared/paths.d.ts +1 -1
  193. package/dist/src/shared/paths.js +1 -1
  194. package/dist/src/shared/version.d.ts +1 -1
  195. package/dist/src/shared/version.js +1 -1
  196. package/dist/src/skills/peaks-maker/index.d.ts +5 -0
  197. package/dist/src/skills/peaks-maker/index.js +32 -0
  198. package/output-styles/peaks-skill-swarm.md +3 -3
  199. package/package.json +8 -3
  200. package/scripts/install-skills.mjs +29 -4
  201. package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
  202. package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
  203. package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
  204. package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +3 -3
  205. package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
  206. package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
  207. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
  208. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +7 -7
  209. package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
  210. package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
  211. package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
  212. package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
  213. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +1 -1
  214. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +2 -2
  215. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +13 -13
  216. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +2 -2
  217. package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
  218. package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
  219. package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +8 -2
  220. package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +11 -5
  221. package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +19 -13
  222. package/skills/peaks-audit/SKILL.md +1 -1
  223. package/skills/{peaks-solo → peaks-code}/SKILL.md +29 -29
  224. package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
  225. package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +6 -6
  226. package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +3 -3
  227. package/skills/{peaks-solo → peaks-code}/references/boundaries.md +3 -3
  228. package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
  229. package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +1 -1
  230. package/skills/peaks-code/references/command-migration.md +3 -0
  231. package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
  232. package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
  233. package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +7 -7
  234. package/skills/{peaks-solo → peaks-code}/references/external-references.md +2 -2
  235. package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +3 -3
  236. package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +2 -2
  237. package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +10 -10
  238. package/skills/{peaks-solo → peaks-code}/references/job-loop.md +1 -1
  239. package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +3 -3
  240. package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +23 -23
  241. package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +16 -16
  242. package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +4 -4
  243. package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +17 -17
  244. package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +4 -4
  245. package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
  246. package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +1 -1
  247. package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +2 -2
  248. package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
  249. package/skills/{peaks-solo → peaks-code}/references/runbook.md +20 -20
  250. package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
  251. package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
  252. package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +6 -6
  253. package/skills/{peaks-solo → peaks-code}/references/step-0-8-gate.md +11 -11
  254. package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +17 -17
  255. package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +22 -22
  256. package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +4 -4
  257. package/skills/{peaks-solo → peaks-code}/references/workflow.md +5 -5
  258. package/skills/peaks-doctor/SKILL.md +1 -1
  259. package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
  260. package/skills/peaks-final-review/SKILL.md +3 -3
  261. package/skills/peaks-final-review/references/4-dimensions.md +1 -1
  262. package/skills/peaks-ide/SKILL.md +1 -1
  263. package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +15 -15
  264. package/skills/peaks-sop/SKILL.md +1 -1
  265. package/skills/{peaks-solo-status → peaks-status}/SKILL.md +14 -14
  266. package/skills/{peaks-solo-test → peaks-test}/SKILL.md +12 -12
  267. package/skills/peaks-solo/references/command-migration.md +0 -3
  268. /package/dist/src/services/{solo → code}/batch-heartbeat-poller.d.ts +0 -0
  269. /package/dist/src/services/{solo → code}/batch-heartbeat-poller.js +0 -0
  270. /package/dist/src/services/{solo → code}/status-line-renderer.js +0 -0
  271. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
  272. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
  273. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
  274. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
  275. /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
  276. /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
  277. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
  278. /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
  279. /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
  280. /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
  281. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
  282. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
  283. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
  284. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
  285. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
  286. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
  287. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
  288. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
  289. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
  290. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
  291. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
  292. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
  293. /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
  294. /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
  295. /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
  296. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
  297. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
  298. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
  299. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
  300. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
  301. /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
  302. /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
  303. /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
  304. /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
  305. /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
  306. /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
  307. /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
  308. /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
  309. /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
  310. /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
  311. /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
  312. /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
  313. /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
  314. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
  315. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
  316. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
  317. /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
  318. /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
  319. /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
  320. /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
  321. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
  322. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
  323. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
  324. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
  325. /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
  326. /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
  327. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
  328. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
  329. /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
  330. /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
  331. /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
  332. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
  333. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
  334. /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
  335. /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
  336. /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
  337. /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
  338. /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
  339. /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
  340. /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
  341. /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
  342. /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
  343. /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
  344. /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
@@ -1,11 +1,11 @@
1
1
  # Peaks-Loop Default Runbook (orchestrator, full-auto profile)
2
2
 
3
- > **Maintenance**: The numbered workflow list in `skills/peaks-solo/SKILL.md` (steps 0-11) is the canonical phase sequence. This runbook is the executable CLI transcription. When updating, keep both in lockstep — a change to one must be reflected in the other.
3
+ > **Maintenance**: The numbered workflow list in `skills/peaks-code/SKILL.md` (steps 0-11) is the canonical phase sequence. This runbook is the executable CLI transcription. When updating, keep both in lockstep — a change to one must be reflected in the other.
4
4
  >
5
5
  > **Why this is a reference, not inline**: the runbook is a stable, copy-pasteable shell (~150 lines of bash) that does not change between skill runs. Inlining it bloats the orchestrator skill body past the 800-line cap (per `common/coding-style.md`). Extracting it here keeps SKILL.md focused on flow / decisions / contracts, while the runbook stays as the canonical place for the CLI sequence.
6
6
  >
7
7
  > **How peaks-loop tooling reads this file**:
8
- > - `peaks skill runbook peaks-solo` (CLI) reads the `## Default runbook` section in either SKILL.md or `references/runbook.md` (whichever has the bash code).
8
+ > - `peaks skill runbook peaks-code` (CLI) reads the `## Default runbook` section in either SKILL.md or `references/runbook.md` (whichever has the bash code).
9
9
  > - The test in `tests/unit/skill-default-runbook.test.ts` looks for `## Default runbook` in SKILL.md first, then falls back to `references/runbook.md` here.
10
10
 
11
11
  ## Default runbook — CLI sequence
@@ -22,7 +22,7 @@ peaks sub-agent dispatch <role> --prompt "<body>" --request-id <rid> --batch-id
22
22
  # 0. Peaks-Loop Snapshot + 0.5 Peaks-Loop Workspace + 0.6 Peaks-Loop Project scan + 0.7 Peaks-Loop Existing-system extraction
23
23
  peaks doctor --json
24
24
  peaks project dashboard --project <repo> --json
25
- peaks skill runbook peaks-solo --json
25
+ peaks skill runbook peaks-code --json
26
26
  peaks workspace init --project <repo> --json
27
27
  peaks workspace reconcile --project <repo> --json
28
28
  peaks scan archetype --project <repo> --json
@@ -60,7 +60,7 @@ peaks request transition <rid> --role prd --state confirmed-by-user --project <r
60
60
  peaks request transition <rid> --role prd --state handed-off --project <repo> --json
61
61
 
62
62
  # 3. Peaks-Loop Default sub-agent fan-out (slice 5 contract)
63
- # Solo computes the swarm plan from --type + frontendOnly + frontend-keyword scan,
63
+ # Code computes the swarm plan from --type + frontendOnly + frontend-keyword scan,
64
64
  # writes it to .peaks/_runtime/<sid>/sc/swarm-plan.json, then writes the slice
65
65
  # DAG to .peaks/_runtime/<sid>/sc/slice-dag.json and launches ONE
66
66
  # `peaks sub-agent dispatch --from-dag <dag-file>` call. The CLI's
@@ -75,12 +75,12 @@ peaks request transition <rid> --role prd --state handed-off --project <repo> --
75
75
  # `peaks sub-agent dispatch <role>` calls in N separate messages when a fan-out
76
76
  # shape exists — `--from-dag` is the only path that exercises the orchestrator.
77
77
  #
78
- # 3a. Pre-fan-out: Solo initialises every role's request artefact slot in the main
78
+ # 3a. Pre-fan-out: Code initialises every role's request artefact slot in the main
79
79
  # loop so sub-agents find a stable rid <-> artefact binding. Each role's
80
80
  # sub-agent may also call peaks request init itself (idempotent on the same rid);
81
- # Solo's call here is the source of truth. Only init roles that are in the
81
+ # Code's call here is the source of truth. Only init roles that are in the
82
82
  # swarm plan — roles not in the plan do not get a slot yet.
83
- peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-fan-out
83
+ peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-fan-out
84
84
  # for each role in swarm-plan.subAgents:
85
85
  # peaks request init --role ui --id <rid> --project <repo> --apply --type <type> --json
86
86
  # peaks request init --role rd --id <rid> --project <repo> --apply --type <type> --json
@@ -88,7 +88,7 @@ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-
88
88
  # e.g. if plan = [ui, rd, qa]: run init for ui, rd, qa.
89
89
  # If plan = [rd, qa]: run for rd, qa only.
90
90
  # If plan = [] (config|docs|chore skip): no inits here, jump to step 4 directly.
91
- # 3b. Solo writes the slice DAG to a JSON file then issues ONE
91
+ # 3b. Code writes the slice DAG to a JSON file then issues ONE
92
92
  # `peaks sub-agent dispatch --from-dag <dag-file> --batch-id <id>` call.
93
93
  # The CLI envelope returns N parallel buildToolCall descriptors
94
94
  # (dispatchCount = len(swarm-plan.subAgents) when the DAG has >= 2
@@ -98,8 +98,8 @@ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-
98
98
  # concurrently, so wall-time approximates max(per-leaf time), not sum.
99
99
  peaks sc build-dag --change-id <cid> --project <repo> --json > .peaks/_runtime/<sid>/sc/slice-dag.json
100
100
  peaks sub-agent dispatch --from-dag .peaks/_runtime/<sid>/sc/slice-dag.json --batch-id <id> --project <repo> --json
101
- # 3c. After fan-out, Solo restores presence once and runs Gate B (ls checks):
102
- peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-converged
101
+ # 3c. After fan-out, Code restores presence once and runs Gate B (ls checks):
102
+ peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-converged
103
103
  ls .peaks/_runtime/<sid>/prd/requests/<rid>.md # PRD artefact must exist (Gate B hard)
104
104
  # feature / refactor → ls .peaks/_runtime/<sid>/rd/tech-doc.md
105
105
  # bugfix → ls .peaks/_runtime/<sid>/rd/bug-analysis.md
@@ -174,7 +174,7 @@ peaks workspace reconcile --project <repo> --apply --older-than 7
174
174
  # (c) Skip for now — blocks stay in the handoff only, no .peaks/memory/ write"
175
175
  # If 10a returned 0 AND the session surfaced a stable project fact
176
176
  # (decision / convention / approved refactor), STOP — peaks-txt must go
177
- # back and embed at least one block before Solo can advance.
177
+ # back and embed at least one block before Code can advance.
178
178
 
179
179
  # 10c. After the user picks (a) or (b), run:
180
180
  peaks memory extract --project <repo> --artifact .peaks/_runtime/<id>/txt/handoff.md --apply --json
@@ -195,13 +195,13 @@ Repair loop details: see `## Mandatory RD QA repair loop` in SKILL.md for the fu
195
195
  # Step 0.8 (BLOCKING): LLM judges Job-shape, CLI records it.
196
196
  # This is a RECORDER, not a detector. The LLM supplies --is-job + --rationale;
197
197
  # the CLI writes .peaks/_runtime/<sid>/job-shape.json. Downstream steps call
198
- # `peaks solo read-job-shape` to enforce the decision exists.
198
+ # `peaks code read-job-shape` to enforce the decision exists.
199
199
 
200
200
  # (The LLM does the semantic judgement, e.g.:)
201
201
  # "The user named N=35 parallel app/ subdirs, said 'continue until all done',
202
202
  # and disavowed cost. isJob=true, rationale=..., suggestedJobId=app-ut-batch,
203
203
  # suggestedStrategy=rotating, confidence=high."
204
- peaks solo detect-job \
204
+ peaks code detect-job \
205
205
  --is-job true \
206
206
  --rationale "35 parallel app/ subdirs + 'until all done' + '不用考虑费用'" \
207
207
  --suggested-job-id app-ut-batch \
@@ -209,7 +209,7 @@ peaks solo detect-job \
209
209
  --confidence high
210
210
 
211
211
  # Step 0.81-init: if Job-shaped, init BEFORE Step 1.
212
- DECISION=$(peaks solo read-job-shape --json)
212
+ DECISION=$(peaks code read-job-shape --json)
213
213
  if [ "$(echo "$DECISION" | jq -r '.data.decision.isJob')" = "true" ]; then
214
214
  JID=$(echo "$DECISION" | jq -r '.data.decision.suggestedJobId')
215
215
  STRATEGY=$(echo "$DECISION" | jq -r '.data.decision.suggestedStrategy')
@@ -232,18 +232,18 @@ peaks job subagent-cleanup --job-id <jid> --batch-id <bid> --force # Step 0.87
232
232
 
233
233
  # v3.1.2 size-fear ban: refuse to emit a final handoff while remaining > 0.
234
234
  # The LLM cannot bypass this; --force-under-job requires explicit user approval.
235
- peaks solo emit-handoff --project <repo> --job-id <jid> --json
235
+ peaks code emit-handoff --project <repo> --job-id <jid> --json
236
236
 
237
237
  # v3.1.2 forced auto-compact: when --enforce-job-mode is set OR
238
238
  # job-shape.json says isJob=true, ≥0.85 is MANDATORY auto-compact.
239
- # Solo MUST call this without confirmation under Job mode.
240
- peaks solo context-now --project <repo> --enforce-job-mode --json
239
+ # Code MUST call this without confirmation under Job mode.
240
+ peaks code context-now --project <repo> --enforce-job-mode --json
241
241
  peaks session auto-compact --execute --project <repo> --json
242
242
 
243
243
  # v3.1.2 PreToolUse gate (installed by `peaks workspace init`):
244
- # every Bash tool call runs `peaks solo gate-step-08` automatically.
244
+ # every Bash tool call runs `peaks code gate-step-08` automatically.
245
245
  # Exit 0 = allow (with optional Next: slice #N+1 of M line when
246
246
  # progress.json exists). Exit 2 = BLOCKED; LLM must call
247
- # `peaks solo detect-job` first.
248
- peaks solo gate-step-08 --project <repo> --json
247
+ # `peaks code detect-job` first.
248
+ peaks code gate-step-08 --project <repo> --json
249
249
  ```
@@ -7,7 +7,7 @@
7
7
  Step 0 already set presence with no mode. Now that the mode is known (user selected or explicitly named), re-run presence:set so the header/status line shows the profile:
8
8
 
9
9
  ```bash
10
- peaks skill presence:set peaks-solo --project <repo> --mode <mode-value> --gate startup
10
+ peaks skill presence:set peaks-code --project <repo> --mode <mode-value> --gate startup
11
11
  ```
12
12
 
13
13
  On the first presence:set in a project, ensure the out-of-band status bar is installed so the user can see at a glance that Peaks is orchestrating — it renders the active skill in Claude Code's terminal status line, independent of model output:
@@ -16,9 +16,9 @@ On the first presence:set in a project, ensure the out-of-band status bar is ins
16
16
  peaks statusline install --project <repo> # idempotent; skips if already installed
17
17
  ```
18
18
 
19
- Then display the compact status header: `Peaks-Loop Skill: peaks-solo | Peaks-Loop Gate: startup | Next: <one short action>`. Display this header on EVERY turn while the skill is active.
19
+ Then display the compact status header: `Peaks-Loop Skill: peaks-code | Peaks-Loop Gate: startup | Next: <one short action>`. Display this header on EVERY turn while the skill is active.
20
20
 
21
- Update with `peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate <gate>` when gates change. The presence file persists across the full workflow lifecycle — do NOT clear it at workflow end.
21
+ Update with `peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate <gate>` when gates change. The presence file persists across the full workflow lifecycle — do NOT clear it at workflow end.
22
22
 
23
23
  ## Step 2.5 — Set session title
24
24
 
@@ -13,7 +13,7 @@ Use `standards init` for first-time creation and `standards update` for existing
13
13
 
14
14
  Do not hand-write standards file mutations inside the skill.
15
15
 
16
- For project-analysis requests such as "分析项目" / "分析下这个项目", Step 0 still applies: the workspace is initialized and `peaks-solo` presence is set before any analysis output. These requests run the lightweight analysis branch (project scan + standards dry-run) rather than the full RD/QA pipeline, but they never skip workspace anchoring or exit the workflow. The handoff must include an explicit **Standards increment** section. Report the current `CLAUDE.md` and `.claude/rules/**` status from the dry-run output as incremental deltas, not just a generic preflight note:
16
+ For project-analysis requests such as "分析项目" / "分析下这个项目", Step 0 still applies: the workspace is initialized and `peaks-code` presence is set before any analysis output. These requests run the lightweight analysis branch (project scan + standards dry-run) rather than the full RD/QA pipeline, but they never skip workspace anchoring or exit the workflow. The handoff must include an explicit **Standards increment** section. Report the current `CLAUDE.md` and `.claude/rules/**` status from the dry-run output as incremental deltas, not just a generic preflight note:
17
17
 
18
18
  - whether `CLAUDE.md` is missing, existing, planned, skipped, appended, or review-only;
19
19
  - which `.claude/rules/**` files are planned, existing, skipped, appended, or review-only;
@@ -1,6 +1,6 @@
1
1
  # Step 0.55 — 1.x → 2.0 detection reference
2
2
 
3
- > Body of `### Peaks-Loop Step 0.55`. Slice: 2026-06-12-solo-step-0-55-1x-detection.
3
+ > Body of `### Peaks-Loop Step 0.55`. Slice: 2026-06-12-code-step-0-55-1x-detection.
4
4
 
5
5
  ## Why this step exists
6
6
 
@@ -8,9 +8,9 @@ The peaks-loop 1.x → 2.0 closeout ships:
8
8
 
9
9
  1. A postinstall that auto-detects 1.x state and dispatches the upgrade (slice 1, commit `b6e34e6`).
10
10
  2. A standards-migrate path that thins `.claude/rules/**/*.md` and scaffolds `.peaks/standards/` (slice 2, commit `33dd392`).
11
- 3. **THIS STEP** — a peaks-solo startup sequence probe that detects 1.x state when the user invokes `/peaks-solo` directly in a 1.x consumer project, and prompts the user to upgrade.
11
+ 3. **THIS STEP** — a peaks-code startup sequence probe that detects 1.x state when the user invokes `/peaks-code` directly in a 1.x consumer project, and prompts the user to upgrade.
12
12
 
13
- The 1.x user experience is: "I just typed /peaks-solo. Why is it not working in 2.0 mode?" Step 0.55 catches this case and surfaces an `AskUserQuestion` with a one-click upgrade.
13
+ The 1.x user experience is: "I just typed /peaks-code. Why is it not working in 2.0 mode?" Step 0.55 catches this case and surfaces an `AskUserQuestion` with a one-click upgrade.
14
14
 
15
15
  ## Detection algorithm
16
16
 
@@ -35,7 +35,7 @@ The CLI returns:
35
35
  },
36
36
  "warnings": [],
37
37
  "nextActions": [
38
- "Detected 1.x state. peaks-solo Step 0.55 should present an AskUserQuestion to invoke `peaks upgrade --to 2.0 --auto --project /path/to/project`."
38
+ "Detected 1.x state. peaks-code Step 0.55 should present an AskUserQuestion to invoke `peaks upgrade --to 2.0 --auto --project /path/to/project`."
39
39
  ]
40
40
  }
41
41
  ```
@@ -52,8 +52,8 @@ The TS mirror in `src/services/upgrade/1x-detector-service.ts` is the canonical
52
52
 
53
53
  | Option | What it does |
54
54
  |---|---|
55
- | Run `peaks upgrade --to 2.0 --auto --project <root>` (Recommended) | Invokes the umbrella. The user sees the 6 sub-step results in the terminal. After the upgrade, re-run peaks-solo with the standing 2.0 layout. Persist `autoUpgradePrompt: opt-in` to `.peaks/preferences.json`. |
56
- | Skip for this session | Continue with the standing 1.x layout. Persist `autoUpgradePrompt: skip-this-session` to `.peaks/preferences.json`. The next time the user invokes peaks-solo in this project, the question re-asks. |
55
+ | Run `peaks upgrade --to 2.0 --auto --project <root>` (Recommended) | Invokes the umbrella. The user sees the 6 sub-step results in the terminal. After the upgrade, re-run peaks-code with the standing 2.0 layout. Persist `autoUpgradePrompt: opt-in` to `.peaks/preferences.json`. |
56
+ | Skip for this session | Continue with the standing 1.x layout. Persist `autoUpgradePrompt: skip-this-session` to `.peaks/preferences.json`. The next time the user invokes peaks-code in this project, the question re-asks. |
57
57
  | Never ask again for this project | Persist `autoUpgradePrompt: skip-forever` to `.peaks/preferences.json`. Step 0.55 becomes a no-op for this project from now on. The user can re-enable later by removing the `autoUpgradePrompt` key from preferences.json. |
58
58
 
59
59
  ## Persistence contract
@@ -1,10 +1,10 @@
1
- # Peaks-Loop Solo — Step 0.8 (v3.1.1 + v3.1.2) Gate Deep-Dive
1
+ # Peaks-Loop Code — Step 0.8 (v3.1.1 + v3.1.2) Gate Deep-Dive
2
2
 
3
3
  > Read alongside `SKILL.md` Step 0.8. The SKILL.md header is the LOCKED CONTRACT; this file is the mechanics.
4
4
 
5
- ## Recorder contract (`peaks solo detect-job`)
5
+ ## Recorder contract (`peaks code detect-job`)
6
6
 
7
- The CLI does NOT judge whether the request is Job-shaped — that is the LLM's job. Keyword regexes are wrong here (too brittle, miss natural-language variants, shift the LLM's semantic understanding into code). The CLI is a **recorder and gate**: the LLM makes the judgement, writes it via `peaks solo detect-job`, and downstream steps refuse to proceed until the decision file exists.
7
+ The CLI does NOT judge whether the request is Job-shaped — that is the LLM's job. Keyword regexes are wrong here (too brittle, miss natural-language variants, shift the LLM's semantic understanding into code). The CLI is a **recorder and gate**: the LLM makes the judgement, writes it via `peaks code detect-job`, and downstream steps refuse to proceed until the decision file exists.
8
8
 
9
9
  ### LLM judgement criteria (read once, then call the recorder)
10
10
 
@@ -16,40 +16,40 @@ The CLI does NOT judge whether the request is Job-shaped — that is the LLM's j
16
16
  ### Action sequence
17
17
 
18
18
  1. LLM reads the user prompt and applies judgement → `isJob: boolean + rationale + suggestedJobId + suggestedStrategy + confidence`.
19
- 2. LLM calls `peaks solo detect-job --is-job <bool> --rationale <text> --suggested-job-id <jid> --suggested-strategy <single|rotating> --confidence <high|medium|low> [--force]`.
19
+ 2. LLM calls `peaks code detect-job --is-job <bool> --rationale <text> --suggested-job-id <jid> --suggested-strategy <single|rotating> --confidence <high|medium|low> [--force]`.
20
20
  3. CLI records to `.peaks/_runtime/<sessionId>/job-shape.json`.
21
21
  4. If `isJob: true` → `peaks job init --job-id <jid> --slice-list <...> --main-loop-strategy <strategy> --rotate-every 3` (BEFORE Step 1).
22
22
  5. Downstream steps (Step 1, Step 0.81, etc.) call `read-job-shape` to refuse if missing.
23
23
 
24
24
  ### Hard rule (v3.1.1 red-line #10)
25
25
 
26
- LLM MUST NOT skip `peaks solo detect-job` even when the trigger is obvious from context. If the next step's `read-job-shape` throws `JOB_SHAPE_NOT_DECIDED`, Solo MUST record a decision before proceeding. Keyword-based "I already know it's a Job" is not a substitute.
26
+ LLM MUST NOT skip `peaks code detect-job` even when the trigger is obvious from context. If the next step's `read-job-shape` throws `JOB_SHAPE_NOT_DECIDED`, Code MUST record a decision before proceeding. Keyword-based "I already know it's a Job" is not a substitute.
27
27
 
28
28
  ## v3.1.2 mechanical gates
29
29
 
30
30
  The recorder-only design was bypassed twice under load; the gate must be un-bypassable.
31
31
 
32
- ### 1. PreToolUse hook — `peaks solo gate-step-08`
32
+ ### 1. PreToolUse hook — `peaks code gate-step-08`
33
33
 
34
- `peaks workspace init` installs the `Bash` matcher `peaks solo gate-step-08 --project .` in `.claude/settings.local.json` (alongside the existing Write|Edit|MultiEdit matcher). The hook runs before every Bash call:
34
+ `peaks workspace init` installs the `Bash` matcher `peaks code gate-step-08 --project .` in `.claude/settings.local.json` (alongside the existing Write|Edit|MultiEdit matcher). The hook runs before every Bash call:
35
35
 
36
36
  | Condition | Exit | Behaviour |
37
37
  |---|---|---|
38
38
  | `job-shape.json` exists | 0 (allow) | allow + emit decision; if `progress.json` exists, add `Next: slice #N+1 of M (<currentSlice>)` |
39
- | `job-shape.json` missing AND prompt matches the fail-closed backup regex | 2 (BLOCKED) | LLM must call `peaks solo detect-job` before retrying |
39
+ | `job-shape.json` missing AND prompt matches the fail-closed backup regex | 2 (BLOCKED) | LLM must call `peaks code detect-job` before retrying |
40
40
  | `job-shape.json` missing AND no regex match | 0 (allow) | allow, no Job trigger |
41
41
 
42
- ### 2. Size-fear ban — `peaks solo emit-handoff`
42
+ ### 2. Size-fear ban — `peaks code emit-handoff`
43
43
 
44
44
  Refuses to emit a final handoff while `remaining > 0` under Job mode. Pass `--force-under-job` only with explicit user approval.
45
45
 
46
46
  ### 3. Forced auto-compact — `--enforce-job-mode`
47
47
 
48
- `peaks solo context-now --enforce-job-mode` (auto-enabled when `job-shape.json` says `isJob=true`) returns `action: 'auto-compact-now'` at ≥ 0.85; Solo MUST call `peaks session auto-compact --execute` without confirmation.
48
+ `peaks code context-now --enforce-job-mode` (auto-enabled when `job-shape.json` says `isJob=true`) returns `action: 'auto-compact-now'` at ≥ 0.85; Code MUST call `peaks session auto-compact --execute` without confirmation.
49
49
 
50
50
  ### 4. On-disk slice progress — `progress.json`
51
51
 
52
- `peaks job checkpoint --state done` writes `progress.json`. `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader; `peaks solo gate-step-08` also surfaces it on every Bash call so the LLM cannot "wake up cold".
52
+ `peaks job checkpoint --state done` writes `progress.json`. `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader; `peaks code gate-step-08` also surfaces it on every Bash call so the LLM cannot "wake up cold".
53
53
 
54
54
  ## Backup regex rationale
55
55
 
@@ -1,7 +1,7 @@
1
1
  # sub-agent-dispatch.md — peaks sub-agent dispatch orchestrator contract
2
2
 
3
3
  > **Slice**: 2026-06-07-sub-agent-dispatch-decouple (G3 + G6)
4
- > **Audience**: SKILL.md authors and LLM readers of peaks-solo / peaks-rd / peaks-qa
4
+ > **Audience**: SKILL.md authors and LLM readers of peaks-code / peaks-rd / peaks-qa
5
5
  > **Status**: stable
6
6
 
7
7
  This reference is the orchestrator-side contract for sub-agent dispatch.
@@ -20,7 +20,7 @@ the skills compose. For sub-agent dispatch the relationship is:
20
20
 
21
21
  | Surface | Who owns | What it does | Who calls it |
22
22
  |---|---|---|---|
23
- | SKILL.md (主面) | peaks-solo, peaks-rd, peaks-qa | Tells the LLM when and why to dispatch a sub-agent; what prompt to pass; what artifacts to expect back | LLM (during normal Solo / RD / QA flow) |
23
+ | SKILL.md (主面) | peaks-code, peaks-rd, peaks-qa | Tells the LLM when and why to dispatch a sub-agent; what prompt to pass; what artifacts to expect back | LLM (during normal Code / RD / QA flow) |
24
24
  | CLI (副 / 原子) | `peaks sub-agent dispatch` | Validates the role, looks up the current IDE's `subAgentDispatcher`, returns a per-IDE tool-call descriptor + writes a dispatch record | LLM (read from the SKILL.md) |
25
25
  | Dispatcher 抽象 (per-IDE) | `src/services/dispatch/sub-agent-dispatcher.ts` | Encapsulates the IDE-private tool name (claude-code: `Task`, trae: UNVERIFIED placeholder) and arg shape | CLI (called by the CLI) |
26
26
 
@@ -157,7 +157,7 @@ system is dead. G6 is the rule that says: **no**.
157
157
  | Layer | Who | What | Cadence |
158
158
  |---|---|---|---|
159
159
  | **Sub-agent writes** | The sub-agent itself | Calls `peaks sub-agent heartbeat --record <dispatchRecordPath> --status <state> --progress <pct> --note "<text>"` to append a heartbeat | 30 s default; SKILL.md can override via `heartbeatIntervalSec: 15` |
160
- | **Dispatcher reads** | peaks-solo main loop, during the batch-sync wait | In-process async poller (`BatchHeartbeatPoller`) reads `heartbeats[]` + `lastBeatAt` from each record, emits a single-line status per G6.5 | 10 s (offset from 30 s to avoid jitter) |
160
+ | **Dispatcher reads** | peaks-code main loop, during the batch-sync wait | In-process async poller (`BatchHeartbeatPoller`) reads `heartbeats[]` + `lastBeatAt` from each record, emits a single-line status per G6.5 | 10 s (offset from 30 s to avoid jitter) |
161
161
  | **User / CLI reads** | Anyone, anytime | `peaks sub-agent list --session-id <sid> --json` (G5 RL-10, future slice) | manual |
162
162
 
163
163
  ### Sub-agent prompt template (heartbeat-aware + MCP-decoupled)
@@ -207,10 +207,10 @@ add it explicitly.
207
207
  Single line, 80-120 chars:
208
208
 
209
209
  ```
210
- [peaks-solo] swarm 3/3 running | rd-planning 45% (12s ago) | qa-test-cases 30% (5s ago) | ui-design 20% (2s ago)
211
- [peaks-solo] swarm 3/3 running | rd-planning 70% (8s ago) | qa-test-cases 50% (3s ago) | ui-design 30% (6s ago)
210
+ [peaks-code] swarm 3/3 running | rd-planning 45% (12s ago) | qa-test-cases 30% (5s ago) | ui-design 20% (2s ago)
211
+ [peaks-code] swarm 3/3 running | rd-planning 70% (8s ago) | qa-test-cases 50% (3s ago) | ui-design 30% (6s ago)
212
212
  ...
213
- [peaks-solo] swarm 3/3 done
213
+ [peaks-code] swarm 3/3 done
214
214
  ```
215
215
 
216
216
  If a sub-agent has not written a heartbeat in 5 minutes, the poller
@@ -231,7 +231,7 @@ once the poller has read them.
231
231
 
232
232
  - AC-33 `peaks sub-agent heartbeat` CLI primitive (implemented)
233
233
  - AC-34 Dispatch record schema upgrade (`heartbeats[]` + `lastBeatAt` + `status` aggregate, backward-compat defaults)
234
- - AC-35 peaks-solo main loop batch-sync poller (10 s cadence, 5 min stale)
234
+ - AC-35 peaks-code main loop batch-sync poller (10 s cadence, 5 min stale)
235
235
  - AC-36 SKILL.md fan-out sections include heartbeat instruction
236
236
  - AC-37 G6 E2E dogfood (3 heartbeats, 101 → truncated, stale simulation)
237
237
 
@@ -243,7 +243,7 @@ once the poller has read them.
243
243
  - AC-10: dispatch CLI unit tests
244
244
  - AC-11 / AC-11b / AC-11c: E2E dogfood on the live repo
245
245
  - AC-12: `peaks --help` byte-level delta is `+1` line (`sub-agent <cmd>`)
246
- - AC-13..AC-19: SKILL.md fan-out rewrites (peaks-solo 5 spots, peaks-rd 2, peaks-qa 3-way, peaks-ui 1; this reference is the canonical contract)
246
+ - AC-13..AC-19: SKILL.md fan-out rewrites (peaks-code 5 spots, peaks-rd 2, peaks-qa 3-way, peaks-ui 1; this reference is the canonical contract)
247
247
  - AC-22..AC-24: R-2 path guard, prompt size limit, atomic write
248
248
  - AC-25..AC-32: G5 resource lifecycle (RL-1 batch counter, dispatch record schema, reducer dispose, slice archive, cancel dispose)
249
249
  - AC-33..AC-37: G6 heartbeat CLI, schema, poller, status line, E2E
@@ -271,14 +271,14 @@ When writing a SKILL.md that fans out sub-agents:
271
271
  - RD request #009 in-scope files (implementation contract)
272
272
  - `.peaks/memory/sub-agent-resource-lifecycle-red-line.md` (G5 red line)
273
273
  - `.peaks/memory/sub-agent-heartbeat-progress-red-line.md` (G6 red line)
274
- - `skills/peaks-solo/references/swarm-dispatch-contract.md` (predecessor contract)
274
+ - `skills/peaks-code/references/swarm-dispatch-contract.md` (predecessor contract)
275
275
  - `skills/peaks-qa/references/qa-fanout-contract.md` (QA-specific fan-out)
276
276
 
277
277
  ---
278
278
 
279
279
  ### Sub-agent mechanism (IDE-agnostic dispatch, NOT Skill tool)
280
280
 
281
- > Body of `### Sub-agent mechanism`. **Solo is itself a skill running in the current session. To invoke a role in the Swarm, Solo MUST call the IDE-agnostic dispatch primitive `peaks sub-agent dispatch <role>` — NOT the `Skill` tool, NOT any IDE-private sub-agent literal.** The `Skill` tool is single-stack and blocking; using it for "parallel" work was the v1.x illusion of concurrency. The dispatch CLI is the only mechanism that keeps SKILL.md free of IDE-private tool names and lets the same prompt work on every registered IDE.
281
+ > Body of `### Sub-agent mechanism`. **Code is itself a skill running in the current session. To invoke a role in the Swarm, Code MUST call the IDE-agnostic dispatch primitive `peaks sub-agent dispatch <role>` — NOT the `Skill` tool, NOT any IDE-private sub-agent literal.** The `Skill` tool is single-stack and blocking; using it for "parallel" work was the v1.x illusion of concurrency. The dispatch CLI is the only mechanism that keeps SKILL.md free of IDE-private tool names and lets the same prompt work on every registered IDE.
282
282
 
283
283
  Each sub-agent dispatch call looks like:
284
284
 
@@ -304,21 +304,21 @@ The role's required artefact paths (also see peaks-ui/rd/qa SKILL.md and `refere
304
304
  | `rd-planning` | `.peaks/_runtime/<sessionId>/rd/tech-doc.md` (feature/refactor) or `.peaks/_runtime/<sessionId>/rd/bug-analysis.md` (bugfix) | PRD body, project-scan, existing-system, codegraph |
305
305
  | `qa-test-cases` | `.peaks/_runtime/<sessionId>/qa/test-cases/<rid>.md` | PRD body, RD planning artefact, project-scan, codegraph |
306
306
 
307
- **Solo launches all sub-agents in the swarm plan in a single message (multiple `peaks sub-agent dispatch` calls in parallel, each followed by execution of the returned toolCall)** — this is what gives real concurrency. Do not sequentialize them. The CLI returns N toolCall descriptors; the LLM fires all N in the same message; the IDE dispatches them concurrently; Solo then waits for all to return, runs `ls` checks against the paths above (Peaks-Loop Gate B), and only then advances to RD implementation.
307
+ **Code launches all sub-agents in the swarm plan in a single message (multiple `peaks sub-agent dispatch` calls in parallel, each followed by execution of the returned toolCall)** — this is what gives real concurrency. Do not sequentialize them. The CLI returns N toolCall descriptors; the LLM fires all N in the same message; the IDE dispatches them concurrently; Code then waits for all to return, runs `ls` checks against the paths above (Peaks-Loop Gate B), and only then advances to RD implementation.
308
308
 
309
309
  **Hard prohibitions on sub-agents** (also passed in each dispatch prompt):
310
310
 
311
311
  - Do NOT call `Skill(skill="...")` — sub-agents must not recursively activate skills, that defeats the fan-out.
312
- - Do NOT call `peaks skill presence:set` — only the main Solo loop owns `.peaks/.active-skill.json`. Sub-agents write to a per-agent marker file `.peaks/_runtime/<sessionId>/system/sub-agent-<role>.json` if they need to record state, but never the main presence file.
313
- - Do NOT open interactive user prompts. If a sub-agent needs clarification, it must return a `blocked` verdict in its return string and let Solo handle the user message.
314
- - Do NOT commit, push, install hooks, or apply settings.json mutations. Only Solo holds those permissions.
312
+ - Do NOT call `peaks skill presence:set` — only the main Code loop owns `.peaks/.active-skill.json`. Sub-agents write to a per-agent marker file `.peaks/_runtime/<sessionId>/system/sub-agent-<role>.json` if they need to record state, but never the main presence file.
313
+ - Do NOT open interactive user prompts. If a sub-agent needs clarification, it must return a `blocked` verdict in its return string and let Code handle the user message.
314
+ - Do NOT commit, push, install hooks, or apply settings.json mutations. Only Code holds those permissions.
315
315
  - **Reinforced (2026-06-28 incident):** an RD sub-agent silently auto-committed its own diff during a fix-callerid-leak dispatch (commit `bff4dff`). The orchestrator caught the unauthorized commit on the next turn but the user had to manually re-approve. **Every dispatch prompt MUST copy the verbatim block below into its `--prompt` argument** so the sub-agent sees the rule with full weight:
316
316
 
317
317
  ```
318
318
  ## Commit / push policy (verbatim, mandatory)
319
319
  - Do NOT run `git commit`, `git push`, `git tag`, `git checkout -b`, or any
320
320
  state-mutating git command. Leave the diff on disk and return the
321
- diff summary in your final message. The orchestrator (Solo) owns the
321
+ diff summary in your final message. The orchestrator (Code) owns the
322
322
  commit / push decision; it will run `git status` and `git diff` after
323
323
  your return and decide whether to commit.
324
324
  - If you believe a commit is urgent (e.g. emergency hotfix), return
@@ -327,8 +327,8 @@ The role's required artefact paths (also see peaks-ui/rd/qa SKILL.md and `refere
327
327
  ```
328
328
  - **Do write heartbeats** — call `peaks sub-agent heartbeat --record <dispatchRecordPath> --status running --progress <pct> --note "<text>"` at least every 30s (see `references/sub-agent-dispatch.md` §G6 for the full contract). The parent Dispatcher uses these to render the live status line during the wait.
329
329
 
330
- After every sub-agent dispatch returns, Solo **restores presence** once (not per-agent), then continues to Gate B verification:
330
+ After every sub-agent dispatch returns, Code **restores presence** once (not per-agent), then continues to Gate B verification:
331
331
 
332
332
  ```bash
333
- peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-converged
333
+ peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-converged
334
334
  ```
@@ -1,12 +1,12 @@
1
1
  # Swarm dispatch contract
2
2
 
3
- > Reference for `peaks-solo` Swarm phase and the role sub-agents (`peaks-ui` / `peaks-rd` planning / `peaks-qa` test-cases). Defines the **mechanism** of fan-out: how Solo launches sub-agents, what the sub-agent prompt must contain, what the sub-agent must return, and how Solo reduces the result.
3
+ > Reference for `peaks-code` Swarm phase and the role sub-agents (`peaks-ui` / `peaks-rd` planning / `peaks-qa` test-cases). Defines the **mechanism** of fan-out: how Code launches sub-agents, what the sub-agent prompt must contain, what the sub-agent must return, and how Code reduces the result.
4
4
 
5
5
  ## Peaks-Loop Swarm parallel phase (sub-agent fan-out, default)
6
6
 
7
7
  > **Slice 5 (2026-06-23) + slice 2026-06-23-audit-4th #F3:** the
8
8
  > previous "conditional swarm" framing is replaced by the **default
9
- > fan-out rule** in `skills/peaks-solo/SKILL.md` §"Peaks-Loop Default
9
+ > fan-out rule** in `skills/peaks-code/SKILL.md` §"Peaks-Loop Default
10
10
  > sub-agent fan-out". When the slice DAG has ≥ 2 leaves at the same
11
11
  > topological level, dispatch goes through
12
12
  > `peaks sub-agent dispatch --from-dag` (NOT one-at-a-time). The
@@ -18,7 +18,7 @@
18
18
  > `references/fanout-mandatory.md`).
19
19
 
20
20
  The Swarm phase is the **default** for any DAG with ≥ 2 leaves at
21
- the same topological level. Solo derives the fan-out set from the
21
+ the same topological level. Code derives the fan-out set from the
22
22
  DAG topology — not from a default of "always launch three", and
23
23
  not from a strict conditional check. The swarm gate (PRD state +
24
24
  request type + frontend touch), mode-driven fan-out shape, and
@@ -28,10 +28,10 @@ degradation rules live in the references file.
28
28
 
29
29
  The previous "Swarm" used `Skill(skill="peaks-rd")` calls. That is **single-stack and blocking** — there is no concurrency. Three sequential `Skill` calls run in order on the same main loop, not in parallel. The "parallel Agent calls" wording in the old SKILL.md was a v1.x illusion.
30
30
 
31
- This contract (slice #009) replaces the IDE-private sub-agent literal with the IDE-agnostic primitive `peaks sub-agent dispatch <role>`. The CLI returns a JSON `data.toolCall` descriptor; the LLM executes that tool in its own environment. SKILL.md is now free of IDE-private tool names and the same prompt works on every registered IDE. Real concurrent fan-out is achieved by Solo launching N dispatch calls in a single message and the platform scheduling the returned toolCalls concurrently.
31
+ This contract (slice #009) replaces the IDE-private sub-agent literal with the IDE-agnostic primitive `peaks sub-agent dispatch <role>`. The CLI returns a JSON `data.toolCall` descriptor; the LLM executes that tool in its own environment. SKILL.md is now free of IDE-private tool names and the same prompt works on every registered IDE. Real concurrent fan-out is achieved by Code launching N dispatch calls in a single message and the platform scheduling the returned toolCalls concurrently.
32
32
 
33
33
  ```
34
- You are a sub-agent invoked by peaks-solo. You are NOT the main Claude session.
34
+ You are a sub-agent invoked by peaks-code. You are NOT the main Claude session.
35
35
  Your job: execute ONE role from the peaks skill family and write its artefact(s).
36
36
  Return a compact JSON envelope — do not write prose.
37
37
 
@@ -43,7 +43,7 @@ Return a compact JSON envelope — do not write prose.
43
43
  - Do NOT ask the user interactive questions. If you need clarification, return
44
44
  {"status":"blocked","blockedReason":"<text>"} and let the main loop handle it.
45
45
 
46
- ## Runtime arguments (provided by Solo)
46
+ ## Runtime arguments (provided by Code)
47
47
  - project: <repo> (git repo root, NOT a sub-package)
48
48
  - session-id: <sid> (from .peaks/.active-skill.json or .peaks/.session.json)
49
49
  - request-id: <rid> (PRD id)
@@ -52,7 +52,7 @@ Return a compact JSON envelope — do not write prose.
52
52
  - project-scan-path: <path> (read this for component library / CSS / build tool)
53
53
  - existing-system-path: <path> (legacy projects only)
54
54
  - frontendOnly: <bool> (from project-scan)
55
- - frontendKeywordHit: <bool> (Solo's PRD scan result)
55
+ - frontendKeywordHit: <bool> (Code's PRD scan result)
56
56
  ```
57
57
 
58
58
  ### 3.2 peaks-ui sub-agent prompt
@@ -82,7 +82,7 @@ Steps:
82
82
  }
83
83
 
84
84
  If you determine the request is non-visual (no UI surface, no design impact),
85
- return {"status":"skipped","reason":"non-frontend-request"} so Solo can record
85
+ return {"status":"skipped","reason":"non-frontend-request"} so Code can record
86
86
  the misfire in sc/swarm-plan.json.
87
87
  ```
88
88
 
@@ -97,7 +97,7 @@ Steps:
97
97
  1. peaks request init --role rd --id <rid> --project <repo> --apply --type <type> --json
98
98
  2. peaks request show <rid> --role prd --project <repo> --json
99
99
  3. peaks request show <rid> --role ui --project <repo> --json (if ui in plan)
100
- 4. Read <project-scan-path>. If absent and Solo did not pre-create it, create it
100
+ 4. Read <project-scan-path>. If absent and Code did not pre-create it, create it
101
101
  by running `peaks scan archetype --project <repo> --json` and copying the JSON
102
102
  into rd/project-scan.md.
103
103
  5. Read <existing-system-path> if archetype is legacy-*.
@@ -144,13 +144,13 @@ If --type is docs|chore, return {"status":"skipped","reason":"type=<type>"} —
144
144
  no acceptance surface to plan tests for.
145
145
  ```
146
146
 
147
- ## 4. Reducer (Solo side)
147
+ ## 4. Reducer (Code side)
148
148
 
149
- After all sub-agent dispatch calls return and the LLM has invoked the toolCalls, Solo:
149
+ After all sub-agent dispatch calls return and the LLM has invoked the toolCalls, Code:
150
150
 
151
151
  1. Restores presence ONCE (not per-agent):
152
152
  ```
153
- peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-converged
153
+ peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-converged
154
154
  ```
155
155
  2. Runs `ls` checks against `sc/swarm-plan.json` — every promised artefact must exist (Gate B hard). If any are missing, apply the degradation rules in "Degradation when swarm roles fail or are absent" (main SKILL.md).
156
156
  3. Updates `sc/swarm-plan.json` with the final status of each sub-agent (ok / blocked / skipped / error).
@@ -158,26 +158,26 @@ After all sub-agent dispatch calls return and the LLM has invoked the toolCalls,
158
158
 
159
159
  ## 5. Presence restoration (single-shot)
160
160
 
161
- Sub-agents are explicitly forbidden from calling `peaks skill presence:set`. That means `.peaks/.active-skill.json` does not move during the fan-out. Solo sets it to `gate=swarm-fan-out` before fan-out and to `gate=swarm-converged` once after all Tasks return. The status header (the `Peaks-Loop Skill: peaks-solo | Peaks-Loop Gate: <gate>` line) therefore reads consistently across the fan-out window.
161
+ Sub-agents are explicitly forbidden from calling `peaks skill presence:set`. That means `.peaks/.active-skill.json` does not move during the fan-out. Code sets it to `gate=swarm-fan-out` before fan-out and to `gate=swarm-converged` once after all Tasks return. The status header (the `Peaks-Loop Skill: peaks-code | Peaks-Loop Gate: <gate>` line) therefore reads consistently across the fan-out window.
162
162
 
163
- If a sub-agent is misbehaving and writes to `.peaks/.active-skill.json` anyway, the next Solo presence-set (after fan-out) overwrites it — the bug self-heals on the next gate advance, but the swarm-phase display may be off. The hard prohibition is there to prevent this; Solo should still treat the file as a single-writer resource.
163
+ If a sub-agent is misbehaving and writes to `.peaks/.active-skill.json` anyway, the next Code presence-set (after fan-out) overwrites it — the bug self-heals on the next gate advance, but the swarm-phase display may be off. The hard prohibition is there to prevent this; Code should still treat the file as a single-writer resource.
164
164
 
165
165
  ## 6. Why not a `peaks-swarm` skill?
166
166
 
167
- A skill cannot itself trigger sub-agents — the Skill tool runs in the main loop. The orchestrator (peaks-solo) has to be in the main loop and has to call `peaks sub-agent dispatch` directly. Putting swarm logic into a separate skill would either re-introduce the "single-stack blocking" anti-pattern or require a custom slash command that bypasses the Skill tool. The current design keeps swarm control in peaks-solo where it belongs.
167
+ A skill cannot itself trigger sub-agents — the Skill tool runs in the main loop. The orchestrator (peaks-code) has to be in the main loop and has to call `peaks sub-agent dispatch` directly. Putting swarm logic into a separate skill would either re-introduce the "single-stack blocking" anti-pattern or require a custom slash command that bypasses the Skill tool. The current design keeps swarm control in peaks-code where it belongs.
168
168
 
169
169
  ## 7. Tests / dogfood
170
170
 
171
171
  - `peaks scan archetype --project <repo> --json` must keep emitting `frontendOnly` and `frontendOnlyReason`. Both fields are read here and by the existing pre-RD scan contract.
172
172
  - `peaks request show <rid> --role prd --json` must surface the `--type` chosen at `peaks request init`. Sub-agents pass it through unchanged.
173
173
  - `peaks skill presence:set` must remain single-writer-friendly (the sub-agents do not call it).
174
- - Smoke test: a full-auto peaks-solo run on a `legacy-frontend` project with a UI-affecting PRD should produce `sc/swarm-plan.json` containing all three sub-agents and three corresponding artefacts in `ui/`, `rd/`, `qa/`.
174
+ - Smoke test: a full-auto peaks-code run on a `legacy-frontend` project with a UI-affecting PRD should produce `sc/swarm-plan.json` containing all three sub-agents and three corresponding artefacts in `ui/`, `rd/`, `qa/`.
175
175
 
176
176
  ---
177
177
 
178
178
  ### Swarm gate (decide BEFORE fan-out)
179
179
 
180
- > Body of `### Swarm gate`. Before launching any sub-agent, Solo must compute the **swarm plan** from three signals:
180
+ > Body of `### Swarm gate`. Before launching any sub-agent, Code must compute the **swarm plan** from three signals:
181
181
 
182
182
  1. **PRD state** — `prd/requests/<rid>.md` must be in state `confirmed-by-user` or `handed-off`. If not, STOP. The Swarm is downstream of PRD, not a substitute for it.
183
183
  2. **Request type** (`--type` from `peaks request init`):
@@ -188,7 +188,7 @@ A skill cannot itself trigger sub-agents — the Skill tool runs in the main loo
188
188
  - **AND** scanning the PRD body for frontend keywords: 页面 / 组件 / 表单 / 弹窗 / 表格 / 样式 / 布局 / 交互 / UI / UX / page / component / form / modal / table / styling / layout / interaction
189
189
  - UI joins the swarm when (a) is `true` OR (b) matches. Both signals required `false` to skip UI.
190
190
 
191
- Solo records the swarm plan in `.peaks/_runtime/<sessionId>/sc/swarm-plan.json` so SC and TXT can audit what was launched:
191
+ Code records the swarm plan in `.peaks/_runtime/<sessionId>/sc/swarm-plan.json` so SC and TXT can audit what was launched:
192
192
 
193
193
  ```json
194
194
  {
@@ -200,26 +200,26 @@ Solo records the swarm plan in `.peaks/_runtime/<sessionId>/sc/swarm-plan.json`
200
200
  }
201
201
  ```
202
202
 
203
- Sub-agent presence in this list = Solo launched a Task for it. Absence = the role was skipped with documented reason.
203
+ Sub-agent presence in this list = Code launched a Task for it. Absence = the role was skipped with documented reason.
204
204
 
205
205
  ### Mode-driven fan-out shape
206
206
 
207
207
  > Body of `### Mode-driven fan-out shape`.
208
208
 
209
- | Mode | How the swarm plan is decided | What Solo does |
209
+ | Mode | How the swarm plan is decided | What Code does |
210
210
  |---|---|---|
211
211
  | `full-auto` | Compute plan from signals above, no question to user | Auto-launch all sub-agents in the plan in parallel |
212
212
  | `swarm` | Same as `full-auto` | Same as `full-auto` (this profile name is historical — behavior is identical) |
213
213
  | `assisted` | `AskUserQuestion` with three options: (a) Full — UI + RD(planning) + QA(test-cases); (b) Backend-only — RD(planning) + QA(test-cases); (c) Sequential — run RD first, then QA, skip UI | Use the user's choice as the plan |
214
214
  | `strict` | Same as `assisted` (the question is informational; strict still enforces confirmation gates later) | Same as `assisted` |
215
215
 
216
- In all modes, **the plan must be written to `sc/swarm-plan.json` before any Task call.** Solo updates `.peaks/.active-skill.json` to `gate=swarm-fan-out` at this point.
216
+ In all modes, **the plan must be written to `sc/swarm-plan.json` before any Task call.** Code updates `.peaks/.active-skill.json` to `gate=swarm-fan-out` at this point.
217
217
 
218
218
  ### Degradation when swarm roles fail or are absent
219
219
 
220
220
  > Body of `### Degradation when swarm roles fail or are absent`.
221
221
 
222
- | Condition | Solo action | TXT handoff note |
222
+ | Condition | Code action | TXT handoff note |
223
223
  |---|---|---|
224
224
  | UI sub-agent returns blocked/error | RD continues with PRD visual descriptions | `ui-design-missing` |
225
225
  | RD planning sub-agent returns blocked/error | RD continues with PRD-derived planning | `tech-doc-missing` |
@@ -1,11 +1,11 @@
1
1
  # Peaks-Loop Workflow Order + Request Type Classification + Transition Verification Gates
2
2
 
3
- > **Maintenance**: This reference holds the canonical contract for (a) how Solo sequences the 11 workflow steps, (b) which `--type` to pass to `peaks request init` for which slice shape, and (c) the executable `ls` / `grep` gate commands that physically block progression. SKILL.md keeps the narrative ("what peaks-solo does"); this file keeps the contract.
3
+ > **Maintenance**: This reference holds the canonical contract for (a) how Code sequences the 11 workflow steps, (b) which `--type` to pass to `peaks request init` for which slice shape, and (c) the executable `ls` / `grep` gate commands that physically block progression. SKILL.md keeps the narrative ("what peaks-code does"); this file keeps the contract.
4
4
  >
5
5
  > **Why extracted from SKILL.md**: this content is 165 lines of mostly-tabular + bash-block contract — reference data, not orchestration prose. Inlining it bloats SKILL.md past the 800-line cap (per `common/coding-style.md`). The numbers, gate command shapes, and type-classification rules change rarely; the SKILL.md prose around them (orchestration flow, repair-loop intent, swarm fan-out shape) changes more often.
6
6
  >
7
7
  > **How peaks-loop tooling reads this file**:
8
- > - `peaks skill runbook peaks-solo` (CLI) and the in-line LLM reading the SKILL.md should reference this file when the gate-machine or type-classification contract is in play.
8
+ > - `peaks skill runbook peaks-code` (CLI) and the in-line LLM reading the SKILL.md should reference this file when the gate-machine or type-classification contract is in play.
9
9
  > - The test `tests/unit/skill-default-runbook.test.ts` does NOT check this file (it only checks the runbook). Future tests can add a similar fallback for the gates-and-types contract.
10
10
 
11
11
  ## Peaks-Loop Request type classification (MANDATORY before `peaks request init`)
@@ -25,7 +25,7 @@ Before initializing any role artifact, classify the request into exactly one of
25
25
 
26
26
  For ambiguous cases (e.g. "improve login flow"), ask the user to clarify before initializing. The cost of one `AskUserQuestion` round is much lower than running the wrong gate matrix for the whole workflow.
27
27
 
28
- When Peaks-Loop Solo coordinates development in a code repository, keep this order explicit:
28
+ When Peaks-Loop Code coordinates development in a code repository, keep this order explicit:
29
29
 
30
30
  0. **Peaks-Loop Snapshot** — `peaks doctor` + `peaks project dashboard` to capture baseline state before anything else;
31
31
  0.5. **Peaks-Loop Workspace initialization** — `.peaks/_runtime/<session-id>/` created, directory structure verified;
@@ -170,7 +170,7 @@ find . -maxdepth 1 -name "*.png" -o -name "*.jpg" -o -name "qa-*.js" -o -name "m
170
170
  ```bash
171
171
  # After `peaks standards init/update --apply`, verify the files actually landed
172
172
  # at the project root. The CLAUDE.md and rules files are required so that
173
- # subsequent peaks-rd / peaks-qa / peaks-solo runs perform the project-local
173
+ # subsequent peaks-rd / peaks-qa / peaks-code runs perform the project-local
174
174
  # preflight described in CLAUDE.md (read coding-style.md, code-review.md, security.md).
175
175
  ls <repo>/CLAUDE.md
176
176
  # "No such file" → BLOCKED. Run `peaks standards init --project <repo> --apply --json`
@@ -1,17 +1,17 @@
1
- # Peaks Solo Workflow
1
+ # Peaks Code Workflow
2
2
 
3
- Peaks Solo is a facade over role skills. It keeps the workflow moving without absorbing role-specific responsibility.
3
+ Peaks Code is a facade over role skills. It keeps the workflow moving without absorbing role-specific responsibility.
4
4
 
5
5
  ## Modes
6
6
 
7
- - Solo: default, single controller with soft gates.
7
+ - Code: default, single controller with soft gates.
8
8
  - Assisted: role skills contribute artifacts without broad swarm execution.
9
9
  - Swarm: multiple subagents work in parallel when the CLI-managed profile is enabled.
10
10
  - Strict: hook/profile guarded mode for high-risk work.
11
11
 
12
12
  ## Required code workflow evidence
13
13
 
14
- A code workflow is not complete until Solo has linked or summarized:
14
+ A code workflow is not complete until Code has linked or summarized:
15
15
 
16
16
  1. standards preflight;
17
17
  2. PRD/RD scope and OpenSpec artifacts when required;
@@ -31,7 +31,7 @@ For legacy repositories with pre-existing low UT coverage, do not require histor
31
31
 
32
32
  ## RD QA loop
33
33
 
34
- Every RD implementation or repair slice must be followed by QA validation. If QA does not fully pass, Solo routes the report back to RD, then repeats RD repair and QA validation until QA is all green or the workflow is blocked. In full-auto mode, Claude Code's `goal` command may be used to keep the controller objective explicit while Peaks artifacts remain authoritative.
34
+ Every RD implementation or repair slice must be followed by QA validation. If QA does not fully pass, Code routes the report back to RD, then repeats RD repair and QA validation until QA is all green or the workflow is blocked. In full-auto mode, Claude Code's `goal` command may be used to keep the controller objective explicit while Peaks artifacts remain authoritative.
35
35
 
36
36
  ## Capability discovery
37
37