@rpamis/comet 0.4.0-beta.2 → 0.4.0-beta.4
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.
- package/README.md +27 -18
- package/assets/manifest.json +2 -1
- package/assets/skills/comet/SKILL.md +25 -1
- package/assets/skills/comet/reference/comet-yaml-fields.md +6 -4
- package/assets/skills/comet/reference/context-recovery.md +10 -0
- package/assets/skills/comet/reference/scripts.md +47 -15
- package/assets/skills/comet/rules/comet-phase-guard.en.md +8 -0
- package/assets/skills/comet/rules/comet-phase-guard.md +9 -1
- package/assets/skills/comet/scripts/comet-resume-probe.mjs +3 -0
- package/assets/skills/comet/scripts/comet-runtime.mjs +1664 -512
- package/assets/skills/comet-archive/SKILL.md +24 -11
- package/assets/skills/comet-build/SKILL.md +40 -31
- package/assets/skills/comet-design/SKILL.md +1 -0
- package/assets/skills/comet-hotfix/SKILL.md +3 -1
- package/assets/skills/comet-open/SKILL.md +11 -1
- package/assets/skills/comet-tweak/SKILL.md +3 -1
- package/assets/skills/comet-verify/SKILL.md +29 -20
- package/assets/skills-zh/comet/SKILL.md +25 -1
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +5 -4
- package/assets/skills-zh/comet/reference/context-recovery.md +10 -0
- package/assets/skills-zh/comet/reference/scripts.md +47 -15
- package/assets/skills-zh/comet-archive/SKILL.md +24 -11
- package/assets/skills-zh/comet-build/SKILL.md +40 -31
- package/assets/skills-zh/comet-design/SKILL.md +1 -0
- package/assets/skills-zh/comet-hotfix/SKILL.md +3 -1
- package/assets/skills-zh/comet-open/SKILL.md +11 -1
- package/assets/skills-zh/comet-tweak/SKILL.md +3 -1
- package/assets/skills-zh/comet-verify/SKILL.md +30 -21
- package/dist/app/cli/comet-banner.d.ts +25 -0
- package/dist/app/cli/comet-banner.d.ts.map +1 -0
- package/dist/app/cli/comet-banner.js +265 -0
- package/dist/app/cli/comet-banner.js.map +1 -0
- package/dist/app/cli/index.js +37 -3
- package/dist/app/cli/index.js.map +1 -1
- package/dist/app/commands/classic.d.ts +4 -0
- package/dist/app/commands/classic.d.ts.map +1 -0
- package/dist/app/commands/classic.js +11 -0
- package/dist/app/commands/classic.js.map +1 -0
- package/dist/app/commands/doctor.d.ts +1 -0
- package/dist/app/commands/doctor.d.ts.map +1 -1
- package/dist/app/commands/doctor.js +100 -35
- package/dist/app/commands/doctor.js.map +1 -1
- package/dist/app/commands/eval.d.ts.map +1 -1
- package/dist/app/commands/eval.js +57 -20
- package/dist/app/commands/eval.js.map +1 -1
- package/dist/app/commands/i18n.d.ts +1 -1
- package/dist/app/commands/i18n.d.ts.map +1 -1
- package/dist/app/commands/i18n.js +12 -4
- package/dist/app/commands/i18n.js.map +1 -1
- package/dist/app/commands/init.d.ts.map +1 -1
- package/dist/app/commands/init.js +16 -13
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/project-scope-selection.d.ts +13 -0
- package/dist/app/commands/project-scope-selection.d.ts.map +1 -0
- package/dist/app/commands/project-scope-selection.js +33 -0
- package/dist/app/commands/project-scope-selection.js.map +1 -0
- package/dist/app/commands/resume-probe.d.ts +11 -0
- package/dist/app/commands/resume-probe.d.ts.map +1 -0
- package/dist/app/commands/resume-probe.js +63 -0
- package/dist/app/commands/resume-probe.js.map +1 -0
- package/dist/app/commands/status.d.ts +31 -0
- package/dist/app/commands/status.d.ts.map +1 -1
- package/dist/app/commands/status.js +109 -20
- package/dist/app/commands/status.js.map +1 -1
- package/dist/app/commands/uninstall.d.ts +2 -0
- package/dist/app/commands/uninstall.d.ts.map +1 -1
- package/dist/app/commands/uninstall.js +217 -40
- package/dist/app/commands/uninstall.js.map +1 -1
- package/dist/app/commands/update.d.ts +6 -0
- package/dist/app/commands/update.d.ts.map +1 -1
- package/dist/app/commands/update.js +361 -68
- package/dist/app/commands/update.js.map +1 -1
- package/dist/config/repository-layout.json +4 -2
- package/dist/domains/bundle/bundle-platform.d.ts.map +1 -1
- package/dist/domains/bundle/bundle-platform.js +3 -1
- package/dist/domains/bundle/bundle-platform.js.map +1 -1
- package/dist/domains/bundle/eval-manifest-runtime.d.ts +6 -0
- package/dist/domains/bundle/eval-manifest-runtime.d.ts.map +1 -0
- package/dist/domains/bundle/eval-manifest-runtime.js +58 -0
- package/dist/domains/bundle/eval-manifest-runtime.js.map +1 -0
- package/dist/domains/bundle/types.d.ts +1 -1
- package/dist/domains/bundle/types.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-archive.d.ts +1 -0
- package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-archive.js +35 -38
- package/dist/domains/comet-classic/classic-archive.js.map +1 -1
- package/dist/domains/comet-classic/classic-cli.d.ts +1 -1
- package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-cli.js +3 -0
- package/dist/domains/comet-classic/classic-cli.js.map +1 -1
- package/dist/domains/comet-classic/classic-command-checks.d.ts +20 -0
- package/dist/domains/comet-classic/classic-command-checks.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-command-checks.js +97 -0
- package/dist/domains/comet-classic/classic-command-checks.js.map +1 -0
- package/dist/domains/comet-classic/classic-current-change.d.ts +19 -0
- package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-current-change.js +132 -0
- package/dist/domains/comet-classic/classic-current-change.js.map +1 -0
- package/dist/domains/comet-classic/classic-diagnostics.d.ts +2 -1
- package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-diagnostics.js +54 -1
- package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -1
- package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-evidence.js +4 -0
- package/dist/domains/comet-classic/classic-evidence.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-guard.js +101 -141
- package/dist/domains/comet-classic/classic-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.js +67 -29
- package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-project-config.d.ts +16 -0
- package/dist/domains/comet-classic/classic-project-config.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-project-config.js +40 -0
- package/dist/domains/comet-classic/classic-project-config.js.map +1 -0
- package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-resolver.js +3 -3
- package/dist/domains/comet-classic/classic-resolver.js.map +1 -1
- package/dist/domains/comet-classic/classic-resume-probe-command.d.ts +3 -0
- package/dist/domains/comet-classic/classic-resume-probe-command.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe-command.js +58 -0
- package/dist/domains/comet-classic/classic-resume-probe-command.js.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts +2 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.js +4 -0
- package/dist/domains/comet-classic/classic-resume-probe-entry.js.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe.d.ts +29 -0
- package/dist/domains/comet-classic/classic-resume-probe.d.ts.map +1 -0
- package/dist/domains/comet-classic/classic-resume-probe.js +386 -0
- package/dist/domains/comet-classic/classic-resume-probe.js.map +1 -0
- package/dist/domains/comet-classic/classic-runtime-run.d.ts +2 -1
- package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-runtime-run.js +269 -4
- package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.js +129 -15
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-state.d.ts +3 -3
- package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state.js +4 -6
- package/dist/domains/comet-classic/classic-state.js.map +1 -1
- package/dist/domains/comet-classic/classic-store.d.ts +4 -1
- package/dist/domains/comet-classic/classic-store.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-store.js +27 -9
- package/dist/domains/comet-classic/classic-store.js.map +1 -1
- package/dist/domains/comet-classic/classic-transitions.d.ts +1 -1
- package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-transitions.js +20 -1
- package/dist/domains/comet-classic/classic-transitions.js.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.js +1 -0
- package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
- package/dist/domains/comet-classic/index.d.ts +3 -0
- package/dist/domains/comet-classic/index.d.ts.map +1 -1
- package/dist/domains/comet-classic/index.js +3 -0
- package/dist/domains/comet-classic/index.js.map +1 -1
- package/dist/domains/dashboard/collector.js +10 -2
- package/dist/domains/dashboard/collector.js.map +1 -1
- package/dist/domains/dashboard/web/assets/{index-CjU3VXVu.js → index-CIvN-PL8.js} +11 -11
- package/dist/domains/dashboard/web/assets/{index-BcO3_QlT.css → index-DcyRPBnT.css} +1 -1
- package/dist/domains/dashboard/web/index.html +16 -16
- package/dist/domains/engine/types.d.ts +1 -1
- package/dist/domains/engine/types.d.ts.map +1 -1
- package/dist/domains/integrations/openspec.d.ts.map +1 -1
- package/dist/domains/integrations/openspec.js +6 -6
- package/dist/domains/integrations/openspec.js.map +1 -1
- package/dist/domains/skill/find.d.ts.map +1 -1
- package/dist/domains/skill/find.js +1 -6
- package/dist/domains/skill/find.js.map +1 -1
- package/dist/domains/skill/managed-markdown.d.ts +14 -0
- package/dist/domains/skill/managed-markdown.d.ts.map +1 -0
- package/dist/domains/skill/managed-markdown.js +126 -0
- package/dist/domains/skill/managed-markdown.js.map +1 -0
- package/dist/domains/skill/platform-install.d.ts +4 -3
- package/dist/domains/skill/platform-install.d.ts.map +1 -1
- package/dist/domains/skill/platform-install.js +96 -26
- package/dist/domains/skill/platform-install.js.map +1 -1
- package/dist/domains/skill/project-instructions.d.ts +22 -0
- package/dist/domains/skill/project-instructions.d.ts.map +1 -0
- package/dist/domains/skill/project-instructions.js +61 -0
- package/dist/domains/skill/project-instructions.js.map +1 -0
- package/dist/domains/skill/uninstall.d.ts +3 -1
- package/dist/domains/skill/uninstall.d.ts.map +1 -1
- package/dist/domains/skill/uninstall.js +86 -39
- package/dist/domains/skill/uninstall.js.map +1 -1
- package/dist/platform/install/detect.d.ts +2 -1
- package/dist/platform/install/detect.d.ts.map +1 -1
- package/dist/platform/install/detect.js +10 -1
- package/dist/platform/install/detect.js.map +1 -1
- package/dist/platform/install/platforms.d.ts +5 -1
- package/dist/platform/install/platforms.d.ts.map +1 -1
- package/dist/platform/install/platforms.js +21 -4
- package/dist/platform/install/platforms.js.map +1 -1
- package/dist/platform/install/project-registry.d.ts +37 -0
- package/dist/platform/install/project-registry.d.ts.map +1 -0
- package/dist/platform/install/project-registry.js +205 -0
- package/dist/platform/install/project-registry.js.map +1 -0
- package/eval/.env +28 -0
- package/eval/.env.example +52 -0
- package/eval/CLAUDE.md +43 -0
- package/eval/README.md +538 -0
- package/eval/langsmith/.env.example +16 -0
- package/eval/langsmith/README.md +93 -0
- package/eval/langsmith/skills/README.md +5 -0
- package/eval/langsmith/tasks/README.md +5 -0
- package/eval/langsmith/tests/conftest.py +187 -0
- package/eval/langsmith/tests/tasks/test_tasks.py +287 -0
- package/eval/langsmith/treatments/README.md +5 -0
- package/eval/local/README.md +80 -0
- package/eval/local/regression_baseline.json +13 -0
- package/eval/local/report-style-demo-assets/quality_cost.en.svg +41 -0
- package/eval/local/report-style-demo-assets/quality_cost.zh.svg +41 -0
- package/eval/local/report-style-demo-assets/rubric_delta.en.svg +56 -0
- package/eval/local/report-style-demo-assets/rubric_delta.zh.svg +56 -0
- package/eval/local/report-style-demo-assets/task_outcomes.en.svg +46 -0
- package/eval/local/report-style-demo-assets/task_outcomes.zh.svg +46 -0
- package/eval/local/report-style-demo.html +867 -0
- package/eval/local/scripts/compare_baselines.py +1018 -0
- package/eval/local/scripts/generate_report_style_demo_charts.py +322 -0
- package/eval/local/scripts/regression_check.py +171 -0
- package/eval/local/scripts/render_readme_benchmark_figures.py +416 -0
- package/eval/local/scripts/rescore_rubric.py +120 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/SKILL.md +282 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/auto-transition.md +27 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/comet-yaml-fields.md +68 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/context-recovery.md +35 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/debug-gate.md +17 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/decision-point.md +20 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/dirty-worktree.md +59 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/file-structure.md +28 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/subagent-dispatch.md +113 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/rules/comet-phase-guard.md +125 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-archive.sh +311 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-env.sh +110 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-guard.sh +778 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-handoff.sh +390 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-hook-guard.sh +336 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-state.sh +1338 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039/scripts/comet-yaml-validate.sh +225 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-archive/SKILL.md +100 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-build/SKILL.md +304 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-design/SKILL.md +263 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-hotfix/SKILL.md +204 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-open/SKILL.md +220 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-tweak/SKILL.md +180 -0
- package/eval/local/skills/benchmarks/039-release/comet-classic-039-verify/SKILL.md +234 -0
- package/eval/local/skills/benchmarks/040-beta/comet/SKILL.md +261 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/auto-transition.md +27 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/comet-yaml-fields.md +73 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/context-recovery.md +45 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/debug-gate.md +33 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/decision-point.md +31 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/dirty-worktree.md +59 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/file-structure.md +28 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/intent-frame.md +74 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/scripts.md +69 -0
- package/eval/local/skills/benchmarks/040-beta/comet/reference/subagent-dispatch.md +169 -0
- package/eval/local/skills/benchmarks/040-beta/comet/rules/comet-phase-guard.md +130 -0
- package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/checks.yaml +6 -0
- package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/guardrails.yaml +13 -0
- package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/skill.yaml +122 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-archive.mjs +9515 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-env.mjs +15 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-guard.mjs +10173 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-handoff.mjs +9491 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-hook-guard.mjs +9175 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-intent.mjs +404 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-state.mjs +9273 -0
- package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-yaml-validate.mjs +7627 -0
- package/eval/local/skills/benchmarks/040-beta/comet-archive/SKILL.md +110 -0
- package/eval/local/skills/benchmarks/040-beta/comet-build/SKILL.md +315 -0
- package/eval/local/skills/benchmarks/040-beta/comet-design/SKILL.md +260 -0
- package/eval/local/skills/benchmarks/040-beta/comet-hotfix/SKILL.md +190 -0
- package/eval/local/skills/benchmarks/040-beta/comet-open/SKILL.md +210 -0
- package/eval/local/skills/benchmarks/040-beta/comet-tweak/SKILL.md +183 -0
- package/eval/local/skills/benchmarks/040-beta/comet-verify/SKILL.md +230 -0
- package/eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md +12 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-apply-change/SKILL.md +156 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-archive-change/SKILL.md +114 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-bulk-archive-change/SKILL.md +246 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-continue-change/SKILL.md +118 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-explore/SKILL.md +288 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-ff-change/SKILL.md +101 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-new-change/SKILL.md +74 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-onboard/SKILL.md +554 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-propose/SKILL.md +110 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-sync-specs/SKILL.md +138 -0
- package/eval/local/skills/benchmarks/dependency/openspec/openspec-verify-change/SKILL.md +168 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/SKILL.md +159 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/frame-template.html +213 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/helper.js +167 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/server.cjs +723 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/start-server.sh +209 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/stop-server.sh +120 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/visual-companion.md +291 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/dispatching-parallel-agents/SKILL.md +185 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/executing-plans/SKILL.md +70 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/finishing-a-development-branch/SKILL.md +241 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/receiving-code-review/SKILL.md +213 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/SKILL.md +103 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/code-reviewer.md +172 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/SKILL.md +418 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/implementer-prompt.md +139 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/review-package +44 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/task-brief +40 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/SKILL.md +296 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-academic.md +14 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/SKILL.md +371 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/using-git-worktrees/SKILL.md +202 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/verification-before-completion/SKILL.md +139 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/SKILL.md +174 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/SKILL.md +689 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/render-graphs.js +168 -0
- package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/eval/local/tasks/authoring-skill-smoke/environment/Dockerfile +2 -0
- package/eval/local/tasks/authoring-skill-smoke/instruction.md +4 -0
- package/eval/local/tasks/authoring-skill-smoke/task.toml +21 -0
- package/eval/local/tasks/authoring-skill-smoke/validation/test_authoring_skill_smoke.py +54 -0
- package/eval/local/tasks/comet-agent-memory-routing/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-agent-memory-routing/environment/agent_system.py +40 -0
- package/eval/local/tasks/comet-agent-memory-routing/environment/test_agent_system.py +29 -0
- package/eval/local/tasks/comet-agent-memory-routing/instruction.md +20 -0
- package/eval/local/tasks/comet-agent-memory-routing/task.toml +24 -0
- package/eval/local/tasks/comet-agent-memory-routing/validation/test_agent_memory_routing.py +24 -0
- package/eval/local/tasks/comet-api-cache-ttl/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-api-cache-ttl/environment/cache.py +39 -0
- package/eval/local/tasks/comet-api-cache-ttl/environment/test_cache.py +81 -0
- package/eval/local/tasks/comet-api-cache-ttl/instruction.md +33 -0
- package/eval/local/tasks/comet-api-cache-ttl/task.toml +24 -0
- package/eval/local/tasks/comet-api-cache-ttl/validation/test_api_cache_ttl.py +58 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/cli.py +13 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/counting.py +13 -0
- package/eval/local/tasks/comet-cross-file-refactor/environment/test_textkit.py +21 -0
- package/eval/local/tasks/comet-cross-file-refactor/instruction.md +16 -0
- package/eval/local/tasks/comet-cross-file-refactor/task.toml +20 -0
- package/eval/local/tasks/comet-cross-file-refactor/validation/test_cross_file_refactor.py +20 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/app.py +8 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/settings_loader.py +14 -0
- package/eval/local/tasks/comet-dependency-confusion/environment/test_settings_service.py +19 -0
- package/eval/local/tasks/comet-dependency-confusion/instruction.md +18 -0
- package/eval/local/tasks/comet-dependency-confusion/task.toml +24 -0
- package/eval/local/tasks/comet-dependency-confusion/validation/test_dependency_confusion.py +24 -0
- package/eval/local/tasks/comet-fix-median/environment/Dockerfile +50 -0
- package/eval/local/tasks/comet-fix-median/environment/stats.py +54 -0
- package/eval/local/tasks/comet-fix-median/environment/test_stats.py +68 -0
- package/eval/local/tasks/comet-fix-median/instruction.md +25 -0
- package/eval/local/tasks/comet-fix-median/task.toml +24 -0
- package/eval/local/tasks/comet-fix-median/validation/test_fix_median.py +60 -0
- package/eval/local/tasks/comet-framework-selection/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-framework-selection/environment/architecture.py +12 -0
- package/eval/local/tasks/comet-framework-selection/environment/test_architecture.py +30 -0
- package/eval/local/tasks/comet-framework-selection/instruction.md +22 -0
- package/eval/local/tasks/comet-framework-selection/task.toml +24 -0
- package/eval/local/tasks/comet-framework-selection/validation/test_framework_selection.py +24 -0
- package/eval/local/tasks/comet-full-workflow/environment/Dockerfile +53 -0
- package/eval/local/tasks/comet-full-workflow/environment/test_wordcount.py +29 -0
- package/eval/local/tasks/comet-full-workflow/environment/wordcount.py +40 -0
- package/eval/local/tasks/comet-full-workflow/instruction.md +18 -0
- package/eval/local/tasks/comet-full-workflow/task.toml +24 -0
- package/eval/local/tasks/comet-full-workflow/validation/test_full_workflow.py +171 -0
- package/eval/local/tasks/comet-graph-execution-review/environment/Dockerfile +28 -0
- package/eval/local/tasks/comet-graph-execution-review/environment/pipeline.py +19 -0
- package/eval/local/tasks/comet-graph-execution-review/environment/test_pipeline.py +53 -0
- package/eval/local/tasks/comet-graph-execution-review/instruction.md +21 -0
- package/eval/local/tasks/comet-graph-execution-review/task.toml +24 -0
- package/eval/local/tasks/comet-graph-execution-review/validation/test_graph_execution_review.py +24 -0
- package/eval/local/tasks/comet-human-approval-flow/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-human-approval-flow/environment/approvals.py +17 -0
- package/eval/local/tasks/comet-human-approval-flow/environment/test_approvals.py +30 -0
- package/eval/local/tasks/comet-human-approval-flow/instruction.md +15 -0
- package/eval/local/tasks/comet-human-approval-flow/task.toml +20 -0
- package/eval/local/tasks/comet-human-approval-flow/validation/test_human_approval_flow.py +20 -0
- package/eval/local/tasks/comet-layered-streaming-fix/environment/Dockerfile +20 -0
- package/eval/local/tasks/comet-layered-streaming-fix/environment/chat_app.py +19 -0
- package/eval/local/tasks/comet-layered-streaming-fix/environment/test_chat_app.py +15 -0
- package/eval/local/tasks/comet-layered-streaming-fix/instruction.md +14 -0
- package/eval/local/tasks/comet-layered-streaming-fix/task.toml +20 -0
- package/eval/local/tasks/comet-layered-streaming-fix/validation/test_layered_streaming_fix.py +20 -0
- package/eval/local/tasks/comet-noise-distractor/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-noise-distractor/environment/distractor.md +4 -0
- package/eval/local/tasks/comet-noise-distractor/environment/invoice.py +5 -0
- package/eval/local/tasks/comet-noise-distractor/environment/test_invoice.py +18 -0
- package/eval/local/tasks/comet-noise-distractor/instruction.md +17 -0
- package/eval/local/tasks/comet-noise-distractor/task.toml +20 -0
- package/eval/local/tasks/comet-noise-distractor/validation/test_noise_distractor.py +20 -0
- package/eval/local/tasks/comet-observability-env-template/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-observability-env-template/environment/env_writer.py +17 -0
- package/eval/local/tasks/comet-observability-env-template/environment/test_env_writer.py +17 -0
- package/eval/local/tasks/comet-observability-env-template/instruction.md +20 -0
- package/eval/local/tasks/comet-observability-env-template/task.toml +20 -0
- package/eval/local/tasks/comet-observability-env-template/validation/test_observability_env_template.py +46 -0
- package/eval/local/tasks/comet-perf-dedupe/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-perf-dedupe/environment/dedupe.py +22 -0
- package/eval/local/tasks/comet-perf-dedupe/environment/test_dedupe.py +43 -0
- package/eval/local/tasks/comet-perf-dedupe/instruction.md +25 -0
- package/eval/local/tasks/comet-perf-dedupe/task.toml +24 -0
- package/eval/local/tasks/comet-perf-dedupe/validation/test_perf_dedupe.py +40 -0
- package/eval/local/tasks/comet-persistence-threading/environment/Dockerfile +15 -0
- package/eval/local/tasks/comet-persistence-threading/environment/session_store.py +15 -0
- package/eval/local/tasks/comet-persistence-threading/environment/test_session_store.py +21 -0
- package/eval/local/tasks/comet-persistence-threading/instruction.md +14 -0
- package/eval/local/tasks/comet-persistence-threading/task.toml +20 -0
- package/eval/local/tasks/comet-persistence-threading/validation/test_persistence_threading.py +20 -0
- package/eval/local/tasks/comet-refactor-counter/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-refactor-counter/environment/test_text_processor.py +57 -0
- package/eval/local/tasks/comet-refactor-counter/environment/text_processor.py +49 -0
- package/eval/local/tasks/comet-refactor-counter/instruction.md +31 -0
- package/eval/local/tasks/comet-refactor-counter/task.toml +24 -0
- package/eval/local/tasks/comet-refactor-counter/validation/test_refactor_counter.py +75 -0
- package/eval/local/tasks/comet-robust-config/environment/Dockerfile +39 -0
- package/eval/local/tasks/comet-robust-config/environment/config_loader.py +56 -0
- package/eval/local/tasks/comet-robust-config/environment/test_config_loader.py +72 -0
- package/eval/local/tasks/comet-robust-config/instruction.md +30 -0
- package/eval/local/tasks/comet-robust-config/task.toml +24 -0
- package/eval/local/tasks/comet-robust-config/validation/test_robust_config.py +37 -0
- package/eval/local/tasks/generic-skill-smoke/environment/Dockerfile +2 -0
- package/eval/local/tasks/generic-skill-smoke/instruction.md +7 -0
- package/eval/local/tasks/generic-skill-smoke/task.toml +21 -0
- package/eval/local/tasks/generic-skill-smoke/validation/test_generic_skill_smoke.py +36 -0
- package/eval/local/tasks/index.yaml +155 -0
- package/eval/local/tasks/workflow-overlay-contract/environment/Dockerfile +5 -0
- package/eval/local/tasks/workflow-overlay-contract/instruction.md +5 -0
- package/eval/local/tasks/workflow-overlay-contract/task.toml +21 -0
- package/eval/local/tasks/workflow-overlay-contract/validation/test_workflow_overlay_contract.py +235 -0
- package/eval/local/tasks/workflow-route-conformance/environment/Dockerfile +2 -0
- package/eval/local/tasks/workflow-route-conformance/instruction.md +5 -0
- package/eval/local/tasks/workflow-route-conformance/task.toml +21 -0
- package/eval/local/tasks/workflow-route-conformance/validation/test_workflow_route_conformance.py +84 -0
- package/eval/local/tests/conftest.py +1148 -0
- package/eval/local/tests/scaffold/test_attribution.py +48 -0
- package/eval/local/tests/scaffold/test_compare_baselines.py +999 -0
- package/eval/local/tests/scaffold/test_conftest_helpers.py +534 -0
- package/eval/local/tests/scaffold/test_evidence.py +15 -0
- package/eval/local/tests/scaffold/test_langsmith_conftest.py +244 -0
- package/eval/local/tests/scaffold/test_logging.py +243 -0
- package/eval/local/tests/scaffold/test_manifests.py +132 -0
- package/eval/local/tests/scaffold/test_profiles.py +866 -0
- package/eval/local/tests/scaffold/test_regression_check.py +19 -0
- package/eval/local/tests/scaffold/test_report_style_demo_charts.py +45 -0
- package/eval/local/tests/scaffold/test_sample_quality.py +211 -0
- package/eval/local/tests/scaffold/test_tasks.py +168 -0
- package/eval/local/tests/scaffold/test_treatments.py +244 -0
- package/eval/local/tests/scaffold/test_utils.py +139 -0
- package/eval/local/tests/tasks/test_tasks.py +445 -0
- package/eval/local/tests/tasks/test_validation_scripts.py +143 -0
- package/eval/local/treatments/comet/comet_full_039.yaml +141 -0
- package/eval/local/treatments/comet/comet_full_040_beta.yaml +140 -0
- package/eval/local/treatments/common/control.yaml +4 -0
- package/eval/pyproject.toml +41 -0
- package/eval/report-html-config.json +6 -0
- package/eval/scaffold/__init__.py +67 -0
- package/eval/scaffold/python/__init__.py +95 -0
- package/eval/scaffold/python/attribution.py +43 -0
- package/eval/scaffold/python/evidence.py +38 -0
- package/eval/scaffold/python/external_data_handler.py +18 -0
- package/eval/scaffold/python/generic_llm_judge.py +235 -0
- package/eval/scaffold/python/judge_config.py +168 -0
- package/eval/scaffold/python/llm_judge.py +191 -0
- package/eval/scaffold/python/logging.py +705 -0
- package/eval/scaffold/python/manifests.py +129 -0
- package/eval/scaffold/python/paper_charts.py +25 -0
- package/eval/scaffold/python/pass_at_k.py +107 -0
- package/eval/scaffold/python/paths.py +56 -0
- package/eval/scaffold/python/profiles.py +127 -0
- package/eval/scaffold/python/report_outputs.py +1391 -0
- package/eval/scaffold/python/sample_quality.py +339 -0
- package/eval/scaffold/python/schema.py +39 -0
- package/eval/scaffold/python/skill_parser.py +469 -0
- package/eval/scaffold/python/tasks.py +330 -0
- package/eval/scaffold/python/treatments.py +271 -0
- package/eval/scaffold/python/utils.py +366 -0
- package/eval/scaffold/python/validation/__init__.py +21 -0
- package/eval/scaffold/python/validation/authoring_rubric.py +326 -0
- package/eval/scaffold/python/validation/comet_workflow.py +187 -0
- package/eval/scaffold/python/validation/core.py +264 -0
- package/eval/scaffold/python/validation/dataset.py +337 -0
- package/eval/scaffold/python/validation/docker.py +106 -0
- package/eval/scaffold/python/validation/evaluator.py +549 -0
- package/eval/scaffold/python/validation/generic_rubric.py +169 -0
- package/eval/scaffold/python/validation/rubric.py +740 -0
- package/eval/scaffold/python/validation/runner.py +237 -0
- package/eval/scaffold/python/validation/scripts.py +58 -0
- package/eval/scaffold/python/validation/tracing.py +313 -0
- package/eval/scaffold/shell/common.sh +126 -0
- package/eval/scaffold/shell/docker.sh +482 -0
- package/eval/scaffold/shell/run-claude-loop.sh +181 -0
- package/eval/scaffold/shell/setup.sh +259 -0
- package/eval/simulator-instruction.md +9 -0
- package/package.json +24 -2
|
@@ -5,8 +5,10 @@ import { collectClassicEvidence } from './classic-evidence.js';
|
|
|
5
5
|
import { ensureClassicRun } from './classic-migrate.js';
|
|
6
6
|
import { resolveClassicStepId } from './classic-resolver.js';
|
|
7
7
|
import { readClassicState, writeClassicState } from './classic-store.js';
|
|
8
|
+
import { CLASSIC_MIGRATION_VERSION, } from './classic-state.js';
|
|
8
9
|
import { appendTrajectory, readTrajectory } from '../../domains/engine/run-store.js';
|
|
9
10
|
import { loadRuntimePackage, loadSkillPackage } from '../../domains/skill/load.js';
|
|
11
|
+
import { readSkillSnapshot } from '../../domains/skill/snapshot.js';
|
|
10
12
|
async function directoryExists(directory) {
|
|
11
13
|
try {
|
|
12
14
|
return (await fs.stat(directory)).isDirectory();
|
|
@@ -27,6 +29,230 @@ async function fileExists(file) {
|
|
|
27
29
|
throw error;
|
|
28
30
|
}
|
|
29
31
|
}
|
|
32
|
+
function embeddedClassicRuntimePackage(root) {
|
|
33
|
+
return {
|
|
34
|
+
root,
|
|
35
|
+
packageKind: 'runtime',
|
|
36
|
+
definition: {
|
|
37
|
+
apiVersion: 'comet/v1alpha1',
|
|
38
|
+
kind: 'Skill',
|
|
39
|
+
metadata: {
|
|
40
|
+
name: 'comet-classic',
|
|
41
|
+
version: '1',
|
|
42
|
+
description: 'Internal compatibility orchestration for classic Comet full, hotfix, and tweak workflows',
|
|
43
|
+
},
|
|
44
|
+
goal: {
|
|
45
|
+
statement: 'Advance or restore a classic Comet Run without changing the user command surface',
|
|
46
|
+
inputs: [
|
|
47
|
+
{
|
|
48
|
+
name: 'classic-state',
|
|
49
|
+
description: 'Validated ClassicState consistent with the Run projection',
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'evidence',
|
|
54
|
+
description: 'Structured evidence produced by the Classic Evidence collector',
|
|
55
|
+
required: true,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
outputs: [
|
|
59
|
+
{
|
|
60
|
+
name: 'run-state',
|
|
61
|
+
description: 'Atomically synchronized Classic and Run state',
|
|
62
|
+
required: true,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
success: [
|
|
66
|
+
'Legacy fields and Run fields remain consistent',
|
|
67
|
+
'Every step invokes only a declared public Comet Skill',
|
|
68
|
+
'The completed state passes its completion eval',
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
orchestration: {
|
|
72
|
+
mode: 'deterministic',
|
|
73
|
+
entry: 'full.open',
|
|
74
|
+
steps: [
|
|
75
|
+
{
|
|
76
|
+
id: 'full.open',
|
|
77
|
+
action: { type: 'invoke_skill', ref: 'comet-open' },
|
|
78
|
+
next: 'full.design.handoff',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'full.design.handoff',
|
|
82
|
+
action: { type: 'invoke_skill', ref: 'comet-design' },
|
|
83
|
+
next: 'full.design.document',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'full.design.document',
|
|
87
|
+
action: { type: 'invoke_skill', ref: 'comet-design' },
|
|
88
|
+
next: 'full.build.plan',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'full.build.plan',
|
|
92
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
93
|
+
next: 'full.build.plan-ready',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'full.build.plan-ready',
|
|
97
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
98
|
+
next: 'full.build.configure',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'full.build.configure',
|
|
102
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
103
|
+
next: 'full.build.execute',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 'full.build.execute',
|
|
107
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
108
|
+
next: 'full.build.complete',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'full.build.complete',
|
|
112
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
113
|
+
next: 'full.verify.run',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'full.build.fix',
|
|
117
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
118
|
+
next: 'full.build.execute',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 'full.verify.run',
|
|
122
|
+
action: { type: 'invoke_skill', ref: 'comet-verify' },
|
|
123
|
+
next: 'full.verify.branch',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 'full.verify.branch',
|
|
127
|
+
action: { type: 'invoke_skill', ref: 'comet-verify' },
|
|
128
|
+
next: 'full.archive.confirm',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 'full.archive.confirm',
|
|
132
|
+
action: { type: 'invoke_skill', ref: 'comet-archive' },
|
|
133
|
+
next: 'full.archive.execute',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'full.archive.execute',
|
|
137
|
+
action: { type: 'invoke_skill', ref: 'comet-archive' },
|
|
138
|
+
next: 'completed',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: 'hotfix.open',
|
|
142
|
+
action: { type: 'invoke_skill', ref: 'comet-hotfix' },
|
|
143
|
+
next: 'hotfix.build.execute',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'hotfix.build.execute',
|
|
147
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
148
|
+
next: 'hotfix.build.complete',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: 'hotfix.build.complete',
|
|
152
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
153
|
+
next: 'hotfix.verify.run',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'hotfix.verify.run',
|
|
157
|
+
action: { type: 'invoke_skill', ref: 'comet-verify' },
|
|
158
|
+
next: 'hotfix.verify.branch',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: 'hotfix.verify.branch',
|
|
162
|
+
action: { type: 'invoke_skill', ref: 'comet-verify' },
|
|
163
|
+
next: 'hotfix.archive.confirm',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: 'hotfix.archive.confirm',
|
|
167
|
+
action: { type: 'invoke_skill', ref: 'comet-archive' },
|
|
168
|
+
next: 'hotfix.archive.execute',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: 'hotfix.archive.execute',
|
|
172
|
+
action: { type: 'invoke_skill', ref: 'comet-archive' },
|
|
173
|
+
next: 'completed',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: 'tweak.open',
|
|
177
|
+
action: { type: 'invoke_skill', ref: 'comet-tweak' },
|
|
178
|
+
next: 'tweak.build.execute',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'tweak.build.execute',
|
|
182
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
183
|
+
next: 'tweak.build.complete',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: 'tweak.build.complete',
|
|
187
|
+
action: { type: 'invoke_skill', ref: 'comet-build' },
|
|
188
|
+
next: 'tweak.verify.run',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: 'tweak.verify.run',
|
|
192
|
+
action: { type: 'invoke_skill', ref: 'comet-verify' },
|
|
193
|
+
next: 'tweak.verify.branch',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'tweak.verify.branch',
|
|
197
|
+
action: { type: 'invoke_skill', ref: 'comet-verify' },
|
|
198
|
+
next: 'tweak.archive.confirm',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: 'tweak.archive.confirm',
|
|
202
|
+
action: { type: 'invoke_skill', ref: 'comet-archive' },
|
|
203
|
+
next: 'tweak.archive.execute',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: 'tweak.archive.execute',
|
|
207
|
+
action: { type: 'invoke_skill', ref: 'comet-archive' },
|
|
208
|
+
next: 'completed',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: 'completed',
|
|
212
|
+
action: { type: 'checkpoint' },
|
|
213
|
+
completionEvals: ['classic-completed'],
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
skills: [
|
|
218
|
+
{ id: 'comet-open' },
|
|
219
|
+
{ id: 'comet-design' },
|
|
220
|
+
{ id: 'comet-build' },
|
|
221
|
+
{ id: 'comet-verify' },
|
|
222
|
+
{ id: 'comet-archive' },
|
|
223
|
+
{ id: 'comet-hotfix' },
|
|
224
|
+
{ id: 'comet-tweak' },
|
|
225
|
+
],
|
|
226
|
+
agents: [],
|
|
227
|
+
tools: [],
|
|
228
|
+
},
|
|
229
|
+
guardrails: {
|
|
230
|
+
allowedSkills: [
|
|
231
|
+
'comet-open',
|
|
232
|
+
'comet-design',
|
|
233
|
+
'comet-build',
|
|
234
|
+
'comet-verify',
|
|
235
|
+
'comet-archive',
|
|
236
|
+
'comet-hotfix',
|
|
237
|
+
'comet-tweak',
|
|
238
|
+
],
|
|
239
|
+
allowedAgents: [],
|
|
240
|
+
allowedTools: [],
|
|
241
|
+
maxIterations: 500,
|
|
242
|
+
maxRetriesPerAction: 3,
|
|
243
|
+
confirmationRequiredFor: [],
|
|
244
|
+
},
|
|
245
|
+
evals: [
|
|
246
|
+
{
|
|
247
|
+
id: 'classic-completed',
|
|
248
|
+
scope: 'completion',
|
|
249
|
+
type: 'state_equals',
|
|
250
|
+
field: 'status',
|
|
251
|
+
equals: 'completed',
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
};
|
|
255
|
+
}
|
|
30
256
|
async function classicRuntimeRoot() {
|
|
31
257
|
const runtimeDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
32
258
|
const candidates = [
|
|
@@ -44,7 +270,7 @@ async function classicRuntimeRoot() {
|
|
|
44
270
|
if (await directoryExists(candidate))
|
|
45
271
|
return candidate;
|
|
46
272
|
}
|
|
47
|
-
|
|
273
|
+
return null;
|
|
48
274
|
}
|
|
49
275
|
async function loadClassicRuntimePackage(root) {
|
|
50
276
|
if (await fileExists(path.join(root, 'skill.yaml'))) {
|
|
@@ -55,16 +281,55 @@ async function loadClassicRuntimePackage(root) {
|
|
|
55
281
|
export async function ensureClassicRuntimeRun(changeDir) {
|
|
56
282
|
const root = await classicRuntimeRoot();
|
|
57
283
|
return ensureClassicRun(changeDir, {
|
|
58
|
-
skillPackage:
|
|
284
|
+
skillPackage: root
|
|
285
|
+
? await loadClassicRuntimePackage(root)
|
|
286
|
+
: embeddedClassicRuntimePackage(path.dirname(fileURLToPath(import.meta.url))),
|
|
59
287
|
});
|
|
60
288
|
}
|
|
61
289
|
export async function ensureStrictClassicRuntimeRun(changeDir) {
|
|
62
290
|
const projection = await readClassicState(changeDir);
|
|
63
|
-
|
|
64
|
-
|
|
291
|
+
const unknownKeys = Array.from(new Set(projection.unknownKeys)).sort();
|
|
292
|
+
if (unknownKeys.length > 0) {
|
|
293
|
+
throw new Error(`Invalid Classic state: unknown field(s): ${unknownKeys.join(', ')}`);
|
|
65
294
|
}
|
|
66
295
|
return ensureClassicRuntimeRun(changeDir);
|
|
67
296
|
}
|
|
297
|
+
export async function validateClassicRuntimeRun(changeDir, existingProjection) {
|
|
298
|
+
const projection = existingProjection ?? (await readClassicState(changeDir, { migrate: false }));
|
|
299
|
+
const unknownKeys = Array.from(new Set(projection.unknownKeys)).sort();
|
|
300
|
+
if (unknownKeys.length > 0) {
|
|
301
|
+
throw new Error(`Invalid Classic state: unknown field(s): ${unknownKeys.join(', ')}`);
|
|
302
|
+
}
|
|
303
|
+
if (!projection.classic || !projection.run) {
|
|
304
|
+
throw new Error('Classic runtime validation requires synchronized Classic and Run projections');
|
|
305
|
+
}
|
|
306
|
+
if (projection.classic.classicMigration !== CLASSIC_MIGRATION_VERSION) {
|
|
307
|
+
throw new Error('Classic Run exists without a supported classic_migration marker');
|
|
308
|
+
}
|
|
309
|
+
const root = await classicRuntimeRoot();
|
|
310
|
+
const skillPackage = root
|
|
311
|
+
? await loadClassicRuntimePackage(root)
|
|
312
|
+
: embeddedClassicRuntimePackage(path.dirname(fileURLToPath(import.meta.url)));
|
|
313
|
+
if (projection.run.skill !== skillPackage.definition.metadata.name) {
|
|
314
|
+
throw new Error(`Classic Run skill mismatch: expected ${skillPackage.definition.metadata.name}, got ${projection.run.skill}`);
|
|
315
|
+
}
|
|
316
|
+
const snapshot = await readSkillSnapshot(changeDir, projection.run.skillHash);
|
|
317
|
+
if (snapshot.definition.metadata.name !== projection.run.skill) {
|
|
318
|
+
throw new Error(`Classic Run snapshot skill mismatch: expected ${projection.run.skill}, got ${snapshot.definition.metadata.name}`);
|
|
319
|
+
}
|
|
320
|
+
const evidence = await collectClassicEvidence(changeDir, projection);
|
|
321
|
+
const currentStep = resolveClassicStepId(projection.classic, evidence);
|
|
322
|
+
if (projection.run.currentStep !== currentStep) {
|
|
323
|
+
throw new Error(`Classic Run step mismatch: expected ${currentStep}, got ${projection.run.currentStep}`);
|
|
324
|
+
}
|
|
325
|
+
return {
|
|
326
|
+
classic: projection.classic,
|
|
327
|
+
run: projection.run,
|
|
328
|
+
evidence,
|
|
329
|
+
migrated: false,
|
|
330
|
+
snapshotDir: path.join(changeDir, '.comet', 'skill-snapshots', projection.run.skillHash),
|
|
331
|
+
};
|
|
332
|
+
}
|
|
68
333
|
export async function transitionClassicRuntimeRun(changeDir, classic, run, data) {
|
|
69
334
|
const projection = await readClassicState(changeDir);
|
|
70
335
|
if (!projection.classic || !projection.run) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classic-runtime-run.js","sourceRoot":"","sources":["../../../domains/comet-classic/classic-runtime-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAu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AAG;QACN,WAAW;QACX,SAAS,EAAE,GAAG,CAAC,SAAS,GAAG,CAAC;QAC5B,MAAM,EAAE,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;KAC9D,CAAC;IAEF,MAAM,iBAAiB,CAAC,SAAS,EAAE;QACjC,OAAO;QACP,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,UAAU,CAAC,WAAW;KACpC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,MAAM,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1E,MAAM,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,aAAa,EAAE;QACvD,QAAQ,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC;QAC/B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,GAAG,CAAC,WAAW;YACzB,MAAM,EAAE,WAAW;YACnB,GAAG,IAAI;SACR;KACF,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classic-state-command.d.ts","sourceRoot":"","sources":["../../../domains/comet-classic/classic-state-command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAwB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"classic-state-command.d.ts","sourceRoot":"","sources":["../../../domains/comet-classic/classic-state-command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAwB,MAAM,kBAAkB,CAAC;AAwtCpF,eAAO,MAAM,mBAAmB,EAAE,qBA8DjC,CAAC"}
|
|
@@ -3,16 +3,19 @@ import { randomUUID } from 'crypto';
|
|
|
3
3
|
import { existsSync, promises as fs } from 'fs';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { Document, parseDocument } from 'yaml';
|
|
6
|
+
import { clearCurrentChange, resolveCurrentChange, selectCurrentChange, } from './classic-current-change.js';
|
|
6
7
|
import { collectClassicEvidence } from './classic-evidence.js';
|
|
7
8
|
import { openSpecChangeNameError, resolveClassicChangeDirectory } from './classic-paths.js';
|
|
8
9
|
import { resolveClassicStepId } from './classic-resolver.js';
|
|
9
|
-
import { transitionClassicRuntimeRun } from './classic-runtime-run.js';
|
|
10
|
+
import { transitionClassicRuntimeRun, validateClassicRuntimeRun } from './classic-runtime-run.js';
|
|
10
11
|
import { appendClassicStateEvent } from './classic-state-events.js';
|
|
11
12
|
import { CLASSIC_WIRE_KEYS, RUN_WIRE_KEYS, parseClassicStateDocument, } from './classic-state.js';
|
|
12
13
|
import { readClassicState, writeClassicState } from './classic-store.js';
|
|
13
14
|
import { CLASSIC_TRANSITION_EVENTS, applyClassicTransition, } from './classic-transitions.js';
|
|
14
15
|
import { readRunState } from '../../domains/engine/state.js';
|
|
15
16
|
import { appendTrajectory, readTrajectory } from '../../domains/engine/run-store.js';
|
|
17
|
+
import { recordCommandCheck } from './classic-command-checks.js';
|
|
18
|
+
import { readClassicConfigValue } from './classic-project-config.js';
|
|
16
19
|
const GREEN = '\u001b[32m';
|
|
17
20
|
const RED = '\u001b[31m';
|
|
18
21
|
const YELLOW = '\u001b[33m';
|
|
@@ -23,6 +26,7 @@ const ARTIFACT_LANGUAGES = ['en', 'zh-CN'];
|
|
|
23
26
|
const EVENTS = CLASSIC_TRANSITION_EVENTS;
|
|
24
27
|
const MACHINE_OWNED_FIELDS = new Set([
|
|
25
28
|
...RUN_WIRE_KEYS,
|
|
29
|
+
'archive_confirmation',
|
|
26
30
|
'classic_profile',
|
|
27
31
|
'classic_migration',
|
|
28
32
|
]);
|
|
@@ -41,6 +45,7 @@ const FIELD_ENUMS = {
|
|
|
41
45
|
auto_transition: ['true', 'false'],
|
|
42
46
|
verify_result: ['pending', 'pass', 'fail'],
|
|
43
47
|
branch_status: ['pending', 'handled'],
|
|
48
|
+
archive_confirmation: ['pending', 'confirmed'],
|
|
44
49
|
archived: ['true', 'false'],
|
|
45
50
|
direct_override: ['true', 'false'],
|
|
46
51
|
classic_profile: PROFILES,
|
|
@@ -56,6 +61,7 @@ const CLASSIC_FIELD_WIRE_NAMES = {
|
|
|
56
61
|
phase: 'phase',
|
|
57
62
|
verificationReport: 'verification_report',
|
|
58
63
|
verifiedAt: 'verified_at',
|
|
64
|
+
archiveConfirmation: 'archive_confirmation',
|
|
59
65
|
verifyResult: 'verify_result',
|
|
60
66
|
workflow: 'workflow',
|
|
61
67
|
};
|
|
@@ -229,10 +235,9 @@ function sparseClassicState(record) {
|
|
|
229
235
|
branchStatus: enumRecordValue(record, 'branch_status', ['pending', 'handled'], null),
|
|
230
236
|
createdAt: nullableRecordString(record, 'created_at'),
|
|
231
237
|
verifiedAt: nullableRecordString(record, 'verified_at'),
|
|
238
|
+
archiveConfirmation: enumRecordValue(record, 'archive_confirmation', ['pending', 'confirmed'], null),
|
|
232
239
|
archived: nullableRecordBoolean(record, 'archived') ?? false,
|
|
233
240
|
directOverride: nullableRecordBoolean(record, 'direct_override'),
|
|
234
|
-
buildCommand: nullableRecordString(record, 'build_command'),
|
|
235
|
-
verifyCommand: nullableRecordString(record, 'verify_command'),
|
|
236
241
|
handoffContext: nullableRecordString(record, 'handoff_context'),
|
|
237
242
|
handoffHash: nullableRecordString(record, 'handoff_hash'),
|
|
238
243
|
classicProfile: enumRecordValue(record, 'classic_profile', PROFILES, workflow),
|
|
@@ -240,19 +245,14 @@ function sparseClassicState(record) {
|
|
|
240
245
|
};
|
|
241
246
|
}
|
|
242
247
|
async function projectConfigValue(field) {
|
|
243
|
-
|
|
244
|
-
if (!(await exists(file)))
|
|
245
|
-
return null;
|
|
246
|
-
const document = await readDocument(file);
|
|
247
|
-
const value = document.get(field);
|
|
248
|
-
return value === null || value === undefined ? null : scalar(value);
|
|
248
|
+
return (await readClassicConfigValue(field))?.value ?? null;
|
|
249
249
|
}
|
|
250
250
|
async function projectLanguageDefault() {
|
|
251
251
|
if (process.env.COMET_LANGUAGE)
|
|
252
252
|
return validateLanguage(process.env.COMET_LANGUAGE, 'COMET_LANGUAGE');
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
return validateLanguage(value,
|
|
253
|
+
const configured = await readClassicConfigValue('language');
|
|
254
|
+
if (configured)
|
|
255
|
+
return validateLanguage(configured.value, configured.source);
|
|
256
256
|
return 'en';
|
|
257
257
|
}
|
|
258
258
|
async function contextCompression() {
|
|
@@ -333,7 +333,7 @@ function validateSetValue(field, value) {
|
|
|
333
333
|
}
|
|
334
334
|
async function setField(output, name, field, value, options = {}) {
|
|
335
335
|
if (MACHINE_OWNED_FIELDS.has(field) && !options.machineOwned) {
|
|
336
|
-
fail(`ERROR: '${field}' is a machine-owned
|
|
336
|
+
fail(`ERROR: '${field}' is a machine-owned field and cannot be set directly`);
|
|
337
337
|
}
|
|
338
338
|
if (!SETTABLE_FIELDS.has(field) && !MACHINE_OWNED_FIELDS.has(field)) {
|
|
339
339
|
fail(`ERROR: Unknown field: '${field}'`);
|
|
@@ -420,10 +420,11 @@ async function init(output, name, workflow) {
|
|
|
420
420
|
branch_status: 'pending',
|
|
421
421
|
created_at: new Date().toISOString().slice(0, 10),
|
|
422
422
|
verified_at: null,
|
|
423
|
+
archive_confirmation: null,
|
|
423
424
|
archived: false,
|
|
424
425
|
});
|
|
425
426
|
await atomicWrite(file, document.toString());
|
|
426
|
-
output.
|
|
427
|
+
output.stdout.push(green(`Initialized: ${label}/.comet.yaml (workflow=${workflow})`));
|
|
427
428
|
}
|
|
428
429
|
async function requirePhase(name, expected) {
|
|
429
430
|
const actual = await readField(name, 'phase');
|
|
@@ -557,6 +558,15 @@ async function transition(output, name, event) {
|
|
|
557
558
|
else if (event === 'verify-fail') {
|
|
558
559
|
await requirePhase(name, 'verify');
|
|
559
560
|
}
|
|
561
|
+
else if (event === 'archive-confirm') {
|
|
562
|
+
await requirePhase(name, 'archive');
|
|
563
|
+
if ((await readField(name, 'verify_result')) !== 'pass') {
|
|
564
|
+
fail(`ERROR: Cannot transition '${name}': verify_result must be pass before archiving`);
|
|
565
|
+
}
|
|
566
|
+
if ((await readField(name, 'archived')) === 'true') {
|
|
567
|
+
fail(`ERROR: Cannot transition '${name}': already archived`);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
560
570
|
else if (event === 'preset-escalate') {
|
|
561
571
|
// preset (hotfix/tweak) → full: rewind phase to design so the agent can
|
|
562
572
|
// supplement a Design Doc before continuing. Unlike verify-fail /
|
|
@@ -581,6 +591,9 @@ async function transition(output, name, event) {
|
|
|
581
591
|
if ((await readField(name, 'verify_result')) !== 'pass') {
|
|
582
592
|
fail(`ERROR: Cannot transition '${name}': verify_result must be pass before archiving`);
|
|
583
593
|
}
|
|
594
|
+
if ((await readField(name, 'archive_confirmation')) !== 'confirmed') {
|
|
595
|
+
fail(`ERROR: Cannot transition '${name}': archive_confirmation must be confirmed before archiving`);
|
|
596
|
+
}
|
|
584
597
|
}
|
|
585
598
|
await applyTransitionEvent(output, name, event);
|
|
586
599
|
}
|
|
@@ -851,7 +864,10 @@ async function recoverVerify(output, name) {
|
|
|
851
864
|
: 'Recovery action: Verification not yet started or in progress. Run scale assessment then verify.');
|
|
852
865
|
}
|
|
853
866
|
async function recoverArchive(output, name) {
|
|
854
|
-
|
|
867
|
+
const archiveConfirmation = await readField(name, 'archive_confirmation');
|
|
868
|
+
output.stdout.push(' Archive:', fieldStatus('verify_result', await readField(name, 'verify_result')), fieldStatus('archive_confirmation', archiveConfirmation), fieldStatus('archived', await readField(name, 'archived')), '', archiveConfirmation === 'confirmed'
|
|
869
|
+
? 'Recovery action: Archive is confirmed. Run /comet-archive to complete archiving.'
|
|
870
|
+
: 'Recovery action: Ask for final archive confirmation in /comet-archive before running the archive command.');
|
|
855
871
|
}
|
|
856
872
|
async function recover(output, name) {
|
|
857
873
|
validateChangeName(name);
|
|
@@ -917,10 +933,92 @@ async function scale(output, name) {
|
|
|
917
933
|
await setField(new CommandOutput(), name, 'verify_mode', result);
|
|
918
934
|
output.stderr.push(`=== Scale Assessment: ${name} ===`, ` Tasks: ${taskCount} (threshold: 3)`, ` Delta specs: ${deltaSpecs} capabilities (threshold: 1)`, ` Changed files: ${changedFiles} (threshold: 8)`, ` → Result: ${result}`, green(`[SCALE] verify_mode=${result}`));
|
|
919
935
|
}
|
|
936
|
+
function parseRecordCheckOptions(args) {
|
|
937
|
+
let command;
|
|
938
|
+
let exitCodeText;
|
|
939
|
+
let cwd;
|
|
940
|
+
for (let index = 0; index < args.length; index += 2) {
|
|
941
|
+
const option = args[index];
|
|
942
|
+
if (!['--command', '--exit-code', '--cwd'].includes(option)) {
|
|
943
|
+
fail(`ERROR: Unknown option: ${option}`);
|
|
944
|
+
}
|
|
945
|
+
const value = args[index + 1];
|
|
946
|
+
if (value === undefined)
|
|
947
|
+
fail(`ERROR: Missing value for option: ${option}`);
|
|
948
|
+
if (option === '--command')
|
|
949
|
+
command = value;
|
|
950
|
+
else if (option === '--exit-code')
|
|
951
|
+
exitCodeText = value;
|
|
952
|
+
else
|
|
953
|
+
cwd = value;
|
|
954
|
+
}
|
|
955
|
+
if (command === undefined)
|
|
956
|
+
fail('ERROR: Missing option: --command');
|
|
957
|
+
if (exitCodeText === undefined)
|
|
958
|
+
fail('ERROR: Missing option: --exit-code');
|
|
959
|
+
if (!/^-?\d+$/u.test(exitCodeText))
|
|
960
|
+
fail('ERROR: --exit-code must be an integer');
|
|
961
|
+
return { command, exitCode: Number(exitCodeText), ...(cwd === undefined ? {} : { cwd }) };
|
|
962
|
+
}
|
|
963
|
+
async function recordCheck(output, name, scopeText, args) {
|
|
964
|
+
validateChangeName(name);
|
|
965
|
+
if (scopeText !== 'build' && scopeText !== 'verify') {
|
|
966
|
+
fail(`ERROR: Invalid command check scope: '${scopeText}'`);
|
|
967
|
+
}
|
|
968
|
+
const options = parseRecordCheckOptions(args);
|
|
969
|
+
const { label, directory, file } = await stateFile(name);
|
|
970
|
+
if (label !== `openspec/changes/${name}` || !(await exists(file))) {
|
|
971
|
+
fail(`ERROR: command checks require an active change: ${name}`);
|
|
972
|
+
}
|
|
973
|
+
try {
|
|
974
|
+
const projection = await readClassicState(directory, { migrate: false });
|
|
975
|
+
if (!projection.classic || !projection.run) {
|
|
976
|
+
throw new Error('command checks require an existing synchronized Classic Run');
|
|
977
|
+
}
|
|
978
|
+
const { run } = await validateClassicRuntimeRun(directory, projection);
|
|
979
|
+
const recorded = await recordCommandCheck(directory, run, {
|
|
980
|
+
scope: scopeText,
|
|
981
|
+
...options,
|
|
982
|
+
});
|
|
983
|
+
output.stderr.push(green(`[RECORDED] ${recorded.scope} exit=${recorded.exitCode} cwd=${recorded.cwd} command=${recorded.command}`));
|
|
984
|
+
}
|
|
985
|
+
catch (error) {
|
|
986
|
+
fail(`ERROR: ${error.message}`);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
920
989
|
function required(args, count, usage) {
|
|
921
990
|
if (args.length < count)
|
|
922
991
|
fail(usage);
|
|
923
992
|
}
|
|
993
|
+
function requiredExact(args, count, usage) {
|
|
994
|
+
if (args.length !== count)
|
|
995
|
+
fail(usage);
|
|
996
|
+
}
|
|
997
|
+
async function selectChange(output, name) {
|
|
998
|
+
validateChangeName(name);
|
|
999
|
+
try {
|
|
1000
|
+
const selection = await selectCurrentChange(process.cwd(), name);
|
|
1001
|
+
output.stderr.push(green(`[SELECTED] current change: ${selection.change}${selection.branch ? ` (branch: ${selection.branch})` : ''}`));
|
|
1002
|
+
}
|
|
1003
|
+
catch (error) {
|
|
1004
|
+
fail(`ERROR: ${error instanceof Error ? error.message : String(error)}`);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
async function currentChange(output) {
|
|
1008
|
+
const resolution = await resolveCurrentChange(process.cwd());
|
|
1009
|
+
if (resolution.status === 'selected') {
|
|
1010
|
+
output.stdout.push(resolution.selection.change);
|
|
1011
|
+
return;
|
|
1012
|
+
}
|
|
1013
|
+
if (resolution.status === 'missing') {
|
|
1014
|
+
fail('ERROR: no current change selected\nUse: comet-state.mjs select <change-name>');
|
|
1015
|
+
}
|
|
1016
|
+
fail(`ERROR: current change selection is stale: ${resolution.reason}\nUse: comet-state.mjs select <change-name>`);
|
|
1017
|
+
}
|
|
1018
|
+
async function clearSelection(output) {
|
|
1019
|
+
await clearCurrentChange(process.cwd());
|
|
1020
|
+
output.stderr.push(green('[CLEARED] current change selection'));
|
|
1021
|
+
}
|
|
924
1022
|
export const classicStateCommand = async (args) => {
|
|
925
1023
|
const output = new CommandOutput();
|
|
926
1024
|
try {
|
|
@@ -954,10 +1052,26 @@ export const classicStateCommand = async (args) => {
|
|
|
954
1052
|
required(rest, 1, 'Usage: comet-state.mjs scale <change-name>');
|
|
955
1053
|
await scale(output, rest[0]);
|
|
956
1054
|
}
|
|
1055
|
+
else if (subcommand === 'record-check') {
|
|
1056
|
+
required(rest, 2, 'Usage: comet state record-check <change> <build|verify> --command <text> --exit-code <int> [--cwd <path>]');
|
|
1057
|
+
await recordCheck(output, rest[0], rest[1], rest.slice(2));
|
|
1058
|
+
}
|
|
957
1059
|
else if (subcommand === 'task-checkoff') {
|
|
958
1060
|
required(rest, 2, 'Usage: comet-state.mjs task-checkoff <file> <task-text>');
|
|
959
1061
|
await taskCheckoff(output, rest[0], rest[1]);
|
|
960
1062
|
}
|
|
1063
|
+
else if (subcommand === 'select') {
|
|
1064
|
+
requiredExact(rest, 1, 'Usage: comet-state.mjs select <change-name>');
|
|
1065
|
+
await selectChange(output, rest[0]);
|
|
1066
|
+
}
|
|
1067
|
+
else if (subcommand === 'current') {
|
|
1068
|
+
requiredExact(rest, 0, 'Usage: comet-state.mjs current');
|
|
1069
|
+
await currentChange(output);
|
|
1070
|
+
}
|
|
1071
|
+
else if (subcommand === 'clear-selection') {
|
|
1072
|
+
requiredExact(rest, 0, 'Usage: comet-state.mjs clear-selection');
|
|
1073
|
+
await clearSelection(output);
|
|
1074
|
+
}
|
|
961
1075
|
else if (subcommand === 'next') {
|
|
962
1076
|
required(rest, 1, 'Usage: comet-state.mjs next <change-name>');
|
|
963
1077
|
await next(output, rest[0]);
|