You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
日本語の概要は準備中です。原文の説明を表示しています。
Comet — OpenSpec + Superpowers dual-star development workflow. Start with /comet for automatic phase detection and dispatch to subcommands. Five phases: open → design → build → verify → archive.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
OpenSpec and Superpowers orbit the same goal like a binary star system.
OpenSpec handles WHAT — outline, proposal, spec lifecycle, archive
Superpowers handles HOW — technical design, planning, execution, closing
Core principle: brainstorming cannot be skipped. Every change must undergo deep design (except hotfix and tweak presets).
Agents need only read this section for decision-making. Refer to the Reference Appendix as needed.
Use the language of the user request that triggered this workflow as the default output language. When resuming an existing change with a clear dominant artifact language, preserve that language unless the user explicitly asks to switch.
Step 0: Active Change Discovery and Intent Detection
openspec list --json to get all active changesPreset detection has highest priority:
/comet-hotfix/comet-tweak| Active changes | User input | Behavior |
|---|---|---|
| None | non-preset input | → Invoke /comet-open |
| Exactly 1 | /comet <description> | → Ask: continue this change or create a new change |
| Multiple | /comet <description> | → Ask: continue existing or create new; if continuing, list changes for selection |
| Exactly 1 | /comet with no description | → Auto-select, enter Step 1 |
| Multiple | /comet with no description | → List changes for user selection |
Step 1: Read .comet.yaml state metadata
Prefer reading openspec/changes/<name>/.comet.yaml. If not available, fall back to openspec status --change "<name>" --json, tasks.md, and docs/superpowers/ file checks.
Resume rules:
comet/reference/dirty-worktree.md. That protocol defines checks, attribution, and prohibitions; this file does not repeat themphase: build, first check build_pause, plan, build_mode, and isolation (see details below):
build_pause: plan-ready but isolation and build_mode are already set, treat as stale pause: first output [COMET] Detected stale pause (build_pause=plan-ready but isolation/build_mode already set), auto-clearing and continuing, then run "$COMET_BASH" "$COMET_STATE" set <name> build_pause null, then read the next unchecked task from tasks.md and resume execution per build_modebuild_pause: plan-ready and the plan file exists, but isolation or build_mode is not yet set, return to the /comet-build plan-ready resume point, prompt the user to choose isolation and execution method, and do not regenerate the planbuild_pause: plan-ready but the plan file is missing, return to /comet-build to handle corrupted state or regenerate the planbuild_mode, isolation, or tdd_mode is unset, return to the corresponding /comet-build step to supplement before executingbuild_mode: subagent-driven-development, do not execute tasks directly in the main window; return to /comet-build's background subagent dispatch rules, main window only coordinates/comet-build's corresponding rulesphase: verify and verify_result: fail, enter the verification failure decision blocking point: pause and ask the user to fix or accept deviation; only after the user chooses fix, run "$COMET_BASH" "$COMET_STATE" transition <name> verify-fail and invoke /comet-buildphase: open but proposal/design/tasks are complete, first run "$COMET_BASH" "$COMET_GUARD" <change-name> open --apply to repair state, then continue detectionphase: archive, only invoke /comet-archive; /comet-archive must first wait for final archive confirmation. After archive succeeds, the change moves to the archive directory, so do not run guard against the old active directoryStep 2: Phase Determination (check in order, first match wins)
archived: true or change moved to archive → Workflow completeverify_result: pass and archived is not true → Invoke /comet-archive (first perform final archive confirmation)verify_result: fail → Enter verification failure decision blocking point (pause and ask fix or accept deviation; only after user chooses fix, run verify-fail then /comet-build)phase: verify or tasks.md all checked → Invoke /comet-verifyphase: build or has Design Doc but plan/execution incomplete → Route by workflow: hotfix → /comet-hotfix, tweak → /comet-tweak, full → /comet-buildphase: design or has change but no Design Doc → Invoke /comet-designphase: open or active change exists but .comet.yaml is missing → Invoke /comet-open/comet-openIf metadata conflicts with file state, use verifiable file state as source of truth and correct .comet.yaml before continuing.
hotfix → full (upgrade if any condition met):
tweak → full (upgrade if any condition met):
| Scenario | Handling |
|---|---|
openspec list --json fails | Check if openspec is installed, prompt user to run openspec init |
| Sub-skill unavailable | Stop workflow, prompt to install or enable the corresponding skill |
.comet.yaml malformed or missing | Use file state as source of truth, correct with "$COMET_BASH" "$COMET_STATE" set then continue |
| Build/test fails | Return to build phase for fixes, do not enter verify |
| Incomplete change directory structure | Fill missing files according to comet-open artifact requirements |
Flow chain: open → design → build → verify → archive
Continuous execution requirement: starting from the detected phase, the agent automatically continues through all later phases. But auto-advancing only applies at transition points without user decisions. When encountering user decision points, must use the current platform's available user input/confirmation mechanism to pause and wait for the user's explicit response. Must not use recommendation rules, defaults, or historical preferences to substitute for user confirmation, and must not just output a text prompt and then continue executing.
Distinguish phase advancement vs automatic handoff: each sub-skill runs phase guard --apply before exit to advance the .comet.yaml phase field. This step always happens and is not controlled by auto_transition. After that, the sub-skill runs "$COMET_BASH" "$COMET_STATE" next <name> to resolve the next action: when auto_transition is not false, output is NEXT: auto (auto-invoke next skill); when auto_transition is false, output is NEXT: manual (do not invoke next skill, show a manual run hint). Therefore auto_transition only controls next skill invocation, not phase advancement. Regardless of auto_transition, user decision points below remain blocking.
Decision points are blocking points: whenever reaching any of the following nodes, the current /comet invocation must stop, and follow the comet/reference/decision-point.md protocol to obtain the user's explicit choice. Only after the user explicitly chooses can the corresponding state fields be written and operations executed, then auto-advance resumes.
Nodes requiring user participation (pause only at these nodes):
Agents should not skip these decision points; other unambiguous phase transitions must proceed automatically, must not exit midway. At decision points, must not skip user confirmation or choose automatically — must explicitly obtain the user's choice through the current platform's available user input/confirmation mechanism before continuing.
Red Flags — when these thoughts appear, STOP and check:
| Agent Thought | Actual Risk |
|---|---|
| "The user would probably agree with this approach" | Cannot decide for the user — use the current platform's user input/confirmation mechanism |
| "This is a small change, confirmation isn't needed" | Decision points have no size exception — blocking points must wait |
| "The user chose A last time, so A again" | Historical preference cannot substitute for current confirmation |
| "I explained the plan and the user didn't object" | No objection ≠ consent — must use tool to get explicit choice |
| "The flow has reached this point, should be fine" | Verification not passed ≠ passed — check verify_result |
| Command | Phase | Owner | Artifacts |
|---|---|---|---|
/comet-open | 1. Open | OpenSpec | proposal.md, design.md, tasks.md |
/comet-design | 2. Deep Design | Superpowers | Design Doc, delta spec |
/comet-build | 3. Plan and Build | Superpowers | Implementation plan, code commits |
/comet-verify | 4. Verify and Close | Both | Verification report, branch handling |
/comet-archive | 5. Archive | OpenSpec | delta→main spec sync, design doc markup, archive |
/comet-hotfix | Preset path | Both | Quick fix (skip brainstorming) |
/comet-tweak | Preset path | Both | Small change (skip brainstorming and full plan) |
/comet
↓ Auto-detect
/comet-open ──→ /comet-design ──→ /comet-build ──→ /comet-verify ──→ /comet-archive
(OpenSpec) (Superpowers) (Superpowers) (Both) (OpenSpec)
/comet-hotfix (preset, skip brainstorming)
open ──→ build ──→ verify ──→ archive
↑ If upgrade triggered → block for confirmation → supplement Design Doc → return to full workflow
/comet-tweak (preset, skip brainstorming and full plan)
open ──→ lightweight build ──→ light verify ──→ archive
↑ If upgrade triggered → block for confirmation → supplement Design Doc → return to full workflow
build → verify, isolation must be branch or worktreebuild → verify, build_mode must be selectedbuild_mode: subagent-driven-development must also have subagent_dispatch: confirmedtdd_mode must be selected as tdd or directbuild_mode: direct is allowed by default only for hotfix / tweak; full workflow requires direct_override: truebuild_pause is not an execution method and must not be written to build_modecomet-guard.sh build --apply and comet-state.sh transition <name> build-completeSee comet/reference/comet-yaml-fields.md for complete field reference with examples and descriptions.
See comet/reference/file-structure.md for the complete directory layout and artifact organization.
See comet/reference/auto-transition.md for the complete automatic handoff workflow.
See comet/reference/context-recovery.md for structured recovery after context compression.
See comet/reference/decision-point.md for the complete user decision point protocol.
See comet/reference/debug-gate.md for the complete debug gate protocol.
Comet scripts are distributed in comet/scripts/. Do not hardcode paths — locate once, cache in env vars. This block is a standard boilerplate repeated in every sub-skill for independent loadability; changes must be kept in sync across all files (boilerplate version: v2, update this version when changing to help locate files needing sync):
COMET_ENV="${COMET_ENV:-$(find . "$HOME"/.*/skills "$HOME/.config" "$HOME/.gemini" -path '*/comet/scripts/comet-env.sh' -type f -print -quit 2>/dev/null)}"
if [ -z "$COMET_ENV" ]; then
echo "ERROR: comet-env.sh not found. Ensure the comet skill is installed." >&2
return 1
fi
. "$COMET_ENV"
# Stop workflow when script location fails
if [ -z "$COMET_GUARD" ] || [ -z "$COMET_STATE" ] || [ -z "$COMET_HANDOFF" ] || [ -z "$COMET_ARCHIVE" ]; then
echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
echo "Expected path pattern: */comet/scripts/comet-*.sh under project or platform skill directories" >&2
return 1
fi
Auto state update: Guard supports --apply flag, automatically updating .comet.yaml state fields after checks pass:
"$COMET_BASH" "$COMET_GUARD" <change-name> <phase> --apply
--apply delegates to comet-state transition. Use these semantic events when state changes need to be expressed directly:
"$COMET_BASH" "$COMET_STATE" transition <change-name> open-complete
"$COMET_BASH" "$COMET_STATE" transition <change-name> design-complete
"$COMET_BASH" "$COMET_STATE" transition <change-name> build-complete
"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-pass
"$COMET_BASH" "$COMET_STATE" transition <change-name> verify-fail
"$COMET_BASH" "$COMET_STATE" transition <archive-name> archived
Resolve next action: after guard-based phase advancement, use the next subcommand to determine whether to auto-invoke the next skill:
"$COMET_BASH" "$COMET_STATE" next <change-name>
Output format: NEXT: auto|manual|done + SKILL: <skill-name> (omitted for done) + HINT (for manual only). With auto_transition: false, output is manual, which pauses only the next skill invocation and does not block phase updates.
Archive script: Complete all archive steps in one command:
"$COMET_BASH" "$COMET_ARCHIVE" <change-name>
After loading comet, agents should run the variable assignments above once, then reuse $COMET_GUARD, $COMET_STATE, $COMET_HANDOFF, $COMET_ARCHIVE throughout the session.
comet-handoff.sh as compact traceable excerpts (use --full when needed), and validated by guard for source/hash/mode/comet-archive only after /comet-verify passes, but wait for final user confirmation before running the archive scriptchange: and design-doc: metadataarchived-with statusまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
日本語の概要は準備中です。原文の説明を表示しています。
Comet 工作流入口。当用户明确调用 /comet,或明确要求使用 Comet 但未指定 Native/Classic 时使用;按项目配置加载 Native 或 Classic。
日本語の概要は準備中です。原文の説明を表示しています。
Comet workflow entry. Use when the user invokes /comet or asks to use Comet without choosing Native or Classic; load Native or Classic from project configuration.
日本語の概要は準備中です。原文の説明を表示しています。
Use when 用户要启动或恢复 Comet 工作流,需要根据 active change、.comet.yaml、hotfix/tweak 意图路由到对应阶段 Skill。
日本語の概要は準備中です。原文の説明を表示しています。
Create or upgrade a Comet Classic workflow Skill via Comet Creator. Not for general Skill authoring, cleanup, or review.
日本語の概要は準備中です。原文の説明を表示しています。
通过 Comet Creator 创建或升级 Comet Classic workflow Skill。不用于一般 Skill 的编写、整理或评审。
日本語の概要は準備中です。原文の説明を表示しています。