@rpamis/comet 0.3.9 → 0.4.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 (623) hide show
  1. package/README.md +371 -222
  2. package/assets/manifest.json +33 -12
  3. package/assets/skills/comet/SKILL.md +87 -102
  4. package/assets/skills/comet/reference/auto-transition.md +1 -1
  5. package/assets/skills/comet/reference/comet-yaml-fields.md +11 -4
  6. package/assets/skills/comet/reference/context-recovery.md +12 -2
  7. package/assets/skills/comet/reference/debug-gate.md +17 -1
  8. package/assets/skills/comet/reference/decision-point.md +13 -2
  9. package/assets/skills/comet/reference/intent-frame.md +74 -0
  10. package/assets/skills/comet/reference/scripts.md +69 -0
  11. package/assets/skills/comet/reference/subagent-dispatch.md +79 -23
  12. package/assets/skills/comet/rules/comet-phase-guard.en.md +18 -10
  13. package/assets/skills/comet/rules/comet-phase-guard.md +17 -10
  14. package/assets/skills/comet/runtime/classic/checks.yaml +6 -0
  15. package/assets/skills/comet/runtime/classic/guardrails.yaml +13 -0
  16. package/assets/skills/comet/runtime/classic/skill.yaml +122 -0
  17. package/assets/skills/comet/scripts/comet-archive.mjs +3 -0
  18. package/assets/skills/comet/scripts/comet-env.mjs +15 -0
  19. package/assets/skills/comet/scripts/comet-guard.mjs +3 -0
  20. package/assets/skills/comet/scripts/comet-handoff.mjs +3 -0
  21. package/assets/skills/comet/scripts/comet-hook-guard.mjs +3 -0
  22. package/assets/skills/comet/scripts/comet-intent.mjs +3 -0
  23. package/assets/skills/comet/scripts/comet-runtime.mjs +12941 -0
  24. package/assets/skills/comet/scripts/comet-state.mjs +3 -0
  25. package/assets/skills/comet/scripts/comet-yaml-validate.mjs +3 -0
  26. package/assets/skills/comet-any/SKILL.md +118 -0
  27. package/assets/skills/comet-any/reference/authored-zone-example.md +100 -0
  28. package/assets/skills/comet-any/reference/authoring-protocol.json +91 -0
  29. package/assets/skills/comet-any/reference/authoring-subagents.md +102 -0
  30. package/assets/skills/comet-any/reference/bundle-authoring.md +166 -0
  31. package/assets/skills/comet-any/reference/eval-provider.md +83 -0
  32. package/assets/skills/comet-any/reference/subagents/pause-points-author.md +75 -0
  33. package/assets/skills/comet-any/reference/subagents/reference-author.md +77 -0
  34. package/assets/skills/comet-any/reference/subagents/script-author.md +81 -0
  35. package/assets/skills/comet-any/reference/subagents/skill-core-author.md +129 -0
  36. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +124 -0
  37. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +100 -0
  38. package/assets/skills/comet-archive/SKILL.md +25 -15
  39. package/assets/skills/comet-build/SKILL.md +51 -40
  40. package/assets/skills/comet-design/SKILL.md +14 -18
  41. package/assets/skills/comet-hotfix/SKILL.md +33 -43
  42. package/assets/skills/comet-open/SKILL.md +10 -20
  43. package/assets/skills/comet-tweak/SKILL.md +71 -65
  44. package/assets/skills/comet-verify/SKILL.md +31 -35
  45. package/assets/skills-zh/comet/SKILL.md +87 -101
  46. package/assets/skills-zh/comet/reference/auto-transition.md +3 -3
  47. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +8 -4
  48. package/assets/skills-zh/comet/reference/context-recovery.md +11 -1
  49. package/assets/skills-zh/comet/reference/debug-gate.md +17 -1
  50. package/assets/skills-zh/comet/reference/decision-point.md +13 -2
  51. package/assets/skills-zh/comet/reference/intent-frame.md +74 -0
  52. package/assets/skills-zh/comet/reference/scripts.md +69 -0
  53. package/assets/skills-zh/comet/reference/subagent-dispatch.md +67 -18
  54. package/assets/skills-zh/comet/runtime/classic/checks.yaml +6 -0
  55. package/assets/skills-zh/comet/runtime/classic/guardrails.yaml +13 -0
  56. package/assets/skills-zh/comet/runtime/classic/skill.yaml +122 -0
  57. package/assets/skills-zh/comet-any/SKILL.md +118 -0
  58. package/assets/skills-zh/comet-any/reference/authored-zone-example.md +100 -0
  59. package/assets/skills-zh/comet-any/reference/authoring-protocol.json +91 -0
  60. package/assets/skills-zh/comet-any/reference/authoring-subagents.md +107 -0
  61. package/assets/skills-zh/comet-any/reference/bundle-authoring.md +166 -0
  62. package/assets/skills-zh/comet-any/reference/eval-provider.md +66 -0
  63. package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +79 -0
  64. package/assets/skills-zh/comet-any/reference/subagents/reference-author.md +81 -0
  65. package/assets/skills-zh/comet-any/reference/subagents/script-author.md +84 -0
  66. package/assets/skills-zh/comet-any/reference/subagents/skill-core-author.md +129 -0
  67. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +124 -0
  68. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +98 -0
  69. package/assets/skills-zh/comet-archive/SKILL.md +25 -15
  70. package/assets/skills-zh/comet-build/SKILL.md +41 -43
  71. package/assets/skills-zh/comet-design/SKILL.md +14 -18
  72. package/assets/skills-zh/comet-hotfix/SKILL.md +37 -47
  73. package/assets/skills-zh/comet-open/SKILL.md +12 -22
  74. package/assets/skills-zh/comet-tweak/SKILL.md +70 -63
  75. package/assets/skills-zh/comet-verify/SKILL.md +28 -30
  76. package/bin/comet.js +1 -1
  77. package/dist/{cli → app/cli}/index.d.ts.map +1 -1
  78. package/dist/app/cli/index.js +430 -0
  79. package/dist/app/cli/index.js.map +1 -0
  80. package/dist/app/commands/bundle.d.ts +51 -0
  81. package/dist/app/commands/bundle.d.ts.map +1 -0
  82. package/dist/app/commands/bundle.js +387 -0
  83. package/dist/app/commands/bundle.js.map +1 -0
  84. package/dist/app/commands/creator.d.ts +14 -0
  85. package/dist/app/commands/creator.d.ts.map +1 -0
  86. package/dist/app/commands/creator.js +82 -0
  87. package/dist/app/commands/creator.js.map +1 -0
  88. package/dist/app/commands/dashboard.d.ts +16 -0
  89. package/dist/app/commands/dashboard.d.ts.map +1 -0
  90. package/dist/app/commands/dashboard.js +53 -0
  91. package/dist/app/commands/dashboard.js.map +1 -0
  92. package/dist/{commands → app/commands}/doctor.d.ts +1 -1
  93. package/dist/app/commands/doctor.d.ts.map +1 -0
  94. package/dist/{commands → app/commands}/doctor.js +110 -60
  95. package/dist/app/commands/doctor.js.map +1 -0
  96. package/dist/app/commands/eval.d.ts +17 -0
  97. package/dist/app/commands/eval.d.ts.map +1 -0
  98. package/dist/app/commands/eval.js +169 -0
  99. package/dist/app/commands/eval.js.map +1 -0
  100. package/dist/app/commands/i18n.d.ts +4 -0
  101. package/dist/app/commands/i18n.d.ts.map +1 -0
  102. package/dist/{commands → app/commands}/i18n.js +22 -2
  103. package/dist/app/commands/i18n.js.map +1 -0
  104. package/dist/{commands → app/commands}/init.d.ts +3 -1
  105. package/dist/app/commands/init.d.ts.map +1 -0
  106. package/dist/{commands → app/commands}/init.js +82 -32
  107. package/dist/app/commands/init.js.map +1 -0
  108. package/dist/app/commands/platform-select-prompt.d.ts +38 -0
  109. package/dist/app/commands/platform-select-prompt.d.ts.map +1 -0
  110. package/dist/app/commands/platform-select-prompt.js +141 -0
  111. package/dist/app/commands/platform-select-prompt.js.map +1 -0
  112. package/dist/app/commands/publish.d.ts +7 -0
  113. package/dist/app/commands/publish.d.ts.map +1 -0
  114. package/dist/app/commands/publish.js +14 -0
  115. package/dist/app/commands/publish.js.map +1 -0
  116. package/dist/app/commands/skill.d.ts +23 -0
  117. package/dist/app/commands/skill.d.ts.map +1 -0
  118. package/dist/app/commands/skill.js +208 -0
  119. package/dist/app/commands/skill.js.map +1 -0
  120. package/dist/app/commands/status.d.ts.map +1 -0
  121. package/dist/app/commands/status.js +159 -0
  122. package/dist/app/commands/status.js.map +1 -0
  123. package/dist/{commands → app/commands}/uninstall.d.ts +1 -1
  124. package/dist/app/commands/uninstall.d.ts.map +1 -0
  125. package/dist/{commands → app/commands}/uninstall.js +3 -3
  126. package/dist/app/commands/uninstall.js.map +1 -0
  127. package/dist/{commands → app/commands}/update.d.ts +4 -3
  128. package/dist/app/commands/update.d.ts.map +1 -0
  129. package/dist/{commands → app/commands}/update.js +43 -15
  130. package/dist/app/commands/update.js.map +1 -0
  131. package/dist/config/repository-layout.json +98 -0
  132. package/dist/domains/bundle/authoring.d.ts +82 -0
  133. package/dist/domains/bundle/authoring.d.ts.map +1 -0
  134. package/dist/domains/bundle/authoring.js +185 -0
  135. package/dist/domains/bundle/authoring.js.map +1 -0
  136. package/dist/domains/bundle/bundle-platform.d.ts +39 -0
  137. package/dist/domains/bundle/bundle-platform.d.ts.map +1 -0
  138. package/dist/domains/bundle/bundle-platform.js +287 -0
  139. package/dist/domains/bundle/bundle-platform.js.map +1 -0
  140. package/dist/domains/bundle/candidates.d.ts +29 -0
  141. package/dist/domains/bundle/candidates.d.ts.map +1 -0
  142. package/dist/domains/bundle/candidates.js +37 -0
  143. package/dist/domains/bundle/candidates.js.map +1 -0
  144. package/dist/domains/bundle/compatibility-benchmark.d.ts +12 -0
  145. package/dist/domains/bundle/compatibility-benchmark.d.ts.map +1 -0
  146. package/dist/domains/bundle/compatibility-benchmark.js +224 -0
  147. package/dist/domains/bundle/compatibility-benchmark.js.map +1 -0
  148. package/dist/domains/bundle/compiler.d.ts +5 -0
  149. package/dist/domains/bundle/compiler.d.ts.map +1 -0
  150. package/dist/domains/bundle/compiler.js +106 -0
  151. package/dist/domains/bundle/compiler.js.map +1 -0
  152. package/dist/domains/bundle/distribute.d.ts +33 -0
  153. package/dist/domains/bundle/distribute.d.ts.map +1 -0
  154. package/dist/domains/bundle/distribute.js +166 -0
  155. package/dist/domains/bundle/distribute.js.map +1 -0
  156. package/dist/domains/bundle/draft.d.ts +19 -0
  157. package/dist/domains/bundle/draft.d.ts.map +1 -0
  158. package/dist/domains/bundle/draft.js +82 -0
  159. package/dist/domains/bundle/draft.js.map +1 -0
  160. package/dist/domains/bundle/eval.d.ts +36 -0
  161. package/dist/domains/bundle/eval.d.ts.map +1 -0
  162. package/dist/domains/bundle/eval.js +501 -0
  163. package/dist/domains/bundle/eval.js.map +1 -0
  164. package/dist/domains/bundle/factory-compose.d.ts +12 -0
  165. package/dist/domains/bundle/factory-compose.d.ts.map +1 -0
  166. package/dist/domains/bundle/factory-compose.js +309 -0
  167. package/dist/domains/bundle/factory-compose.js.map +1 -0
  168. package/dist/domains/bundle/factory-guide.d.ts +37 -0
  169. package/dist/domains/bundle/factory-guide.d.ts.map +1 -0
  170. package/dist/domains/bundle/factory-guide.js +96 -0
  171. package/dist/domains/bundle/factory-guide.js.map +1 -0
  172. package/dist/domains/bundle/factory-plan.d.ts +48 -0
  173. package/dist/domains/bundle/factory-plan.d.ts.map +1 -0
  174. package/dist/domains/bundle/factory-plan.js +172 -0
  175. package/dist/domains/bundle/factory-plan.js.map +1 -0
  176. package/dist/domains/bundle/factory-proposal.d.ts +31 -0
  177. package/dist/domains/bundle/factory-proposal.d.ts.map +1 -0
  178. package/dist/domains/bundle/factory-proposal.js +225 -0
  179. package/dist/domains/bundle/factory-proposal.js.map +1 -0
  180. package/dist/domains/bundle/factory-resolve.d.ts +11 -0
  181. package/dist/domains/bundle/factory-resolve.d.ts.map +1 -0
  182. package/dist/domains/bundle/factory-resolve.js +121 -0
  183. package/dist/domains/bundle/factory-resolve.js.map +1 -0
  184. package/dist/domains/bundle/factory.d.ts +17 -0
  185. package/dist/domains/bundle/factory.d.ts.map +1 -0
  186. package/dist/domains/bundle/factory.js +511 -0
  187. package/dist/domains/bundle/factory.js.map +1 -0
  188. package/dist/domains/bundle/hash.d.ts +3 -0
  189. package/dist/domains/bundle/hash.d.ts.map +1 -0
  190. package/dist/domains/bundle/hash.js +72 -0
  191. package/dist/domains/bundle/hash.js.map +1 -0
  192. package/dist/domains/bundle/load.d.ts +4 -0
  193. package/dist/domains/bundle/load.d.ts.map +1 -0
  194. package/dist/domains/bundle/load.js +355 -0
  195. package/dist/domains/bundle/load.js.map +1 -0
  196. package/dist/domains/bundle/next-action.d.ts +37 -0
  197. package/dist/domains/bundle/next-action.d.ts.map +1 -0
  198. package/dist/domains/bundle/next-action.js +185 -0
  199. package/dist/domains/bundle/next-action.js.map +1 -0
  200. package/dist/domains/bundle/platform.d.ts +21 -0
  201. package/dist/domains/bundle/platform.d.ts.map +1 -0
  202. package/dist/domains/bundle/platform.js +170 -0
  203. package/dist/domains/bundle/platform.js.map +1 -0
  204. package/dist/domains/bundle/preferences.d.ts +11 -0
  205. package/dist/domains/bundle/preferences.d.ts.map +1 -0
  206. package/dist/domains/bundle/preferences.js +17 -0
  207. package/dist/domains/bundle/preferences.js.map +1 -0
  208. package/dist/domains/bundle/publish.d.ts +14 -0
  209. package/dist/domains/bundle/publish.d.ts.map +1 -0
  210. package/dist/domains/bundle/publish.js +159 -0
  211. package/dist/domains/bundle/publish.js.map +1 -0
  212. package/dist/domains/bundle/readiness-user-summary.d.ts +25 -0
  213. package/dist/domains/bundle/readiness-user-summary.d.ts.map +1 -0
  214. package/dist/domains/bundle/readiness-user-summary.js +186 -0
  215. package/dist/domains/bundle/readiness-user-summary.js.map +1 -0
  216. package/dist/domains/bundle/review-summary.d.ts +36 -0
  217. package/dist/domains/bundle/review-summary.d.ts.map +1 -0
  218. package/dist/domains/bundle/review-summary.js +348 -0
  219. package/dist/domains/bundle/review-summary.js.map +1 -0
  220. package/dist/domains/bundle/state.d.ts +7 -0
  221. package/dist/domains/bundle/state.d.ts.map +1 -0
  222. package/dist/domains/bundle/state.js +132 -0
  223. package/dist/domains/bundle/state.js.map +1 -0
  224. package/dist/domains/bundle/types.d.ts +347 -0
  225. package/dist/domains/bundle/types.d.ts.map +1 -0
  226. package/dist/domains/bundle/types.js.map +1 -0
  227. package/dist/domains/bundle/user-facing.d.ts +48 -0
  228. package/dist/domains/bundle/user-facing.d.ts.map +1 -0
  229. package/dist/domains/bundle/user-facing.js +73 -0
  230. package/dist/domains/bundle/user-facing.js.map +1 -0
  231. package/dist/domains/bundle/validate.d.ts +5 -0
  232. package/dist/domains/bundle/validate.d.ts.map +1 -0
  233. package/dist/domains/bundle/validate.js +292 -0
  234. package/dist/domains/bundle/validate.js.map +1 -0
  235. package/dist/domains/comet-classic/classic-archive-entry.d.ts +2 -0
  236. package/dist/domains/comet-classic/classic-archive-entry.d.ts.map +1 -0
  237. package/dist/domains/comet-classic/classic-archive-entry.js +4 -0
  238. package/dist/domains/comet-classic/classic-archive-entry.js.map +1 -0
  239. package/dist/domains/comet-classic/classic-archive.d.ts +3 -0
  240. package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -0
  241. package/dist/domains/comet-classic/classic-archive.js +392 -0
  242. package/dist/domains/comet-classic/classic-archive.js.map +1 -0
  243. package/dist/domains/comet-classic/classic-cli.d.ts +15 -0
  244. package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -0
  245. package/dist/domains/comet-classic/classic-cli.js +94 -0
  246. package/dist/domains/comet-classic/classic-cli.js.map +1 -0
  247. package/dist/domains/comet-classic/classic-diagnostics.d.ts +16 -0
  248. package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -0
  249. package/dist/domains/comet-classic/classic-diagnostics.js +57 -0
  250. package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -0
  251. package/dist/domains/comet-classic/classic-evidence.d.ts +10 -0
  252. package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -0
  253. package/dist/domains/comet-classic/classic-evidence.js +114 -0
  254. package/dist/domains/comet-classic/classic-evidence.js.map +1 -0
  255. package/dist/domains/comet-classic/classic-guard-entry.d.ts +2 -0
  256. package/dist/domains/comet-classic/classic-guard-entry.d.ts.map +1 -0
  257. package/dist/domains/comet-classic/classic-guard-entry.js +4 -0
  258. package/dist/domains/comet-classic/classic-guard-entry.js.map +1 -0
  259. package/dist/domains/comet-classic/classic-guard.d.ts +3 -0
  260. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -0
  261. package/dist/domains/comet-classic/classic-guard.js +833 -0
  262. package/dist/domains/comet-classic/classic-guard.js.map +1 -0
  263. package/dist/domains/comet-classic/classic-handoff-entry.d.ts +2 -0
  264. package/dist/domains/comet-classic/classic-handoff-entry.d.ts.map +1 -0
  265. package/dist/domains/comet-classic/classic-handoff-entry.js +4 -0
  266. package/dist/domains/comet-classic/classic-handoff-entry.js.map +1 -0
  267. package/dist/domains/comet-classic/classic-handoff.d.ts +3 -0
  268. package/dist/domains/comet-classic/classic-handoff.d.ts.map +1 -0
  269. package/dist/domains/comet-classic/classic-handoff.js +478 -0
  270. package/dist/domains/comet-classic/classic-handoff.js.map +1 -0
  271. package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts +2 -0
  272. package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts.map +1 -0
  273. package/dist/domains/comet-classic/classic-hook-guard-entry.js +4 -0
  274. package/dist/domains/comet-classic/classic-hook-guard-entry.js.map +1 -0
  275. package/dist/domains/comet-classic/classic-hook-guard.d.ts +3 -0
  276. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -0
  277. package/dist/domains/comet-classic/classic-hook-guard.js +382 -0
  278. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -0
  279. package/dist/domains/comet-classic/classic-intent-command.d.ts +3 -0
  280. package/dist/domains/comet-classic/classic-intent-command.d.ts.map +1 -0
  281. package/dist/domains/comet-classic/classic-intent-command.js +40 -0
  282. package/dist/domains/comet-classic/classic-intent-command.js.map +1 -0
  283. package/dist/domains/comet-classic/classic-intent-entry.d.ts +2 -0
  284. package/dist/domains/comet-classic/classic-intent-entry.d.ts.map +1 -0
  285. package/dist/domains/comet-classic/classic-intent-entry.js +4 -0
  286. package/dist/domains/comet-classic/classic-intent-entry.js.map +1 -0
  287. package/dist/domains/comet-classic/classic-intent.d.ts +79 -0
  288. package/dist/domains/comet-classic/classic-intent.d.ts.map +1 -0
  289. package/dist/domains/comet-classic/classic-intent.js +307 -0
  290. package/dist/domains/comet-classic/classic-intent.js.map +1 -0
  291. package/dist/domains/comet-classic/classic-migrate.d.ts +18 -0
  292. package/dist/domains/comet-classic/classic-migrate.d.ts.map +1 -0
  293. package/dist/domains/comet-classic/classic-migrate.js +184 -0
  294. package/dist/domains/comet-classic/classic-migrate.js.map +1 -0
  295. package/dist/domains/comet-classic/classic-paths.d.ts +8 -0
  296. package/dist/domains/comet-classic/classic-paths.d.ts.map +1 -0
  297. package/dist/domains/comet-classic/classic-paths.js +61 -0
  298. package/dist/domains/comet-classic/classic-paths.js.map +1 -0
  299. package/dist/domains/comet-classic/classic-resolver.d.ts +10 -0
  300. package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -0
  301. package/dist/domains/comet-classic/classic-resolver.js +89 -0
  302. package/dist/domains/comet-classic/classic-resolver.js.map +1 -0
  303. package/dist/domains/comet-classic/classic-runtime-evals.d.ts +9 -0
  304. package/dist/domains/comet-classic/classic-runtime-evals.d.ts.map +1 -0
  305. package/dist/domains/comet-classic/classic-runtime-evals.js +45 -0
  306. package/dist/domains/comet-classic/classic-runtime-evals.js.map +1 -0
  307. package/dist/domains/comet-classic/classic-runtime-run.d.ts +7 -0
  308. package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -0
  309. package/dist/domains/comet-classic/classic-runtime-run.js +105 -0
  310. package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -0
  311. package/dist/domains/comet-classic/classic-script-entry.d.ts +3 -0
  312. package/dist/domains/comet-classic/classic-script-entry.d.ts.map +1 -0
  313. package/dist/domains/comet-classic/classic-script-entry.js +31 -0
  314. package/dist/domains/comet-classic/classic-script-entry.js.map +1 -0
  315. package/dist/domains/comet-classic/classic-state-command.d.ts +3 -0
  316. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -0
  317. package/dist/domains/comet-classic/classic-state-command.js +984 -0
  318. package/dist/domains/comet-classic/classic-state-command.js.map +1 -0
  319. package/dist/domains/comet-classic/classic-state-entry.d.ts +2 -0
  320. package/dist/domains/comet-classic/classic-state-entry.d.ts.map +1 -0
  321. package/dist/domains/comet-classic/classic-state-entry.js +4 -0
  322. package/dist/domains/comet-classic/classic-state-entry.js.map +1 -0
  323. package/dist/domains/comet-classic/classic-state-events.d.ts +18 -0
  324. package/dist/domains/comet-classic/classic-state-events.d.ts.map +1 -0
  325. package/dist/domains/comet-classic/classic-state-events.js +15 -0
  326. package/dist/domains/comet-classic/classic-state-events.js.map +1 -0
  327. package/dist/domains/comet-classic/classic-state.d.ts +69 -0
  328. package/dist/domains/comet-classic/classic-state.d.ts.map +1 -0
  329. package/dist/domains/comet-classic/classic-state.js +238 -0
  330. package/dist/domains/comet-classic/classic-state.js.map +1 -0
  331. package/dist/domains/comet-classic/classic-store.d.ts +7 -0
  332. package/dist/domains/comet-classic/classic-store.d.ts.map +1 -0
  333. package/dist/domains/comet-classic/classic-store.js +127 -0
  334. package/dist/domains/comet-classic/classic-store.js.map +1 -0
  335. package/dist/domains/comet-classic/classic-transitions.d.ts +24 -0
  336. package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -0
  337. package/dist/domains/comet-classic/classic-transitions.js +124 -0
  338. package/dist/domains/comet-classic/classic-transitions.js.map +1 -0
  339. package/dist/domains/comet-classic/classic-validate-command.d.ts +3 -0
  340. package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -0
  341. package/dist/domains/comet-classic/classic-validate-command.js +154 -0
  342. package/dist/domains/comet-classic/classic-validate-command.js.map +1 -0
  343. package/dist/domains/comet-classic/classic-validate-entry.d.ts +2 -0
  344. package/dist/domains/comet-classic/classic-validate-entry.d.ts.map +1 -0
  345. package/dist/domains/comet-classic/classic-validate-entry.js +4 -0
  346. package/dist/domains/comet-classic/classic-validate-entry.js.map +1 -0
  347. package/dist/domains/comet-classic/index.d.ts +20 -0
  348. package/dist/domains/comet-classic/index.d.ts.map +1 -0
  349. package/dist/domains/comet-classic/index.js +20 -0
  350. package/dist/domains/comet-classic/index.js.map +1 -0
  351. package/dist/domains/dashboard/collector.d.ts +12 -0
  352. package/dist/domains/dashboard/collector.d.ts.map +1 -0
  353. package/dist/domains/dashboard/collector.js +475 -0
  354. package/dist/domains/dashboard/collector.js.map +1 -0
  355. package/dist/domains/dashboard/git.d.ts +8 -0
  356. package/dist/domains/dashboard/git.d.ts.map +1 -0
  357. package/dist/domains/dashboard/git.js +69 -0
  358. package/dist/domains/dashboard/git.js.map +1 -0
  359. package/dist/domains/dashboard/next-action.d.ts +17 -0
  360. package/dist/domains/dashboard/next-action.d.ts.map +1 -0
  361. package/dist/domains/dashboard/next-action.js +83 -0
  362. package/dist/domains/dashboard/next-action.js.map +1 -0
  363. package/dist/domains/dashboard/open-browser.d.ts +9 -0
  364. package/dist/domains/dashboard/open-browser.d.ts.map +1 -0
  365. package/dist/domains/dashboard/open-browser.js +40 -0
  366. package/dist/domains/dashboard/open-browser.js.map +1 -0
  367. package/dist/domains/dashboard/risk.d.ts +24 -0
  368. package/dist/domains/dashboard/risk.d.ts.map +1 -0
  369. package/dist/domains/dashboard/risk.js +97 -0
  370. package/dist/domains/dashboard/risk.js.map +1 -0
  371. package/dist/domains/dashboard/server.d.ts +21 -0
  372. package/dist/domains/dashboard/server.d.ts.map +1 -0
  373. package/dist/domains/dashboard/server.js +149 -0
  374. package/dist/domains/dashboard/server.js.map +1 -0
  375. package/dist/domains/dashboard/task-parser.d.ts +13 -0
  376. package/dist/domains/dashboard/task-parser.d.ts.map +1 -0
  377. package/dist/domains/dashboard/task-parser.js +82 -0
  378. package/dist/domains/dashboard/task-parser.js.map +1 -0
  379. package/dist/domains/dashboard/types.d.ts +122 -0
  380. package/dist/domains/dashboard/types.d.ts.map +1 -0
  381. package/dist/domains/dashboard/types.js +10 -0
  382. package/dist/domains/dashboard/types.js.map +1 -0
  383. package/dist/domains/dashboard/verify-parser.d.ts +18 -0
  384. package/dist/domains/dashboard/verify-parser.d.ts.map +1 -0
  385. package/dist/domains/dashboard/verify-parser.js +94 -0
  386. package/dist/domains/dashboard/verify-parser.js.map +1 -0
  387. package/dist/domains/dashboard/web/assets/demo-DQyfozbi.js +1 -0
  388. package/dist/domains/dashboard/web/assets/index-BcO3_QlT.css +1 -0
  389. package/dist/domains/dashboard/web/assets/index-CjU3VXVu.js +22 -0
  390. package/dist/domains/dashboard/web/favicon.png +0 -0
  391. package/dist/domains/dashboard/web/index.html +16 -0
  392. package/dist/domains/dashboard/yaml.d.ts +13 -0
  393. package/dist/domains/dashboard/yaml.d.ts.map +1 -0
  394. package/dist/domains/dashboard/yaml.js +61 -0
  395. package/dist/domains/dashboard/yaml.js.map +1 -0
  396. package/dist/domains/engine/evals.d.ts +4 -0
  397. package/dist/domains/engine/evals.d.ts.map +1 -0
  398. package/dist/domains/engine/evals.js +25 -0
  399. package/dist/domains/engine/evals.js.map +1 -0
  400. package/dist/domains/engine/guardrails.d.ts +10 -0
  401. package/dist/domains/engine/guardrails.d.ts.map +1 -0
  402. package/dist/domains/engine/guardrails.js +25 -0
  403. package/dist/domains/engine/guardrails.js.map +1 -0
  404. package/dist/domains/engine/loop.d.ts +15 -0
  405. package/dist/domains/engine/loop.d.ts.map +1 -0
  406. package/dist/domains/engine/loop.js +126 -0
  407. package/dist/domains/engine/loop.js.map +1 -0
  408. package/dist/domains/engine/manual-run.d.ts +30 -0
  409. package/dist/domains/engine/manual-run.d.ts.map +1 -0
  410. package/dist/domains/engine/manual-run.js +184 -0
  411. package/dist/domains/engine/manual-run.js.map +1 -0
  412. package/dist/domains/engine/resolver.d.ts +20 -0
  413. package/dist/domains/engine/resolver.d.ts.map +1 -0
  414. package/dist/domains/engine/resolver.js +36 -0
  415. package/dist/domains/engine/resolver.js.map +1 -0
  416. package/dist/domains/engine/run-store.d.ts +13 -0
  417. package/dist/domains/engine/run-store.d.ts.map +1 -0
  418. package/dist/domains/engine/run-store.js +100 -0
  419. package/dist/domains/engine/run-store.js.map +1 -0
  420. package/dist/domains/engine/runtime-types.d.ts +11 -0
  421. package/dist/domains/engine/runtime-types.d.ts.map +1 -0
  422. package/dist/domains/engine/runtime-types.js +2 -0
  423. package/dist/domains/engine/runtime-types.js.map +1 -0
  424. package/dist/domains/engine/standalone-run.d.ts +13 -0
  425. package/dist/domains/engine/standalone-run.d.ts.map +1 -0
  426. package/dist/domains/engine/standalone-run.js +27 -0
  427. package/dist/domains/engine/standalone-run.js.map +1 -0
  428. package/dist/domains/engine/state.d.ts +10 -0
  429. package/dist/domains/engine/state.d.ts.map +1 -0
  430. package/dist/domains/engine/state.js +160 -0
  431. package/dist/domains/engine/state.js.map +1 -0
  432. package/dist/domains/engine/types.d.ts +51 -0
  433. package/dist/domains/engine/types.d.ts.map +1 -0
  434. package/dist/domains/engine/types.js +2 -0
  435. package/dist/domains/engine/types.js.map +1 -0
  436. package/dist/domains/eval/index.d.ts +7 -0
  437. package/dist/domains/eval/index.d.ts.map +1 -0
  438. package/dist/domains/eval/index.js +11 -0
  439. package/dist/domains/eval/index.js.map +1 -0
  440. package/dist/domains/eval/repository-benchmarks.d.ts +6 -0
  441. package/dist/domains/eval/repository-benchmarks.d.ts.map +1 -0
  442. package/dist/domains/eval/repository-benchmarks.js +10 -0
  443. package/dist/domains/eval/repository-benchmarks.js.map +1 -0
  444. package/dist/domains/factory/artifacts.d.ts +53 -0
  445. package/dist/domains/factory/artifacts.d.ts.map +1 -0
  446. package/dist/domains/factory/artifacts.js +8 -0
  447. package/dist/domains/factory/artifacts.js.map +1 -0
  448. package/dist/domains/factory/package.d.ts +7 -0
  449. package/dist/domains/factory/package.d.ts.map +1 -0
  450. package/dist/domains/factory/package.js +1511 -0
  451. package/dist/domains/factory/package.js.map +1 -0
  452. package/dist/domains/factory/types.d.ts +127 -0
  453. package/dist/domains/factory/types.d.ts.map +1 -0
  454. package/dist/domains/factory/types.js +2 -0
  455. package/dist/domains/factory/types.js.map +1 -0
  456. package/dist/{core → domains/integrations}/codegraph.d.ts +1 -1
  457. package/dist/domains/integrations/codegraph.d.ts.map +1 -0
  458. package/dist/{core → domains/integrations}/codegraph.js +1 -1
  459. package/dist/domains/integrations/codegraph.js.map +1 -0
  460. package/dist/domains/integrations/openspec.d.ts +18 -0
  461. package/dist/domains/integrations/openspec.d.ts.map +1 -0
  462. package/dist/{core → domains/integrations}/openspec.js +102 -25
  463. package/dist/domains/integrations/openspec.js.map +1 -0
  464. package/dist/{core → domains/integrations}/superpowers.d.ts +10 -2
  465. package/dist/domains/integrations/superpowers.d.ts.map +1 -0
  466. package/dist/{core → domains/integrations}/superpowers.js +59 -13
  467. package/dist/domains/integrations/superpowers.js.map +1 -0
  468. package/dist/domains/skill/discovery.d.ts +17 -0
  469. package/dist/domains/skill/discovery.d.ts.map +1 -0
  470. package/dist/domains/skill/discovery.js +80 -0
  471. package/dist/domains/skill/discovery.js.map +1 -0
  472. package/dist/domains/skill/find.d.ts +41 -0
  473. package/dist/domains/skill/find.d.ts.map +1 -0
  474. package/dist/domains/skill/find.js +251 -0
  475. package/dist/domains/skill/find.js.map +1 -0
  476. package/dist/domains/skill/install.d.ts +11 -0
  477. package/dist/domains/skill/install.d.ts.map +1 -0
  478. package/dist/domains/skill/install.js +82 -0
  479. package/dist/domains/skill/install.js.map +1 -0
  480. package/dist/domains/skill/inventory.d.ts +19 -0
  481. package/dist/domains/skill/inventory.d.ts.map +1 -0
  482. package/dist/domains/skill/inventory.js +64 -0
  483. package/dist/domains/skill/inventory.js.map +1 -0
  484. package/dist/domains/skill/languages.d.ts +19 -0
  485. package/dist/domains/skill/languages.d.ts.map +1 -0
  486. package/dist/domains/skill/languages.js +21 -0
  487. package/dist/domains/skill/languages.js.map +1 -0
  488. package/dist/domains/skill/load.d.ts +5 -0
  489. package/dist/domains/skill/load.d.ts.map +1 -0
  490. package/dist/domains/skill/load.js +313 -0
  491. package/dist/domains/skill/load.js.map +1 -0
  492. package/dist/domains/skill/platform-install.d.ts +79 -0
  493. package/dist/domains/skill/platform-install.d.ts.map +1 -0
  494. package/dist/{core/skills.js → domains/skill/platform-install.js} +311 -54
  495. package/dist/domains/skill/platform-install.js.map +1 -0
  496. package/dist/domains/skill/preferences.d.ts +42 -0
  497. package/dist/domains/skill/preferences.d.ts.map +1 -0
  498. package/dist/domains/skill/preferences.js +118 -0
  499. package/dist/domains/skill/preferences.js.map +1 -0
  500. package/dist/domains/skill/snapshot.d.ts +8 -0
  501. package/dist/domains/skill/snapshot.d.ts.map +1 -0
  502. package/dist/domains/skill/snapshot.js +184 -0
  503. package/dist/domains/skill/snapshot.js.map +1 -0
  504. package/dist/domains/skill/types.d.ts +85 -0
  505. package/dist/domains/skill/types.d.ts.map +1 -0
  506. package/dist/domains/skill/types.js +2 -0
  507. package/dist/{core → domains/skill}/types.js.map +1 -1
  508. package/dist/{core → domains/skill}/uninstall.d.ts +2 -18
  509. package/dist/domains/skill/uninstall.d.ts.map +1 -0
  510. package/dist/{core → domains/skill}/uninstall.js +15 -66
  511. package/dist/domains/skill/uninstall.js.map +1 -0
  512. package/dist/domains/skill/validate.d.ts +3 -0
  513. package/dist/domains/skill/validate.d.ts.map +1 -0
  514. package/dist/domains/skill/validate.js +81 -0
  515. package/dist/domains/skill/validate.js.map +1 -0
  516. package/dist/domains/workflow-contract/builtins.d.ts +8 -0
  517. package/dist/domains/workflow-contract/builtins.d.ts.map +1 -0
  518. package/dist/domains/workflow-contract/builtins.js +229 -0
  519. package/dist/domains/workflow-contract/builtins.js.map +1 -0
  520. package/dist/domains/workflow-contract/hash.d.ts +3 -0
  521. package/dist/domains/workflow-contract/hash.d.ts.map +1 -0
  522. package/dist/domains/workflow-contract/hash.js +16 -0
  523. package/dist/domains/workflow-contract/hash.js.map +1 -0
  524. package/dist/domains/workflow-contract/index.d.ts +6 -0
  525. package/dist/domains/workflow-contract/index.d.ts.map +1 -0
  526. package/dist/domains/workflow-contract/index.js +5 -0
  527. package/dist/domains/workflow-contract/index.js.map +1 -0
  528. package/dist/domains/workflow-contract/normalize.d.ts +3 -0
  529. package/dist/domains/workflow-contract/normalize.d.ts.map +1 -0
  530. package/dist/domains/workflow-contract/normalize.js +146 -0
  531. package/dist/domains/workflow-contract/normalize.js.map +1 -0
  532. package/dist/domains/workflow-contract/types.d.ts +128 -0
  533. package/dist/domains/workflow-contract/types.d.ts.map +1 -0
  534. package/dist/domains/workflow-contract/types.js +2 -0
  535. package/dist/domains/workflow-contract/types.js.map +1 -0
  536. package/dist/domains/workflow-contract/validation.d.ts +3 -0
  537. package/dist/domains/workflow-contract/validation.d.ts.map +1 -0
  538. package/dist/domains/workflow-contract/validation.js +180 -0
  539. package/dist/domains/workflow-contract/validation.js.map +1 -0
  540. package/dist/platform/fs/file-system.d.ts.map +1 -0
  541. package/dist/platform/fs/file-system.js.map +1 -0
  542. package/dist/platform/install/detect.d.ts.map +1 -0
  543. package/dist/{core → platform/install}/detect.js +4 -3
  544. package/dist/platform/install/detect.js.map +1 -0
  545. package/dist/platform/install/platforms.d.ts.map +1 -0
  546. package/dist/{core → platform/install}/platforms.js +41 -0
  547. package/dist/platform/install/platforms.js.map +1 -0
  548. package/dist/platform/install/types.d.ts +3 -0
  549. package/dist/platform/install/types.d.ts.map +1 -0
  550. package/dist/platform/install/types.js +2 -0
  551. package/dist/platform/install/types.js.map +1 -0
  552. package/dist/platform/paths/repository-layout.d.ts +22 -0
  553. package/dist/platform/paths/repository-layout.d.ts.map +1 -0
  554. package/dist/platform/paths/repository-layout.js +11 -0
  555. package/dist/platform/paths/repository-layout.js.map +1 -0
  556. package/dist/platform/process/command-error.d.ts.map +1 -0
  557. package/dist/platform/process/command-error.js.map +1 -0
  558. package/dist/platform/process/shell-quote.d.ts +22 -0
  559. package/dist/platform/process/shell-quote.d.ts.map +1 -0
  560. package/dist/platform/process/shell-quote.js +34 -0
  561. package/dist/platform/process/shell-quote.js.map +1 -0
  562. package/dist/platform/version/version.d.ts.map +1 -0
  563. package/dist/{core → platform/version}/version.js +16 -3
  564. package/dist/platform/version/version.js.map +1 -0
  565. package/package.json +41 -15
  566. package/assets/skills/comet/scripts/comet-archive.sh +0 -311
  567. package/assets/skills/comet/scripts/comet-env.sh +0 -110
  568. package/assets/skills/comet/scripts/comet-guard.sh +0 -778
  569. package/assets/skills/comet/scripts/comet-handoff.sh +0 -390
  570. package/assets/skills/comet/scripts/comet-hook-guard.sh +0 -336
  571. package/assets/skills/comet/scripts/comet-state.sh +0 -1338
  572. package/assets/skills/comet/scripts/comet-yaml-validate.sh +0 -225
  573. package/dist/cli/index.js +0 -84
  574. package/dist/cli/index.js.map +0 -1
  575. package/dist/commands/doctor.d.ts.map +0 -1
  576. package/dist/commands/doctor.js.map +0 -1
  577. package/dist/commands/i18n.d.ts +0 -4
  578. package/dist/commands/i18n.d.ts.map +0 -1
  579. package/dist/commands/i18n.js.map +0 -1
  580. package/dist/commands/init.d.ts.map +0 -1
  581. package/dist/commands/init.js.map +0 -1
  582. package/dist/commands/status.d.ts.map +0 -1
  583. package/dist/commands/status.js +0 -108
  584. package/dist/commands/status.js.map +0 -1
  585. package/dist/commands/uninstall.d.ts.map +0 -1
  586. package/dist/commands/uninstall.js.map +0 -1
  587. package/dist/commands/update.d.ts.map +0 -1
  588. package/dist/commands/update.js.map +0 -1
  589. package/dist/core/codegraph.d.ts.map +0 -1
  590. package/dist/core/codegraph.js.map +0 -1
  591. package/dist/core/command-error.d.ts.map +0 -1
  592. package/dist/core/command-error.js.map +0 -1
  593. package/dist/core/detect.d.ts.map +0 -1
  594. package/dist/core/detect.js.map +0 -1
  595. package/dist/core/openspec.d.ts +0 -11
  596. package/dist/core/openspec.d.ts.map +0 -1
  597. package/dist/core/openspec.js.map +0 -1
  598. package/dist/core/platforms.d.ts.map +0 -1
  599. package/dist/core/platforms.js.map +0 -1
  600. package/dist/core/skills.d.ts +0 -58
  601. package/dist/core/skills.d.ts.map +0 -1
  602. package/dist/core/skills.js.map +0 -1
  603. package/dist/core/superpowers.d.ts.map +0 -1
  604. package/dist/core/superpowers.js.map +0 -1
  605. package/dist/core/types.d.ts +0 -2
  606. package/dist/core/types.d.ts.map +0 -1
  607. package/dist/core/uninstall.d.ts.map +0 -1
  608. package/dist/core/uninstall.js.map +0 -1
  609. package/dist/core/version.d.ts.map +0 -1
  610. package/dist/core/version.js.map +0 -1
  611. package/dist/utils/file-system.d.ts.map +0 -1
  612. package/dist/utils/file-system.js.map +0 -1
  613. /package/dist/{cli → app/cli}/index.d.ts +0 -0
  614. /package/dist/{commands → app/commands}/status.d.ts +0 -0
  615. /package/dist/{core → domains/bundle}/types.js +0 -0
  616. /package/dist/{utils → platform/fs}/file-system.d.ts +0 -0
  617. /package/dist/{utils → platform/fs}/file-system.js +0 -0
  618. /package/dist/{core → platform/install}/detect.d.ts +0 -0
  619. /package/dist/{core → platform/install}/platforms.d.ts +0 -0
  620. /package/dist/{core → platform/process}/command-error.d.ts +0 -0
  621. /package/dist/{core → platform/process}/command-error.js +0 -0
  622. /package/dist/{core → platform/version}/version.d.ts +0 -0
  623. /package/scripts/{postinstall.js → install/postinstall.js} +0 -0
@@ -0,0 +1,69 @@
1
+ # Script Location and Commands
2
+
3
+ Canonical path: `comet/reference/scripts.md`
4
+
5
+ This file is the single source of truth for locating Comet scripts and the state/guard/handoff/archive command surface. Load it once per session, then reuse the cached env vars.
6
+
7
+ ## Bootstrap (run once per session)
8
+
9
+ Comet scripts are distributed in `comet/scripts/`. **Do not hardcode paths** — locate once, cache in env vars. Sub-skills may reference this section directly and only inline this block when they must be fully self-contained; this file is the single source of truth for updates:
10
+
11
+ ```bash
12
+ COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.mjs' -type f -print -quit 2>/dev/null)}"
13
+ if [ -z "$COMET_ENV" ]; then
14
+ echo "ERROR: comet-env.mjs not found. Ensure the comet skill is installed." >&2
15
+ return 1
16
+ fi
17
+ COMET_SCRIPTS_DIR="$(node "$COMET_ENV")"
18
+ COMET_STATE="$COMET_SCRIPTS_DIR/comet-state.mjs"
19
+ COMET_GUARD="$COMET_SCRIPTS_DIR/comet-guard.mjs"
20
+ COMET_HANDOFF="$COMET_SCRIPTS_DIR/comet-handoff.mjs"
21
+ COMET_ARCHIVE="$COMET_SCRIPTS_DIR/comet-archive.mjs"
22
+ COMET_INTENT="$COMET_SCRIPTS_DIR/comet-intent.mjs"
23
+
24
+ # Stop workflow when script location fails
25
+ if [ -z "$COMET_SCRIPTS_DIR" ]; then
26
+ echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
27
+ return 1
28
+ fi
29
+ ```
30
+
31
+ After loading comet, agents should run this bootstrap block once, then reuse `$COMET_GUARD`, `$COMET_STATE`, `$COMET_HANDOFF`, `$COMET_ARCHIVE`, and `$COMET_INTENT` throughout the session.
32
+
33
+ ## Auto state update
34
+
35
+ Guard supports `--apply` flag, automatically updating `.comet.yaml` state fields after checks pass:
36
+
37
+ ```bash
38
+ node "$COMET_GUARD" <change-name> <phase> --apply
39
+ ```
40
+
41
+ `--apply` delegates to `comet-state transition`. Use these semantic events when state changes need to be expressed directly:
42
+
43
+ ```bash
44
+ node "$COMET_STATE" transition <change-name> open-complete
45
+ node "$COMET_STATE" transition <change-name> design-complete
46
+ node "$COMET_STATE" transition <change-name> build-complete
47
+ node "$COMET_STATE" transition <change-name> verify-pass
48
+ node "$COMET_STATE" transition <change-name> verify-fail
49
+ ```
50
+
51
+ Archive completion is handled by `node "$COMET_ARCHIVE" <change-name>` after OpenSpec moves the change into its date-prefixed archive directory; do not manually transition an `<archive-name>`.
52
+
53
+ ## Resolve next action
54
+
55
+ After guard-based phase advancement, use the `next` subcommand to determine whether to auto-invoke the next skill:
56
+
57
+ ```bash
58
+ node "$COMET_STATE" next <change-name>
59
+ ```
60
+
61
+ Output format: `NEXT: auto|manual|done` + `SKILL: <skill-name>` (omitted for `done`) + `HINT` (for `manual` only). With `auto_transition: false`, output is `manual`, which pauses only the next skill invocation and does not block phase updates.
62
+
63
+ ## Archive script
64
+
65
+ Complete all archive steps in one command:
66
+
67
+ ```bash
68
+ node "$COMET_ARCHIVE" <change-name>
69
+ ```
@@ -2,14 +2,14 @@
2
2
 
3
3
  Canonical path: `comet/reference/subagent-dispatch.md`
4
4
 
5
- This document provides Comet-specific extensions applied **on top of** the Superpowers `subagent-driven-development` skill. The skill handles the core dispatch loop (fresh implementer per task spec compliance review code quality review → next task) and enforces continuous execution. This document adds Comet-specific real background dispatch, task tracking, state verification, and context recovery. If the Superpowers skill conflicts with this document, the more specific Comet constraints here take precedence.
5
+ This document provides Comet-specific extensions applied **on top of** the Superpowers `subagent-driven-development` skill. The Superpowers `subagent-driven-development` skill provides the base continuous dispatch loop (a fresh implementer for each task, including the default task reviewer node) and enforces continuous execution. This document adds Comet-specific real background dispatch, task tracking, state verification, context recovery, and review/fix budgets; Comet's `review_mode` takes over the reviewer stage to decide which tasks need reviewers, how many fix rounds are allowed, and which final review runs. If the Superpowers skill conflicts with this document, the more specific Comet constraints here take precedence.
6
6
 
7
7
  > **⚠️ CRITICAL — No Pause Between Tasks**
8
8
  >
9
- > After a task passes both reviews and is checked off, **immediately dispatch the next task** without stopping, summarizing, or asking the user whether to continue. The user expects all tasks to execute in sequence without manual intervention. Pausing between tasks breaks the workflow and requires the user to manually resume each time.
9
+ > After a task passes `review_mode` validation and is checked off, **immediately dispatch the next task** without stopping, summarizing, or asking the user whether to continue. The user expects all tasks to execute in sequence without manual intervention. Pausing between tasks breaks the workflow and requires the user to manually resume each time.
10
10
  >
11
11
  > Only stop and wait for user input when:
12
- > - A task is **BLOCKED** (3 review-fix rounds exhausted)
12
+ > - A task is **BLOCKED** (review-fix rounds exhausted: `review_mode: standard` — 1 round of risk-task review-fix or final lightweight review not passed; `review_mode: thorough` — 2 rounds of task-level/final review-fix not passed)
13
13
  > - There is irreducible ambiguity that cannot be resolved from the repository, plan, or existing context
14
14
  > - The platform lacks real background agent dispatch capability and the user must choose `executing-plans`
15
15
  > - The user **explicitly** asks to pause
@@ -18,9 +18,10 @@ This document provides Comet-specific extensions applied **on top of** the Super
18
18
 
19
19
  ## Before Starting
20
20
 
21
- 1. Read the plan once, extracting the full text of all unchecked tasks in order.
22
- 2. Save a unique identifier for each task: the full task text after the checkbox in the plan, and the full OpenSpec task text it maps to (if any). If the text is not unique, stop and fix the plan first; never rely on "first match."
23
- 3. Respect dependencies; do not dispatch a task whose dependencies are not yet complete.
21
+ 1. Before dispatching the first task, complete the Superpowers `subagent-driven-development` skill pre-flight plan review: scan the plan and global constraints for contradictions or plan-mandated defects a reviewer would flag. If found, ask one batched question with the conflicting plan text before implementation starts; if clean, proceed without ceremony.
22
+ 2. Read the plan once, extracting the full text of all unchecked tasks in order.
23
+ 3. Save a unique identifier for each task: the full task text after the checkbox in the plan, and the full OpenSpec task text it maps to (if any). If the text is not unique, stop and fix the plan first; never rely on "first match."
24
+ 4. Respect dependencies; do not dispatch a task whose dependencies are not yet complete.
24
25
 
25
26
  ## Per-Task Comet Extensions
26
27
 
@@ -28,9 +29,9 @@ Apply these on every task, in addition to the Superpowers skill's dispatch loop:
28
29
 
29
30
  ### 0. Dispatch Enforcement (Critical)
30
31
 
31
- The main session is the **coordinator only** and must NOT execute tasks directly or modify source code. The coordinator may modify only the plan, OpenSpec task, and subagent progress checkpoint for durable tracking. Never bundle multiple tasks into one agent. Dispatch a fresh background implementer agent for every task; spec reviewers, code quality reviewers, fix agents, and the final reviewer must also each use a fresh background agent:
32
+ The main session is the **coordinator only** and must NOT execute tasks directly or modify source code. The coordinator may modify only the plan, OpenSpec task, and subagent progress checkpoint for durable tracking. Never bundle multiple tasks into one agent. Dispatch a fresh background implementer agent for every task; when `review_mode` requires review or fixes, the task reviewer, fix agents, and the final reviewer must also each use a fresh background agent:
32
33
 
33
- - **Claude Code**: Use the `Agent` tool with `run_in_background: true` for each implementer, spec reviewer, code quality reviewer, fix agent, and final reviewer. Never execute tasks inline and do not accidentally enter team mode, which requires a pre-created team.
34
+ - **Claude Code**: Use the `Agent` tool with `run_in_background: true` for each implementer, task reviewer, fix agent, and final reviewer. Never execute tasks inline and do not accidentally enter team mode, which requires a pre-created team.
34
35
  - **Other platforms**: Use the platform's equivalent background agent / Task / multi-agent dispatch mechanism.
35
36
  - **Never** reuse implementers, reviewers, or fix agents across tasks or roles. Each agent gets a fresh, isolated context containing only the single task and role-specific context it needs.
36
37
  - If the platform has no real background dispatch capability, do not proceed; pause and wait for the user to choose `build_mode: executing-plans`.
@@ -40,14 +41,40 @@ The main session is the **coordinator only** and must NOT execute tasks directly
40
41
  Every implementer or fix-agent prompt must include:
41
42
 
42
43
  - The full text of the single current task, architecture background, and dependency context
43
- - `Language: Use the language of the user request that triggered this workflow`
44
+ - `Language: Use the configured Comet artifact language from "$COMET_BASH" "$COMET_STATE" get <name> language`
44
45
  - The allowed file scope and prohibited modification scope
45
46
  - The required test commands and commit requirements
46
47
  - For a fix agent, the corresponding reviewer's complete feedback
47
48
 
48
- The agent return status must be `DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT` and include implementation details, test results, commit hash, changed files, and concerns. Before review, the coordinator must verify that the commit and changed files are visible in the current worktree; on isolated-copy platforms, pull or merge the changes first.
49
+ Large task text, implementation reports, and review material must move through the file-handoff mechanism exposed by the loaded Superpowers `subagent-driven-development` skill, not be pasted wholesale into the main session. The dispatch prompt should point agents to those handoff artifacts while still naming the role, allowed scope, required tests, report contract, and any Comet-specific constraints. Comet may record returned artifact paths or short summaries for recovery, but must not depend on the internal names or directory layout of those artifacts.
49
50
 
50
- Every reviewer prompt must include the full task, the implementation commit or diff and the RED/GREEN evidence (when `tdd_mode: tdd`). A reviewer must not review from the implementer's summary alone.
51
+ The agent return status must be `DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT` and include or point to implementation details, test results, commit hash, changed files, and concerns. **The implementer/fix agent must also report whether this task hits any risk signal** (see the list below); if so, list each one hit. This is the first signal source for whether a per-task reviewer is dispatched under `review_mode: standard`. Before review, the coordinator must verify that the commit and changed files are visible in the current worktree; on isolated-copy platforms, pull or merge the changes first.
52
+
53
+ **Risk signal list** (hitting any one marks the task as a risk task):
54
+
55
+ - Cross-module / cross-subsystem coordinated change
56
+ - Security-sensitive surface: auth, authorization, crypto, SQL, external input handling, secrets/credentials
57
+ - Concurrency, locks, shared mutable state
58
+ - Data or schema migration
59
+ - Public API contract or external interface change
60
+ - Implementer returns `DONE_WITH_CONCERNS`
61
+ - Single-task diff exceeds 200 lines
62
+
63
+ When `review_mode` requires a reviewer, each reviewer prompt must include or point to the full task requirements, the implementation commit or diff, and the RED/GREEN evidence (when `tdd_mode: tdd`). A reviewer must not review from the implementer's summary alone.
64
+
65
+ Reviewer prompts must stay neutral:
66
+
67
+ - Do not ask a reviewer to re-run the same tests the implementer already ran and reported; the reviewer verifies the reported evidence and the code/diff.
68
+ - Do not pre-judge, suppress, or down-rank findings in the reviewer prompt. If a likely finding conflicts with the plan, let the reviewer report it, then ask the user which requirement governs.
69
+ - Do not paste accumulated prior-task history into later dispatches. Give only the current task, the relevant interfaces/constraints, and the handoff artifacts exposed by the loaded Superpowers `subagent-driven-development` skill.
70
+
71
+ **Model selection (mandatory)**: Every dispatch must specify the model explicitly. An omitted model silently inherits the session's most expensive model, slowing execution and raising cost. Follow the Superpowers `subagent-driven-development` Model Selection rules:
72
+
73
+ - **Implementer / fix agent**: prose-described implementation work uses at least the standard tier; multi-file integration, pattern matching, or debugging → standard tier; requires design judgment or broad codebase understanding → most capable tier. Use the cheapest tier only when the plan text already contains the complete code to write (transcription + testing) or for a single-file mechanical fix.
74
+ - **Reviewer (task-level / final)**: scale to the diff's size, complexity, and risk. A small mechanical diff does not need the most capable model; a subtle concurrency change does.
75
+ - **Final whole-branch review**: use the most capable available model, not the session default.
76
+
77
+ Omitting the model equals letting it run the session's most expensive model — directly defeating this section's goal.
51
78
 
52
79
  ### 2. Implementer Scope Restriction
53
80
 
@@ -61,27 +88,53 @@ If `tdd_mode: tdd`, every implementer and fix agent must first use the Skill too
61
88
  You MUST follow TDD: write a failing test first, watch it fail, then write minimal code to pass. No production code without a failing test first.
62
89
  ```
63
90
 
64
- The implementer or fix-agent return must provide **RED failure command and failure summary**, **GREEN pass command and pass summary**; missing either piece of evidence blocks entry into review. Both spec compliance reviewer and code quality reviewer must verify RED/GREEN evidence and test coverage.
91
+ The implementer or fix-agent return must provide **RED failure command and failure summary**, **GREEN pass command and pass summary**; missing either piece of evidence blocks entry into review. When `review_mode` requires a task reviewer, that reviewer must verify RED/GREEN evidence and test coverage while checking both spec compliance and code quality.
65
92
 
66
93
  ### 4. Durable Progress Checkpoint
67
94
 
68
95
  The coordinator must maintain `openspec/changes/<name>/.comet/subagent-progress.md` and update it immediately after every dispatch, agent return, review result, review-fix round change, and task checkoff. The checkpoint must record at least:
69
96
 
70
97
  - The unique current plan task text and mapped OpenSpec task text
71
- - Current stage: `implementing | spec-review | quality-review | checkoff | done | blocked | final-review | final-fix`
98
+ - Current stage: `implementing | task-review | checkoff | done | blocked | final-review | final-fix`
72
99
  - Implementation commit hash, changed files, and RED/GREEN evidence
100
+ - The selected `review_mode`
73
101
  - Review stages already passed and unresolved reviewer feedback
74
- - The current task or final-review review-fix round (maximum 3)
102
+ - The current task or final-review review-fix round (`standard`: max 1, `thorough`: max 2, `off`: 0)
103
+ - Under `review_mode: standard`, whether this task has already triggered a risk task-level review and which risk signals it hit (on recovery, do not re-dispatch an already-completed task-level review)
75
104
 
76
105
  This file stores only coordinator recovery state and does not replace plan or OpenSpec checkboxes. Retain the final record when a task completes, then replace it with the next task's record when that task begins.
77
106
 
78
- ### 5. Review-Fix Round Limit
107
+ Comet does not read, write, or require any Superpowers `subagent-driven-development` internal scripts or workspace paths. If the installed Superpowers `subagent-driven-development` skill maintains its own scratch artifacts, review material, task requirement files, or progress records, those remain owned by Superpowers. Comet's durable source of truth is limited to Comet workflow state, the plan/OpenSpec checkboxes, and this coordinator checkpoint.
108
+
109
+ ### 5. Review Mode Behavior
110
+
111
+ > **⚠️ CRITICAL — review_mode takes over the Superpowers default flow, no double review**
112
+ >
113
+ > The Superpowers `subagent-driven-development` Process flowchart makes "dispatch a task reviewer after every task" a mandatory node. **Comet's `review_mode` takes over this stage, deciding which tasks get a per-task reviewer** (see the per-task reviewer column in the table below). **Do not dispatch additional reviewers beyond what `review_mode` prescribes.** Tasks that do not get a reviewer (`off`: all; `standard`: non-risk tasks) must go straight to task checkoff and dispatch of the next task.
114
+ >
115
+ > The total review count for a change is decided solely by the table below — do not add more.
116
+
117
+ **Build-phase review budget** (these only — do not add more). This table covers the build phase only; the verify phase has its own review handling (see note below):
118
+
119
+ | `review_mode` | per-task reviewer (build) | final review (build) |
120
+ |---------------|---------------------------|----------------------|
121
+ | `off` | 0 | 0 |
122
+ | `standard` | risk tasks only (see rules below) | 1 (lightweight) |
123
+ | `thorough` | every task (spec + quality) | 1 (complete) |
124
+
125
+ **Verify-phase review is not in this table.** The verify phase's review is driven by `verify_mode` (light/full), with `review_mode` only gating whether automatic code review fires at all (`off` skips it; `standard`/`thorough` run a lightweight code review under lightweight verification, or rely on `openspec-verify-change` under full verification). There is no separate per-`review_mode` "complete" code review in verify — see `comet-verify` for the authoritative verify-phase behavior.
126
+
127
+ **When `review_mode: standard`**: By default no per-task reviewer is dispatched; instead, a **risk trigger** decides: after the implementer self-tests, commits, and reports evidence (including the risk-signal self-report), the coordinator reads the self-report and reviews the task's diff. **Only when the implementer's self-report hits any risk signal, or the coordinator's diff review finds any risk signal**, dispatch one per-task reviewer for that task, checking both spec compliance and code quality; CRITICAL/IMPORTANT findings enter one review-fix round (max 1), and a failed re-review marks it **BLOCKED**. Tasks that hit no risk signal go straight through targeted checkoff verification. After all tasks complete, still dispatch one final lightweight code reviewer (scope: correctness, security, edge cases). If the final lightweight review finds CRITICAL or IMPORTANT issues, dispatch at most one fix agent and re-review once; if still not passed, mark **BLOCKED** and pause, handing feedback to the user. Non-CRITICAL findings may be accepted with rationale recorded.
128
+
129
+ **When `review_mode: thorough`**: **Dispatch one per-task reviewer per task, checking both spec compliance and code quality**: after the implementer self-tests, commits, and reports evidence, the coordinator dispatches a fresh background reviewer for that task. CRITICAL/IMPORTANT findings enter review-fix (max 2 rounds); if still not passed, mark **BLOCKED** and pause, handing feedback to the user. After all tasks, dispatch one final complete reviewer. Thorough does not run batched review — a high-risk change demands immediate, focused review on every task; deferring to a batch boundary to catch issues is too costly.
130
+
131
+ When a reviewer returns an item that cannot be verified from review material alone, the coordinator must resolve it before task checkoff. If direct repository inspection confirms a real gap, treat it as a failed spec/quality review and send it through the appropriate fix and re-review loop. If it is satisfied by unchanged code or a cross-task constraint, record the rationale in the checkpoint and continue.
79
132
 
80
- Each task allows at most 3 review-fix rounds. When either reviewer finds an issue, dispatch a fresh background fix agent and restart from the corresponding review. If the task still does not pass after 3 rounds, mark it **BLOCKED**, pause, and hand the accumulated feedback to the user.
133
+ **When `review_mode: off`**: No automatic task reviewer, final reviewer, or review-fix agent is dispatched. Task completion is determined by implementer test/build evidence, current worktree confirmation, targeted task text checkoff verification, and explicit user request. If test failures, build failures, or abnormal behavior occur during execution, the debug gate protocol must still be followed - `off` does not skip real issues.
81
134
 
82
135
  ### 6. Task Checkoff and Verification
83
136
 
84
- **After both reviews pass**, the main session:
137
+ **After `review_mode` validation**, the main session:
85
138
 
86
139
  1. Changes the saved unique task text from `- [ ]` to `- [x]` in the plan
87
140
  2. If a mapping exists, also checks off the OpenSpec task
@@ -89,25 +142,28 @@ Each task allows at most 3 review-fix rounds. When either reviewer finds an issu
89
142
  4. Runs targeted verification:
90
143
 
91
144
  ```bash
92
- "$COMET_BASH" "$COMET_STATE" task-checkoff "$PLAN_FILE" "$PLAN_TASK_TEXT"
93
- "$COMET_BASH" "$COMET_STATE" task-checkoff "openspec/changes/<name>/tasks.md" "$OPENSPEC_TASK_TEXT"
145
+ node "$COMET_STATE" task-checkoff "$PLAN_FILE" "$PLAN_TASK_TEXT"
146
+ node "$COMET_STATE" task-checkoff "openspec/changes/<name>/tasks.md" "$OPENSPEC_TASK_TEXT"
94
147
  ```
95
148
 
96
149
  Run the second command only when the corresponding mapping exists. The script requires the task text to appear exactly once and be checked; verification failure blocks moving to the next task.
97
150
 
98
151
  ## Wrap-up
99
152
 
100
- - **AUTO-CONTINUE**: After both reviews pass and the task is checked off, immediately dispatch the next unchecked task. Do NOT summarize, do NOT ask the user whether to continue, do NOT wait for user input between tasks. This is non-negotiable — the Superpowers skill enforces continuous execution, and the CRITICAL warning at the top of this document reinforces it.
101
- - After all tasks complete, switch the checkpoint to `final-review`, then dispatch a fresh background final code quality reviewer. For CRITICAL issues, switch the checkpoint to `final-fix`, record feedback and the round, dispatch a fresh background fix agent, and re-review. Final review also has a maximum of 3 rounds; when exhausted, mark the checkpoint `blocked` and pause. Non-CRITICAL findings may be accepted with rationale recorded in tasks.md.
153
+ - **AUTO-CONTINUE**: After `review_mode` validation and the task is checked off, immediately dispatch the next unchecked task. Do NOT summarize, do NOT ask the user whether to continue, do NOT wait for user input between tasks. This is non-negotiable — the Superpowers skill enforces continuous execution, and the CRITICAL warning at the top of this document reinforces it.
154
+ - After all tasks complete, if `review_mode: standard`, switch the checkpoint to `final-review` and dispatch exactly one final lightweight code reviewer. CRITICAL or IMPORTANT issues allow at most one auto-fix and re-review; if still not passed, pause and hand to the user. After passing or accepting non-CRITICAL findings, continue to return to `comet-build`.
155
+ - After all tasks complete, if `review_mode: thorough`, switch the checkpoint to `final-review` and dispatch one final complete reviewer. CRITICAL or IMPORTANT issues allow at most two auto-fix and re-review rounds; if still not passed, pause and hand to the user. After passing or accepting non-CRITICAL findings, continue to return to `comet-build`.
156
+ - After all tasks complete, if `review_mode: off`, do not enter `final-review` or `final-fix`, but must record the reason for skipping automatic code review in a durable artifact, then return to `comet-build`.
102
157
  - After final review passes, only the subagent dispatch loop is complete, not the Comet workflow. The coordinator must not load `finishing-a-development-branch` or pause to ask what comes next; it must return control to `comet-build` for exit checks, the phase guard, and phase handoff.
103
158
 
104
159
  ## Context Recovery
105
160
 
106
161
  Reload the Superpowers `subagent-driven-development` skill and re-read this document. Read `openspec/changes/<name>/.comet/subagent-progress.md`, then compare it with the first unchecked task and the current worktree:
107
162
 
108
- - When the checkpoint matches the unchecked task, resume from its exact recorded stage while preserving the implementation commit, RED/GREEN evidence, review stages already passed, unresolved feedback, and current review-fix round. Never reset the round or repeat an already passed stage.
163
+ - When the checkpoint matches the unchecked task, resume from its exact recorded stage while preserving the implementation commit, RED/GREEN evidence, `review_mode`, review stages already passed, unresolved feedback, and current review-fix round. Never reset the round or repeat an already passed stage.
164
+ - If the loaded Superpowers `subagent-driven-development` skill reports a task complete through its own progress record, reconcile that report against git history and Comet plan/OpenSpec checkboxes before dispatching. When the commits and task identity match, update Comet's checkpoint/checkoff state instead of re-dispatching completed work.
109
165
  - When the checkpoint is missing or does not match the unchecked task, create a new checkpoint for the first unchecked task and begin with implementer dispatch.
110
166
  - When a recorded commit or file is not visible in the current worktree, pull, merge, or recover the corresponding changes before proceeding; never assume the implementation exists.
111
167
  - When all tasks are checked and the checkpoint stage is `final-review` or `final-fix`, resume the exact final-review stage while preserving final feedback and its review-fix round; never re-enter completed tasks.
112
168
 
113
- Tasks committed without dual-review approval remain unchecked and re-enter the review or fix loop according to the checkpoint.
169
+ Tasks committed without passing `review_mode` validation remain unchecked and re-enter the corresponding validation, review, or fix loop according to the checkpoint.
@@ -1,7 +1,7 @@
1
1
  # Comet Phase Awareness (Anti-Drift Rules)
2
2
 
3
3
  > This rule is injected every round to prevent forgetting Comet workflow state during long context.
4
- > The Hook platform additionally executes `comet-hook-guard.sh` for hard interception;
4
+ > The Hook platform additionally executes `comet-hook-guard.mjs` for hard interception;
5
5
  > this Rule is a universal soft defense line for all platforms.
6
6
 
7
7
  ## Global Rules
@@ -19,6 +19,9 @@ When there is an active comet change (`openspec/changes/<name>/.comet.yaml` exis
19
19
  | `build` | Write source code, tests, execute plans | Skip user confirmation points |
20
20
  | `verify` | Verification, branch handling | Skip failure handling |
21
21
  | `archive` | Confirm archive, run archive script | Write source code |
22
+
23
+ The hook hard interception allowlist includes workflow and platform workspaces such as `openspec/*`, `docs/superpowers/*`, `.superpowers/*`, `.claude/*`, and `.comet/*`; write access to these paths does not allow skipping the current phase's artifacts or confirmation requirements.
24
+
22
25
  ### Phase-Entry Self-Consistency Check (Before Writing Source Code)
23
26
 
24
27
  Reading the `phase` field alone is not enough — you must also confirm **how** that phase was reached. Before writing any source code, self-check whether `.comet.yaml` is in an **illegal jump** state (a prior phase was skipped) using the table below. If any row matches, immediately stop writing source code, go back to the corresponding phase to fill the missing artifact, and do not trust the `phase` field to keep going.
@@ -26,10 +29,14 @@ Reading the `phase` field alone is not enough — you must also confirm **how**
26
29
  | Detected | Verdict | Action |
27
30
  |----------|---------|--------|
28
31
  | `phase: build` + `workflow: full` + `design_doc` empty/null | Skipped design | Stop writing source; run `/comet-design` to create the Design Doc and pass guard |
29
- | `phase: build/verify` + any of proposal/design/tasks missing or empty | Skipped open | Return to `/comet-open` to fill the three artifacts |
32
+ | `phase: build` + any of proposal/design/tasks missing or empty | Skipped open | Return to `/comet-open` to fill the three artifacts |
30
33
  | `phase: archive` + `verify_result` ≠ `pass` | Skipped verify | Return to `/comet-verify` to complete verification |
31
34
 
35
+ > Note: the table above only covers what the hook hard-gate actually detects (the `design_doc` empty-jump at the build phase; proposal/design/tasks completeness is validated at the open→build guard exit). The `verify` phase is not covered by this write-source self-consistency gate — if artifacts are found missing during verify, follow the verify-fail rewind handling under "Verify Phase Specifics" below.
36
+
32
37
  Exception: `workflow: hotfix/tweak` intentionally skips design, so an empty `design_doc` is normal and not an illegal jump.
38
+
39
+ Upgrade state note: after a preset (hotfix/tweak) hits an upgrade signal and the user confirms upgrading, `comet-state transition <name> preset-escalate` legally converts it to `workflow: full` + `phase: design` + `design_doc: null`. At this point `phase: design` with an empty `design_doc` **is a normal upgrade pre-state**, not an illegal jump — the agent should enter `/comet-design` to supplement the Design Doc. This terminal state does not match the "skipped design" row above (that row only detects `phase: build`).
33
40
  ### Skill Invocation (Cannot Replace with Normal Conversation)
34
41
 
35
42
  The following operations must be loaded through the Skill tool. When Skill is unavailable, stop the workflow and prompt to install:
@@ -47,7 +54,7 @@ The following operations must be loaded through the Skill tool. When Skill is un
47
54
  - **Phase exit**: `comet-guard <name> <phase> --apply` (must see ALL CHECKS PASSED)
48
55
  - **Compression recovery**: `comet-state check <name> <phase> --recover`
49
56
  - **State update**: After key operations, update fields through `comet-state set`; manually editing .comet.yaml is prohibited
50
- - **Phase advancement only via guard/transition**: directly running `comet-state set <name> phase <value>` to jump phases is prohibited (it bypasses evidence checks and the script now hard-blocks it); use the `COMET_FORCE_PHASE=1` escape hatch only to repair a malformed state
57
+ - **Phase advancement only via guard/transition**: directly running `comet-state set <name> phase <value>` to jump phases is prohibited (it bypasses evidence checks and the script now hard-blocks it); use the `COMET_FORCE_PHASE=1` escape hatch only to repair a malformed state. A preset (hotfix/tweak) upgrade to full must use `comet-state transition <name> preset-escalate` — this is the only channel that can legally rewind phase to design and sync workflow/classic_profile; direct `set phase design` and `set classic_profile` are both hard-blocked
51
58
  - **handoff generation**: `comet-handoff <name> design --write` (handwriting summaries is prohibited)
52
59
 
53
60
  ### User Confirmation (Cannot Auto-Skip)
@@ -56,7 +63,7 @@ The following decision points must pause to wait for explicit user selection; do
56
63
 
57
64
  - **open**: Requirements clarification completion confirmation, artifact review confirmation
58
65
  - **design**: brainstorming proposal confirmation (Design Doc cannot be created before confirmation)
59
- - **build**: plan-ready pause, isolation/build_mode/tdd_mode selection, spec large-scale change confirmation
66
+ - **build**: plan-ready pause, four choices: `isolation` / `build_mode` / `tdd_mode` / `review_mode` (workspace isolation, execution method, TDD mode, code review mode), spec large-scale change confirmation, preset (hotfix/tweak) upgrade-assessment two-choice (when a qualitative-change signal or file-count tripwire is hit, let the user decide whether to continue the preset or upgrade to full)
60
67
  - **verify**: Verification failure handling strategy, branch handling selection
61
68
  - **archive**: Final confirmation before archiving
62
69
 
@@ -71,7 +78,7 @@ The following decision points must pause to wait for explicit user selection; do
71
78
  ## Build Phase Specifics
72
79
 
73
80
  1. After plan creation, must ask user to choose continue or pause (`build_pause` mechanism)
74
- 2. After each task acceptance, must: tasks.md checkmark → git commit (do not accumulate). `subagent-driven-development` must wait for both spec compliance and code quality reviews to pass, then the coordinator performs targeted verification by unique task text; do not use an incomplete task summary table to replace current task verification
81
+ 2. After each task acceptance, must: tasks.md checkmark → git commit (do not accumulate). `subagent-driven-development` must complete acceptance according to the current `review_mode`, then the coordinator performs targeted verification by unique task text; do not use an incomplete task summary table to replace current task verification
75
82
  3. When encountering failures, must load **systematic-debugging** skill; do not propose source code fixes before root cause is located
76
83
  4. spec change grading: small changes edit directly | medium changes load brainstorming | large changes pause and wait for user confirmation to split
77
84
 
@@ -80,13 +87,14 @@ The following decision points must pause to wait for explicit user selection; do
80
87
  1. First step run `comet-state scale <name>` to determine verification level
81
88
  2. After verification fails, list failed items and wait for user selection; CRITICAL must be fixed
82
89
  3. After 3 consecutive failures, must let user choose to accept deviation or continue fixing
90
+ 4. When the user chooses to fix, run `comet-state transition <name> verify-fail`: this transition rewinds `phase` back to `build` (not staying in verify), then enter `/comet-build` to fix; after fixing, re-run the build→verify guard
83
91
 
84
92
  ## Context Compression Recovery
85
93
 
86
94
  If context compression is suspected (previous conversation was summarized, previous discussion cannot be found), immediately run:
87
95
 
88
96
  ```bash
89
- "$COMET_BASH" "$COMET_STATE" check <name> <phase> --recover
97
+ node "$COMET_STATE" check <name> <phase> --recover
90
98
  ```
91
99
 
92
100
  Decide next step according to the script's **Recovery action** output.
@@ -99,8 +107,8 @@ After recovery, first re-run the "Phase-Entry Self-Consistency Check" table: if
99
107
  3. Read `openspec/changes/<name>/.comet/subagent-progress.md` to recover the exact stage, evidence, and review-fix round
100
108
  4. Do not execute tasks directly in the main session
101
109
  5. Resume from the checkpoint; start from the first unchecked task only when it is missing or mismatched
102
- 6. Already committed but not yet passed both reviews tasks remain unchecked; continue review/fix loop
103
- 7. After dual review and targeted checkoff verification pass, immediately continue to the next task without summarizing or asking whether to continue
110
+ 6. Tasks already committed but not yet validated according to `review_mode` remain unchecked; continue the corresponding validation/review/fix loop
111
+ 7. After a task passes `review_mode` validation and targeted checkoff verification, immediately continue to the next task without summarizing or asking whether to continue
104
112
 
105
113
  ## Automatic Transition After Phase Exit
106
114
 
@@ -110,10 +118,10 @@ After guard `--apply` succeeds, do not hardcode the next skill in this rule. Fir
110
118
  comet-state next <change-name>
111
119
  ```
112
120
 
113
- If `comet-env.sh` has already located the scripts, the equivalent command is:
121
+ If `comet-env.mjs` has already located the scripts, the equivalent command is:
114
122
 
115
123
  ```bash
116
- "$COMET_BASH" "$COMET_STATE" next <change-name>
124
+ node "$COMET_STATE" next <change-name>
117
125
  ```
118
126
 
119
127
  Decide the next step from the script output:
@@ -1,7 +1,7 @@
1
1
  # Comet 阶段感知(防漂移规则)
2
2
 
3
3
  > 此规则每轮注入,防止长上下文时遗忘 Comet 流程状态。
4
- > Hook 平台额外执行 `comet-hook-guard.sh` 进行硬性拦截;
4
+ > Hook 平台额外执行 `comet-hook-guard.mjs` 进行硬性拦截;
5
5
  > 此 Rule 是所有平台通用的软性防线。
6
6
 
7
7
  ## 全局规则
@@ -20,6 +20,8 @@
20
20
  | `verify` | 验证、branch handling | 跳过失败处理 |
21
21
  | `archive` | 确认归档、运行归档脚本 | 写源代码 |
22
22
 
23
+ Hook 硬拦截白名单包括 `openspec/*`、`docs/superpowers/*`、`.superpowers/*`、`.claude/*` 和 `.comet/*` 等流程/平台工作区;这些路径可写不代表可以跳过当前阶段的产物和确认要求。
24
+
23
25
  ### 阶段进入自洽性校验(写源代码前必查)
24
26
 
25
27
  仅看 `phase` 字段不够——还必须确认"是如何到达这个阶段的"。每次准备写源代码前,先用下表自检 `.comet.yaml` 是否处于**非法空跳**状态(绕过了前置阶段)。命中任一行,立即停止写源代码,按动作回到对应阶段补齐产物,不得信任 `phase` 字段直接续跑。
@@ -27,11 +29,15 @@
27
29
  | 检测到 | 判定 | 动作 |
28
30
  |--------|------|------|
29
31
  | `phase: build` + `workflow: full` + `design_doc` 为空/null | 绕过 design 空跳 | 停止写源代码,运行 `/comet-design` 补 Design Doc 并过 guard |
30
- | `phase: build/verify` + proposal/design/tasks 任一缺失或为空 | 绕过 open 空跳 | 回 `/comet-open` 补齐三件套 |
32
+ | `phase: build` + proposal/design/tasks 任一缺失或为空 | 绕过 open 空跳 | 回 `/comet-open` 补齐三件套 |
31
33
  | `phase: archive` + `verify_result` ≠ `pass` | 绕过 verify 空跳 | 回 `/comet-verify` 完成验证 |
32
34
 
35
+ > 说明:上表只覆盖 hook 硬门实际检测的范围(`design_doc` 空跳在 build 阶段;proposal/design/tasks 三件套完整性在 open→build 的 guard 退出时校验)。`verify` 阶段不在此写源码自洽门内——若 verify 发现产物缺失,按下方「Verify 阶段专项」的 verify-fail 回退处理。
36
+
33
37
  预设例外:`workflow: hotfix/tweak` 本就跳过 design,`design_doc` 为空属正常,不算非法。
34
38
 
39
+ 升级态说明:预设(hotfix/tweak)命中升级信号并经用户确认升级后,通过 `comet-state transition <name> preset-escalate` 合法地变为 `workflow: full` + `phase: design` + `design_doc: null`。此时 `phase: design` + `design_doc` 为空**属正常升级前置态**,不是非法空跳——agent 应进入 `/comet-design` 补 Design Doc。该终态不命中上表「绕过 design 空跳」行(该行仅检测 `phase: build`)。
40
+
35
41
  ### Skill 调用(不可用普通对话替代)
36
42
 
37
43
  以下操作必须通过 Skill 工具加载,Skill 不可用时应停止流程并提示安装:
@@ -49,7 +55,7 @@
49
55
  - **阶段退出**: `comet-guard <name> <phase> --apply`(必须看到 ALL CHECKS PASSED)
50
56
  - **压缩恢复**: `comet-state check <name> <phase> --recover`
51
57
  - **状态更新**: 关键操作后通过 `comet-state set` 更新字段,禁止手工编辑 .comet.yaml
52
- - **阶段推进只能经 guard/transition**: 禁止用 `comet-state set <name> phase <值>` 手动跳阶段(会绕过证据校验,脚本已硬拦截);确需修复畸形状态时才用 `COMET_FORCE_PHASE=1` 逃生阀
58
+ - **阶段推进只能经 guard/transition**: 禁止用 `comet-state set <name> phase <值>` 手动跳阶段(会绕过证据校验,脚本已硬拦截);确需修复畸形状态时才用 `COMET_FORCE_PHASE=1` 逃生阀。预设(hotfix/tweak)升级到 full 必须用 `comet-state transition <name> preset-escalate`——这是唯一能合法回退 phase 到 design 并同步 workflow/classic_profile 的通道,直接 `set phase design` 和 `set classic_profile` 都会被硬拦截
53
59
  - **handoff 生成**: `comet-handoff <name> design --write`(禁止手写摘要)
54
60
 
55
61
  ### 用户确认(不可自动跳过)
@@ -58,7 +64,7 @@
58
64
 
59
65
  - **open**: 需求澄清完成确认、artifact 评审确认
60
66
  - **design**: brainstorming 方案确认(确认前不得创建 Design Doc)
61
- - **build**: plan-ready 暂停、isolation/build_mode/tdd_mode 选择、spec 大规模变更确认
67
+ - **build**: plan-ready 暂停、`isolation` / `build_mode` / `tdd_mode` / `review_mode` 四项选择(工作区隔离、执行方式、TDD 模式、代码审查模式)、spec 大规模变更确认、预设(hotfix/tweak)升级判定二选一(命中质变信号或文件数 tripwire 时,交用户决定继续预设流程还是升级 full)
62
68
  - **verify**: 验证失败处理策略、branch handling 选择
63
69
  - **archive**: 归档前最终确认
64
70
 
@@ -73,7 +79,7 @@
73
79
  ## Build 阶段专项
74
80
 
75
81
  1. plan 创建后必须询问用户选择继续或暂停(`build_pause` 机制)
76
- 2. 每个 task 验收后必须: tasks.md 打勾 → git commit(不得积攒)。`subagent-driven-development` 必须等 spec compliance 与 code quality 两个审查都通过,再由协调者按任务唯一文本定向勾选和验证;不得用未完成任务总表代替当前任务验证
82
+ 2. 每个 task 验收后必须: tasks.md 打勾 → git commit(不得积攒)。`subagent-driven-development` 必须按当前 `review_mode` 完成验收,再由协调者按任务唯一文本定向勾选和验证;不得用未完成任务总表代替当前任务验证
77
83
  3. 遇到失败必须加载 **systematic-debugging** skill,根因未定位前不得提出源码修复
78
84
  4. spec 变更分级: 小改直接编辑 | 中改加载 brainstorming | 大改暂停等用户确认拆分
79
85
 
@@ -82,13 +88,14 @@
82
88
  1. 第一步运行 `comet-state scale <name>` 确定验证级别
83
89
  2. 验证失败后列出失败项等用户选择,CRITICAL 必须修
84
90
  3. 连续 3 次失败后必须让用户选择接受偏差或继续修
91
+ 4. 用户选择修复时运行 `comet-state transition <name> verify-fail`:该转移会把 `phase` 回退到 `build`(不是停在 verify),随后进入 `/comet-build` 修复,修完重新过 build→verify guard
85
92
 
86
93
  ## 上下文压缩恢复
87
94
 
88
95
  如果怀疑发生上下文压缩(之前对话被摘要、找不到之前讨论的内容),立即运行:
89
96
 
90
97
  ```bash
91
- "$COMET_BASH" "$COMET_STATE" check <name> <phase> --recover
98
+ node "$COMET_STATE" check <name> <phase> --recover
92
99
  ```
93
100
 
94
101
  按脚本输出的 **Recovery action** 决定下一步。
@@ -101,8 +108,8 @@
101
108
  3. 读取 `openspec/changes/<name>/.comet/subagent-progress.md` 恢复精确阶段、证据和审查-修复轮次 (Read `openspec/changes/<name>/.comet/subagent-progress.md` to recover the exact stage, evidence, and review-fix round)
102
109
  4. 禁止在主会话中直接执行 task (Do not execute the pending task directly in the main window)
103
110
  5. 按检查点恢复;缺失或不匹配时才从第一个未勾选 task 开始
104
- 6. 已提交但未通过双审查的 task 保持未勾选,继续审查/修复循环
105
- 7. task 通过双审查和定向勾选验证后立即继续下一个 task,不得总结或询问是否继续
111
+ 6. 已提交但未按 `review_mode` 完成验收的 task 保持未勾选,继续对应的验证/审查/修复循环
112
+ 7. task `review_mode` 完成验收并通过定向勾选验证后立即继续下一个 task,不得总结或询问是否继续
106
113
 
107
114
  ## 阶段退出后自动过渡
108
115
 
@@ -112,10 +119,10 @@ guard `--apply` 成功后,不得在本规则中硬编码下一阶段 skill。
112
119
  comet-state next <change-name>
113
120
  ```
114
121
 
115
- 若已通过 `comet-env.sh` 定位脚本,等价运行:
122
+ 若已通过 `comet-env.mjs` 定位脚本,等价运行:
116
123
 
117
124
  ```bash
118
- "$COMET_BASH" "$COMET_STATE" next <change-name>
125
+ node "$COMET_STATE" next <change-name>
119
126
  ```
120
127
 
121
128
  按脚本输出决定下一步:
@@ -0,0 +1,6 @@
1
+ runtime:
2
+ - id: classic-completed
3
+ scope: completion
4
+ type: state_equals
5
+ field: status
6
+ equals: completed
@@ -0,0 +1,13 @@
1
+ allowedSkills:
2
+ - comet-open
3
+ - comet-design
4
+ - comet-build
5
+ - comet-verify
6
+ - comet-archive
7
+ - comet-hotfix
8
+ - comet-tweak
9
+ allowedAgents: []
10
+ allowedTools: []
11
+ maxIterations: 500
12
+ maxRetriesPerAction: 3
13
+ confirmationRequiredFor: []
@@ -0,0 +1,122 @@
1
+ apiVersion: comet/v1alpha1
2
+ kind: Skill
3
+ metadata:
4
+ name: comet-classic
5
+ version: "1"
6
+ description: Internal compatibility orchestration for classic Comet full, hotfix, and tweak workflows
7
+ goal:
8
+ statement: Advance or restore a classic Comet Run without changing the user command surface
9
+ inputs:
10
+ - name: classic-state
11
+ description: Validated ClassicState consistent with the Run projection
12
+ required: true
13
+ - name: evidence
14
+ description: Structured evidence produced by the Classic Evidence collector
15
+ required: true
16
+ outputs:
17
+ - name: run-state
18
+ description: Atomically synchronized Classic and Run state
19
+ required: true
20
+ success:
21
+ - Legacy fields and Run fields remain consistent
22
+ - Every step invokes only a declared public Comet Skill
23
+ - The completed state passes its completion eval
24
+ orchestration:
25
+ mode: deterministic
26
+ entry: full.open
27
+ steps:
28
+ - id: full.open
29
+ action: { type: invoke_skill, ref: comet-open }
30
+ next: full.design.handoff
31
+ - id: full.design.handoff
32
+ action: { type: invoke_skill, ref: comet-design }
33
+ next: full.design.document
34
+ - id: full.design.document
35
+ action: { type: invoke_skill, ref: comet-design }
36
+ next: full.build.plan
37
+ - id: full.build.plan
38
+ action: { type: invoke_skill, ref: comet-build }
39
+ next: full.build.plan-ready
40
+ - id: full.build.plan-ready
41
+ action: { type: invoke_skill, ref: comet-build }
42
+ next: full.build.configure
43
+ - id: full.build.configure
44
+ action: { type: invoke_skill, ref: comet-build }
45
+ next: full.build.execute
46
+ - id: full.build.execute
47
+ action: { type: invoke_skill, ref: comet-build }
48
+ next: full.build.complete
49
+ - id: full.build.complete
50
+ action: { type: invoke_skill, ref: comet-build }
51
+ next: full.verify.run
52
+ - id: full.build.fix
53
+ action: { type: invoke_skill, ref: comet-build }
54
+ next: full.build.execute
55
+ - id: full.verify.run
56
+ action: { type: invoke_skill, ref: comet-verify }
57
+ next: full.verify.branch
58
+ - id: full.verify.branch
59
+ action: { type: invoke_skill, ref: comet-verify }
60
+ next: full.archive.confirm
61
+ - id: full.archive.confirm
62
+ action: { type: invoke_skill, ref: comet-archive }
63
+ next: full.archive.execute
64
+ - id: full.archive.execute
65
+ action: { type: invoke_skill, ref: comet-archive }
66
+ next: completed
67
+ - id: hotfix.open
68
+ action: { type: invoke_skill, ref: comet-hotfix }
69
+ next: hotfix.build.execute
70
+ - id: hotfix.build.execute
71
+ action: { type: invoke_skill, ref: comet-build }
72
+ next: hotfix.build.complete
73
+ - id: hotfix.build.complete
74
+ action: { type: invoke_skill, ref: comet-build }
75
+ next: hotfix.verify.run
76
+ - id: hotfix.verify.run
77
+ action: { type: invoke_skill, ref: comet-verify }
78
+ next: hotfix.verify.branch
79
+ - id: hotfix.verify.branch
80
+ action: { type: invoke_skill, ref: comet-verify }
81
+ next: hotfix.archive.confirm
82
+ - id: hotfix.archive.confirm
83
+ action: { type: invoke_skill, ref: comet-archive }
84
+ next: hotfix.archive.execute
85
+ - id: hotfix.archive.execute
86
+ action: { type: invoke_skill, ref: comet-archive }
87
+ next: completed
88
+ - id: tweak.open
89
+ action: { type: invoke_skill, ref: comet-tweak }
90
+ next: tweak.build.execute
91
+ - id: tweak.build.execute
92
+ action: { type: invoke_skill, ref: comet-build }
93
+ next: tweak.build.complete
94
+ - id: tweak.build.complete
95
+ action: { type: invoke_skill, ref: comet-build }
96
+ next: tweak.verify.run
97
+ - id: tweak.verify.run
98
+ action: { type: invoke_skill, ref: comet-verify }
99
+ next: tweak.verify.branch
100
+ - id: tweak.verify.branch
101
+ action: { type: invoke_skill, ref: comet-verify }
102
+ next: tweak.archive.confirm
103
+ - id: tweak.archive.confirm
104
+ action: { type: invoke_skill, ref: comet-archive }
105
+ next: tweak.archive.execute
106
+ - id: tweak.archive.execute
107
+ action: { type: invoke_skill, ref: comet-archive }
108
+ next: completed
109
+ - id: completed
110
+ action: { type: checkpoint }
111
+ completionEvals:
112
+ - classic-completed
113
+ skills:
114
+ - id: comet-open
115
+ - id: comet-design
116
+ - id: comet-build
117
+ - id: comet-verify
118
+ - id: comet-archive
119
+ - id: comet-hotfix
120
+ - id: comet-tweak
121
+ agents: []
122
+ tools: []
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { main } from './comet-runtime.mjs';
3
+ process.exitCode = await main(["archive", ...process.argv.slice(2)]);