peaks-loop 3.1.1 → 4.0.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/.claude-plugin/marketplace.json +62 -12
  2. package/CHANGELOG.md +74 -36
  3. package/README-en.md +58 -240
  4. package/README.md +49 -325
  5. package/agents/karpathy-reviewer.md +3 -3
  6. package/dist/src/cli/cli-helpers.d.ts +18 -0
  7. package/dist/src/cli/cli-helpers.js +8 -0
  8. package/dist/src/cli/commands/adapter-commands.d.ts +30 -0
  9. package/dist/src/cli/commands/adapter-commands.js +35 -0
  10. package/dist/src/cli/commands/context-commands.d.ts +1 -1
  11. package/dist/src/cli/commands/context-commands.js +1 -1
  12. package/dist/src/cli/commands/contract-commands.d.ts +1 -1
  13. package/dist/src/cli/commands/contract-commands.js +1 -1
  14. package/dist/src/cli/commands/core/session-command.js +12 -0
  15. package/dist/src/cli/commands/core/skill-command.js +4 -4
  16. package/dist/src/cli/commands/dispatch-commands.js +2 -2
  17. package/dist/src/cli/commands/job-commands.js +58 -5
  18. package/dist/src/cli/commands/observability-commands.js +1 -1
  19. package/dist/src/cli/commands/perf-audit-commands.js +2 -2
  20. package/dist/src/cli/commands/security-audit-commands.js +2 -2
  21. package/dist/src/cli/commands/sediment-commands.d.ts +80 -0
  22. package/dist/src/cli/commands/sediment-commands.js +640 -0
  23. package/dist/src/cli/commands/session-migrate-skill-name.d.ts +17 -0
  24. package/dist/src/cli/commands/session-migrate-skill-name.js +41 -0
  25. package/dist/src/cli/commands/skill-visibility.d.ts +8 -0
  26. package/dist/src/cli/commands/skill-visibility.js +63 -0
  27. package/dist/src/cli/commands/slice-commands.js +2 -2
  28. package/dist/src/cli/commands/solo-commands.d.ts +2 -2
  29. package/dist/src/cli/commands/solo-commands.js +246 -20
  30. package/dist/src/cli/commands/sub-agent-commands.d.ts +1 -1
  31. package/dist/src/cli/commands/sub-agent-commands.js +1 -1
  32. package/dist/src/cli/commands/understand-commands.js +1 -1
  33. package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
  34. package/dist/src/cli/commands/upgrade-commands.js +3 -3
  35. package/dist/src/cli/commands/user-touchpoint-commands.js +1 -1
  36. package/dist/src/cli/commands/verdict-aggregate-command.d.ts +1 -1
  37. package/dist/src/cli/commands/verdict-aggregate-command.js +2 -2
  38. package/dist/src/cli/commands/workflow-commands.js +2 -2
  39. package/dist/src/cli/commands/workspace/init-command.d.ts +3 -3
  40. package/dist/src/cli/commands/workspace/init-command.js +7 -7
  41. package/dist/src/cli/program.js +19 -2
  42. package/dist/src/services/adapter/adapter.d.ts +27 -0
  43. package/dist/src/services/adapter/adapter.js +5 -0
  44. package/dist/src/services/adapter/auto-adapter.d.ts +11 -0
  45. package/dist/src/services/adapter/auto-adapter.js +15 -0
  46. package/dist/src/services/adapter/claude-adapter.d.ts +14 -0
  47. package/dist/src/services/adapter/claude-adapter.js +40 -0
  48. package/dist/src/services/adapter/codex-adapter.d.ts +14 -0
  49. package/dist/src/services/adapter/codex-adapter.js +14 -0
  50. package/dist/src/services/adapter/copilot-adapter.d.ts +14 -0
  51. package/dist/src/services/adapter/copilot-adapter.js +14 -0
  52. package/dist/src/services/audit/enforcers/solo-code-ban.d.ts +1 -1
  53. package/dist/src/services/audit/enforcers/solo-code-ban.js +2 -2
  54. package/dist/src/services/audit/red-line-catalog.js +1 -1
  55. package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
  56. package/dist/src/services/context/auto-compact-dispatcher.d.ts +1 -1
  57. package/dist/src/services/dispatch/batch-counter.js +1 -1
  58. package/dist/src/services/dispatch/leak-detector.js +1 -1
  59. package/dist/src/services/doctor/doctor-service.js +2 -2
  60. package/dist/src/services/job/job-progress-store.d.ts +60 -0
  61. package/dist/src/services/job/job-progress-store.js +70 -0
  62. package/dist/src/services/job/job-resource-snapshot.js +29 -1
  63. package/dist/src/services/job/job-types.d.ts +4 -4
  64. package/dist/src/services/memory/project-memory-service.js +1 -1
  65. package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
  66. package/dist/src/services/migrate-skill-name/migrate.js +152 -0
  67. package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
  68. package/dist/src/services/migrate-skill-name/schema.js +25 -0
  69. package/dist/src/services/observability/aggregation.d.ts +1 -1
  70. package/dist/src/services/observability/aggregation.js +1 -1
  71. package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
  72. package/dist/src/services/perf/perf-baseline-service.js +1 -1
  73. package/dist/src/services/prd/handoff-types.d.ts +1 -1
  74. package/dist/src/services/prd/handoff-types.js +1 -1
  75. package/dist/src/services/progress/progress-service.d.ts +1 -1
  76. package/dist/src/services/progress/progress-service.js +1 -1
  77. package/dist/src/services/rd/standards-diagnostic.js +1 -1
  78. package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
  79. package/dist/src/services/sc/sc-service.js +1 -1
  80. package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
  81. package/dist/src/services/sediment/dispose-confirm.js +5 -0
  82. package/dist/src/services/sediment/json-schema.d.ts +247 -0
  83. package/dist/src/services/sediment/json-schema.js +26 -0
  84. package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
  85. package/dist/src/services/sediment/manifest-lint.js +11 -0
  86. package/dist/src/services/sediment/pool-paths.d.ts +22 -0
  87. package/dist/src/services/sediment/pool-paths.js +25 -0
  88. package/dist/src/services/sediment/pool-read.d.ts +20 -0
  89. package/dist/src/services/sediment/pool-read.js +73 -0
  90. package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
  91. package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
  92. package/dist/src/services/sediment/pool-write.d.ts +14 -0
  93. package/dist/src/services/sediment/pool-write.js +25 -0
  94. package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
  95. package/dist/src/services/sediment/promotion-gate.js +20 -0
  96. package/dist/src/services/sediment/types.d.ts +52 -0
  97. package/dist/src/services/sediment/types.js +1 -0
  98. package/dist/src/services/session/binding-store.d.ts +1 -1
  99. package/dist/src/services/session/binding-store.js +1 -1
  100. package/dist/src/services/session/caller-id-types.d.ts +1 -1
  101. package/dist/src/services/session/session-manager.d.ts +1 -1
  102. package/dist/src/services/session/session-manager.js +1 -1
  103. package/dist/src/services/skill/resume-detector.js +1 -1
  104. package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
  105. package/dist/src/services/skill/skill-scheduler.js +1 -1
  106. package/dist/src/services/skillhub/release-diff.d.ts +18 -0
  107. package/dist/src/services/skillhub/release-diff.js +38 -0
  108. package/dist/src/services/skillhub/release-export.d.ts +8 -0
  109. package/dist/src/services/skillhub/release-export.js +31 -0
  110. package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
  111. package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
  112. package/dist/src/services/skillhub/release-import.d.ts +7 -0
  113. package/dist/src/services/skillhub/release-import.js +59 -0
  114. package/dist/src/services/skillhub/release-retain.d.ts +23 -0
  115. package/dist/src/services/skillhub/release-retain.js +89 -0
  116. package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
  117. package/dist/src/services/skillhub/sqlite-store.js +47 -0
  118. package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
  119. package/dist/src/services/skillhub/tar-runtime.js +91 -0
  120. package/dist/src/services/skillhub/types.d.ts +105 -0
  121. package/dist/src/services/skillhub/types.js +1 -0
  122. package/dist/src/services/skills/skill-conformance-service.js +8 -5
  123. package/dist/src/services/skills/skill-presence-service.d.ts +4 -4
  124. package/dist/src/services/skills/skill-presence-service.js +2 -2
  125. package/dist/src/services/skills/skill-registry.js +27 -0
  126. package/dist/src/services/skills/skill-runbook-service.js +2 -2
  127. package/dist/src/services/slice/slice-check-service.js +1 -1
  128. package/dist/src/services/slice/slice-check-types.d.ts +1 -1
  129. package/dist/src/services/slice/slice-check-types.js +1 -1
  130. package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
  131. package/dist/src/services/slice/slice-decompose-types.js +1 -1
  132. package/dist/src/services/solo/auto-compact-orchestrator.d.ts +1 -1
  133. package/dist/src/services/solo/auto-compact-orchestrator.js +2 -2
  134. package/dist/src/services/solo/dag-orchestrator.d.ts +3 -3
  135. package/dist/src/services/solo/dag-orchestrator.js +4 -4
  136. package/dist/src/services/solo/emit-handoff.d.ts +49 -0
  137. package/dist/src/services/solo/emit-handoff.js +79 -0
  138. package/dist/src/services/solo/mode-gate.d.ts +2 -2
  139. package/dist/src/services/solo/post-compact-detector.js +2 -2
  140. package/dist/src/services/solo/status-line-renderer.d.ts +4 -4
  141. package/dist/src/services/solo/step-08-gate.d.ts +90 -0
  142. package/dist/src/services/solo/step-08-gate.js +136 -0
  143. package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
  144. package/dist/src/services/standards/missing-standards-detector.js +1 -1
  145. package/dist/src/services/standards/project-standards-service.d.ts +1 -1
  146. package/dist/src/services/standards/project-standards-service.js +4 -4
  147. package/dist/src/services/understand/understand-types.d.ts +1 -1
  148. package/dist/src/services/upgrade/1x-detector-service.js +1 -1
  149. package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
  150. package/dist/src/services/upgrade/upgrade-service.js +52 -30
  151. package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
  152. package/dist/src/services/workflow/workflow-router-service.d.ts +1 -1
  153. package/dist/src/services/workflow/workflow-router-service.js +3 -3
  154. package/dist/src/services/workspace/claude-settings-template.d.ts +7 -2
  155. package/dist/src/services/workspace/claude-settings-template.js +42 -3
  156. package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
  157. package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
  158. package/dist/src/services/workspace/workspace-service.d.ts +4 -4
  159. package/dist/src/services/workspace/workspace-service.js +2 -2
  160. package/dist/src/shared/paths.d.ts +1 -1
  161. package/dist/src/shared/paths.js +1 -1
  162. package/dist/src/shared/version.d.ts +1 -1
  163. package/dist/src/shared/version.js +1 -1
  164. package/dist/src/skills/peaks-maker/index.d.ts +5 -0
  165. package/dist/src/skills/peaks-maker/index.js +32 -0
  166. package/package.json +8 -3
  167. package/scripts/install-skills.mjs +29 -4
  168. package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
  169. package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
  170. package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
  171. package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
  172. package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
  173. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
  174. package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +1 -1
  175. package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
  176. package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
  177. package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
  178. package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
  179. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +1 -1
  180. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +2 -2
  181. package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +1 -1
  182. package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
  183. package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
  184. package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +7 -1
  185. package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +9 -3
  186. package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +11 -5
  187. package/skills/peaks-audit/SKILL.md +1 -1
  188. package/skills/{peaks-solo → peaks-code}/SKILL.md +53 -104
  189. package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
  190. package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +4 -4
  191. package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +2 -2
  192. package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
  193. package/skills/peaks-code/references/command-migration.md +3 -0
  194. package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
  195. package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
  196. package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +1 -1
  197. package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +1 -1
  198. package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +9 -9
  199. package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +12 -12
  200. package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +1 -1
  201. package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +1 -1
  202. package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
  203. package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +1 -1
  204. package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
  205. package/skills/{peaks-solo → peaks-code}/references/runbook.md +25 -5
  206. package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
  207. package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
  208. package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +5 -5
  209. package/skills/peaks-code/references/step-0-8-gate.md +60 -0
  210. package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +10 -10
  211. package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +7 -7
  212. package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +3 -3
  213. package/skills/peaks-doctor/SKILL.md +1 -1
  214. package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
  215. package/skills/peaks-final-review/SKILL.md +3 -3
  216. package/skills/peaks-final-review/references/4-dimensions.md +1 -1
  217. package/skills/peaks-ide/SKILL.md +1 -1
  218. package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +14 -14
  219. package/skills/peaks-sop/SKILL.md +1 -1
  220. package/skills/{peaks-solo-status → peaks-status}/SKILL.md +13 -13
  221. package/skills/{peaks-solo-test → peaks-test}/SKILL.md +11 -11
  222. package/skills/peaks-solo/references/command-migration.md +0 -3
  223. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
  224. /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
  225. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
  226. /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
  227. /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
  228. /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
  229. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
  230. /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +0 -0
  231. /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
  232. /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
  233. /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
  234. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
  235. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
  236. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
  237. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
  238. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
  239. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
  240. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
  241. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
  242. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
  243. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
  244. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
  245. /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
  246. /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
  247. /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
  248. /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
  249. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
  250. /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
  251. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
  252. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
  253. /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
  254. /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
  255. /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
  256. /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
  257. /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
  258. /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
  259. /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
  260. /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
  261. /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
  262. /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
  263. /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
  264. /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
  265. /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
  266. /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
  267. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
  268. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +0 -0
  269. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
  270. /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
  271. /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
  272. /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
  273. /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
  274. /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
  275. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
  276. /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
  277. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
  278. /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
  279. /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
  280. /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
  281. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
  282. /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
  283. /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
  284. /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
  285. /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
  286. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
  287. /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
  288. /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
  289. /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
  290. /package/skills/{peaks-solo → peaks-code}/references/boundaries.md +0 -0
  291. /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
  292. /package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +0 -0
  293. /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
  294. /package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +0 -0
  295. /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
  296. /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
  297. /package/skills/{peaks-solo → peaks-code}/references/external-references.md +0 -0
  298. /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
  299. /package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +0 -0
  300. /package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +0 -0
  301. /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
  302. /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
  303. /package/skills/{peaks-solo → peaks-code}/references/job-loop.md +0 -0
  304. /package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +0 -0
  305. /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
  306. /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
  307. /package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +0 -0
  308. /package/skills/{peaks-solo → peaks-code}/references/workflow.md +0 -0
@@ -0,0 +1,17 @@
1
+ import type { MigrateResult } from './schema.js';
2
+ export interface MigrateOpts {
3
+ projectRoot: string;
4
+ from: string;
5
+ to: string;
6
+ /** false = dry-run (default); true = write through. */
7
+ apply: boolean;
8
+ }
9
+ /** True iff `absPath` falls under any skip-path (substring match). */
10
+ export declare function shouldSkip(projectRoot: string, absPath: string): boolean;
11
+ /**
12
+ * Recursively walk a directory and return every `.json` / `.md`
13
+ * path. Missing root → empty list (the CLI reports scannedFiles:0,
14
+ * which is the truthful "nothing to look at" signal).
15
+ */
16
+ export declare function walkRuntimeFiles(root: string): string[];
17
+ export declare function migrateSkillName(opts: MigrateOpts): MigrateResult;
@@ -0,0 +1,152 @@
1
+ /**
2
+ * `peaks session migrate-skill-name` core service (slice 2 of the
3
+ * peaks-code → peaks-code rename plan).
4
+ *
5
+ * Walks `.peaks/_runtime/**` and rewrites two patterns:
6
+ * 1. Key-value: `"skill": "<old>"` → `"skill": "<new>"`
7
+ * 2. Slash-trig: `/<old>` → `/<new>`
8
+ *
9
+ * Files under known skip-paths (`.peaks/memory/**`,
10
+ * `.peaks/skills/.system/bees/<old>/manifest.json`) are recorded in
11
+ * `skipped` but never opened. The operation is idempotent: re-running
12
+ * with the same `--from` on a tree already migrated reports 0
13
+ * modifications.
14
+ *
15
+ * Dry-run (`apply: false`) counts what WOULD change without writing;
16
+ * apply (`apply: true`) validates each `.json` payload with
17
+ * `JSON.parse` before writing so a broken mid-edit never lands on
18
+ * disk. Errors are pushed into `result.errors` (never swallowed).
19
+ */
20
+ import { existsSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
21
+ import { join, relative } from 'node:path';
22
+ /**
23
+ * Skip-paths are matched against the path relative to `projectRoot`,
24
+ * forward-slashed (Windows-friendly). Each entry is a SUBSTRING —
25
+ * the brief pins two specific exclusions: the memory dir, and the
26
+ * .system bee manifest for the old skill (which the renamer must
27
+ * leave alone until the bee itself is moved in a later slice).
28
+ */
29
+ const SKIP_DIRS = ['.peaks/memory', '.peaks/skills/.system/bees'];
30
+ const TARGET_ROOT = '.peaks/_runtime';
31
+ const KEY_VALUE_PATTERN = (from, to) => new RegExp(`"skill"\\s*:\\s*"${escapeRe(from)}"`, 'g');
32
+ const STRING_PATTERN = (from, to) => new RegExp(`/${escapeRe(from)}`, 'g');
33
+ /**
34
+ * Escape regex metachars so an aggressive `--from` value (e.g.
35
+ * `peaks.code`) doesn't blow up the regex compiler. The two regexes
36
+ * above use `from` inside both body and character-class territory,
37
+ * so escaping is the safe path regardless of input.
38
+ */
39
+ function escapeRe(input) {
40
+ return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
41
+ }
42
+ /** True iff `absPath` falls under any skip-path (substring match). */
43
+ export function shouldSkip(projectRoot, absPath) {
44
+ const rel = relative(projectRoot, absPath).replace(/\\/g, '/');
45
+ return SKIP_DIRS.some((skip) => rel.includes(skip));
46
+ }
47
+ /**
48
+ * Recursively walk a directory and return every `.json` / `.md`
49
+ * path. Missing root → empty list (the CLI reports scannedFiles:0,
50
+ * which is the truthful "nothing to look at" signal).
51
+ */
52
+ export function walkRuntimeFiles(root) {
53
+ const out = [];
54
+ if (!existsSync(root))
55
+ return out;
56
+ const visit = (dir) => {
57
+ for (const entry of readdirSync(dir)) {
58
+ const full = join(dir, entry);
59
+ const stat = statSync(full);
60
+ if (stat.isDirectory()) {
61
+ visit(full);
62
+ }
63
+ else if (entry.endsWith('.json') || entry.endsWith('.md')) {
64
+ out.push(full);
65
+ }
66
+ }
67
+ };
68
+ visit(root);
69
+ return out;
70
+ }
71
+ export function migrateSkillName(opts) {
72
+ const runtimeRoot = join(opts.projectRoot, TARGET_ROOT);
73
+ const files = walkRuntimeFiles(runtimeRoot);
74
+ const result = {
75
+ ok: true,
76
+ scannedFiles: files.length,
77
+ modifiedFiles: 0,
78
+ keyValueReplacements: 0,
79
+ stringReplacements: 0,
80
+ skipped: [...SKIP_DIRS],
81
+ errors: [],
82
+ };
83
+ for (const file of files) {
84
+ if (shouldSkip(opts.projectRoot, file))
85
+ continue;
86
+ let original;
87
+ try {
88
+ original = readFileSync(file, 'utf-8');
89
+ }
90
+ catch (e) {
91
+ // Unreadable file: surface the error and keep going (other
92
+ // files may be fine). `ok` flips to false; reporting stops
93
+ // hiding the failure from the operator.
94
+ result.errors.push(`${file}: read failed: ${e.message}`);
95
+ result.ok = false;
96
+ continue;
97
+ }
98
+ // Pin the broken-JSON test: any .json runtime file that fails
99
+ // to parse MUST be surfaced as an error, EVEN when it does not
100
+ // contain the from-name (the operator still needs to know the
101
+ // file is unparseable so they can fix it before re-running).
102
+ // Per Karpathy §4 honesty, silent skip is the worst kind of
103
+ // fake-green.
104
+ if (file.endsWith('.json')) {
105
+ try {
106
+ JSON.parse(original);
107
+ }
108
+ catch (e) {
109
+ result.errors.push(`${file}: invalid JSON: ${e.message}`);
110
+ result.ok = false;
111
+ continue;
112
+ }
113
+ }
114
+ let mutated = original;
115
+ const kvPattern = KEY_VALUE_PATTERN(opts.from, opts.to);
116
+ const kvMatches = mutated.match(kvPattern);
117
+ if (kvMatches) {
118
+ mutated = mutated.replace(kvPattern, `"skill": "${opts.to}"`);
119
+ result.keyValueReplacements += kvMatches.length;
120
+ }
121
+ const strPattern = STRING_PATTERN(opts.from, opts.to);
122
+ const strMatches = mutated.match(strPattern);
123
+ if (strMatches) {
124
+ mutated = mutated.replace(strPattern, `/${opts.to}`);
125
+ result.stringReplacements += strMatches.length;
126
+ }
127
+ if (mutated === original)
128
+ continue;
129
+ if (opts.apply) {
130
+ try {
131
+ if (file.endsWith('.json')) {
132
+ // Validate the post-edit JSON before touching the disk —
133
+ // catches accidents (e.g., stray quotes in the renamed
134
+ // from/to values) without leaving a corrupted runtime file
135
+ // behind.
136
+ JSON.parse(mutated);
137
+ }
138
+ writeFileSync(file, mutated, 'utf-8');
139
+ result.modifiedFiles += 1;
140
+ }
141
+ catch (e) {
142
+ result.errors.push(`${file}: ${e.message}`);
143
+ result.ok = false;
144
+ }
145
+ }
146
+ // Dry-run path intentionally does not bump `modifiedFiles` —
147
+ // pin: `expect(result.modifiedFiles).toBe(0)` in the dry-run
148
+ // test. The would-be count lives implicitly in the *Replacement
149
+ // counters, which both dry-run and apply share.
150
+ }
151
+ return result;
152
+ }
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Result shape for `peaks session migrate-skill-name`.
4
+ *
5
+ * Counters:
6
+ * - `scannedFiles` — every .json / .md under `.peaks/_runtime/**` (excluding
7
+ * skip dirs below).
8
+ * - `modifiedFiles` — files whose contents would change (dry-run reports
9
+ * the predicted count; --apply reports the actually-written count).
10
+ * - `keyValueReplacements` — `"skill": "<old>"` → `"skill": "<new>"`.
11
+ * - `stringReplacements` — `/<old>` → `/<new>` slash-trigger mentions.
12
+ *
13
+ * Errors are surfaced per-file with `errors: [ "<absPath>: <message>", … ]`;
14
+ * the tool never silently skips a broken JSON file (Karpathy §4 honesty:
15
+ * silence on bad data is the worst kind of fake-green).
16
+ */
17
+ export declare const MigrateResultSchema: z.ZodObject<{
18
+ ok: z.ZodBoolean;
19
+ scannedFiles: z.ZodNumber;
20
+ modifiedFiles: z.ZodNumber;
21
+ keyValueReplacements: z.ZodNumber;
22
+ stringReplacements: z.ZodNumber;
23
+ skipped: z.ZodArray<z.ZodString, "many">;
24
+ errors: z.ZodArray<z.ZodString, "many">;
25
+ }, "strip", z.ZodTypeAny, {
26
+ ok: boolean;
27
+ skipped: string[];
28
+ scannedFiles: number;
29
+ modifiedFiles: number;
30
+ keyValueReplacements: number;
31
+ stringReplacements: number;
32
+ errors: string[];
33
+ }, {
34
+ ok: boolean;
35
+ skipped: string[];
36
+ scannedFiles: number;
37
+ modifiedFiles: number;
38
+ keyValueReplacements: number;
39
+ stringReplacements: number;
40
+ errors: string[];
41
+ }>;
42
+ export type MigrateResult = z.infer<typeof MigrateResultSchema>;
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Result shape for `peaks session migrate-skill-name`.
4
+ *
5
+ * Counters:
6
+ * - `scannedFiles` — every .json / .md under `.peaks/_runtime/**` (excluding
7
+ * skip dirs below).
8
+ * - `modifiedFiles` — files whose contents would change (dry-run reports
9
+ * the predicted count; --apply reports the actually-written count).
10
+ * - `keyValueReplacements` — `"skill": "<old>"` → `"skill": "<new>"`.
11
+ * - `stringReplacements` — `/<old>` → `/<new>` slash-trigger mentions.
12
+ *
13
+ * Errors are surfaced per-file with `errors: [ "<absPath>: <message>", … ]`;
14
+ * the tool never silently skips a broken JSON file (Karpathy §4 honesty:
15
+ * silence on bad data is the worst kind of fake-green).
16
+ */
17
+ export const MigrateResultSchema = z.object({
18
+ ok: z.boolean(),
19
+ scannedFiles: z.number().int().nonnegative(),
20
+ modifiedFiles: z.number().int().nonnegative(),
21
+ keyValueReplacements: z.number().int().nonnegative(),
22
+ stringReplacements: z.number().int().nonnegative(),
23
+ skipped: z.array(z.string()),
24
+ errors: z.array(z.string()),
25
+ });
@@ -51,7 +51,7 @@ export type RepairCycleReport = {
51
51
  cycleCount: number;
52
52
  }>;
53
53
  };
54
- /** RD/QA repair-loop cap (matches the peaks-solo repair-loop contract). */
54
+ /** RD/QA repair-loop cap (matches the peaks-code repair-loop contract). */
55
55
  export declare const REPAIR_CYCLE_CAP = 3;
56
56
  export declare function aggregateStatus(events: readonly ObservabilityEvent[]): StatusAggregate;
57
57
  export declare function aggregateSlices(events: readonly ObservabilityEvent[]): SliceRollup[];
@@ -28,7 +28,7 @@ const TERMINAL_HAPPY_STATES = new Set([
28
28
  'boundary-recorded'
29
29
  ]);
30
30
  const TERMINAL_FAIL_STATES = new Set(['blocked']);
31
- /** RD/QA repair-loop cap (matches the peaks-solo repair-loop contract). */
31
+ /** RD/QA repair-loop cap (matches the peaks-code repair-loop contract). */
32
32
  export const REPAIR_CYCLE_CAP = 3;
33
33
  // v2.12.0 fan-out collapse: see OBSERVABILITY_SUBAGENT_ROLES for the
34
34
  // rationale on why `security-reviewer` was dropped and `peaks-security-audit`
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Performance baseline scaffolding for the RD stage.
3
3
  *
4
- * peaks-solo's RD stage runs before the QA stage. The user-facing pain is
4
+ * peaks-code's RD stage runs before the QA stage. The user-facing pain is
5
5
  * that performance tests (lighthouse / k6 / project-local benches / etc.)
6
6
  * have historically only been run at QA Gate A4 — too late in the loop,
7
7
  * because a slow regression discovered at QA triggers a return-to-rd
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Performance baseline scaffolding for the RD stage.
3
3
  *
4
- * peaks-solo's RD stage runs before the QA stage. The user-facing pain is
4
+ * peaks-code's RD stage runs before the QA stage. The user-facing pain is
5
5
  * that performance tests (lighthouse / k6 / project-local benches / etc.)
6
6
  * have historically only been run at QA Gate A4 — too late in the loop,
7
7
  * because a slow regression discovered at QA triggers a return-to-rd
@@ -4,7 +4,7 @@
4
4
  * The handoff is the **immutable** single source of truth that all
5
5
  * downstream consumers (peaks-rd main loop + 4 audit sub-agents +
6
6
  * peaks-qa) read. It is written by peaks-prd AFTER user confirmation
7
- * (per `skills/peaks-prd/SKILL.md` Step 5.5) and replaces the legacy
7
+ * (per `skills/bee/peaks-prd/SKILL.md` Step 5.5) and replaces the legacy
8
8
  * peaks-rd tech-doc handoff (v2.10.0 and earlier).
9
9
  *
10
10
  * Frontmatter invariant: `handoffHash` MUST equal the lowercase hex
@@ -4,7 +4,7 @@
4
4
  * The handoff is the **immutable** single source of truth that all
5
5
  * downstream consumers (peaks-rd main loop + 4 audit sub-agents +
6
6
  * peaks-qa) read. It is written by peaks-prd AFTER user confirmation
7
- * (per `skills/peaks-prd/SKILL.md` Step 5.5) and replaces the legacy
7
+ * (per `skills/bee/peaks-prd/SKILL.md` Step 5.5) and replaces the legacy
8
8
  * peaks-rd tech-doc handoff (v2.10.0 and earlier).
9
9
  *
10
10
  * Frontmatter invariant: `handoffHash` MUST equal the lowercase hex
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Sub-agent progress file for the RD/QA sub-agents in `peaks-solo`'s
2
+ * Sub-agent progress file for the RD/QA sub-agents in `peaks-code`'s
3
3
  * Swarm phase. A sub-agent (or the LLM via the `peaks progress step`
4
4
  * CLI) writes a stable JSON file at
5
5
  * `.peaks/_sub_agents/<sid>/subagent-progress.json`. The dispatch +
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Sub-agent progress file for the RD/QA sub-agents in `peaks-solo`'s
2
+ * Sub-agent progress file for the RD/QA sub-agents in `peaks-code`'s
3
3
  * Swarm phase. A sub-agent (or the LLM via the `peaks progress step`
4
4
  * CLI) writes a stable JSON file at
5
5
  * `.peaks/_sub_agents/<sid>/subagent-progress.json`. The dispatch +
@@ -2,7 +2,7 @@
2
2
  * Slice 2026-06-16-peaks-rd-no-gates — missing-project-standards diagnostic
3
3
  * + JSON gate list shape for the RD bootstrap path.
4
4
  *
5
- * Background: when `peaks-rd` (or `peaks-qa` / `peaks-solo`) starts in a
5
+ * Background: when `peaks-rd` (or `peaks-qa` / `peaks-code`) starts in a
6
6
  * project whose `.claude/rules/{common,typescript}/` is missing or empty,
7
7
  * the existing code-review / security / performance gates were silently
8
8
  * dropped. This module makes the missing-standards condition observable:
@@ -6,7 +6,7 @@ export const seedCapabilityLandingMappings = [
6
6
  mapping({ capabilityId: 'codegraph.impact-analysis', sourceId: 'codegraph', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Dry-run reference only: peaks-rd may use peaks codegraph affected --project <path> <files...> --json to inspect likely impact before slice planning and red-line checks when execution is approved.' }),
7
7
  mapping({ capabilityId: 'codegraph.impact-analysis', sourceId: 'codegraph', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-qa', skillName: 'peaks-qa', guidance: 'Use affected output as regression-surface evidence only; QA validation and test evidence remain authoritative.' }),
8
8
  mapping({ capabilityId: 'codegraph.context-pack', sourceId: 'codegraph', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Dry-run reference only: peaks-rd may use peaks codegraph context --project <path> <task> to gather local evidence for RD analysis when execution is approved, without replacing standards dry-runs.' }),
9
- mapping({ capabilityId: 'codegraph.context-pack', sourceId: 'codegraph', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-solo', skillName: 'peaks-solo', guidance: 'Solo may attach local context packs or affected summaries before role handoff so RD, QA, and TXT share the same project evidence.' }),
9
+ mapping({ capabilityId: 'codegraph.context-pack', sourceId: 'codegraph', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-code', skillName: 'peaks-code', guidance: 'Solo may attach local context packs or affected summaries before role handoff so RD, QA, and TXT share the same project evidence.' }),
10
10
  mapping({ capabilityId: 'codegraph.context-pack', sourceId: 'codegraph', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-txt', skillName: 'peaks-txt', guidance: 'TXT may summarize recorded codegraph context packs into handoffs while treating them as supporting evidence only.' }),
11
11
  mapping({ capabilityId: 'playwright-mcp.browser-validation', sourceId: 'playwright-mcp', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-qa', skillName: 'peaks-qa', guidance: 'Use for browser and E2E validation after user-approved app targets are available.' }),
12
12
  mapping({ capabilityId: 'chrome-devtools-mcp.browser-debug', sourceId: 'chrome-devtools-mcp', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use for runtime UI, console, network, and performance inspection.' }),
@@ -473,7 +473,7 @@ export function validateArtifactRetention(sliceId) {
473
473
  };
474
474
  if (!workspace) {
475
475
  // No workspace: validate against the resolved session dir directly
476
- // (this is the common peaks-solo / peaks-rd invocation: the slice
476
+ // (this is the common peaks-code / peaks-rd invocation: the slice
477
477
  // lives under the project-root `.peaks/_runtime/<sessionId>/`, and the
478
478
  // workspace artifact path is irrelevant). When the resolution also
479
479
  // fails, fall back to the legacy "No workspace configured" failure
@@ -0,0 +1,9 @@
1
+ import type { BeeManifest } from "./types.js";
2
+ export type DisposePlan = {
3
+ decision: "destroy";
4
+ auto: true;
5
+ } | {
6
+ decision: null;
7
+ requiresUserPrompt: true;
8
+ };
9
+ export declare function planDispose(m: BeeManifest): DisposePlan;
@@ -0,0 +1,5 @@
1
+ export function planDispose(m) {
2
+ if (m.source === "system")
3
+ return { decision: "destroy", auto: true };
4
+ return { decision: null, requiresUserPrompt: true };
5
+ }
@@ -0,0 +1,247 @@
1
+ import { z } from "zod";
2
+ export declare const BeeManifestSchema: z.ZodEffects<z.ZodObject<{
3
+ schemaVersion: z.ZodLiteral<"peaks.bee/1">;
4
+ name: z.ZodString;
5
+ source: z.ZodEnum<["system", "user"]>;
6
+ promotion_status: z.ZodEnum<["candidate", "stable", "retired", "system-stable"]>;
7
+ description: z.ZodString;
8
+ segments: z.ZodArray<z.ZodObject<{
9
+ name: z.ZodString;
10
+ inputs: z.ZodArray<z.ZodObject<{
11
+ name: z.ZodString;
12
+ type: z.ZodEnum<["string", "number", "boolean", "json"]>;
13
+ required: z.ZodBoolean;
14
+ }, "strip", z.ZodTypeAny, {
15
+ name: string;
16
+ type: "string" | "number" | "boolean" | "json";
17
+ required: boolean;
18
+ }, {
19
+ name: string;
20
+ type: "string" | "number" | "boolean" | "json";
21
+ required: boolean;
22
+ }>, "many">;
23
+ outputs: z.ZodArray<z.ZodObject<{
24
+ name: z.ZodString;
25
+ type: z.ZodEnum<["string", "number", "boolean", "json"]>;
26
+ required: z.ZodBoolean;
27
+ }, "strip", z.ZodTypeAny, {
28
+ name: string;
29
+ type: "string" | "number" | "boolean" | "json";
30
+ required: boolean;
31
+ }, {
32
+ name: string;
33
+ type: "string" | "number" | "boolean" | "json";
34
+ required: boolean;
35
+ }>, "many">;
36
+ sideEffects: z.ZodArray<z.ZodString, "many">;
37
+ }, "strip", z.ZodTypeAny, {
38
+ name: string;
39
+ outputs: {
40
+ name: string;
41
+ type: "string" | "number" | "boolean" | "json";
42
+ required: boolean;
43
+ }[];
44
+ inputs: {
45
+ name: string;
46
+ type: "string" | "number" | "boolean" | "json";
47
+ required: boolean;
48
+ }[];
49
+ sideEffects: string[];
50
+ }, {
51
+ name: string;
52
+ outputs: {
53
+ name: string;
54
+ type: "string" | "number" | "boolean" | "json";
55
+ required: boolean;
56
+ }[];
57
+ inputs: {
58
+ name: string;
59
+ type: "string" | "number" | "boolean" | "json";
60
+ required: boolean;
61
+ }[];
62
+ sideEffects: string[];
63
+ }>, "many">;
64
+ entrypoint: z.ZodObject<{
65
+ preamble: z.ZodString;
66
+ refs: z.ZodArray<z.ZodObject<{
67
+ path: z.ZodString;
68
+ kind: z.ZodEnum<["file", "dir", "script"]>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ path: string;
71
+ kind: "file" | "script" | "dir";
72
+ }, {
73
+ path: string;
74
+ kind: "file" | "script" | "dir";
75
+ }>, "many">;
76
+ }, "strip", z.ZodTypeAny, {
77
+ preamble: string;
78
+ refs: {
79
+ path: string;
80
+ kind: "file" | "script" | "dir";
81
+ }[];
82
+ }, {
83
+ preamble: string;
84
+ refs: {
85
+ path: string;
86
+ kind: "file" | "script" | "dir";
87
+ }[];
88
+ }>;
89
+ promotion: z.ZodObject<{
90
+ minCycles: z.ZodNumber;
91
+ requiresHumanApproval: z.ZodBoolean;
92
+ requiresSmokeTest: z.ZodBoolean;
93
+ retireOnMissesInRow: z.ZodOptional<z.ZodNumber>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ minCycles: number;
96
+ requiresHumanApproval: boolean;
97
+ requiresSmokeTest: boolean;
98
+ retireOnMissesInRow?: number | undefined;
99
+ }, {
100
+ minCycles: number;
101
+ requiresHumanApproval: boolean;
102
+ requiresSmokeTest: boolean;
103
+ retireOnMissesInRow?: number | undefined;
104
+ }>;
105
+ createdBy: z.ZodEnum<["human", "llm"]>;
106
+ lastTouchedAt: z.ZodString;
107
+ }, "strip", z.ZodTypeAny, {
108
+ name: string;
109
+ source: "user" | "system";
110
+ description: string;
111
+ schemaVersion: "peaks.bee/1";
112
+ promotion: {
113
+ minCycles: number;
114
+ requiresHumanApproval: boolean;
115
+ requiresSmokeTest: boolean;
116
+ retireOnMissesInRow?: number | undefined;
117
+ };
118
+ segments: {
119
+ name: string;
120
+ outputs: {
121
+ name: string;
122
+ type: "string" | "number" | "boolean" | "json";
123
+ required: boolean;
124
+ }[];
125
+ inputs: {
126
+ name: string;
127
+ type: "string" | "number" | "boolean" | "json";
128
+ required: boolean;
129
+ }[];
130
+ sideEffects: string[];
131
+ }[];
132
+ promotion_status: "candidate" | "stable" | "retired" | "system-stable";
133
+ entrypoint: {
134
+ preamble: string;
135
+ refs: {
136
+ path: string;
137
+ kind: "file" | "script" | "dir";
138
+ }[];
139
+ };
140
+ createdBy: "llm" | "human";
141
+ lastTouchedAt: string;
142
+ }, {
143
+ name: string;
144
+ source: "user" | "system";
145
+ description: string;
146
+ schemaVersion: "peaks.bee/1";
147
+ promotion: {
148
+ minCycles: number;
149
+ requiresHumanApproval: boolean;
150
+ requiresSmokeTest: boolean;
151
+ retireOnMissesInRow?: number | undefined;
152
+ };
153
+ segments: {
154
+ name: string;
155
+ outputs: {
156
+ name: string;
157
+ type: "string" | "number" | "boolean" | "json";
158
+ required: boolean;
159
+ }[];
160
+ inputs: {
161
+ name: string;
162
+ type: "string" | "number" | "boolean" | "json";
163
+ required: boolean;
164
+ }[];
165
+ sideEffects: string[];
166
+ }[];
167
+ promotion_status: "candidate" | "stable" | "retired" | "system-stable";
168
+ entrypoint: {
169
+ preamble: string;
170
+ refs: {
171
+ path: string;
172
+ kind: "file" | "script" | "dir";
173
+ }[];
174
+ };
175
+ createdBy: "llm" | "human";
176
+ lastTouchedAt: string;
177
+ }>, {
178
+ name: string;
179
+ source: "user" | "system";
180
+ description: string;
181
+ schemaVersion: "peaks.bee/1";
182
+ promotion: {
183
+ minCycles: number;
184
+ requiresHumanApproval: boolean;
185
+ requiresSmokeTest: boolean;
186
+ retireOnMissesInRow?: number | undefined;
187
+ };
188
+ segments: {
189
+ name: string;
190
+ outputs: {
191
+ name: string;
192
+ type: "string" | "number" | "boolean" | "json";
193
+ required: boolean;
194
+ }[];
195
+ inputs: {
196
+ name: string;
197
+ type: "string" | "number" | "boolean" | "json";
198
+ required: boolean;
199
+ }[];
200
+ sideEffects: string[];
201
+ }[];
202
+ promotion_status: "candidate" | "stable" | "retired" | "system-stable";
203
+ entrypoint: {
204
+ preamble: string;
205
+ refs: {
206
+ path: string;
207
+ kind: "file" | "script" | "dir";
208
+ }[];
209
+ };
210
+ createdBy: "llm" | "human";
211
+ lastTouchedAt: string;
212
+ }, {
213
+ name: string;
214
+ source: "user" | "system";
215
+ description: string;
216
+ schemaVersion: "peaks.bee/1";
217
+ promotion: {
218
+ minCycles: number;
219
+ requiresHumanApproval: boolean;
220
+ requiresSmokeTest: boolean;
221
+ retireOnMissesInRow?: number | undefined;
222
+ };
223
+ segments: {
224
+ name: string;
225
+ outputs: {
226
+ name: string;
227
+ type: "string" | "number" | "boolean" | "json";
228
+ required: boolean;
229
+ }[];
230
+ inputs: {
231
+ name: string;
232
+ type: "string" | "number" | "boolean" | "json";
233
+ required: boolean;
234
+ }[];
235
+ sideEffects: string[];
236
+ }[];
237
+ promotion_status: "candidate" | "stable" | "retired" | "system-stable";
238
+ entrypoint: {
239
+ preamble: string;
240
+ refs: {
241
+ path: string;
242
+ kind: "file" | "script" | "dir";
243
+ }[];
244
+ };
245
+ createdBy: "llm" | "human";
246
+ lastTouchedAt: string;
247
+ }>;
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ export const BeeManifestSchema = z.object({
3
+ schemaVersion: z.literal("peaks.bee/1"),
4
+ name: z.string().regex(/^bee-[a-z0-9][a-z0-9-]*$|^peaks-[a-z0-9][a-z0-9-]*$/),
5
+ source: z.enum(["system", "user"]),
6
+ promotion_status: z.enum(["candidate", "stable", "retired", "system-stable"]),
7
+ description: z.string().min(1).max(200),
8
+ segments: z.array(z.object({
9
+ name: z.string(),
10
+ inputs: z.array(z.object({ name: z.string(), type: z.enum(["string", "number", "boolean", "json"]), required: z.boolean() })),
11
+ outputs: z.array(z.object({ name: z.string(), type: z.enum(["string", "number", "boolean", "json"]), required: z.boolean() })),
12
+ sideEffects: z.array(z.string()),
13
+ })),
14
+ entrypoint: z.object({
15
+ preamble: z.string(),
16
+ refs: z.array(z.object({ path: z.string(), kind: z.enum(["file", "dir", "script"]) })),
17
+ }),
18
+ promotion: z.object({
19
+ minCycles: z.number().int().nonnegative(),
20
+ requiresHumanApproval: z.boolean(),
21
+ requiresSmokeTest: z.boolean(),
22
+ retireOnMissesInRow: z.number().int().positive().optional(),
23
+ }),
24
+ createdBy: z.enum(["human", "llm"]),
25
+ lastTouchedAt: z.string().datetime(),
26
+ }).refine((m) => !(m.source === "system" && m.promotion_status !== "system-stable"), { message: "source=system must have promotion_status=system-stable" });
@@ -0,0 +1,13 @@
1
+ import type { BeeManifest } from "./types.js";
2
+ export type Finding = {
3
+ path: string;
4
+ message: string;
5
+ };
6
+ export type LintResult = {
7
+ ok: true;
8
+ } | {
9
+ ok: false;
10
+ findings: Finding[];
11
+ };
12
+ export declare function lintManifest(m: unknown): LintResult;
13
+ export declare function lintManifestStrict(m: unknown): BeeManifest;
@@ -0,0 +1,11 @@
1
+ import { BeeManifestSchema } from "./json-schema.js";
2
+ export function lintManifest(m) {
3
+ const r = BeeManifestSchema.safeParse(m);
4
+ if (r.success)
5
+ return { ok: true };
6
+ return { ok: false, findings: r.error.issues.map((i) => ({ path: i.path.join("."), message: i.message })) };
7
+ }
8
+ export function lintManifestStrict(m) {
9
+ const r = BeeManifestSchema.parse(m);
10
+ return r;
11
+ }