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,7 +1,7 @@
1
- # Solo fast mode (slice 2 — round-trip ≤ 30s)
1
+ # Code fast mode (slice 2 — round-trip ≤ 30s)
2
2
 
3
3
  For hot-fix / small-bug slices where the full 5-step workflow is overkill,
4
- use **fast mode**: `peaks solo plan --fast <change-id>`. Fast mode skips
4
+ use **fast mode**: `peaks code plan --fast <change-id>`. Fast mode skips
5
5
  three steps that dominate cold-start cost:
6
6
 
7
7
  | Step | Default | Fast |
@@ -1,8 +1,8 @@
1
1
  # Peaks-Loop Frontend-only development mode
2
2
 
3
- > Extracted from `skills/peaks-solo/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Frontend-only development mode section that was previously inline; nothing was paraphrased, just relocated.
3
+ > Extracted from `skills/peaks-code/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Frontend-only development mode section that was previously inline; nothing was paraphrased, just relocated.
4
4
 
5
- When the project has no live backend (no swagger.json, no API server), Solo must activate frontend-only mode.
5
+ When the project has no live backend (no swagger.json, no API server), Code must activate frontend-only mode.
6
6
 
7
7
  ### Mode determination (deterministic — CLI is the source of truth)
8
8
 
@@ -11,13 +11,13 @@ The CLI decision is authoritative. Read `frontendOnly` and `frontendOnlyReason`
11
11
  User-stated intent is **only** consulted when it conflicts with the CLI result. The two conflict cases:
12
12
 
13
13
  - **CLI says `frontendOnly=false` but the user says "前端项目 / 没有后端 / 先 mock 数据"**: STOP and `AskUserQuestion` to confirm whether to override the scan (the repo probably contains a backend folder the user wants to ignore). Record the override decision and reason in `project-scan.md`.
14
- - **CLI says `frontendOnly=true` but the user says "需要做后端 / 加 API"**: STOP and `AskUserQuestion` to confirm whether the request actually targets the missing backend (the user may be confused about repo scope, or there is a separate backend repo Solo should switch to).
14
+ - **CLI says `frontendOnly=true` but the user says "需要做后端 / 加 API"**: STOP and `AskUserQuestion` to confirm whether the request actually targets the missing backend (the user may be confused about repo scope, or there is a separate backend repo Code should switch to).
15
15
 
16
16
  When there is no conflict, do not ask — the CLI value wins and the workflow proceeds.
17
17
 
18
18
  ### Mock data strategy selection
19
19
 
20
- Solo records the chosen mock strategy in `.peaks/_runtime/<sessionId>/rd/tech-doc.md` under a `## Mock Data Strategy` section. The choice depends on the project scan results:
20
+ Code records the chosen mock strategy in `.peaks/_runtime/<sessionId>/rd/tech-doc.md` under a `## Mock Data Strategy` section. The choice depends on the project scan results:
21
21
 
22
22
  | Project data-fetching pattern | Recommended mock approach | Rationale |
23
23
  |---|---|---|
@@ -59,15 +59,15 @@ When swagger.json becomes available later, the migration follows this sequence:
59
59
  3. Remove corresponding mock files.
60
60
  4. Run QA regression to verify the real API responses match the mock interface contracts.
61
61
 
62
- Solo records the migration readiness in the TXT handoff capsule under a `## API Migration` section listing: mock file paths, the corresponding swagger endpoints (when known), and the migration status for each.
62
+ Code records the migration readiness in the TXT handoff capsule under a `## API Migration` section listing: mock file paths, the corresponding swagger endpoints (when known), and the migration status for each.
63
63
 
64
64
  ### Feishu document access fallback
65
65
 
66
66
  When the PRD source is a Feishu/Lark document that requires authentication:
67
67
 
68
- 1. **Primary path**: Playwright MCP headed browser → user completes login → Solo reads document content via `browser_snapshot`.
69
- 2. **Fallback A (user cannot login)**: Ask user to copy-paste the document content or export as Markdown/PDF. Solo creates the PRD artifact from the pasted content.
70
- 3. **Fallback B (user provides export)**: User drops a `.md` or `.pdf` export into `.peaks/_runtime/<sessionId>/prd/source/`. Solo reads and processes it.
68
+ 1. **Primary path**: Playwright MCP headed browser → user completes login → Code reads document content via `browser_snapshot`.
69
+ 2. **Fallback A (user cannot login)**: Ask user to copy-paste the document content or export as Markdown/PDF. Code creates the PRD artifact from the pasted content.
70
+ 3. **Fallback B (user provides export)**: User drops a `.md` or `.pdf` export into `.peaks/_runtime/<sessionId>/prd/source/`. Code reads and processes it.
71
71
  4. **Fallback C (none of the above)**: Mark PRD as `blocked` with reason `doc-inaccessible`, list the exact next steps for the user, and pause the workflow.
72
72
 
73
73
  Never silently fall back to unauthenticated `fetch` or `WebFetch` for authenticated documents.
@@ -76,7 +76,7 @@ Never silently fall back to unauthenticated `fetch` or `WebFetch` for authentica
76
76
 
77
77
  ### Frontend-only trigger pre-flight
78
78
 
79
- > Body of `### Frontend-only trigger pre-flight`. Before computing the swarm plan, Solo runs the keyword scan deterministically:
79
+ > Body of `### Frontend-only trigger pre-flight`. Before computing the swarm plan, Code runs the keyword scan deterministically:
80
80
 
81
81
  1. Read `.peaks/_runtime/<sessionId>/prd/requests/<rid>.md` body.
82
82
  2. Lowercase + strip markdown; check regex `\b(页面|组件|表单|弹窗|表格|样式|布局|交互|UI|UX|page|component|form|modal|table|styling|layout|interaction|frontend|前端)\b`.
@@ -84,4 +84,4 @@ Never silently fall back to unauthenticated `fetch` or `WebFetch` for authentica
84
84
  4. If `frontendOnly` (from project-scan) is `true` and no keyword hit → UI joins anyway (frontend-only project, even non-visual changes may need visual sanity for regressions).
85
85
  5. If `frontendOnly` is `false` and no keyword hit → UI skipped.
86
86
 
87
- Solo records the pre-flight result in `sc/swarm-plan.json` so the audit trail shows why UI was or was not included.
87
+ Code records the pre-flight result in `sc/swarm-plan.json` so the audit trail shows why UI was or was not included.
@@ -1,4 +1,4 @@
1
- # Peaks-Loop Solo — Job Loop Deep-Dive
1
+ # Peaks-Loop Code — Job Loop Deep-Dive
2
2
 
3
3
  > Read alongside `SKILL.md` Steps 0.8 / 0.81 / 0.85 / 0.86 / 0.87.
4
4
 
@@ -28,7 +28,7 @@ The workspace initialization creates this structure under `.peaks/`:
28
28
  # --active --json` (and the matching read-only primitives for the
29
29
  # other two) to discover session-id / active-skill / sop-state.
30
30
  .peaks/_runtime/
31
- ├── active-skill.json # orchestrator presence marker (peaks-solo / -rd / -qa / -ui / -sc / -sop / -txt)
31
+ ├── active-skill.json # orchestrator presence marker (peaks-code / -rd / -qa / -ui / -sc / -sop / -txt)
32
32
  ├── session.json # project → session binding (the only single-session source of truth)
33
33
  └── sop-state/ # current phase + history; definitions live globally in ~/.peaks
34
34
 
@@ -50,13 +50,13 @@ system/ # Existing-system extraction output (visual tokens, conventions
50
50
 
51
51
  Files written into these directories during the workflow (not pre-created — they appear as their step runs):
52
52
 
53
- - `rd/project-scan.md` (Solo step 0.6)
53
+ - `rd/project-scan.md` (Code step 0.6)
54
54
  - `rd/tech-doc.md` (feature/refactor planning; required by `rd → implemented` gate)
55
55
  - `rd/bug-analysis.md` (bugfix planning; required by `rd → implemented` gate for `--type bugfix`)
56
56
  - `rd/code-review.md`, `rd/security-review.md` (required by `rd → qa-handoff` gate for feature/bugfix/refactor; security-review only for config)
57
57
  - `rd/mock-plan.md` (frontend-only mode)
58
58
  - `ui/design-draft.md` (UI step)
59
- - `system/existing-system.md` (Solo step 0.7; legacy projects only)
59
+ - `system/existing-system.md` (Code step 0.7; legacy projects only)
60
60
  - `qa/test-cases/<rid>.md`, `qa/test-reports/<rid>.md`, `qa/security-findings.md`, `qa/performance-findings.md` (gated per `--type`)
61
61
 
62
62
  ## Root pollution prohibition (CRITICAL)
@@ -95,7 +95,7 @@ peaks slice check [--rid <rid>] [--project <path>] [--json]
95
95
 
96
96
  4 个 check 全绿 + verify-pipeline pass → 才进 `peaks request transition --state qa-handoff`,让 peaks-qa 接管。
97
97
 
98
- > **新增 run 017(2026-06-09)**:边界默认走 changed-only suite,原来的全 suite 行为移到 `--run-tests` opt-in。`peaks-solo-test` skill 仍然是手动跑全量的入口。rationale: 全量 30s+ 严重拖慢 workflow;changed-only 命中 99% 真正回归。详见 PRD `.peaks/_runtime/2026-06-07-session-84feb7/prd/requests/002-017-2026-06-09-remove-auto-full-vitest-from-slice-check.md`。
98
+ > **新增 run 017(2026-06-09)**:边界默认走 changed-only suite,原来的全 suite 行为移到 `--run-tests` opt-in。`peaks-test` skill 仍然是手动跑全量的入口。rationale: 全量 30s+ 严重拖慢 workflow;changed-only 命中 99% 真正回归。详见 PRD `.peaks/_runtime/2026-06-07-session-84feb7/prd/requests/002-017-2026-06-09-remove-auto-full-vitest-from-slice-check.md`。
99
99
 
100
100
  ## Micro-cycle → 边界 check → QA 的串联
101
101
 
@@ -131,21 +131,21 @@ verdict=return-to-rd → RD 修 (new slice 内部走 micro-cycle)
131
131
 
132
132
  | 阶段 | 谁负责 | 节奏 |
133
133
  |---|---|---|
134
- | RD slice 内部 | peaks-solo (main loop) | micro-cycle(5-10s 一个) |
135
- | RD slice 边界 | peaks-solo 调用 `peaks slice check` | 一次 |
134
+ | RD slice 内部 | peaks-code (main loop) | micro-cycle(5-10s 一个) |
135
+ | RD slice 边界 | peaks-code 调用 `peaks slice check` | 一次 |
136
136
  | QA test execution | peaks-qa (sub-agent or inline) | slice 级 |
137
137
  | 3-way fan-out (CR + sec + perf) | peaks-rd (sub-agent) | slice 级(RD 内部一次 + 边界 check 一次) |
138
138
  | TXT handoff | peaks-txt | slice 级 |
139
139
  | SC commit-boundaries | peaks-sc | slice 级 |
140
140
 
141
- ## 为什么这套比当前 peaks-solo 的设计合理
141
+ ## 为什么这套比当前 peaks-code 的设计合理
142
142
 
143
143
  - **快**:micro-cycle ~100ms(vs 30s 全 suite),改 10 个 bug 从 5 分钟降到 30 秒
144
144
  - **稳**:边界 check 不省,4 项检查(tsc + vitest run --changed + 3-way + verify-pipeline)一次全跑;changed-only 模式 1-3s 内出结果,全量用 `--run-tests` opt-in
145
145
  - **清晰**:LLM 看到一个 explicit "禁止" 列表 + 强制 sequence,比"建议"更不容易越界
146
146
  - **可观测**:micro-cycle 走单测 → 边界跑 verify-pipeline,每步都有 JSON envelope 验证
147
147
 
148
- ## 跟 peaks-solo SKILL.md 的对账
148
+ ## 跟 peaks-code SKILL.md 的对账
149
149
 
150
150
  - `peaks slice check` = 边界命令
151
151
  - micro-cycle = slice 内部
@@ -171,34 +171,34 @@ verdict=return-to-rd → RD 修 (new slice 内部走 micro-cycle)
171
171
  >
172
172
  > When PRD lands, classify the request type before running `peaks request init` for every role — pass `--type <type>` so the artifact records it and downstream transitions enforce the right gates. Misclassifying a feature as `docs` to skip gates is a workflow violation. If a transition fails with `code: PREREQUISITES_MISSING`, the response lists every missing path — produce them, then re-transition. For one-off exceptions, the escape hatch `--allow-incomplete --reason "<text>"` records the bypass in the artifact transition note.
173
173
 
174
- After `peaks-rd` finishes any implementation, repair, or code-output slice, Peaks-Loop Solo MUST automatically route the result to `peaks-qa` without waiting for user confirmation. This is not optional in full-auto mode. Solo must not declare the workflow complete, emit a TXT handoff, or stop at RD completion.
174
+ After `peaks-rd` finishes any implementation, repair, or code-output slice, Peaks-Loop Code MUST automatically route the result to `peaks-qa` without waiting for user confirmation. This is not optional in full-auto mode. Code must not declare the workflow complete, emit a TXT handoff, or stop at RD completion.
175
175
 
176
- **How Solo invokes another role (mechanism, not metaphor):**
176
+ **How Code invokes another role (mechanism, not metaphor):**
177
177
 
178
- Solo is itself a skill running in the current session. There are **two distinct mechanisms** in this skill, and they MUST NOT be confused:
178
+ Code is itself a skill running in the current session. There are **two distinct mechanisms** in this skill, and they MUST NOT be confused:
179
179
 
180
180
  1. **Swarm fan-out (planning side, after PRD confirmed)** — uses `peaks sub-agent dispatch <role>` to launch real concurrent sub-agents. The CLI returns a per-IDE tool-call descriptor that the LLM executes in its environment. See "Peaks-Loop Swarm parallel phase" above for the full contract. Sub-agents do NOT call Skill(...) back into the role; they execute the role's instructions inline from the prompt.
181
- 2. **Sequential handoff (execution side, RD↔QA repair loop)** — Solo is the only loop, and after RD or QA finishes (whether as a sub-agent or directly), Solo drives the next step from the orchestrator seat. Do NOT use the `Skill` tool to "reactivate" peaks-rd or peaks-qa in the main loop; doing so is the v1.x anti-pattern that masqueraded as "calling the role" but actually just re-prompted the same session. From v1.3 onward, the main loop drives roles via the CLI gate (`peaks request transition`) and reads back artefacts (`peaks request show ... --json`); the actual RD/QA work is either done inline by Solo (when Solo has just been re-invoked by the user) or by a Task sub-agent (in swarm mode).
181
+ 2. **Sequential handoff (execution side, RD↔QA repair loop)** — Code is the only loop, and after RD or QA finishes (whether as a sub-agent or directly), Code drives the next step from the orchestrator seat. Do NOT use the `Skill` tool to "reactivate" peaks-rd or peaks-qa in the main loop; doing so is the v1.x anti-pattern that masqueraded as "calling the role" but actually just re-prompted the same session. From v1.3 onward, the main loop drives roles via the CLI gate (`peaks request transition`) and reads back artefacts (`peaks request show ... --json`); the actual RD/QA work is either done inline by Code (when Code has just been re-invoked by the user) or by a Task sub-agent (in swarm mode).
182
182
 
183
- After RD completes (whether inline or sub-agent), Solo does not stop — it must advance to QA. There is no "RD done, ask the user" state in full-auto mode. The only valid stops are: (a) QA verdict=pass, (b) repair cap hit, (c) explicit user cancel.
183
+ After RD completes (whether inline or sub-agent), Code does not stop — it must advance to QA. There is no "RD done, ask the user" state in full-auto mode. The only valid stops are: (a) QA verdict=pass, (b) repair cap hit, (c) explicit user cancel.
184
184
 
185
- **RD's internal reviews are already parallelized.** When RD finishes implementation, it issues a 3-way sub-agent fan-out (code-review + security-review + perf-baseline, see `skills/peaks-rd/SKILL.md` "Parallel review fan-out") and waits for all to return before transitioning to `qa-handoff`. Solo does NOT need to track three separate RD-side sub-runs; the RD role owns the fan-out lifecycle end-to-end. Solo's presence restoration after the swarm converges is the only coordination point.
185
+ **RD's internal reviews are already parallelized.** When RD finishes implementation, it issues a 3-way sub-agent fan-out (code-review + security-review + perf-baseline, see `skills/peaks-rd/SKILL.md` "Parallel review fan-out") and waits for all to return before transitioning to `qa-handoff`. Code does NOT need to track three separate RD-side sub-runs; the RD role owns the fan-out lifecycle end-to-end. Code's presence restoration after the swarm converges is the only coordination point.
186
186
 
187
- **Presence restoration after RD/QA work returns (MANDATORY):** In v1.x, role skills called `peaks skill presence:set <role>` internally and stomped on `.peaks/.active-skill.json`. From v1.3 onward, sub-agents in the Swarm path are forbidden from calling `peaks skill presence:set` (see "Sub-agent dispatch" in each role's SKILL.md), so the main loop's presence file is preserved across the fan-out window by construction. The one place Solo still has to actively restore presence is **once after the fan-out returns** (gate=swarm-converged) and again **after each RD↔QA repair iteration** (gate=repair-cycle-<N>). Use the same command from Step 2 with the current mode and the gate that has just advanced:
187
+ **Presence restoration after RD/QA work returns (MANDATORY):** In v1.x, role skills called `peaks skill presence:set <role>` internally and stomped on `.peaks/.active-skill.json`. From v1.3 onward, sub-agents in the Swarm path are forbidden from calling `peaks skill presence:set` (see "Sub-agent dispatch" in each role's SKILL.md), so the main loop's presence file is preserved across the fan-out window by construction. The one place Code still has to actively restore presence is **once after the fan-out returns** (gate=swarm-converged) and again **after each RD↔QA repair iteration** (gate=repair-cycle-<N>). Use the same command from Step 2 with the current mode and the gate that has just advanced:
188
188
 
189
189
  ```bash
190
- peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate <current-gate>
190
+ peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate <current-gate>
191
191
  ```
192
192
 
193
- This keeps the CLAUDE.md status header accurate (`Peaks-Loop Skill: peaks-solo`) instead of showing a stale role name. Use the current mode and gate values; the gate may have advanced since startup. Skipping this step causes the header to display the last-known gate permanently.
193
+ This keeps the CLAUDE.md status header accurate (`Peaks-Loop Skill: peaks-code`) instead of showing a stale role name. Use the current mode and gate values; the gate may have advanced since startup. Skipping this step causes the header to display the last-known gate permanently.
194
194
 
195
- **Full-auto auto-proceed rule**: In the `full-auto` profile, when RD transitions to `qa-handoff`, Solo immediately drives QA — by launching a `peaks sub-agent dispatch qa` sub-agent carrying the `peaks-qa` body (swarm path), then executing the returned toolCall, or by running QA inline in the main loop (assisted/strict path). Do not pause, do not ask the user, do not summarize RD results as if they were final. The only valid reason to skip QA is when `--type` is `docs` or `chore` (no acceptance surface).
195
+ **Full-auto auto-proceed rule**: In the `full-auto` profile, when RD transitions to `qa-handoff`, Code immediately drives QA — by launching a `peaks sub-agent dispatch qa` sub-agent carrying the `peaks-qa` body (swarm path), then executing the returned toolCall, or by running QA inline in the main loop (assisted/strict path). Do not pause, do not ask the user, do not summarize RD results as if they were final. The only valid reason to skip QA is when `--type` is `docs` or `chore` (no acceptance surface).
196
196
 
197
197
  A QA report with any failing, blocked, missing, or unverified acceptance item is not a pass.
198
198
 
199
- **How Solo routes QA findings back to RD (mechanism, not metaphor):**
199
+ **How Code routes QA findings back to RD (mechanism, not metaphor):**
200
200
 
201
- When `peaks-qa` returns `verdict=return-to-rd`, Solo does NOT manually rewrite RD artifacts. Instead it follows this exact sequence:
201
+ When `peaks-qa` returns `verdict=return-to-rd`, Code does NOT manually rewrite RD artifacts. Instead it follows this exact sequence:
202
202
 
203
203
  1. Read the QA verdict and findings via `peaks request show <rid> --role qa --project <repo> --json`. The findings live in the QA artifact body (failing acceptance items, evidence paths, severity).
204
204
  2. Transition the RD artifact back from `qa-handoff` to a working state and record the QA verdict in the transition note:
@@ -209,15 +209,15 @@ When `peaks-qa` returns `verdict=return-to-rd`, Solo does NOT manually rewrite R
209
209
  ```
210
210
  `spec-locked` is the canonical "needs more RD work" state. The reason is mandatory in repair cycles so the artifact history shows the loop.
211
211
  3. Re-launch `peaks-rd` work. Two paths, mode-driven:
212
- - **Swarm / full-auto**: launch a fresh `peaks sub-agent dispatch rd` sub-agent (then execute the returned toolCall) with the same `peaks-rd` body used in the Swarm phase, plus the QA findings path so it can read the failure list. Solo restores presence after the sub-agent returns.
213
- - **Assisted / strict / inline-fallback**: Solo executes the RD repair steps directly in the main loop, since there is no concurrent fan-out to coordinate.
212
+ - **Swarm / full-auto**: launch a fresh `peaks sub-agent dispatch rd` sub-agent (then execute the returned toolCall) with the same `peaks-rd` body used in the Swarm phase, plus the QA findings path so it can read the failure list. Code restores presence after the sub-agent returns.
213
+ - **Assisted / strict / inline-fallback**: Code executes the RD repair steps directly in the main loop, since there is no concurrent fan-out to coordinate.
214
214
  In both paths, pass the QA findings path so the repair sees what failed.
215
215
  4. peaks-rd fixes the reported issues only (red-line scope: do not modify unrelated surfaces), regenerates code-review and security-review evidence if changes touched reviewed surfaces, then transitions `rd → implemented → qa-handoff` again.
216
- 5. Solo re-runs QA (sub-agent Task in swarm/full-auto, inline in assisted/strict) with the same `<request-id>`. QA re-runs gates against the new diff.
216
+ 5. Code re-runs QA (sub-agent Task in swarm/full-auto, inline in assisted/strict) with the same `<request-id>`. QA re-runs gates against the new diff.
217
217
  6. Repeat steps 1-5 until QA returns `verdict=pass`, or the cap below fires.
218
- **After each repair iteration** (after peaks-rd and peaks-qa both return), Solo MUST restore presence:
218
+ **After each repair iteration** (after peaks-rd and peaks-qa both return), Code MUST restore presence:
219
219
  ```bash
220
- peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate repair-cycle-<N>
220
+ peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate repair-cycle-<N>
221
221
  ```
222
222
 
223
223
  **Repair cycle cap**: After 3 repair cycles without a passing QA verdict, emit a blocked TXT handoff regardless of remaining issues. Do not loop indefinitely. If a specific issue cannot be resolved within 3 cycles, mark it as a known blocker in the TXT handoff and proceed to the SC phase.
@@ -297,7 +297,7 @@ reasons array preserved verbatim.
297
297
 
298
298
  ### Runbook integration
299
299
 
300
- When the peaks-solo main loop sees `qa verdict != pass` or any audit
300
+ When the peaks-code main loop sees `qa verdict != pass` or any audit
301
301
  prereq missing, the runbook now does:
302
302
 
303
303
  1. Call `aggregateVerdict({ security, perf, karpathy, mut, qa })` with
@@ -8,19 +8,19 @@
8
8
 
9
9
  Defect A (from PRD-002, 2026-06-28 session 88b27d):
10
10
 
11
- 1. session A runs in `full-auto` → `peaks skill presence:set peaks-solo --mode full-auto --gate startup` stamps
11
+ 1. session A runs in `full-auto` → `peaks skill presence:set peaks-code --mode full-auto --gate startup` stamps
12
12
  `.peaks/_runtime/active-skill.json` with `outerSessionId=outer-A`.
13
13
  2. session A closes (Claude window quit).
14
14
  3. session B opens (a new Claude window, `outerSessionId=outer-B`).
15
15
  4. `peaks skill presence:get --project <path>` still returns `mode=full-auto` because the file is on disk.
16
- 5. peaks-solo Step 1 reads the presence, sees `mode=full-auto`, **skips** AskUserQuestion.
16
+ 5. peaks-code Step 1 reads the presence, sees `mode=full-auto`, **skips** AskUserQuestion.
17
17
  6. The user never picked `full-auto` for THIS session — the mode was sticky from the previous one.
18
18
 
19
19
  The fix: presence is only authoritative when its `outerSessionId` matches the current outer session. Otherwise Step 1 must re-ask.
20
20
 
21
21
  ## Detection protocol
22
22
 
23
- Before deciding to skip Step 1's AskUserQuestion, the LLM driver (or any peaks-solo caller) MUST run:
23
+ Before deciding to skip Step 1's AskUserQuestion, the LLM driver (or any peaks-code caller) MUST run:
24
24
 
25
25
  ```bash
26
26
  peaks skill presence:check-stale --project <path> --json
@@ -35,7 +35,7 @@ The CLI returns a JSON envelope of shape:
35
35
  "data": {
36
36
  "stale": true,
37
37
  "reason": "outer-session-mismatch",
38
- "presence": { "skill": "peaks-solo", "mode": "full-auto", "outerSessionId": "outer-A", ... },
38
+ "presence": { "skill": "peaks-code", "mode": "full-auto", "outerSessionId": "outer-A", ... },
39
39
  "currentOuterSessionId": "outer-B",
40
40
  "recordedOuterSessionId": "outer-A"
41
41
  },
@@ -62,14 +62,14 @@ peaks skill presence --check-stale --project <path> --json
62
62
 
63
63
  Returns the same `stale` / `reason` / `currentOuterSessionId` / `recordedOuterSessionId` fields attached to the standard presence envelope. Default `false` (back-compat).
64
64
 
65
- ## Pause integration via `peaks solo should-pause`
65
+ ## Pause integration via `peaks code should-pause`
66
66
 
67
- `peaks solo should-pause --step step-1-mode-select --mode <mode>` now consults `presence:check-stale` automatically. When stale:
67
+ `peaks code should-pause --step step-1-mode-select --mode <mode>` now consults `presence:check-stale` automatically. When stale:
68
68
 
69
69
  ```json
70
70
  {
71
71
  "ok": true,
72
- "command": "solo.should-pause",
72
+ "command": "code.should-pause",
73
73
  "data": {
74
74
  "shouldPause": true,
75
75
  "reason": "stale-presence — re-ask Step 1 (recorded outer session id does not match current)",
@@ -79,11 +79,11 @@ Returns the same `stale` / `reason` / `currentOuterSessionId` / `recordedOuterSe
79
79
  }
80
80
  ```
81
81
 
82
- The hard-pause on `step-1-mode-select` is preserved for ALL modes (defect #1 fix from slice 2026-06-28-solo-mode-bypass-fix). Stale-presence is an additional reason — even when the user names a profile explicitly, peaks-solo can still surface the staleness for visibility.
82
+ The hard-pause on `step-1-mode-select` is preserved for ALL modes (defect #1 fix from slice 2026-06-28-code-mode-bypass-fix). Stale-presence is an additional reason — even when the user names a profile explicitly, peaks-code can still surface the staleness for visibility.
83
83
 
84
84
  ## Auto-clear on session rotation
85
85
 
86
- `peaks workspace init` now calls `clearStalePresenceOnRotation` whenever an `outer-session-mismatch` rotation fires. This means in the COMMON path (user reopens Claude → peaks-solo auto-runs `peaks workspace init` → rotation clears the stale presence → Step 1 reads no-presence → re-ask). The check-stale CLI is the safety net for the rare case where rotation was suppressed (`--no-rotate-on-outer-mismatch`).
86
+ `peaks workspace init` now calls `clearStalePresenceOnRotation` whenever an `outer-session-mismatch` rotation fires. This means in the COMMON path (user reopens Claude → peaks-code auto-runs `peaks workspace init` → rotation clears the stale presence → Step 1 reads no-presence → re-ask). The check-stale CLI is the safety net for the rare case where rotation was suppressed (`--no-rotate-on-outer-mismatch`).
87
87
 
88
88
  The auto-clear respects two guards so it never destroys a user-explicit mode:
89
89
 
@@ -92,27 +92,27 @@ The auto-clear respects two guards so it never destroys a user-explicit mode:
92
92
 
93
93
  ## Worked example (the 88b27d defect)
94
94
 
95
- Session A: `peaks skill presence:set peaks-solo --mode full-auto` (outer A).
95
+ Session A: `peaks skill presence:set peaks-code --mode full-auto` (outer A).
96
96
  Session A closes. Session B starts (outer B).
97
97
 
98
98
  ```bash
99
- # 1. Run init (the common entry into peaks-solo).
99
+ # 1. Run init (the common entry into peaks-code).
100
100
  peaks workspace init --project . --json
101
101
  # → auto-rotates session binding AND auto-clears stale presence
102
102
  # nextActions: ["Auto-cleared stale skill presence ..."]
103
103
  # data.rotation: { previousSessionId: "session-A", reason: "outer-session-mismatch" }
104
104
 
105
- # 2. peaks-solo Step 1 (was: skip AskUserQuestion because presence.mode=full-auto).
105
+ # 2. peaks-code Step 1 (was: skip AskUserQuestion because presence.mode=full-auto).
106
106
  # Now: presence is gone → no-presence → AskUserQuestion fires.
107
107
 
108
108
  peaks skill presence:check-stale --project . --json
109
109
  # → { stale: true, reason: "no-presence", presence: null }
110
110
 
111
- peaks solo should-pause --step step-1-mode-select --mode full-auto --json
111
+ peaks code should-pause --step step-1-mode-select --mode full-auto --json
112
112
  # → { shouldPause: true, reason: "step=step-1-mode-select is a mode/context-selection step → always pause" }
113
113
 
114
114
  # 3. User picks a profile (or repeats "full-auto"). Then:
115
- peaks skill presence:set peaks-solo --mode full-auto --gate startup
115
+ peaks skill presence:set peaks-code --mode full-auto --gate startup
116
116
  # → re-stamps with outer=B. Future sessions that read this presence
117
117
  # see outerSessionId=outer-B matching THEIR outer=B → not stale.
118
118
  ```
@@ -120,5 +120,5 @@ peaks skill presence:set peaks-solo --mode full-auto --gate startup
120
120
  ## ACL — what NOT to do
121
121
 
122
122
  - **NEVER** skip Step 1 just because `.peaks/_runtime/active-skill.json` shows a `mode` field. Run `presence:check-stale` first.
123
- - **NEVER** call `peaks skill presence:clear` from peaks-solo to "fix" a stale mode. The auto-clear path is `peaks workspace init`'s job; manual clears destroy user-explicit mode choices that may belong to another live outer session.
124
- - **NEVER** set the presence `mode` field from inside a sub-agent (peaks-rd, peaks-qa, etc.). Sub-agents may read presence to honour the user's chosen mode but the write authority for Step 1 belongs to the peaks-solo driver.
123
+ - **NEVER** call `peaks skill presence:clear` from peaks-code to "fix" a stale mode. The auto-clear path is `peaks workspace init`'s job; manual clears destroy user-explicit mode choices that may belong to another live outer session.
124
+ - **NEVER** set the presence `mode` field from inside a sub-agent (peaks-rd, peaks-qa, etc.). Sub-agents may read presence to honour the user's chosen mode but the write authority for Step 1 belongs to the peaks-code driver.
@@ -1,13 +1,13 @@
1
1
  # Step 1 — Mode selection
2
2
 
3
- > Body of `### Peaks-Loop Step 1`. After Step 0 has anchored the workspace and presence, when the user invokes Peaks-Loop Solo without explicitly naming an execution profile, use `AskUserQuestion` to pick the profile. Present the recommended full-auto path as the first/default option with a practical description for each:
3
+ > Body of `### Peaks-Loop Step 1`. After Step 0 has anchored the workspace and presence, when the user invokes Peaks-Loop Code without explicitly naming an execution profile, use `AskUserQuestion` to pick the profile. Present the recommended full-auto path as the first/default option with a practical description for each:
4
4
 
5
5
  1. **Full auto (Recommended)** — Peaks-Loop handles planning, role coordination, validation, and compact handoff end-to-end while preserving required confirmation gates for risky or shared-state actions.
6
6
  2. **Assisted** — Peaks-Loop proposes plans, artifacts, and checks, then pauses for user decisions at major workflow boundaries.
7
7
  3. **Swarm** — Peaks-Loop maximizes safe parallel role/worker execution for larger RD or QA workloads while keeping reducer validation and artifact boundaries explicit.
8
8
  4. **Strict** — Peaks-Loop uses the most conservative gates: explicit confirmations, strict slice specs, coverage evidence, QA acceptance, and commit boundaries before continuing.
9
9
 
10
- Map the user's selection to the `--mode` flag value (used by `peaks skill presence:set`; `presence:set --mode` accepts any string, so the name matches the user-facing label rather than overloading "solo" which is also the skill name):
10
+ Map the user's selection to the `--mode` flag value (used by `peaks skill presence:set`; `presence:set --mode` accepts any string, so the name matches the user-facing label rather than overloading "code" which is also the skill name):
11
11
 
12
12
  | User selects | `--mode` value |
13
13
  |---|---|
@@ -16,6 +16,6 @@ Map the user's selection to the `--mode` flag value (used by `peaks skill presen
16
16
  | Swarm | `swarm` |
17
17
  | Strict | `strict` |
18
18
 
19
- > Note: `peaks workflow route --mode solo|team` is a **different** CLI dimension (solo developer vs team flow) and is unrelated to the profile choice here. Do not conflate them.
19
+ > Note: `peaks workflow route --mode code|team` is a **different** CLI dimension (code developer vs team flow) and is unrelated to the profile choice here. Do not conflate them.
20
20
 
21
- If the user already names a profile in their invocation (e.g. `/peaks-solo --full-auto`, "用全自动模式"), skip this question and use the named profile directly.
21
+ If the user already names a profile in their invocation (e.g. `/peaks-code --full-auto`, "用全自动模式"), skip this question and use the named profile directly.
@@ -1,6 +1,6 @@
1
- # OpenSpec Lifecycle for Peaks Solo
1
+ # OpenSpec Lifecycle for Peaks Code
2
2
 
3
- Peaks Solo orchestrates RD, QA, and SC. When the target repository uses OpenSpec, Solo must drive the full lifecycle through the Peaks CLI so each role works against the same stable surface.
3
+ Peaks Code orchestrates RD, QA, and SC. When the target repository uses OpenSpec, Code must drive the full lifecycle through the Peaks CLI so each role works against the same stable surface.
4
4
 
5
5
  > **Slice #016 (2026-06-09)**: this document used to live at `openspec-mcp-workflow.md` and contained a section on the `peaks mcp *` lifecycle. The MCP subsystem was retired in slice #016; that section is gone. The OpenSpec lifecycle described below is unchanged.
6
6
 
@@ -8,23 +8,23 @@ Peaks Solo orchestrates RD, QA, and SC. When the target repository uses OpenSpec
8
8
 
9
9
  ```text
10
10
  peaks openspec render → RD authors a change pack (dry-run, then --apply)
11
- peaks openspec validate → Solo gates RD output before slicing starts
11
+ peaks openspec validate → Code gates RD output before slicing starts
12
12
  peaks openspec show → any role reads parsed proposal/tasks state
13
13
  peaks openspec to-rd → RD projects the pack into refactor slice input
14
14
  SC projects it into commit boundary candidates
15
15
  peaks openspec validate → QA gates the final state before sign-off
16
- peaks openspec archive → Solo moves the change under changes/archive/<id>/
16
+ peaks openspec archive → Code moves the change under changes/archive/<id>/
17
17
  ```
18
18
 
19
- Rules Solo applies:
19
+ Rules Code applies:
20
20
 
21
21
  - `render --apply` is the only Peaks-managed way to write a change pack. Other roles must not hand-edit `openspec/changes/**`.
22
22
  - `validate` is run twice per change in a refactor flow: once before slicing (RD entry gate) and once before archive (QA exit gate). Both must end with `data.valid === true`.
23
- - `archive --apply` is the lifecycle terminator; Solo only invokes it after QA acceptance and SC commit.
23
+ - `archive --apply` is the lifecycle terminator; Code only invokes it after QA acceptance and SC commit.
24
24
 
25
25
  ## Refactor workflow wiring
26
26
 
27
- For `peaks-solo refactor` runs against a repository with `openspec/`:
27
+ For `peaks-code refactor` runs against a repository with `openspec/`:
28
28
 
29
29
  1. RD entry gate — `peaks openspec validate <id>` must pass and `peaks openspec to-rd <id>` must return `acceptance.length > 0`.
30
30
  2. Each slice must reference one OpenSpec tasks section as its commit boundary (per `references/openspec-commit-boundaries.md` in peaks-sc).
@@ -35,27 +35,27 @@ If the consuming LLM needs an MCP server for docs lookup or research (e.g. Conte
35
35
 
36
36
  ## Boundary
37
37
 
38
- Solo must not write `openspec/changes/**` or `~/.claude/settings.json` directly. Every mutation goes through the CLI commands above. The CLI returns stable envelopes; Solo captures them as artifact links rather than re-explaining their content in the handoff.
38
+ Code must not write `openspec/changes/**` or `~/.claude/settings.json` directly. Every mutation goes through the CLI commands above. The CLI returns stable envelopes; Code captures them as artifact links rather than re-explaining their content in the handoff.
39
39
 
40
40
  ---
41
41
 
42
42
  # Step 0.5 — OpenSpec first-run opt-in (conditional)
43
43
 
44
- > Body of `### Peaks-Loop Step 0.5`. After the workspace is anchored, before project scan, Solo checks whether
44
+ > Body of `### Peaks-Loop Step 0.5`. After the workspace is anchored, before project scan, Code checks whether
45
45
  the project already has an `openspec/` directory. The lifecycle
46
46
  (`render → validate → show → to-rd → validate → archive`) only applies
47
47
  when `openspec/` exists; without it, RD/QA/SC silently skip the
48
48
  openspec-aware paths and you lose change-proposal tracking, commit
49
49
  boundaries from `tasks.md`, and the historical archive.
50
50
 
51
- To make that opt-in visible instead of silent, Solo runs:
51
+ To make that opt-in visible instead of silent, Code runs:
52
52
 
53
53
  ```bash
54
54
  # 1. Detect whether the project already has openspec/.
55
55
  ls <repo>/openspec/changes 2>&1
56
- # 2. If absent, ask the user once — only on the first Solo run in this
56
+ # 2. If absent, ask the user once — only on the first Code run in this
57
57
  # project. The decision is sticky: write it to .peaks/.peaks-openspec-opt-in.json
58
- # so subsequent Solo invocations do not re-ask.
58
+ # so subsequent Code invocations do not re-ask.
59
59
  test -f <repo>/.peaks/.peaks-openspec-opt-in.json || \
60
60
  echo "{\"enabled\": <bool>}" > <repo>/.peaks/.peaks-openspec-opt-in.json
61
61
  ```
@@ -65,11 +65,11 @@ file is missing):
65
65
 
66
66
  | Option | What it does |
67
67
  |---|---|
68
- | Enable OpenSpec for this project (Recommended) | Run `peaks openspec init --project <repo> --apply`. After that, every Solo run uses the change-proposal lifecycle for the same project. |
69
- | Skip for now | Do nothing. Solo proceeds without openspec; the question is re-asked on the next first-run detection. |
70
- | Never ask again for this project | Write `{enabled: false, sticky: true}`. Solo stops asking. The user can re-enable later by removing `.peaks/.peaks-openspec-opt-in.json` and re-running. |
68
+ | Enable OpenSpec for this project (Recommended) | Run `peaks openspec init --project <repo> --apply`. After that, every Code run uses the change-proposal lifecycle for the same project. |
69
+ | Skip for now | Do nothing. Code proceeds without openspec; the question is re-asked on the next first-run detection. |
70
+ | Never ask again for this project | Write `{enabled: false, sticky: true}`. Code stops asking. The user can re-enable later by removing `.peaks/.peaks-openspec-opt-in.json` and re-running. |
71
71
 
72
- The first option is the recommended default because it gives Solo the
72
+ The first option is the recommended default because it gives Code the
73
73
  full change-proposal lifecycle (proposal / tasks / design / specs
74
74
  deltas, archive on ship, commit boundaries from `tasks.md`). It costs
75
75
  only a single scaffolded directory and pays back the first time the
@@ -77,5 +77,5 @@ project needs a real review trail.
77
77
 
78
78
  If the user picks "Enable", the only required follow-up is to make
79
79
  sure `openspec/changes/` is added to git (it is part of the project
80
- repo, not a tool-managed artefact). Solo does not run `git add` for
80
+ repo, not a tool-managed artefact). Code does not run `git add` for
81
81
  the user; that is the user's commit boundary.
@@ -27,7 +27,7 @@ checkpoint as often as it wants.
27
27
  > does **not** expose a `--periodic-every <n>` override flag — the
28
28
  > cadence is owned by the skill, not the CLI. Any patch that relaxes
29
29
  > this must update both files in lockstep or fail the
30
- > `tests/unit/solo/checkpoint-periodic-frequency.test.ts` guard.
30
+ > `tests/unit/code/checkpoint-periodic-frequency.test.ts` guard.
31
31
 
32
32
  ## Checkpoint CLI contract
33
33
 
@@ -72,10 +72,10 @@ This step is strictly IDE-agnostic. The LLM calls the peaks CLI; no IDE-specific
72
72
 
73
73
  ## Companion surface — auto-compact (zero-pause)
74
74
 
75
- When the runner crosses the v2.13.0 auto-compact thresholds (0.85 pre-compact / 0.95 red-line), `peaks session checkpoint` is NOT enough on its own — the LLM must also fire `peaks solo auto-compact --execute` (or wait for the in-band PreToolUse hook at ratio ≥ 0.95 to compact the runner itself). See:
75
+ When the runner crosses the v2.13.0 auto-compact thresholds (0.85 pre-compact / 0.95 red-line), `peaks session checkpoint` is NOT enough on its own — the LLM must also fire `peaks code auto-compact --execute` (or wait for the in-band PreToolUse hook at ratio ≥ 0.95 to compact the runner itself). See:
76
76
 
77
- - `peaks solo auto-compact --execute` — orchestrator that writes the convergence plan + dispatches the compact pathway
77
+ - `peaks code auto-compact --execute` — orchestrator that writes the convergence plan + dispatches the compact pathway
78
78
  - `peaks session auto-compact-hook` — the PreToolUse hook entrypoint fired by `.claude/settings.local.json` (slice 2026-07-02-auto-compact-zero-pause)
79
79
  - `.peaks/memory/2026-06-27-auto-compact-design.md` — zero-human-intervention design rationale
80
80
 
81
- The two surfaces compose: `peaks session checkpoint` persists the context state, `peaks solo auto-compact` collapses the runner's window. The LLM fires both in the 0.85–0.95 zone; the hook fires alone at ≥ 0.95.
81
+ The two surfaces compose: `peaks session checkpoint` persists the context state, `peaks code auto-compact` collapses the runner's window. The LLM fires both in the 0.85–0.95 zone; the hook fires alone at ≥ 0.95.
@@ -1,6 +1,6 @@
1
1
  # Peaks-Loop Pre-RD project scan checklist
2
2
 
3
- > Extracted from `skills/peaks-solo/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Pre-RD project scan checklist that was previously inline; nothing was paraphrased, just relocated.
3
+ > Extracted from `skills/peaks-code/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Pre-RD project scan checklist that was previously inline; nothing was paraphrased, just relocated.
4
4
 
5
5
  Before handing off to `peaks-rd`, scan the project and record findings to `.peaks/_runtime/<sessionId>/rd/project-scan.md`. RD and UI roles read this before starting work. **project-scan.md is a session-scoped singleton** — check if it already exists before regenerating (e.g. via `ls .peaks/_runtime/<sessionId>/rd/project-scan.md`). If it exists and is complete (has `## Archetype` and `## Project mode` sections), reuse it. Only regenerate if missing or incomplete.
6
6
 
@@ -7,7 +7,7 @@
7
7
  | `peaks request lint <rid> --role <role> --project <path>` | Scan artifact body for unfilled `<placeholder>`, bare `- ...` bullets, TBD/TODO markers | Before every transition out of `draft` / before role handoff | Any `error`-severity finding (unfilled placeholder, bare-dot bullet) |
8
8
  | `peaks request repair-status <rid> --project <path>` | Count RD↔QA repair cycles from `--reason` transition notes ("QA cycle N: ...") | Before every RD repair iteration in step 7 | Cycle count reached the 3-cycle cap |
9
9
  | `peaks scan request-type-sanity --project <path> --type <type>` | Cross-verify declared `--type` against the actual `git diff` file mix (catches "feature mis-declared as docs" workflow violations) | After PRD type lock-in AND after each RD repair iteration | Declared type disagrees with the file mix |
10
- | `peaks scan libraries --project <path>` | Enumerate every dependency + devDependency + peerDependency + optionalDependency with parsed major version; output goes to `## Library versions` in `rd/project-scan.md`. Read-only. | At Solo step 0.6 (alongside `peaks scan archetype`) | Always exits 0 (warnings in JSON envelope; never blocks) |
10
+ | `peaks scan libraries --project <path>` | Enumerate every dependency + devDependency + peerDependency + optionalDependency with parsed major version; output goes to `## Library versions` in `rd/project-scan.md`. Read-only. | At Code step 0.6 (alongside `peaks scan archetype`) | Always exits 0 (warnings in JSON envelope; never blocks) |
11
11
  | `peaks slice check [--rid <rid>] [--project <path>]` | 4-stage slice 边界 check (typecheck + unit-tests + review-fanout + gate-verify-pipeline). Aggregate pass/fail; non-zero exit if any stage fails. See "Slice 边界 check" below for usage rules (boundary only, never inside a micro-cycle). | At slice 边界(post-micro-cycle, pre-peaks-qa)| Any stage fails |
12
12
 
13
13
  Together with `peaks request transition` (which already CLI-enforces per-type artifact prerequisites), these five commands form the runtime quality net. SKILL.md prose is descriptive; the CLI is what physically blocks bad workflows.
@@ -1,6 +1,6 @@
1
- # Peaks Solo Refactor Mode
1
+ # Peaks Code Refactor Mode
2
2
 
3
- `peaks-solo refactor` is the primary MVP path.
3
+ `peaks-code refactor` is the primary MVP path.
4
4
 
5
5
  ## Flow
6
6
 
@@ -60,4 +60,4 @@ done
60
60
  **Strict quality guarantee (per user's hard rule: "严格要保证不能比当前的效果差")**:
61
61
  - If no in-flight slice is detected, this step is a no-op: zero extra commands beyond the existing Step 0 probe, zero extra token cost.
62
62
  - If an in-flight slice is detected, the cost is one `find` + one `grep` loop (sub-millisecond) + one `AskUserQuestion` (one round-trip). The savings are 3-5k tokens (the cost of manually re-reading 3-5 artifact files).
63
- - The dogfood test in `tests/unit/skill-resume-mode.test.ts` (8 cases, bash-fixture shim — the legacy interface used by `skills/peaks-solo-resume`) and `tests/unit/services/skill/resume-detector.test.ts` (24 cases, the canonical TypeScript classifier at `src/services/skill/resume-detector.ts`) together cover: (a) fresh / complete / resume:rd-planning / resume:qa-validation / resume:txt-handoff state-based classifications, (b) the "Other resume triggers" overrides (missing `rd/tech-doc.md` → `rd-planning`; missing `rd/code-review.md` or `rd/security-review.md` → `rd-review-fanout`; missing `qa/test-reports/<rid>.md` → `qa-execution`), (c) the mid-implementation distinction (`spec-locked` / `implemented` / `running` / `blocked` all return `in-flight:<state>`), (d) the primary-vs-abandoned filter (multiple RDs → spec-locked wins; single blocked RD stays primary; 2+ all-abandoned → fresh), (e) the legacy `.peaks/_runtime/<sessionId>/` path fallback, and (f) determinism across two invocations on the same fixture.
63
+ - The dogfood test in `tests/unit/skill-resume-mode.test.ts` (8 cases, bash-fixture shim — the legacy interface used by `skills/peaks-resume`) and `tests/unit/services/skill/resume-detector.test.ts` (24 cases, the canonical TypeScript classifier at `src/services/skill/resume-detector.ts`) together cover: (a) fresh / complete / resume:rd-planning / resume:qa-validation / resume:txt-handoff state-based classifications, (b) the "Other resume triggers" overrides (missing `rd/tech-doc.md` → `rd-planning`; missing `rd/code-review.md` or `rd/security-review.md` → `rd-review-fanout`; missing `qa/test-reports/<rid>.md` → `qa-execution`), (c) the mid-implementation distinction (`spec-locked` / `implemented` / `running` / `blocked` all return `in-flight:<state>`), (d) the primary-vs-abandoned filter (multiple RDs → spec-locked wins; single blocked RD stays primary; 2+ all-abandoned → fresh), (e) the legacy `.peaks/_runtime/<sessionId>/` path fallback, and (f) determinism across two invocations on the same fixture.