@rpamis/comet 0.4.0-beta.3 → 0.4.0-beta.5

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 (605) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +15 -1
  3. package/assets/manifest.json +2 -1
  4. package/assets/skills/comet/SKILL.md +54 -28
  5. package/assets/skills/comet/reference/auto-transition.md +1 -1
  6. package/assets/skills/comet/reference/comet-yaml-fields.md +11 -6
  7. package/assets/skills/comet/reference/context-recovery.md +12 -2
  8. package/assets/skills/comet/reference/decision-point.md +11 -0
  9. package/assets/skills/comet/reference/scripts.md +47 -15
  10. package/assets/skills/comet/reference/subagent-dispatch.md +6 -5
  11. package/assets/skills/comet/rules/comet-phase-guard.en.md +31 -28
  12. package/assets/skills/comet/rules/comet-phase-guard.md +31 -29
  13. package/assets/skills/comet/scripts/comet-resume-probe.mjs +3 -0
  14. package/assets/skills/comet/scripts/comet-runtime.mjs +1568 -476
  15. package/assets/skills/comet-any/SKILL.md +1 -1
  16. package/assets/skills/comet-any/reference/authored-zone-example.md +10 -5
  17. package/assets/skills/comet-any/reference/subagents/pause-points-author.md +14 -11
  18. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +2 -0
  19. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +5 -4
  20. package/assets/skills/comet-archive/SKILL.md +52 -18
  21. package/assets/skills/comet-build/SKILL.md +64 -45
  22. package/assets/skills/comet-design/SKILL.md +24 -22
  23. package/assets/skills/comet-hotfix/SKILL.md +37 -34
  24. package/assets/skills/comet-open/SKILL.md +106 -57
  25. package/assets/skills/comet-tweak/SKILL.md +23 -18
  26. package/assets/skills/comet-verify/SKILL.md +57 -72
  27. package/assets/skills-zh/comet/SKILL.md +54 -28
  28. package/assets/skills-zh/comet/reference/auto-transition.md +1 -1
  29. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +11 -6
  30. package/assets/skills-zh/comet/reference/context-recovery.md +12 -2
  31. package/assets/skills-zh/comet/reference/decision-point.md +11 -0
  32. package/assets/skills-zh/comet/reference/scripts.md +47 -15
  33. package/assets/skills-zh/comet/reference/subagent-dispatch.md +6 -5
  34. package/assets/skills-zh/comet-any/SKILL.md +1 -1
  35. package/assets/skills-zh/comet-any/reference/authored-zone-example.md +10 -5
  36. package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +14 -12
  37. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +2 -0
  38. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +5 -4
  39. package/assets/skills-zh/comet-archive/SKILL.md +52 -18
  40. package/assets/skills-zh/comet-build/SKILL.md +64 -45
  41. package/assets/skills-zh/comet-design/SKILL.md +24 -22
  42. package/assets/skills-zh/comet-hotfix/SKILL.md +36 -33
  43. package/assets/skills-zh/comet-open/SKILL.md +105 -56
  44. package/assets/skills-zh/comet-tweak/SKILL.md +22 -17
  45. package/assets/skills-zh/comet-verify/SKILL.md +57 -72
  46. package/dist/app/cli/comet-banner.d.ts +25 -0
  47. package/dist/app/cli/comet-banner.d.ts.map +1 -0
  48. package/dist/app/cli/comet-banner.js +265 -0
  49. package/dist/app/cli/comet-banner.js.map +1 -0
  50. package/dist/app/cli/index.js +36 -2
  51. package/dist/app/cli/index.js.map +1 -1
  52. package/dist/app/commands/classic.d.ts +4 -0
  53. package/dist/app/commands/classic.d.ts.map +1 -0
  54. package/dist/app/commands/classic.js +11 -0
  55. package/dist/app/commands/classic.js.map +1 -0
  56. package/dist/app/commands/doctor.d.ts.map +1 -1
  57. package/dist/app/commands/doctor.js +99 -37
  58. package/dist/app/commands/doctor.js.map +1 -1
  59. package/dist/app/commands/eval.d.ts.map +1 -1
  60. package/dist/app/commands/eval.js +57 -20
  61. package/dist/app/commands/eval.js.map +1 -1
  62. package/dist/app/commands/i18n.d.ts +1 -1
  63. package/dist/app/commands/i18n.d.ts.map +1 -1
  64. package/dist/app/commands/i18n.js +12 -4
  65. package/dist/app/commands/i18n.js.map +1 -1
  66. package/dist/app/commands/init.d.ts +1 -1
  67. package/dist/app/commands/init.d.ts.map +1 -1
  68. package/dist/app/commands/init.js +72 -25
  69. package/dist/app/commands/init.js.map +1 -1
  70. package/dist/app/commands/project-scope-selection.d.ts +13 -0
  71. package/dist/app/commands/project-scope-selection.d.ts.map +1 -0
  72. package/dist/app/commands/project-scope-selection.js +33 -0
  73. package/dist/app/commands/project-scope-selection.js.map +1 -0
  74. package/dist/app/commands/resume-probe.d.ts +11 -0
  75. package/dist/app/commands/resume-probe.d.ts.map +1 -0
  76. package/dist/app/commands/resume-probe.js +63 -0
  77. package/dist/app/commands/resume-probe.js.map +1 -0
  78. package/dist/app/commands/status.d.ts +31 -0
  79. package/dist/app/commands/status.d.ts.map +1 -1
  80. package/dist/app/commands/status.js +109 -20
  81. package/dist/app/commands/status.js.map +1 -1
  82. package/dist/app/commands/uninstall.d.ts +5 -0
  83. package/dist/app/commands/uninstall.d.ts.map +1 -1
  84. package/dist/app/commands/uninstall.js +264 -53
  85. package/dist/app/commands/uninstall.js.map +1 -1
  86. package/dist/app/commands/update.d.ts +6 -0
  87. package/dist/app/commands/update.d.ts.map +1 -1
  88. package/dist/app/commands/update.js +558 -86
  89. package/dist/app/commands/update.js.map +1 -1
  90. package/dist/config/repository-layout.json +4 -2
  91. package/dist/domains/bundle/bundle-platform.d.ts +1 -0
  92. package/dist/domains/bundle/bundle-platform.d.ts.map +1 -1
  93. package/dist/domains/bundle/bundle-platform.js +9 -3
  94. package/dist/domains/bundle/bundle-platform.js.map +1 -1
  95. package/dist/domains/bundle/eval-manifest-runtime.d.ts +6 -0
  96. package/dist/domains/bundle/eval-manifest-runtime.d.ts.map +1 -0
  97. package/dist/domains/bundle/eval-manifest-runtime.js +58 -0
  98. package/dist/domains/bundle/eval-manifest-runtime.js.map +1 -0
  99. package/dist/domains/bundle/types.d.ts +1 -1
  100. package/dist/domains/bundle/types.d.ts.map +1 -1
  101. package/dist/domains/comet-classic/classic-archive.d.ts +1 -0
  102. package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -1
  103. package/dist/domains/comet-classic/classic-archive.js +35 -38
  104. package/dist/domains/comet-classic/classic-archive.js.map +1 -1
  105. package/dist/domains/comet-classic/classic-cli.d.ts +1 -1
  106. package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -1
  107. package/dist/domains/comet-classic/classic-cli.js +3 -0
  108. package/dist/domains/comet-classic/classic-cli.js.map +1 -1
  109. package/dist/domains/comet-classic/classic-command-checks.d.ts +20 -0
  110. package/dist/domains/comet-classic/classic-command-checks.d.ts.map +1 -0
  111. package/dist/domains/comet-classic/classic-command-checks.js +97 -0
  112. package/dist/domains/comet-classic/classic-command-checks.js.map +1 -0
  113. package/dist/domains/comet-classic/classic-current-change.d.ts +19 -0
  114. package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -0
  115. package/dist/domains/comet-classic/classic-current-change.js +132 -0
  116. package/dist/domains/comet-classic/classic-current-change.js.map +1 -0
  117. package/dist/domains/comet-classic/classic-diagnostics.d.ts +2 -1
  118. package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -1
  119. package/dist/domains/comet-classic/classic-diagnostics.js +54 -1
  120. package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -1
  121. package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -1
  122. package/dist/domains/comet-classic/classic-evidence.js +4 -0
  123. package/dist/domains/comet-classic/classic-evidence.js.map +1 -1
  124. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
  125. package/dist/domains/comet-classic/classic-guard.js +83 -80
  126. package/dist/domains/comet-classic/classic-guard.js.map +1 -1
  127. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
  128. package/dist/domains/comet-classic/classic-hook-guard.js +179 -42
  129. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
  130. package/dist/domains/comet-classic/classic-project-config.d.ts +16 -0
  131. package/dist/domains/comet-classic/classic-project-config.d.ts.map +1 -0
  132. package/dist/domains/comet-classic/classic-project-config.js +40 -0
  133. package/dist/domains/comet-classic/classic-project-config.js.map +1 -0
  134. package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -1
  135. package/dist/domains/comet-classic/classic-resolver.js +4 -4
  136. package/dist/domains/comet-classic/classic-resolver.js.map +1 -1
  137. package/dist/domains/comet-classic/classic-resume-probe-command.d.ts +3 -0
  138. package/dist/domains/comet-classic/classic-resume-probe-command.d.ts.map +1 -0
  139. package/dist/domains/comet-classic/classic-resume-probe-command.js +58 -0
  140. package/dist/domains/comet-classic/classic-resume-probe-command.js.map +1 -0
  141. package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts +2 -0
  142. package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts.map +1 -0
  143. package/dist/domains/comet-classic/classic-resume-probe-entry.js +4 -0
  144. package/dist/domains/comet-classic/classic-resume-probe-entry.js.map +1 -0
  145. package/dist/domains/comet-classic/classic-resume-probe.d.ts +29 -0
  146. package/dist/domains/comet-classic/classic-resume-probe.d.ts.map +1 -0
  147. package/dist/domains/comet-classic/classic-resume-probe.js +386 -0
  148. package/dist/domains/comet-classic/classic-resume-probe.js.map +1 -0
  149. package/dist/domains/comet-classic/classic-runtime-run.d.ts +2 -1
  150. package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -1
  151. package/dist/domains/comet-classic/classic-runtime-run.js +38 -0
  152. package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -1
  153. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
  154. package/dist/domains/comet-classic/classic-state-command.js +150 -25
  155. package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
  156. package/dist/domains/comet-classic/classic-state.d.ts +5 -2
  157. package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
  158. package/dist/domains/comet-classic/classic-state.js +17 -1
  159. package/dist/domains/comet-classic/classic-state.js.map +1 -1
  160. package/dist/domains/comet-classic/classic-store.d.ts +4 -1
  161. package/dist/domains/comet-classic/classic-store.d.ts.map +1 -1
  162. package/dist/domains/comet-classic/classic-store.js +4 -3
  163. package/dist/domains/comet-classic/classic-store.js.map +1 -1
  164. package/dist/domains/comet-classic/classic-transitions.d.ts +1 -1
  165. package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -1
  166. package/dist/domains/comet-classic/classic-transitions.js +36 -3
  167. package/dist/domains/comet-classic/classic-transitions.js.map +1 -1
  168. package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
  169. package/dist/domains/comet-classic/classic-validate-command.js +8 -1
  170. package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
  171. package/dist/domains/comet-classic/index.d.ts +3 -0
  172. package/dist/domains/comet-classic/index.d.ts.map +1 -1
  173. package/dist/domains/comet-classic/index.js +3 -0
  174. package/dist/domains/comet-classic/index.js.map +1 -1
  175. package/dist/domains/dashboard/collector.js +10 -2
  176. package/dist/domains/dashboard/collector.js.map +1 -1
  177. package/dist/domains/dashboard/web/assets/_commonjsHelpers-CqkleIqs.js +1 -0
  178. package/dist/domains/dashboard/web/assets/arc-TGVUG2WN.js +1 -0
  179. package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-ASHmiHoP.js +36 -0
  180. package/dist/domains/dashboard/web/assets/blockDiagram-GPEHLZMM-CwASxBKe.js +132 -0
  181. package/dist/domains/dashboard/web/assets/c4Diagram-AAUBKEIU-BU8z_WNk.js +10 -0
  182. package/dist/domains/dashboard/web/assets/channel-kp6Ng2JJ.js +1 -0
  183. package/dist/domains/dashboard/web/assets/chunk-2J33WTMH-CBGlUx4_.js +1 -0
  184. package/dist/domains/dashboard/web/assets/chunk-4BX2VUAB-CS-iGcFz.js +1 -0
  185. package/dist/domains/dashboard/web/assets/chunk-55IACEB6-BUtCVJat.js +1 -0
  186. package/dist/domains/dashboard/web/assets/chunk-727SXJPM-C94tj_pf.js +206 -0
  187. package/dist/domains/dashboard/web/assets/chunk-AQP2D5EJ-BFOKcpdG.js +231 -0
  188. package/dist/domains/dashboard/web/assets/chunk-FMBD7UC4-Dmx8B-st.js +15 -0
  189. package/dist/domains/dashboard/web/assets/chunk-ND2GUHAM-DYV00CNn.js +1 -0
  190. package/dist/domains/dashboard/web/assets/chunk-QZHKN3VN-DMJJyQnw.js +1 -0
  191. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-yBDjgMY_.js +1 -0
  192. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-yBDjgMY_.js +1 -0
  193. package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-P4nE2rea.js +1 -0
  194. package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-C-R1HXDv.js +166 -0
  195. package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
  196. package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-BH8d-C9z.js +4 -0
  197. package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +1 -0
  198. package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-DpXTgQIH.js +43 -0
  199. package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-DSiFJzSw.js +10 -0
  200. package/dist/domains/dashboard/web/assets/diagram-KO2AKTUF-DULMkben.js +3 -0
  201. package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-Pi8m_NO9.js +24 -0
  202. package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-BSe6bCWm.js +24 -0
  203. package/dist/domains/dashboard/web/assets/erDiagram-TEJ5UH35-zb-FEcbq.js +85 -0
  204. package/dist/domains/dashboard/web/assets/flowDiagram-I6XJVG4X-Dr-Gk0z2.js +162 -0
  205. package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-qs6Zb2A6.js +292 -0
  206. package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-BQ314orT.js +106 -0
  207. package/dist/domains/dashboard/web/assets/graph--OzhPTMs.js +1 -0
  208. package/dist/domains/dashboard/web/assets/index-BLAfkNTu.css +1 -0
  209. package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +139 -0
  210. package/dist/domains/dashboard/web/assets/index-DtLUOcAW.js +24 -0
  211. package/dist/domains/dashboard/web/assets/index-QO0z6F4w.js +10 -0
  212. package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-O0bQp98A.js +2 -0
  213. package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +1 -0
  214. package/dist/domains/dashboard/web/assets/ishikawaDiagram-YF4QCWOH-BPC7wbKh.js +70 -0
  215. package/dist/domains/dashboard/web/assets/journeyDiagram-JHISSGLW-ohViOd4b.js +139 -0
  216. package/dist/domains/dashboard/web/assets/kanban-definition-UN3LZRKU-CHleNdbG.js +89 -0
  217. package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +257 -0
  218. package/dist/domains/dashboard/web/assets/layout-SsrduOYp.js +1 -0
  219. package/dist/domains/dashboard/web/assets/linear-CyqiW--Q.js +1 -0
  220. package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +64 -0
  221. package/dist/domains/dashboard/web/assets/mermaid.core-qS9XvtaK.js +301 -0
  222. package/dist/domains/dashboard/web/assets/mindmap-definition-RKZ34NQL-oaGkqO9l.js +96 -0
  223. package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +1 -0
  224. package/dist/domains/dashboard/web/assets/pieDiagram-4H26LBE5-CPcB-AFh.js +30 -0
  225. package/dist/domains/dashboard/web/assets/purify.es-VaSPOPhr.js +3 -0
  226. package/dist/domains/dashboard/web/assets/quadrantDiagram-W4KKPZXB-LFy52Qtj.js +7 -0
  227. package/dist/domains/dashboard/web/assets/requirementDiagram-4Y6WPE33-BdjeaYP_.js +84 -0
  228. package/dist/domains/dashboard/web/assets/sankeyDiagram-5OEKKPKP-DDJ4styL.js +40 -0
  229. package/dist/domains/dashboard/web/assets/sequenceDiagram-3UESZ5HK-BL5bFNoz.js +162 -0
  230. package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-BNUfikui.js +1 -0
  231. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-DGrsmWts.js +1 -0
  232. package/dist/domains/dashboard/web/assets/timeline-definition-PNZ67QCA--ps2uu6L.js +120 -0
  233. package/dist/domains/dashboard/web/assets/vennDiagram-CIIHVFJN-C2q8q26c.js +34 -0
  234. package/dist/domains/dashboard/web/assets/wardleyDiagram-YWT4CUSO-BUH9gXqd.js +78 -0
  235. package/dist/domains/dashboard/web/assets/xychartDiagram-2RQKCTM6-B-DielEy.js +7 -0
  236. package/dist/domains/dashboard/web/index.html +16 -16
  237. package/dist/domains/engine/types.d.ts +1 -1
  238. package/dist/domains/engine/types.d.ts.map +1 -1
  239. package/dist/domains/factory/package.d.ts.map +1 -1
  240. package/dist/domains/factory/package.js +20 -6
  241. package/dist/domains/factory/package.js.map +1 -1
  242. package/dist/domains/integrations/openspec.d.ts +4 -1
  243. package/dist/domains/integrations/openspec.d.ts.map +1 -1
  244. package/dist/domains/integrations/openspec.js +62 -10
  245. package/dist/domains/integrations/openspec.js.map +1 -1
  246. package/dist/domains/skill/find.d.ts.map +1 -1
  247. package/dist/domains/skill/find.js +1 -6
  248. package/dist/domains/skill/find.js.map +1 -1
  249. package/dist/domains/skill/json-object.d.ts +13 -0
  250. package/dist/domains/skill/json-object.d.ts.map +1 -0
  251. package/dist/domains/skill/json-object.js +24 -0
  252. package/dist/domains/skill/json-object.js.map +1 -0
  253. package/dist/domains/skill/managed-markdown.d.ts +14 -0
  254. package/dist/domains/skill/managed-markdown.d.ts.map +1 -0
  255. package/dist/domains/skill/managed-markdown.js +126 -0
  256. package/dist/domains/skill/managed-markdown.js.map +1 -0
  257. package/dist/domains/skill/platform-inspect.d.ts +9 -0
  258. package/dist/domains/skill/platform-inspect.d.ts.map +1 -0
  259. package/dist/domains/skill/platform-inspect.js +149 -0
  260. package/dist/domains/skill/platform-inspect.js.map +1 -0
  261. package/dist/domains/skill/platform-install.d.ts +20 -9
  262. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  263. package/dist/domains/skill/platform-install.js +356 -153
  264. package/dist/domains/skill/platform-install.js.map +1 -1
  265. package/dist/domains/skill/project-instructions.d.ts +22 -0
  266. package/dist/domains/skill/project-instructions.d.ts.map +1 -0
  267. package/dist/domains/skill/project-instructions.js +61 -0
  268. package/dist/domains/skill/project-instructions.js.map +1 -0
  269. package/dist/domains/skill/uninstall.d.ts +3 -1
  270. package/dist/domains/skill/uninstall.d.ts.map +1 -1
  271. package/dist/domains/skill/uninstall.js +259 -149
  272. package/dist/domains/skill/uninstall.js.map +1 -1
  273. package/dist/platform/fs/file-system.d.ts +3 -3
  274. package/dist/platform/fs/file-system.d.ts.map +1 -1
  275. package/dist/platform/fs/file-system.js +21 -11
  276. package/dist/platform/fs/file-system.js.map +1 -1
  277. package/dist/platform/install/detect.d.ts +2 -1
  278. package/dist/platform/install/detect.d.ts.map +1 -1
  279. package/dist/platform/install/detect.js +10 -1
  280. package/dist/platform/install/detect.js.map +1 -1
  281. package/dist/platform/install/platforms.d.ts +9 -1
  282. package/dist/platform/install/platforms.d.ts.map +1 -1
  283. package/dist/platform/install/platforms.js +23 -4
  284. package/dist/platform/install/platforms.js.map +1 -1
  285. package/dist/platform/install/project-registry.d.ts +38 -0
  286. package/dist/platform/install/project-registry.d.ts.map +1 -0
  287. package/dist/platform/install/project-registry.js +213 -0
  288. package/dist/platform/install/project-registry.js.map +1 -0
  289. package/dist/platform/install/skill-root-owner.d.ts +15 -0
  290. package/dist/platform/install/skill-root-owner.d.ts.map +1 -0
  291. package/dist/platform/install/skill-root-owner.js +68 -0
  292. package/dist/platform/install/skill-root-owner.js.map +1 -0
  293. package/eval/.env.example +52 -0
  294. package/eval/CLAUDE.md +43 -0
  295. package/eval/README.md +538 -0
  296. package/eval/langsmith/.env.example +16 -0
  297. package/eval/langsmith/README.md +93 -0
  298. package/eval/langsmith/skills/README.md +5 -0
  299. package/eval/langsmith/tasks/README.md +5 -0
  300. package/eval/langsmith/tests/conftest.py +187 -0
  301. package/eval/langsmith/tests/tasks/test_tasks.py +287 -0
  302. package/eval/langsmith/treatments/README.md +5 -0
  303. package/eval/local/README.md +80 -0
  304. package/eval/local/regression_baseline.json +13 -0
  305. package/eval/local/report-style-demo-assets/quality_cost.en.svg +41 -0
  306. package/eval/local/report-style-demo-assets/quality_cost.zh.svg +41 -0
  307. package/eval/local/report-style-demo-assets/rubric_delta.en.svg +56 -0
  308. package/eval/local/report-style-demo-assets/rubric_delta.zh.svg +56 -0
  309. package/eval/local/report-style-demo-assets/task_outcomes.en.svg +46 -0
  310. package/eval/local/report-style-demo-assets/task_outcomes.zh.svg +46 -0
  311. package/eval/local/report-style-demo.html +867 -0
  312. package/eval/local/scripts/compare_baselines.py +1018 -0
  313. package/eval/local/scripts/generate_report_style_demo_charts.py +322 -0
  314. package/eval/local/scripts/regression_check.py +171 -0
  315. package/eval/local/scripts/render_readme_benchmark_figures.py +416 -0
  316. package/eval/local/scripts/rescore_rubric.py +120 -0
  317. package/eval/local/skills/benchmarks/039-release/comet-classic-039/SKILL.md +282 -0
  318. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/auto-transition.md +27 -0
  319. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/comet-yaml-fields.md +68 -0
  320. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/context-recovery.md +35 -0
  321. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/debug-gate.md +17 -0
  322. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/decision-point.md +20 -0
  323. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/dirty-worktree.md +59 -0
  324. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/file-structure.md +28 -0
  325. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/subagent-dispatch.md +113 -0
  326. package/eval/local/skills/benchmarks/039-release/comet-classic-039/rules/comet-phase-guard.md +125 -0
  327. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-archive.sh +311 -0
  328. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-env.sh +110 -0
  329. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-guard.sh +778 -0
  330. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-handoff.sh +390 -0
  331. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-hook-guard.sh +336 -0
  332. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-state.sh +1338 -0
  333. package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-yaml-validate.sh +225 -0
  334. package/eval/local/skills/benchmarks/039-release/comet-classic-039-archive/SKILL.md +100 -0
  335. package/eval/local/skills/benchmarks/039-release/comet-classic-039-build/SKILL.md +304 -0
  336. package/eval/local/skills/benchmarks/039-release/comet-classic-039-design/SKILL.md +263 -0
  337. package/eval/local/skills/benchmarks/039-release/comet-classic-039-hotfix/SKILL.md +204 -0
  338. package/eval/local/skills/benchmarks/039-release/comet-classic-039-open/SKILL.md +220 -0
  339. package/eval/local/skills/benchmarks/039-release/comet-classic-039-tweak/SKILL.md +180 -0
  340. package/eval/local/skills/benchmarks/039-release/comet-classic-039-verify/SKILL.md +234 -0
  341. package/eval/local/skills/benchmarks/040-beta/comet/SKILL.md +261 -0
  342. package/eval/local/skills/benchmarks/040-beta/comet/reference/auto-transition.md +27 -0
  343. package/eval/local/skills/benchmarks/040-beta/comet/reference/comet-yaml-fields.md +73 -0
  344. package/eval/local/skills/benchmarks/040-beta/comet/reference/context-recovery.md +45 -0
  345. package/eval/local/skills/benchmarks/040-beta/comet/reference/debug-gate.md +33 -0
  346. package/eval/local/skills/benchmarks/040-beta/comet/reference/decision-point.md +31 -0
  347. package/eval/local/skills/benchmarks/040-beta/comet/reference/dirty-worktree.md +59 -0
  348. package/eval/local/skills/benchmarks/040-beta/comet/reference/file-structure.md +28 -0
  349. package/eval/local/skills/benchmarks/040-beta/comet/reference/intent-frame.md +74 -0
  350. package/eval/local/skills/benchmarks/040-beta/comet/reference/scripts.md +69 -0
  351. package/eval/local/skills/benchmarks/040-beta/comet/reference/subagent-dispatch.md +169 -0
  352. package/eval/local/skills/benchmarks/040-beta/comet/rules/comet-phase-guard.md +130 -0
  353. package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/checks.yaml +6 -0
  354. package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/guardrails.yaml +13 -0
  355. package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/skill.yaml +122 -0
  356. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-archive.mjs +9515 -0
  357. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-env.mjs +15 -0
  358. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-guard.mjs +10173 -0
  359. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-handoff.mjs +9491 -0
  360. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-hook-guard.mjs +9175 -0
  361. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-intent.mjs +404 -0
  362. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-state.mjs +9273 -0
  363. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-yaml-validate.mjs +7627 -0
  364. package/eval/local/skills/benchmarks/040-beta/comet-archive/SKILL.md +110 -0
  365. package/eval/local/skills/benchmarks/040-beta/comet-build/SKILL.md +315 -0
  366. package/eval/local/skills/benchmarks/040-beta/comet-design/SKILL.md +260 -0
  367. package/eval/local/skills/benchmarks/040-beta/comet-hotfix/SKILL.md +190 -0
  368. package/eval/local/skills/benchmarks/040-beta/comet-open/SKILL.md +210 -0
  369. package/eval/local/skills/benchmarks/040-beta/comet-tweak/SKILL.md +183 -0
  370. package/eval/local/skills/benchmarks/040-beta/comet-verify/SKILL.md +230 -0
  371. package/eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md +12 -0
  372. package/eval/local/skills/benchmarks/dependency/openspec/openspec-apply-change/SKILL.md +156 -0
  373. package/eval/local/skills/benchmarks/dependency/openspec/openspec-archive-change/SKILL.md +114 -0
  374. package/eval/local/skills/benchmarks/dependency/openspec/openspec-bulk-archive-change/SKILL.md +246 -0
  375. package/eval/local/skills/benchmarks/dependency/openspec/openspec-continue-change/SKILL.md +118 -0
  376. package/eval/local/skills/benchmarks/dependency/openspec/openspec-explore/SKILL.md +288 -0
  377. package/eval/local/skills/benchmarks/dependency/openspec/openspec-ff-change/SKILL.md +101 -0
  378. package/eval/local/skills/benchmarks/dependency/openspec/openspec-new-change/SKILL.md +74 -0
  379. package/eval/local/skills/benchmarks/dependency/openspec/openspec-onboard/SKILL.md +554 -0
  380. package/eval/local/skills/benchmarks/dependency/openspec/openspec-propose/SKILL.md +110 -0
  381. package/eval/local/skills/benchmarks/dependency/openspec/openspec-sync-specs/SKILL.md +138 -0
  382. package/eval/local/skills/benchmarks/dependency/openspec/openspec-verify-change/SKILL.md +168 -0
  383. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/SKILL.md +159 -0
  384. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/frame-template.html +213 -0
  385. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/helper.js +167 -0
  386. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/server.cjs +723 -0
  387. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/start-server.sh +209 -0
  388. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/stop-server.sh +120 -0
  389. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
  390. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/visual-companion.md +291 -0
  391. package/eval/local/skills/benchmarks/dependency/superpowers/dispatching-parallel-agents/SKILL.md +185 -0
  392. package/eval/local/skills/benchmarks/dependency/superpowers/executing-plans/SKILL.md +70 -0
  393. package/eval/local/skills/benchmarks/dependency/superpowers/finishing-a-development-branch/SKILL.md +241 -0
  394. package/eval/local/skills/benchmarks/dependency/superpowers/receiving-code-review/SKILL.md +213 -0
  395. package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/SKILL.md +103 -0
  396. package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/code-reviewer.md +172 -0
  397. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/SKILL.md +418 -0
  398. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/implementer-prompt.md +139 -0
  399. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/review-package +44 -0
  400. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/sdd-workspace +22 -0
  401. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/task-brief +40 -0
  402. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/task-reviewer-prompt.md +188 -0
  403. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
  404. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/SKILL.md +296 -0
  405. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
  406. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
  407. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/defense-in-depth.md +122 -0
  408. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/find-polluter.sh +63 -0
  409. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
  410. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-academic.md +14 -0
  411. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-1.md +58 -0
  412. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-2.md +68 -0
  413. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-3.md +69 -0
  414. package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/SKILL.md +371 -0
  415. package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
  416. package/eval/local/skills/benchmarks/dependency/superpowers/using-git-worktrees/SKILL.md +202 -0
  417. package/eval/local/skills/benchmarks/dependency/superpowers/verification-before-completion/SKILL.md +139 -0
  418. package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/SKILL.md +174 -0
  419. package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
  420. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/SKILL.md +689 -0
  421. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
  422. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  423. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/graphviz-conventions.dot +172 -0
  424. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/persuasion-principles.md +187 -0
  425. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/render-graphs.js +168 -0
  426. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
  427. package/eval/local/tasks/authoring-skill-smoke/environment/Dockerfile +2 -0
  428. package/eval/local/tasks/authoring-skill-smoke/instruction.md +4 -0
  429. package/eval/local/tasks/authoring-skill-smoke/task.toml +21 -0
  430. package/eval/local/tasks/authoring-skill-smoke/validation/test_authoring_skill_smoke.py +54 -0
  431. package/eval/local/tasks/comet-agent-memory-routing/environment/Dockerfile +28 -0
  432. package/eval/local/tasks/comet-agent-memory-routing/environment/agent_system.py +40 -0
  433. package/eval/local/tasks/comet-agent-memory-routing/environment/test_agent_system.py +29 -0
  434. package/eval/local/tasks/comet-agent-memory-routing/instruction.md +20 -0
  435. package/eval/local/tasks/comet-agent-memory-routing/task.toml +24 -0
  436. package/eval/local/tasks/comet-agent-memory-routing/validation/test_agent_memory_routing.py +24 -0
  437. package/eval/local/tasks/comet-api-cache-ttl/environment/Dockerfile +39 -0
  438. package/eval/local/tasks/comet-api-cache-ttl/environment/cache.py +39 -0
  439. package/eval/local/tasks/comet-api-cache-ttl/environment/test_cache.py +81 -0
  440. package/eval/local/tasks/comet-api-cache-ttl/instruction.md +33 -0
  441. package/eval/local/tasks/comet-api-cache-ttl/task.toml +24 -0
  442. package/eval/local/tasks/comet-api-cache-ttl/validation/test_api_cache_ttl.py +58 -0
  443. package/eval/local/tasks/comet-cross-file-refactor/environment/Dockerfile +15 -0
  444. package/eval/local/tasks/comet-cross-file-refactor/environment/cli.py +13 -0
  445. package/eval/local/tasks/comet-cross-file-refactor/environment/counting.py +13 -0
  446. package/eval/local/tasks/comet-cross-file-refactor/environment/test_textkit.py +21 -0
  447. package/eval/local/tasks/comet-cross-file-refactor/instruction.md +16 -0
  448. package/eval/local/tasks/comet-cross-file-refactor/task.toml +20 -0
  449. package/eval/local/tasks/comet-cross-file-refactor/validation/test_cross_file_refactor.py +20 -0
  450. package/eval/local/tasks/comet-dependency-confusion/environment/Dockerfile +28 -0
  451. package/eval/local/tasks/comet-dependency-confusion/environment/app.py +8 -0
  452. package/eval/local/tasks/comet-dependency-confusion/environment/settings_loader.py +14 -0
  453. package/eval/local/tasks/comet-dependency-confusion/environment/test_settings_service.py +19 -0
  454. package/eval/local/tasks/comet-dependency-confusion/instruction.md +18 -0
  455. package/eval/local/tasks/comet-dependency-confusion/task.toml +24 -0
  456. package/eval/local/tasks/comet-dependency-confusion/validation/test_dependency_confusion.py +24 -0
  457. package/eval/local/tasks/comet-fix-median/environment/Dockerfile +50 -0
  458. package/eval/local/tasks/comet-fix-median/environment/stats.py +54 -0
  459. package/eval/local/tasks/comet-fix-median/environment/test_stats.py +68 -0
  460. package/eval/local/tasks/comet-fix-median/instruction.md +25 -0
  461. package/eval/local/tasks/comet-fix-median/task.toml +24 -0
  462. package/eval/local/tasks/comet-fix-median/validation/test_fix_median.py +60 -0
  463. package/eval/local/tasks/comet-framework-selection/environment/Dockerfile +28 -0
  464. package/eval/local/tasks/comet-framework-selection/environment/architecture.py +12 -0
  465. package/eval/local/tasks/comet-framework-selection/environment/test_architecture.py +30 -0
  466. package/eval/local/tasks/comet-framework-selection/instruction.md +22 -0
  467. package/eval/local/tasks/comet-framework-selection/task.toml +24 -0
  468. package/eval/local/tasks/comet-framework-selection/validation/test_framework_selection.py +24 -0
  469. package/eval/local/tasks/comet-full-workflow/environment/Dockerfile +53 -0
  470. package/eval/local/tasks/comet-full-workflow/environment/test_wordcount.py +29 -0
  471. package/eval/local/tasks/comet-full-workflow/environment/wordcount.py +40 -0
  472. package/eval/local/tasks/comet-full-workflow/instruction.md +18 -0
  473. package/eval/local/tasks/comet-full-workflow/task.toml +24 -0
  474. package/eval/local/tasks/comet-full-workflow/validation/test_full_workflow.py +171 -0
  475. package/eval/local/tasks/comet-graph-execution-review/environment/Dockerfile +28 -0
  476. package/eval/local/tasks/comet-graph-execution-review/environment/pipeline.py +19 -0
  477. package/eval/local/tasks/comet-graph-execution-review/environment/test_pipeline.py +53 -0
  478. package/eval/local/tasks/comet-graph-execution-review/instruction.md +21 -0
  479. package/eval/local/tasks/comet-graph-execution-review/task.toml +24 -0
  480. package/eval/local/tasks/comet-graph-execution-review/validation/test_graph_execution_review.py +24 -0
  481. package/eval/local/tasks/comet-human-approval-flow/environment/Dockerfile +15 -0
  482. package/eval/local/tasks/comet-human-approval-flow/environment/approvals.py +17 -0
  483. package/eval/local/tasks/comet-human-approval-flow/environment/test_approvals.py +30 -0
  484. package/eval/local/tasks/comet-human-approval-flow/instruction.md +15 -0
  485. package/eval/local/tasks/comet-human-approval-flow/task.toml +20 -0
  486. package/eval/local/tasks/comet-human-approval-flow/validation/test_human_approval_flow.py +20 -0
  487. package/eval/local/tasks/comet-layered-streaming-fix/environment/Dockerfile +20 -0
  488. package/eval/local/tasks/comet-layered-streaming-fix/environment/chat_app.py +19 -0
  489. package/eval/local/tasks/comet-layered-streaming-fix/environment/test_chat_app.py +15 -0
  490. package/eval/local/tasks/comet-layered-streaming-fix/instruction.md +14 -0
  491. package/eval/local/tasks/comet-layered-streaming-fix/task.toml +20 -0
  492. package/eval/local/tasks/comet-layered-streaming-fix/validation/test_layered_streaming_fix.py +20 -0
  493. package/eval/local/tasks/comet-noise-distractor/environment/Dockerfile +15 -0
  494. package/eval/local/tasks/comet-noise-distractor/environment/distractor.md +4 -0
  495. package/eval/local/tasks/comet-noise-distractor/environment/invoice.py +5 -0
  496. package/eval/local/tasks/comet-noise-distractor/environment/test_invoice.py +18 -0
  497. package/eval/local/tasks/comet-noise-distractor/instruction.md +17 -0
  498. package/eval/local/tasks/comet-noise-distractor/task.toml +20 -0
  499. package/eval/local/tasks/comet-noise-distractor/validation/test_noise_distractor.py +20 -0
  500. package/eval/local/tasks/comet-observability-env-template/environment/Dockerfile +15 -0
  501. package/eval/local/tasks/comet-observability-env-template/environment/env_writer.py +17 -0
  502. package/eval/local/tasks/comet-observability-env-template/environment/test_env_writer.py +17 -0
  503. package/eval/local/tasks/comet-observability-env-template/instruction.md +20 -0
  504. package/eval/local/tasks/comet-observability-env-template/task.toml +20 -0
  505. package/eval/local/tasks/comet-observability-env-template/validation/test_observability_env_template.py +46 -0
  506. package/eval/local/tasks/comet-perf-dedupe/environment/Dockerfile +39 -0
  507. package/eval/local/tasks/comet-perf-dedupe/environment/dedupe.py +22 -0
  508. package/eval/local/tasks/comet-perf-dedupe/environment/test_dedupe.py +43 -0
  509. package/eval/local/tasks/comet-perf-dedupe/instruction.md +25 -0
  510. package/eval/local/tasks/comet-perf-dedupe/task.toml +24 -0
  511. package/eval/local/tasks/comet-perf-dedupe/validation/test_perf_dedupe.py +40 -0
  512. package/eval/local/tasks/comet-persistence-threading/environment/Dockerfile +15 -0
  513. package/eval/local/tasks/comet-persistence-threading/environment/session_store.py +15 -0
  514. package/eval/local/tasks/comet-persistence-threading/environment/test_session_store.py +21 -0
  515. package/eval/local/tasks/comet-persistence-threading/instruction.md +14 -0
  516. package/eval/local/tasks/comet-persistence-threading/task.toml +20 -0
  517. package/eval/local/tasks/comet-persistence-threading/validation/test_persistence_threading.py +20 -0
  518. package/eval/local/tasks/comet-refactor-counter/environment/Dockerfile +39 -0
  519. package/eval/local/tasks/comet-refactor-counter/environment/test_text_processor.py +57 -0
  520. package/eval/local/tasks/comet-refactor-counter/environment/text_processor.py +49 -0
  521. package/eval/local/tasks/comet-refactor-counter/instruction.md +31 -0
  522. package/eval/local/tasks/comet-refactor-counter/task.toml +24 -0
  523. package/eval/local/tasks/comet-refactor-counter/validation/test_refactor_counter.py +75 -0
  524. package/eval/local/tasks/comet-robust-config/environment/Dockerfile +39 -0
  525. package/eval/local/tasks/comet-robust-config/environment/config_loader.py +56 -0
  526. package/eval/local/tasks/comet-robust-config/environment/test_config_loader.py +72 -0
  527. package/eval/local/tasks/comet-robust-config/instruction.md +30 -0
  528. package/eval/local/tasks/comet-robust-config/task.toml +24 -0
  529. package/eval/local/tasks/comet-robust-config/validation/test_robust_config.py +37 -0
  530. package/eval/local/tasks/generic-skill-smoke/environment/Dockerfile +2 -0
  531. package/eval/local/tasks/generic-skill-smoke/instruction.md +7 -0
  532. package/eval/local/tasks/generic-skill-smoke/task.toml +21 -0
  533. package/eval/local/tasks/generic-skill-smoke/validation/test_generic_skill_smoke.py +36 -0
  534. package/eval/local/tasks/index.yaml +155 -0
  535. package/eval/local/tasks/workflow-overlay-contract/environment/Dockerfile +5 -0
  536. package/eval/local/tasks/workflow-overlay-contract/instruction.md +5 -0
  537. package/eval/local/tasks/workflow-overlay-contract/task.toml +21 -0
  538. package/eval/local/tasks/workflow-overlay-contract/validation/test_workflow_overlay_contract.py +235 -0
  539. package/eval/local/tasks/workflow-route-conformance/environment/Dockerfile +2 -0
  540. package/eval/local/tasks/workflow-route-conformance/instruction.md +5 -0
  541. package/eval/local/tasks/workflow-route-conformance/task.toml +21 -0
  542. package/eval/local/tasks/workflow-route-conformance/validation/test_workflow_route_conformance.py +84 -0
  543. package/eval/local/tests/conftest.py +1148 -0
  544. package/eval/local/tests/scaffold/test_attribution.py +48 -0
  545. package/eval/local/tests/scaffold/test_compare_baselines.py +999 -0
  546. package/eval/local/tests/scaffold/test_conftest_helpers.py +534 -0
  547. package/eval/local/tests/scaffold/test_evidence.py +15 -0
  548. package/eval/local/tests/scaffold/test_langsmith_conftest.py +244 -0
  549. package/eval/local/tests/scaffold/test_logging.py +243 -0
  550. package/eval/local/tests/scaffold/test_manifests.py +132 -0
  551. package/eval/local/tests/scaffold/test_profiles.py +866 -0
  552. package/eval/local/tests/scaffold/test_regression_check.py +19 -0
  553. package/eval/local/tests/scaffold/test_report_style_demo_charts.py +45 -0
  554. package/eval/local/tests/scaffold/test_sample_quality.py +211 -0
  555. package/eval/local/tests/scaffold/test_tasks.py +168 -0
  556. package/eval/local/tests/scaffold/test_treatments.py +244 -0
  557. package/eval/local/tests/scaffold/test_utils.py +139 -0
  558. package/eval/local/tests/tasks/test_tasks.py +445 -0
  559. package/eval/local/tests/tasks/test_validation_scripts.py +143 -0
  560. package/eval/local/treatments/comet/comet_full_039.yaml +141 -0
  561. package/eval/local/treatments/comet/comet_full_040_beta.yaml +140 -0
  562. package/eval/local/treatments/common/control.yaml +4 -0
  563. package/eval/pyproject.toml +41 -0
  564. package/eval/report-html-config.json +6 -0
  565. package/eval/scaffold/__init__.py +67 -0
  566. package/eval/scaffold/python/__init__.py +95 -0
  567. package/eval/scaffold/python/attribution.py +43 -0
  568. package/eval/scaffold/python/evidence.py +38 -0
  569. package/eval/scaffold/python/external_data_handler.py +18 -0
  570. package/eval/scaffold/python/generic_llm_judge.py +235 -0
  571. package/eval/scaffold/python/judge_config.py +168 -0
  572. package/eval/scaffold/python/llm_judge.py +191 -0
  573. package/eval/scaffold/python/logging.py +705 -0
  574. package/eval/scaffold/python/manifests.py +129 -0
  575. package/eval/scaffold/python/paper_charts.py +25 -0
  576. package/eval/scaffold/python/pass_at_k.py +107 -0
  577. package/eval/scaffold/python/paths.py +56 -0
  578. package/eval/scaffold/python/profiles.py +127 -0
  579. package/eval/scaffold/python/report_outputs.py +1391 -0
  580. package/eval/scaffold/python/sample_quality.py +339 -0
  581. package/eval/scaffold/python/schema.py +39 -0
  582. package/eval/scaffold/python/skill_parser.py +469 -0
  583. package/eval/scaffold/python/tasks.py +330 -0
  584. package/eval/scaffold/python/treatments.py +271 -0
  585. package/eval/scaffold/python/utils.py +366 -0
  586. package/eval/scaffold/python/validation/__init__.py +21 -0
  587. package/eval/scaffold/python/validation/authoring_rubric.py +326 -0
  588. package/eval/scaffold/python/validation/comet_workflow.py +187 -0
  589. package/eval/scaffold/python/validation/core.py +264 -0
  590. package/eval/scaffold/python/validation/dataset.py +337 -0
  591. package/eval/scaffold/python/validation/docker.py +106 -0
  592. package/eval/scaffold/python/validation/evaluator.py +549 -0
  593. package/eval/scaffold/python/validation/generic_rubric.py +169 -0
  594. package/eval/scaffold/python/validation/rubric.py +740 -0
  595. package/eval/scaffold/python/validation/runner.py +237 -0
  596. package/eval/scaffold/python/validation/scripts.py +58 -0
  597. package/eval/scaffold/python/validation/tracing.py +313 -0
  598. package/eval/scaffold/shell/common.sh +126 -0
  599. package/eval/scaffold/shell/docker.sh +482 -0
  600. package/eval/scaffold/shell/run-claude-loop.sh +181 -0
  601. package/eval/scaffold/shell/setup.sh +259 -0
  602. package/eval/simulator-instruction.md +9 -0
  603. package/package.json +29 -2
  604. package/dist/domains/dashboard/web/assets/index-BcO3_QlT.css +0 -1
  605. package/dist/domains/dashboard/web/assets/index-CjU3VXVu.js +0 -22
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: comet-tweak
3
- description: "Use when the user wants a lightweight or medium change that fits a single OpenSpec change and does not need full design; also use when resuming tweak workflow."
3
+ description: "Use only when explicitly invoked as /comet-tweak or routed by the root Comet skill/runtime to the tweak preset; handle a lightweight or medium change that fits one OpenSpec change."
4
4
  ---
5
5
 
6
6
  # Comet Preset Path: Tweak
@@ -23,12 +23,14 @@ Applicable for OpenSpec-chained lightweight changes, such as configuration adjus
23
23
 
24
24
  ### 0. Output Language Constraint
25
25
 
26
- Streamlined OpenSpec artifacts must use the configured Comet artifact language. Read `language` from `.comet/config.yaml` before `.comet.yaml` exists, then use `"$COMET_BASH" "$COMET_STATE" get <name> language` after initialization.
26
+ Streamlined OpenSpec artifacts must use the configured Comet artifact language. Before `.comet.yaml` exists, read `language` from project `.comet/config.yaml`, then fall back to global `~/.comet/config.yaml`; after initialization, use `comet state get <name> language`.
27
27
 
28
28
  Execution chain: open → OpenSpec apply → verify → archive. Tweak provides default decisions for each phase: streamlined open, direct build through OpenSpec apply, scale- and delta-spec-driven verification weight, and final archive confirmation after verification passes.
29
29
 
30
30
  Before starting, locate Comet scripts via `comet/reference/scripts.md`. When resuming from any entry point, first use `comet/reference/context-recovery.md` to confirm phase/workflow.
31
31
 
32
+ When resuming an existing tweak change, the first state operation must be `comet state select <change-name>`. For a new change, run the command immediately after `.comet.yaml` initialization and before source writes.
33
+
32
34
  ### 1. Quick Open (preset open)
33
35
 
34
36
  Reuse Comet open capability to create change, but use tweak defaults: do not execute `openspec-explore` long exploration, directly enter streamlined change creation.
@@ -44,19 +46,22 @@ After the skill loads, follow its guidance to create streamlined artifacts:
44
46
  Initialize Comet state file:
45
47
 
46
48
  ```bash
47
- node "$COMET_STATE" init <name> tweak
49
+ comet state init <name> tweak
50
+ comet state select <name>
48
51
  ```
49
52
 
53
+ Tweak defaults to `isolation: current`, truthfully indicating execution in the current workspace. Change it to `branch` or `worktree` only after that workspace is actually created/selected.
54
+
50
55
  Verify initialized state:
51
56
 
52
57
  ```bash
53
- node "$COMET_STATE" check <name> open
58
+ comet state check <name> open
54
59
  ```
55
60
 
56
61
  Run phase guard to transition open → build:
57
62
 
58
63
  ```bash
59
- node "$COMET_GUARD" <change-name> open --apply
64
+ comet guard <change-name> open --apply
60
65
  ```
61
66
 
62
67
  ### 2. OpenSpec Apply Build (tweak-only preset build)
@@ -93,7 +98,7 @@ For specific investigation, minimal failing test, fix verification, and keeping
93
98
  7. Run phase guard to transition build → verify:
94
99
 
95
100
  ```bash
96
- node "$COMET_GUARD" <change-name> build --apply
101
+ comet guard <change-name> build --apply
97
102
  ```
98
103
 
99
104
  State automatically updates to `phase: verify`, `verify_result: pending`, then enter verification.
@@ -107,10 +112,10 @@ Reuse `/comet-verify`; let comet-verify's scale assessment decide lightweight or
107
112
  **Delta-spec verification routing**: tweak accepts delta spec as a normal artifact. If this change created a delta spec, explicitly set full verification mode before entering comet-verify, to run OpenSpec-native verification (`openspec-verify-change`) covering delta-spec consistency:
108
113
 
109
114
  ```bash
110
- node "$COMET_STATE" set <change-name> verify_mode full
115
+ comet state set <change-name> verify_mode full
111
116
  ```
112
117
 
113
- A tweak without delta spec usually meets lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold); comet-verify's scale assessment selects the lightweight verification path (6 quick checks). If the user wants to add review, run `node "$COMET_STATE" set <name> review_mode standard` or `thorough` before verification.
118
+ A tweak without delta spec usually meets lightweight verification conditions (≤ 3 tasks, changed files below the scale threshold); comet-verify's scale assessment selects the lightweight verification path (6 quick checks). If the user wants to add review, run `comet state set <name> review_mode standard` or `thorough` before verification.
114
119
 
115
120
  After verification passes, record `.comet.yaml` `verify_result` as `pass` according to `/comet-verify` rules, must not skip this status before archiving. After verification passes, still enter `/comet-archive`'s final archive confirmation; do not automatically run the archive script.
116
121
 
@@ -127,13 +132,13 @@ Reuse `/comet-archive`. Must satisfy `verify_result: pass` in `.comet.yaml` befo
127
132
  <IMPORTANT>
128
133
  Tweak workflow is **one-time continuous execution**. After invoking `/comet-tweak`, agent must automatically advance through tweak steps, without pausing to wait for user input mid-way.
129
134
 
130
- Exception: when `.comet.yaml` has `auto_transition: false`, after each phase guard advances `phase`, do not auto-invoke the next skill. In this case, use `node "$COMET_STATE" next <name>` output and pause for manual continuation as instructed.
135
+ Exception: when `.comet.yaml` has `auto_transition: false`, end the current invocation at each phase boundary and return control with `HINT`; the user may run the next phase later. This is a manual handoff, not a new confirmation point.
131
136
 
132
- The following situations must pause and wait for user confirmation:
137
+ The following genuine user decisions still pause:
133
138
 
134
139
  1. Encountering an upgrade-assessment signal (see "Upgrade Assessment" section). **Must use the current platform's available user input/confirmation mechanism to pause and wait for the user to explicitly choose**: continue the tweak lightweight flow, or upgrade to the full `/comet` workflow
135
- 2. verify phase (comet-verify) verification-failure and branch-handling decisions
136
- 3. Final archive confirmation (before comet-archive runs the archive script)
140
+ 2. Verify-phase acceptance of WARNING/SUGGESTION deviations, Spec drift handling, or strategy after the automatic repair limit; the first 3 clearly repairable failures close automatically
141
+ 3. Final archive confirmation and the branch-handling decision after the archive commit
137
142
 
138
143
  Execution order: quick open → build (with upgrade assessment) → verification → archive → complete
139
144
 
@@ -144,7 +149,7 @@ After each phase completes, immediately enter next phase. Within each phase, mus
144
149
 
145
150
  ## Upgrade Assessment
146
151
 
147
- Tweak upgrade assessment only decides whether to move from the lightweight preset to full; delta spec alone is not an upgrade reason, file count never upgrades automatically, and `comet-state scale` only decides verification weight.
152
+ Tweak upgrade assessment only decides whether to move from the lightweight preset to full; delta spec alone is not an upgrade reason, file count never upgrades automatically, and `comet state scale` only decides verification weight.
148
153
 
149
154
  If `/comet` passes an intent frame from the entry, tweak must recheck `risk_signal` and escalation signals only before build: new capability, public API, schema change, cross-module coordination, or deep architecture work. When any signal matches, enter the existing escalation decision point. Delta spec remains a normal tweak artifact and must not trigger escalation by itself; do not reimplement entry intent recognition.
150
155
 
@@ -157,10 +162,10 @@ When a qualitative-change signal or file-count tripwire is hit, **must pause und
157
162
  After the user chooses upgrade (option B), use the legal state-machine upgrade channel, a single command that converts the preset workflow to full and rolls back to design:
158
163
 
159
164
  ```bash
160
- node "$COMET_STATE" transition <name> preset-escalate
165
+ comet state transition <name> preset-escalate
161
166
  ```
162
167
 
163
- This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, and clears `design_doc` (satisfying comet-design entry requirements). Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**, then proceed through the normal full workflow.
168
+ This command atomically sets `workflow`/`classic_profile` to `full`, rolls `phase` back to `design`, clears `design_doc`, and clears preset-only `build_mode`, `tdd_mode`, `review_mode`, `isolation`, and `verify_mode`. Then add the Design Doc on the current change: **immediately use the Skill tool to load the `comet-design` skill**. On entering build, run the full joint workflow-configuration decision again.
164
169
 
165
170
  When the user chooses continue (option A), continue the tweak workflow and record the user's reason for continuing.
166
171
 
@@ -171,16 +176,16 @@ When the user chooses continue (option A), continue the tweak workflow and recor
171
176
  - Change completed, tests pass
172
177
  - Change archived
173
178
  - If spec changed, synced to main spec
174
- - **Phase guard**: Before build → verify run `node "$COMET_GUARD" <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `node "$COMET_GUARD" <change-name> verify --apply`
179
+ - **Phase guard**: Before build → verify run `comet guard <change-name> build --apply`; before verify → archive follow `/comet-verify` and run `comet guard <change-name> verify --apply`
175
180
 
176
181
  ## Automatic Handoff to Next Phase
177
182
 
178
183
  Follow `comet/reference/auto-transition.md`. Key command:
179
184
 
180
185
  ```bash
181
- node "$COMET_STATE" next <name>
186
+ comet state next <name>
182
187
  ```
183
188
 
184
189
  - `NEXT: auto` → invoke the skill pointed to by `SKILL` to continue tweak workflow (`phase: build` returns `comet-tweak`, `verify` returns `comet-verify`, `archive` returns `comet-archive`)
185
- - `NEXT: manual` → do not invoke the next skill; prompt user to manually run `/<SKILL>` per `HINT`
190
+ - `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
186
191
  - `NEXT: done` → workflow is complete, no further action needed
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: comet-verify
3
- description: "Use when a Comet change has completed build and needs implementation verification, verification-failure decisions, or branch closeout."
3
+ description: "Use only when explicitly invoked as /comet-verify or routed by the root Comet skill/runtime to the verify phase; verify a Comet change, record evidence, and manage repair loops."
4
4
  ---
5
5
 
6
- # Comet Phase 4: Verify and Close (Verify)
6
+ # Comet Phase 4: Verify
7
7
 
8
8
  ## Prerequisites
9
9
 
@@ -14,88 +14,89 @@ description: "Use when a Comet change has completed build and needs implementati
14
14
 
15
15
  ### 0a. Output Language Constraint
16
16
 
17
- Verification reports and branch-handling notes must use the configured Comet artifact language from `"$COMET_BASH" "$COMET_STATE" get <name> language`.
17
+ Verification reports must use the configured Comet artifact language from `comet state get <name> language`.
18
18
 
19
19
  ### 0b. Entry State Verification (Entry Check)
20
20
 
21
- Locate scripts via `comet/reference/scripts.md`, then run entry verification. When resuming from any entry point, first run the recovery check in `comet/reference/context-recovery.md`:
21
+ Use the stable `comet` CLI described in `comet/reference/scripts.md`, then run entry verification. When resuming from any entry point, first run the recovery check in `comet/reference/context-recovery.md`:
22
22
 
23
23
  ```bash
24
- node "$COMET_STATE" check <change-name> verify
24
+ comet state select <change-name>
25
+ comet state check <change-name> verify
25
26
  ```
26
27
 
27
28
  Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
28
29
 
29
- **Idempotency**: All verify phase checks can be safely re-executed. If `verify_result` is already `pass` and `branch_status` is `handled`, verification is complete execute guard to transition. If `verify_result` is `pending`, start verification from the beginning.
30
+ **Idempotency**: All verify checks are safe to repeat. If `verify_result` is already `pass`, verification is complete and archive should continue; keep `branch_status: pending` until archive changes are committed and final branch handling finishes. If `verify_result` is `pending`, start verification from the beginning.
30
31
 
31
32
  ### 1. Scale Assessment
32
33
 
33
34
  Execute scale assessment:
34
35
 
35
36
  ```bash
36
- node "$COMET_STATE" scale <change-name>
37
+ comet state scale <change-name>
37
38
  ```
38
39
 
39
40
  The script automatically counts tasks, delta spec count, changed file count, determines light or full verification mode, and sets the verify_mode field. Decision rule (any condition triggers full): tasks > 3, delta spec capabilities > 1, changed files > 8.
40
41
 
41
42
  Before verification begins, handle uncommitted changes through `comet/reference/dirty-worktree.md` protocol. Verify phase special handling:
42
43
 
43
- 1. If dirty diff belongs to current change and involves implementation, tests, tasks, delta spec, or design doc changes, do not fix or commit directly in verify phase; report failures and enter Step 1b verification failure decision blocking point
44
- 2. If dirty diff is only verify phase artifacts (e.g., verification report draft, branch handling records), may continue and record state in verify phase
45
- 3. If dirty diff shows implementation but tasks.md not checked, treat as build state lag; report failures and enter Step 1b, let user decide to roll back for fix or accept deviation
44
+ 1. If dirty diff clearly belongs to the current change, it is verification input. Continue verification, but do not modify or commit implementation, tests, tasks, delta specs, or the Design Doc in verify
45
+ 2. If dirty diff is only a verify phase artifact such as a verification report draft, may continue and record state in verify phase
46
+ 3. If dirty diff shows implementation but tasks.md remains unchecked, treat it as lagging build state. This has one valid next action: run `verify-fail`, return to build, verify evidence, and update task state without asking whether to accept incomplete tasks
47
+ 4. If dirty diff cannot be attributed or belongs to another change, report a stop condition through the dirty-worktree protocol. Do not disguise attribution failure as a continue/ignore choice
46
48
 
47
- Only after user chooses fix, allow rollback to build phase:
49
+ When repair or state reconciliation must return to build, run:
48
50
 
49
51
  ```bash
50
- # Execute only after user confirms fix
51
- node "$COMET_STATE" transition <change-name> verify-fail
52
+ comet state transition <change-name> verify-fail
52
53
  ```
53
54
 
54
- Note: When verify-fail rolls back to build, `branch_status` is not reset. If branch handling was already completed during the first verify attempt, skip the branch handling step on re-verify and keep the existing `branch_status: handled`.
55
-
56
55
  Note: If every task in build phase was committed, the script's file count based on working tree diff may underestimate change scale. In this case, must read plan file header `base-ref` and verify with commit range:
57
56
 
58
57
  ```bash
59
- PLAN=$(node "$COMET_STATE" get <change-name> plan)
60
- BASE_REF=$(grep '^base-ref:' "$PLAN" 2>/dev/null | head -1 | sed 's/^base-ref: *//')
61
- git diff --stat "$BASE_REF"...HEAD
58
+ comet state get <change-name> plan
59
+ git diff --stat <base-ref read from plan frontmatter>...HEAD
62
60
  ```
63
61
 
62
+ The first command returns the plan path. Use the host's file reader to parse the single `base-ref` frontmatter field, validate it as a commit, then substitute it into the second command. Do not depend on POSIX text pipelines.
63
+
64
64
  If commit range shows changes exceed lightweight threshold (> 8 files, cross-module coordination, or delta spec spans more than 1 capability), manually set to full verification:
65
65
 
66
66
  ```bash
67
- node "$COMET_STATE" set <change-name> verify_mode full
67
+ comet state set <change-name> verify_mode full
68
68
  ```
69
69
 
70
- **Override mechanism**: If the agent or user believes the automated assessment is inappropriate, override at any time with `node "$COMET_STATE" set <change-name> verify_mode <light|full>`.
70
+ **Override mechanism**: If the agent or user believes the automated assessment is inappropriate, override at any time with `comet state set <change-name> verify_mode <light|full>`.
71
71
 
72
- ### 1b. Verification Failure Decision (Blocking Point)
72
+ ### 1b. Automatic Verification Repair and Exception Decisions
73
73
 
74
- When verification does not pass, **must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to decide whether to fix or accept the deviation**. Must not automatically run `node "$COMET_STATE" transition <change-name> verify-fail`, nor automatically invoke `/comet-build`.
74
+ Run `comet state get <change-name> verify_failures` first to read the persisted consecutive failure count. Automatically return to build for the first 3 repairable failures: report the failures, run `comet state transition <change-name> verify-fail`, then invoke `/comet-build` without asking for confirmation.
75
75
 
76
- When pausing, must list:
76
+ The report must list:
77
77
  - Failed items
78
78
  - Whether CRITICAL or IMPORTANT (build failure, test failure, security issues, core acceptance scenario failure, lightweight code review correctness/security/edge-case issue)
79
79
  - Recommended handling approach
80
80
 
81
- **Uncertainty principle**: When severity is unclear, downgrade (SUGGESTION > WARNING > CRITICAL). Only use CRITICAL for build failures, test failures, and security issues; ambiguous or uncertain issues should be WARNING or SUGGESTION.
81
+ **Uncertainty principle**: Use a lower severity when evidence is unclear. Reserve CRITICAL for build failures, test failures, and security issues; use IMPORTANT for confirmed core-acceptance or correctness failures; mark ambiguous findings WARNING or SUGGESTION.
82
82
 
83
- After user selection, continue as follows:
84
- - **Fix all**: Run `node "$COMET_STATE" transition <change-name> verify-fail`, then invoke `/comet-build` to fix
85
- - **Handle item by item**: CRITICAL or IMPORTANT failures must be fixed; WARNING/SUGGESTION failures may choose to accept deviation, but must record acceptance reason and impact scope in verification report. If any CRITICAL or IMPORTANT failure exists, skipping fix to accept all is not allowed
83
+ Handle failures as follows:
84
+ - **CRITICAL/IMPORTANT or objectively repairable in-scope issues**: automatically return to build below the retry limit. Do not manufacture a "whether to fix" decision, and never accept these as deviations
85
+ - **WARNING/SUGGESTION whose fix introduces a behavior, scope, or risk tradeoff**: use `comet/reference/decision-point.md` to ask whether to fix or accept. Record the reason and impact scope when accepted
86
+ - **WARNING/SUGGESTION with a safe, local, tradeoff-free fix**: repair automatically below the retry limit; low severity alone does not justify a pause
86
87
 
87
- **Retry limit**: After 3 consecutive verify-fail cycles, on the 4th failure the agent must not automatically choose to continue fixing; **must use the current platform's available user input/confirmation mechanism to pause** with only two options: "Accept all deviations and record" or "Continue fixing", for the user to explicitly decide.
88
+ Only accepting WARNING/SUGGESTION deviations or choosing a strategy after the 4th failure is a user decision point. When `verify_failures >= 3`, do not automatically execute another `verify-fail`. Offer only "Continue fixing" or "Stop this workflow and seek an external decision" under the decision protocol. Record the next failure and return to build only after the user chooses continue. CRITICAL/IMPORTANT findings are never waivable.
88
89
 
89
90
  ### 2. Artifact Context Loading (Hash On-Demand Read)
90
91
 
91
92
  When verification needs to read OpenSpec artifacts, first check whether they have changed since the design phase:
92
93
 
93
94
  ```bash
94
- RECORDED_HASH=$(node "$COMET_STATE" get <change-name> handoff_hash)
95
- CURRENT_HASH=$(node "$COMET_HANDOFF" <change-name> --hash-only 2>/dev/null || echo "")
95
+ comet state get <change-name> handoff_hash
96
+ comet handoff <change-name> --hash-only
96
97
  ```
97
98
 
98
- - If `RECORDED_HASH` = `CURRENT_HASH` and both are non-empty and neither is `null`: OpenSpec artifacts are unchanged. **tasks.md does not need to be re-read in full** (use `grep -c '\- \[ \]' tasks.md` to confirm completion count). proposal.md, design.md, and delta specs must still be read for comparison checks.
99
+ - Read the two standard outputs separately. If they match and both are non-empty and non-`null`, OpenSpec artifacts are unchanged. **tasks.md does not need to be re-read in full**; parse its checkboxes to confirm none remain unchecked. proposal.md, design.md, and delta specs must still be read for comparison checks.
99
100
  - If `RECORDED_HASH` is empty, is `null`, or differs from `CURRENT_HASH`: artifacts have changed or hash was never recorded. Read all required files in full normally.
100
101
 
101
102
  This optimization only skips re-reading tasks.md in full. proposal.md and design.md contain the full context needed for verification checks and must not be skipped due to hash match.
@@ -115,17 +116,24 @@ Run these 6 checks:
115
116
  5. No obvious security issues (no hardcoded keys, no new unsafe operations)
116
117
  6. Code review strategy: when `review_mode: standard` or `thorough`, use the Skill tool to load the Superpowers `requesting-code-review` skill and request a lightweight review that checks only correctness, security, and edge cases; when `review_mode: off`, skip automatic code review and record the skip reason in the verification report
117
118
 
118
- The lightweight code review input should be limited to this change's diff, tasks.md, and necessary test results; the review scope covers implementation correctness, security risk, and edge cases only, and does not perform spec coverage, Design Doc consistency, or drift checks. If the review finds CRITICAL or IMPORTANT issues, treat verification as failed and enter Step 1b. `review_mode: off` only skips automatic code review, not build, test, security checks, or debug gate protocol.
119
+ The lightweight code review input should be limited to this change's diff, tasks.md, and necessary test results; the review scope covers implementation correctness, security risk, and edge cases only, and does not perform spec coverage, Design Doc consistency, or drift checks. If the review finds CRITICAL or IMPORTANT issues, follow Step 1b automatic repair and retry handling. `review_mode: off` only skips automatic code review, not build, test, security checks, or debug gate protocol.
120
+
121
+ If the project has no automatically inferred verification command, the user or Agent must run the real verification command first, then record its evidence separately:
122
+
123
+ ```bash
124
+ comet state record-check <change-name> verify --command "<actual verification command>" --exit-code 0
125
+ ```
126
+
127
+ `--command` records command text only; Comet **never executes it**. Verify and build evidence are separate and cannot substitute for each other. Even when a compatibility workflow uses `COMET_SKIP_BUILD=1`, that bypass cannot be treated as auditable verification or build evidence.
119
128
 
120
129
  **Dedup with build-phase review**: if the build phase (`executing-plans` or `subagent-driven-development`) already completed a final code review of the same diff under `review_mode`, this lightweight verify review focuses on "whether the implementation is correct against spec/tasks" and "changes added after build", and does not re-review the diff that build already reviewed and that has not changed.
121
130
 
122
131
  **Pass criteria**: All 6 items OK, no CRITICAL or IMPORTANT issues.
123
132
 
124
- **When not passing**: Report failures, enter Step 1b verification failure decision blocking point. Only after user confirms fix, execute the following command to record failure and roll back to build phase, then invoke `/comet-build` to fix:
133
+ **When not passing**: Report failures and classify them under Step 1b. Below the automatic retry limit, when an issue must or should be repaired, run the following command directly and invoke `/comet-build`:
125
134
 
126
135
  ```bash
127
- # Execute only after user confirms fix
128
- node "$COMET_STATE" transition <change-name> verify-fail
136
+ comet state transition <change-name> verify-fail
129
137
  ```
130
138
 
131
139
  **Report format**: Brief table listing 6 check results + PASS/FAIL.
@@ -151,62 +159,39 @@ After the skill loads, follow its guidance to verify. Check items:
151
159
  6. No contradictions between delta spec and design doc (if Build phase had incremental spec modifications, check if design doc has corresponding records)
152
160
  7. Associated design documents under `docs/superpowers/specs/` are locatable (file exists and is related to current change)
153
161
 
154
- When verification does not pass: report missing items, enter Step 1b verification failure decision blocking point. Only after user confirms fix, execute the following command to record failure and roll back to build phase, then invoke `/comet-build` to supplement:
162
+ When verification does not pass, report missing items and classify them under Step 1b. Below the automatic retry limit, when the current change can supply the missing evidence, run the following command directly and invoke `/comet-build`:
155
163
 
156
164
  ```bash
157
- # Execute only after user confirms fix
158
- node "$COMET_STATE" transition <change-name> verify-fail
165
+ comet state transition <change-name> verify-fail
159
166
  ```
160
167
 
161
168
  **Spec Drift Handling** (user decision point):
162
169
  - If check item 6 finds contradictions (delta spec has content but design doc does not reflect it), **must use the current platform's available user input/confirmation mechanism as a single-select question to pause and wait for the user to choose the handling method**; must not select automatically. Options:
163
170
  - Option A: Append "Implementation Divergence" section to design doc recording deviation reason. Option A is a verify phase allowed artifact; after writing, must not re-trigger Step 1b dirty-worktree decision due to that design doc change
164
- - Option B: After user selects B, run `node "$COMET_STATE" transition <change-name> verify-fail`, then invoke `/comet-build`; `/comet-build`'s Spec Incremental Update rules will load the Superpowers `brainstorming` skill to update Design Doc + delta spec
171
+ - Option B: After user selects B, run `comet state transition <change-name> verify-fail`, then invoke `/comet-build`; `/comet-build`'s Spec Incremental Update rules will load the Superpowers `brainstorming` skill to update Design Doc + delta spec
165
172
  - Option C: Confirm deviation is acceptable, continue verification (design doc will be marked as `superseded-by-main-spec` during archiving)
166
173
 
167
- ### 3. Finishing (Superpowers)
168
-
169
- **Immediately execute:** Use the Skill tool to load the Superpowers `finishing-a-development-branch` skill. Skipping this step is prohibited.
174
+ ### 3. Record Verification Evidence
170
175
 
171
- If the Superpowers `finishing-a-development-branch` skill is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.
172
-
173
- After the skill loads, follow its guidance to finish. Branch handling options:
174
- 1. Merge to main branch locally
175
- 2. Push and create PR
176
- 3. Keep branch (handle later)
177
- 4. Discard work
178
-
179
- This is a user decision point. **Must follow the `comet/reference/decision-point.md` protocol to pause and wait for the user to choose branch handling method**. Must not select based on recommendations, defaults, or current branch status. Only after the user completes selection and the corresponding operation finishes, may `branch_status: handled` be written.
180
-
181
- **Confirmation items**:
182
- - All tests pass
183
- - No hardcoded keys or security issues
184
-
185
- ### 4. Record Verification Evidence
186
-
187
- Verification report must be saved to disk and recorded in `.comet.yaml`; after branch handling completes, state fields must also be written. Do not manually set `verify_result: pass`; use guard for auto-transition.
176
+ Save the verification report and record it in `.comet.yaml`. Do not handle, merge, or discard branches in verify and do not write `branch_status: handled`: archive creates spec and metadata changes that belong in the final commit, so `/comet-archive` owns branch finishing after that commit. Do not set `verify_result: pass` manually; use the phase guard.
188
177
 
189
178
  ```bash
190
- mkdir -p docs/superpowers/reports
191
- # Write verification conclusions to report file, e.g.:
192
- # docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
193
-
194
- node "$COMET_STATE" set <change-name> verification_report docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
195
- node "$COMET_STATE" set <change-name> branch_status handled
179
+ comet state set <change-name> verification_report docs/superpowers/reports/YYYY-MM-DD-<change-name>-verify.md
196
180
  ```
197
181
 
182
+ Use the host's file API to create `docs/superpowers/reports/` and the report file; do not depend on a POSIX-only directory command.
183
+
198
184
  ## Exit Conditions
199
185
 
200
186
  - Verification report passed
201
- - Branch handled
202
187
  - `verification_report` in `.comet.yaml` points to an existing verification report file
203
- - `branch_status: handled` in `.comet.yaml`
204
- - **Phase guard**: Run `node "$COMET_GUARD" <change-name> verify --apply`; after all PASS, auto-transitions to `phase: archive` through `comet-state transition verify-pass`
188
+ - `branch_status` remains `pending`
189
+ - **Phase guard**: Run `comet guard <change-name> verify --apply`; after all PASS, auto-transitions to `phase: archive` through `comet state transition verify-pass`
205
190
 
206
- After both verification and branch handling are complete, run guard for auto-transition:
191
+ After verification evidence is complete, run guard for auto-transition:
207
192
 
208
193
  ```bash
209
- node "$COMET_GUARD" <change-name> verify --apply
194
+ comet guard <change-name> verify --apply
210
195
  ```
211
196
 
212
197
  State file auto-updates to `phase: archive`, `verify_result: pass`, `verified_at: YYYY-MM-DD`.
@@ -220,11 +205,11 @@ Follow `comet/reference/context-recovery.md` with phase set to `verify`.
220
205
  Follow `comet/reference/auto-transition.md`. Key command:
221
206
 
222
207
  ```bash
223
- node "$COMET_STATE" next <change-name>
208
+ comet state next <change-name>
224
209
  ```
225
210
 
226
211
  - `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase
227
- - `NEXT: manual` → do not invoke the next skill; prompt user to run `/<SKILL>` manually
212
+ - `NEXT: manual` → do not invoke the next skill; return control with `HINT`, end the invocation, and do not create another confirmation point
228
213
  - `NEXT: done` → workflow is complete, no further action needed
229
214
 
230
215
  Note: after `comet-archive` starts, it must first execute the final archive confirmation blocking point and wait for the user to explicitly choose "Confirm archive" before running the archive script. Must not automatically archive just because verification passed.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: comet
3
- description: "Use when 用户要启动或恢复 Comet 工作流,需要根据 active change、.comet.yaml、hotfix/tweak 意图路由到对应阶段 Skill。"
3
+ description: "用于用户明确调用 /comet、要求启动或恢复 Comet 托管工作流,或仓库中存在可无歧义恢复的 active Comet change;负责通过 intent runtime 和 .comet.yaml 路由阶段。"
4
4
  ---
5
5
 
6
6
  # Comet — OpenSpec + Superpowers 双星开发流程
@@ -22,7 +22,7 @@ agent 做决策只需读本节,参考附录按需查阅。
22
22
 
23
23
  ### 输出语言规则
24
24
 
25
- 所有 OpenSpec 和 Superpowers 产物都必须使用 Comet 配置的产物语言。配置值是规范化语言 ID,`en` 或 `zh-CN`。已有 change 优先通过 `"$COMET_BASH" "$COMET_STATE" get <name> language` 读取 `openspec/changes/<name>/.comet.yaml` 中的 `language`;`.comet.yaml` 尚不存在时读取 `.comet/config.yaml` 的 `language`;两者都不存在时才回退到当前用户请求语言。调用外部 OpenSpec/Superpowers skill 时,必须把解析后的语言显式写入 prompt 或 ARGUMENTS。
25
+ 所有 OpenSpec 和 Superpowers 产物都必须使用 Comet 配置的产物语言。配置值是规范化语言 ID,`en` 或 `zh-CN`。已有 change 优先通过 `comet state get <name> language` 读取 `openspec/changes/<name>/.comet.yaml` 中的 `language`;`.comet.yaml` 尚不存在时依次读取项目 `.comet/config.yaml` 和全局 `~/.comet/config.yaml` 的 `language`;都不存在时才回退到当前用户请求语言。调用外部 OpenSpec/Superpowers skill 时,必须把解析后的语言显式写入 prompt 或 ARGUMENTS。
26
26
 
27
27
  ### 阶段自动检测
28
28
 
@@ -40,6 +40,30 @@ agent 做决策只需读本节,参考附录按需查阅。
40
40
  - `ask_user` → 按 `comet/reference/decision-point.md` 暂停并等待用户选择
41
41
  - `out_of_scope` → 说明本次输入不是 Comet workflow 启动/恢复请求,不初始化 change
42
42
 
43
+ 当 runtime route、Ambient Resume 或用户选择已经解析出明确 change 后,进入对应阶段 Skill 前必须先绑定当前执行上下文:
44
+
45
+ ```bash
46
+ comet state select <change-name>
47
+ ```
48
+
49
+ 多个 active change 且用户尚未明确选择时,不得提前绑定;继续按 `ask_user` 决策点等待选择。
50
+
51
+ ### Comet Ambient Resume
52
+
53
+ 当用户未显式输入 `/comet`,但当前仓库可能已有 active Comet change 时,开始处理需要改动或调查的任务前先运行只读探针:
54
+
55
+ ```bash
56
+ node "$COMET_RESUME_PROBE" probe --stdin
57
+ ```
58
+
59
+ 探针只读仓库状态,不修改文件。按返回值处理:
60
+
61
+ - `auto_resume`:输出一行 `[COMET] 检测到 active change <name>,按 <nextCommand> 恢复。`,然后进入 `nextCommand`。
62
+ - `ask_user`:只问一个短问题并等待用户回复。
63
+ - `out_of_scope` 或 `none`:不要进入 Comet workflow。
64
+
65
+ 原则:不把无关任务挂到 active Comet change,尤其不能只因为存在 `.comet.yaml` 就这样做。
66
+
43
67
  **CometIntentFrame 最小骨架**:
44
68
 
45
69
  ```json
@@ -102,22 +126,22 @@ agent 做决策只需读本节,参考附录按需查阅。
102
126
  - 每次恢复上下文时,先重新执行 Step 0 和 Step 1,不依赖对话历史判断阶段
103
127
  - 只要存在 active change 且工作区有未提交改动,必须按 `comet/reference/dirty-worktree.md` 协议处理。该协议定义了检查步骤、归因分类和禁令,本文件不重复
104
128
  - 若 `phase: build`,先检查 `build_pause`、`plan`、`isolation`、`build_mode`、`tdd_mode` 和 `review_mode`(详见下方):
105
- - 若 `build_pause: plan-ready` 但 `isolation`、`build_mode`、`tdd_mode` 和 `review_mode` 都已经设置,则视为 stale pause:先输出 `[COMET] 检测到 stale pause(build_pause=plan-ready 但 isolation/build_mode/tdd_mode/review_mode 已设置),自动清除并继续`,再运行 `node "$COMET_STATE" set <name> build_pause null`,然后读取 tasks.md 的下一个未勾选任务并按 `build_mode` 恢复执行
129
+ - 若 `build_pause: plan-ready` 但 `isolation`、`build_mode`、`tdd_mode` 和 `review_mode` 都已经设置,则视为 stale pause:先输出 `[COMET] 检测到 stale pause(build_pause=plan-ready 但 isolation/build_mode/tdd_mode/review_mode 已设置),自动清除并继续`,再运行 `comet state set <name> build_pause null`,然后读取 tasks.md 的下一个未勾选任务并按 `build_mode` 恢复执行
106
130
  - 若 `build_pause: plan-ready` 且 plan 文件存在,但 `isolation`、`build_mode`、`tdd_mode` 或 `review_mode` 尚未设置,回到 `/comet-build` 的 plan-ready 恢复点,提示用户继续补齐/确认工作区隔离、执行方式、TDD 模式和代码审查模式,不重新生成 plan
107
131
  - 若 `build_pause: plan-ready` 但 plan 文件缺失,回到 `/comet-build` 处理状态损坏或重新生成 plan
108
132
  - 若 `isolation`、`build_mode`、`tdd_mode` 或 `review_mode` 未设置,回到 `/comet-build` 对应步骤补充后再执行
109
133
  - 若均已设置,读取 tasks.md 的下一个未勾选任务,并按 `build_mode` 恢复执行:
110
134
  - 若 `build_mode: subagent-driven-development`,不得在主窗口直接执行任务;必须回到 `/comet-build` 的后台 subagent 调度规则,由主窗口只做协调
111
135
  - 其他执行方式按 `/comet-build` 的对应规则继续
112
- - 若 `phase: verify` 且 `verify_result: fail`,进入验证失败决策阻塞点:暂停并询问用户修复或接受偏差;用户选择修复后才运行 `node "$COMET_STATE" transition <name> verify-fail` 并调用 `/comet-build`
113
- - 若 `phase: open` 但 proposal/design/tasks 已完整,先运行 `node "$COMET_GUARD" <change-name> open --apply` 修正状态,再继续判定
114
- - 若 `phase: archive`,只允许调用 `/comet-archive`;`/comet-archive` 必须先等待归档前最终确认,归档成功后 change 会移动到 archive 目录,不再对原活跃目录运行 guard
136
+ - 若 `verify_result: fail`,读取 `verify_failures`:未超过 3 次时直接调用 `/comet-build` 继续已记录的修复循环,不重复询问;超过自动修复上限时回到 `/comet-verify` 的例外决策点。只有接受 WARNING/SUGGESTION 偏差或超限后的继续/停止策略需要用户选择
137
+ - 若 `phase: open` 但 OpenSpec `applyRequires` 已完整,先运行 `comet guard <change-name> open --apply` 修正状态,再继续判定
138
+ - 若 `phase: archive`,只允许调用 `/comet-archive`;归档前先等待最终确认,归档后精确提交归档改动,再处理分支并运行 archive guard
115
139
 
116
140
  **Step 2: 阶段判定**(按顺序,命中即停)
117
141
 
118
142
  1. `archived: true` 或 change 已移入 archive → 流程已完成
119
143
  2. `verify_result: pass` 且 `archived` 不是 `true` → `/comet-archive`(先进行归档前最终确认)
120
- 3. `verify_result: fail` → 进入验证失败决策阻塞点(暂停询问修复或接受偏差;用户选择修复后才 `verify-fail` `/comet-build`)
144
+ 3. `verify_result: fail` → 自动调用 `/comet-build` 继续修复;若 `verify_failures` 已超过自动修复上限,则进入 `/comet-verify` 的超限策略决策点
121
145
  4. `phase: verify` 或 tasks.md 全部勾选 → `/comet-verify`
122
146
  5. `phase: build` 或已有 Design Doc 但计划/执行未完成 → 优先按 workflow 路由:`hotfix` → `/comet-hotfix`,`tweak` → `/comet-tweak`,`full` → `/comet-build`
123
147
  6. `phase: design` 或有 change 但无 Design Doc → `/comet-design`
@@ -132,11 +156,11 @@ hotfix/tweak 的范围判定采用三层分工,避免「用纯文件数当硬
132
156
 
133
157
  1. **质变信号**(agent 语义识别,命中任一即暂停交用户二选一):跨模块协调修改、需要新增 capability、数据库 schema 变更、引入新的 public API、触及深层架构问题(各预设沿用这套核心信号,并可追加自身语境的特有信号,如 tweak 的「需要拆分为多个 OpenSpec changes」)
134
158
  2. **文件数 tripwire**(用户拍板,非自动升级):改动文件数超提示阈值时,暂停交用户决定继续预设流程还是升级 full,不自动踢
135
- 3. **验证级别**(scale 脚本判定):`comet-state scale` 仅决定 `verify_mode`(验证轻重),不卡流程、不触发升级
159
+ 3. **验证级别**(scale 脚本判定):`comet state scale` 仅决定 `verify_mode`(验证轻重),不卡流程、不触发升级
136
160
 
137
161
  **升级决策点(用户二选一)**:
138
162
  - 继续预设轻量流程(用户确认范围可控)
139
- - 升级为完整 `/comet`(使用 `node "$COMET_STATE" transition <name> preset-escalate` 合法回退到 design 阶段,补 Design Doc 和 Superpowers plan)
163
+ - 升级为完整 `/comet`(使用 `comet state transition <name> preset-escalate` 合法回退到 design 阶段,同时清除预设专属的 build 配置;补 Design Doc 后重新联合选择完整工作方式)
140
164
 
141
165
  详细判定规则见 `comet-hotfix` / `comet-tweak` 各自的「升级判定」章节。
142
166
 
@@ -146,7 +170,8 @@ hotfix/tweak 的范围判定采用三层分工,避免「用纯文件数当硬
146
170
  |------|---------|
147
171
  | `openspec list --json` 失败 | 检查 openspec 是否已安装,提示 `openspec init` |
148
172
  | 子 skill 不可用 | 停止流程,提示安装或启用对应 skill |
149
- | `.comet.yaml` 格式异常或缺失 | 以文件状态为准,用 `node "$COMET_STATE" set` 修正后继续 |
173
+ | `.comet.yaml` 缺失 | 进入对应 preset 的 `/comet-open` 初始化状态,再运行 `comet state select`;不得跳过初始化 |
174
+ | `.comet.yaml` 格式异常 | 停止并报告解析错误;从版本控制、备份或可验证产物人工修复,不能用 `comet state set` 覆盖损坏文件 |
150
175
  | 构建/测试失败 | 返回 build 阶段修复,不进入 verify |
151
176
  | change 目录结构不完整 | 按 `comet-open` 产物要求补齐 |
152
177
 
@@ -159,20 +184,21 @@ hotfix/tweak 的范围判定采用三层分工,避免「用纯文件数当硬
159
184
 
160
185
  **连续执行要求**:从检测到的阶段开始,agent 自动推进后续阶段。但**自动推进仅适用于没有用户决策的衔接点**。遇到用户决策点时,**必须使用当前平台可用的用户输入/确认机制暂停并等待用户明确回复**,不得用推荐规则、默认值或历史偏好代替用户确认,也不得仅输出文字提示后继续执行。
161
186
 
162
- **阶段推进与自动衔接的区分**:每个子 skill 退出前都会运行阶段守卫 `--apply` 推进 `.comet.yaml` 的 `phase` 字段——这一步**始终发生**,与 `auto_transition` 无关。之后子 skill 运行 `node "$COMET_STATE" next <name>` 解析下一步:`auto_transition` 不为 `false` 时输出 `NEXT: auto`(自动调用下一 skill),为 `false` 时输出 `NEXT: manual`(不调用下一 skill,提示用户手动运行)。因此 `auto_transition` **只控制是否自动调用下一个 skill,不影响 phase 推进**。无论 `auto_transition` 取何值,下方的用户决策点都必须阻塞等待。
187
+ **阶段推进与自动衔接的区分**:每个子 skill 退出前都会运行阶段守卫 `--apply` 推进 `.comet.yaml` 的 `phase` 字段——这一步**始终发生**,与 `auto_transition` 无关。之后子 skill 运行 `comet state next <name>` 解析下一步:`auto_transition` 不为 `false` 时输出 `NEXT: auto`(自动调用下一 skill),为 `false` 时输出 `NEXT: manual`(不调用下一 skill,按 `HINT` 交还控制权)。`NEXT: manual` 不是用户决策点,不得再询问“是否继续”。因此 `auto_transition` **只控制是否自动调用下一个 skill,不影响 phase 推进**。无论 `auto_transition` 取何值,下方真正的用户决策点都必须阻塞等待。
163
188
 
164
189
  **决策点是阻塞点**:只要到达下列任一节点,当前 `/comet` 调用必须停住,并按 `comet/reference/decision-point.md` 的协议获取用户明确选择。用户明确选择后才能写入对应状态字段、执行对应操作,随后再继续自动流转。
165
190
 
166
191
  需要用户参与的节点(仅在这些节点暂停):
167
- 1. open 阶段 proposal/design/tasks 审视确认
168
- 2. brainstorming 确认设计方案
169
- 3. build 阶段 plan-ready 暂停选择,以及随后选择工作方式(工作区隔离 + 执行方式 + TDD 模式 + 代码审查模式)
170
- 4. verify 不通过时决定修复或接受偏差(含 Spec 漂移处理方式选择)
171
- 5. finishing-branch 选择分支处理方式
192
+ 1. workflow 目标选择:多个 active changes、继续现有 change/创建新 change、或批量拆分完成后选择先启动哪一个
193
+ 2. open 阶段 proposal/design/tasks 最终审视确认(同时确认 change 名称与范围;清晰请求不做前置摘要/命名确认)
194
+ 3. brainstorming 确认设计方案
195
+ 4. build 阶段一次性联合选择 plan-ready 暂停或完整工作方式(可用的工作区隔离 + 执行方式 + TDD 模式 + 代码审查模式;选择 branch 时同时确认分支名)
196
+ 5. verify 阶段接受 WARNING/SUGGESTION 偏差、处理 Spec 漂移,或第 4 次失败后选择继续修复/停止;前 3 次明确可修复失败自动闭环
172
197
  6. archive 阶段执行归档脚本前的最终确认
173
- 7. 遇到升级判定信号(hotfix/tweak 用户二选一:继续预设流程 / 升级完整流程)
174
- 8. build 阶段范围扩张需重新设计或拆分新 change
175
- 9. open 阶段大型 PRD 需确认拆分为多个 change
198
+ 7. 归档改动精确提交后选择 finishing-branch 分支处理方式
199
+ 8. 遇到升级判定信号(hotfix/tweak 用户二选一:继续预设流程 / 升级完整流程)
200
+ 9. build 阶段范围扩张需重新设计或拆分新 change
201
+ 10. open 阶段大型 PRD 是否拆分为多个 changes
176
202
 
177
203
  agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须自动继续推进,不得中途退出。到达决策点时,**禁止跳过用户确认或自动选择——必须通过当前平台可用的用户输入/确认机制明确获取用户选择后才能继续**。
178
204
 
@@ -196,8 +222,8 @@ agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须
196
222
  | `/comet-open` | 1. 开启 | OpenSpec | proposal.md、design.md、tasks.md |
197
223
  | `/comet-design` | 2. 深度设计 | Superpowers | Design Doc、delta spec |
198
224
  | `/comet-build` | 3. 计划与构建 | Superpowers | 实施计划、代码提交 |
199
- | `/comet-verify` | 4. 验证与收尾 | Both | 验证报告、分支处理 |
200
- | `/comet-archive` | 5. 归档 | OpenSpec | delta→main spec 同步、design doc 标注、归档 |
225
+ | `/comet-verify` | 4. 验证 | Both | 验证报告 |
226
+ | `/comet-archive` | 5. 归档与收尾 | OpenSpec | delta→main spec 同步、design doc 标注、归档提交、分支处理 |
201
227
  | `/comet-hotfix` | 预设路径 | Both | 快速修复(跳过 brainstorming) |
202
228
  | `/comet-tweak` | 预设路径 | Both | 串联 OpenSpec 的中等改动(delta spec 为一等公民,跳过 brainstorming 和完整 plan) |
203
229
 
@@ -230,24 +256,24 @@ agent 不应跳过这些决策点;其他明确无歧义的阶段衔接必须
230
256
 
231
257
  ### 状态机硬约束
232
258
 
233
- - `build → verify` 前,`isolation` 必须是 `branch` 或 `worktree`
259
+ - full workflow 的 `build → verify` 前,`isolation` 必须是 `branch` 或 `worktree`;hotfix/tweak 可如实使用 `current`
234
260
  - `build → verify` 前,`build_mode` 必须已选择
235
261
  - `build_mode: subagent-driven-development` 必须同时有 `subagent_dispatch: confirmed`
236
262
  - full workflow 离开 build 阶段前 `tdd_mode` 必须已选择为 `tdd` 或 `direct`
237
263
  - full workflow 离开 build 阶段前 `review_mode` 必须已选择为 `off`、`standard` 或 `thorough`
238
264
  - `build_mode: direct` 默认只允许 `hotfix` / `tweak`;full workflow 需要 `direct_override: true`
239
265
  - `build_pause` 不是执行方式,不得写入 `build_mode`
240
- - 这些约束同时存在于 `comet-guard.mjs build --apply` 和 `comet-state.mjs transition <name> build-complete`
266
+ - 这些约束同时由 `comet guard <name> build --apply` 和 `comet state transition <name> build-complete` 执行
241
267
 
242
268
  ### 脚本定位
243
269
 
244
- Comet 脚本随 skill 包分发在 `comet/scripts/` 下。**不硬编码路径** 定位一次,缓存到环境变量。完整引导块、命令参考(`--apply`、`transition`、`next`、`archive`)和输出格式见 `comet/reference/scripts.md`。每会话运行一次该引导,后续全程复用 `$COMET_GUARD`、`$COMET_STATE`、`$COMET_HANDOFF`、`$COMET_ARCHIVE`、`$COMET_RUNTIME`。关键入口:
270
+ 面向 workflow 的状态、守卫、handoff archive 操作统一使用稳定 `comet` CLI;只有尚无公开子命令的 intent/resume probe 才按 `comet/reference/scripts.md` 定位内部 launcher。关键入口:
245
271
 
246
272
  ```bash
247
- node "$COMET_GUARD" <change-name> <phase> --apply # 阶段守卫 + 自动状态更新
248
- node "$COMET_STATE" transition <change-name> <event> # open-complete | design-complete | build-complete | verify-pass | verify-fail
249
- node "$COMET_STATE" next <change-name> # NEXT: auto|manual|done + SKILL: <skill-name>;auto_transition:false → manual,只暂停下一 skill 调用,不影响已发生的 phase 推进
250
- node "$COMET_ARCHIVE" <change-name> # 一键完成归档
273
+ comet guard <change-name> <phase> --apply # 阶段守卫 + 自动状态更新
274
+ comet state transition <change-name> <event> # open-complete | design-complete | build-complete | verify-pass | verify-fail
275
+ comet state next <change-name> # NEXT: auto|manual|done + SKILL: <skill-name>
276
+ comet archive <change-name> # 一键完成归档
251
277
  ```
252
278
 
253
279
  ### 文件结构
@@ -13,7 +13,7 @@
13
13
  退出条件满足且阶段守卫推进 phase 后,运行:
14
14
 
15
15
  ```bash
16
- node "$COMET_STATE" next <change-name>
16
+ comet state next <change-name>
17
17
  ```
18
18
 
19
19
  脚本根据 `phase`、`workflow`、`auto_transition` 输出确定性的下一步: