Scripts
| Script | Purpose |
|---|---|
comet-env.sh | Script discovery helper — exports bundled script paths (COMET_GUARD, COMET_STATE, COMET_HANDOFF, COMET_ARCHIVE, COMET_YAML_VALIDATE) |
comet-guard.sh | Phase transition guard — validates exit conditions, --apply auto-updates .comet.yaml |
comet-handoff.sh | Design handoff — generates deterministic context packages from OpenSpec artifacts with SHA256 tracing |
comet-archive.sh | One-command archive — validates state, syncs specs, moves to archive, updates status |
comet-yaml-validate.sh | Schema validator — validates .comet.yaml structure and field values |
comet-state.sh | Unified state management — init/set/get/check/scale |
Loading Scripts in Your Session
Always locate scripts throughcomet-env.sh — never hardcode paths. Script locations vary by platform, install scope, and OS. Sourcing comet-env.sh once at the start of a session exports all script paths as environment variables.
comet-env.sh, the following environment variables are available in your session:
| Variable | Points to |
|---|---|
$COMET_GUARD | comet-guard.sh |
$COMET_STATE | comet-state.sh |
$COMET_HANDOFF | comet-handoff.sh |
$COMET_ARCHIVE | comet-archive.sh |
$COMET_YAML_VALIDATE | comet-yaml-validate.sh |
Cross-Platform Note
Comet resolves a usable bash executable throughCOMET_BASH. This variable is exported by comet-env.sh automatically after testing candidate executables — including Git Bash paths on Windows. The Windows WSL launcher (System32/bash.exe) is explicitly excluded.
Always invoke scripts as:
"$COMET_BASH" rather than calling scripts directly ensures Windows Git Bash is handled correctly across all supported platforms.
Script Pages
comet-guard.sh
Phase transition guard — validates exit conditions before advancing the workflow
comet-state.sh
Unified state management — the exclusive interface for reading and writing
.comet.yamlcomet-handoff.sh
Design context handoff — generates SHA256-traced context packages from OpenSpec artifacts
comet-archive.sh
Automated archive — syncs delta specs, annotates documents, and closes the change