comet-open

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Comet 阶段 1:开启(Open)

Comet Phase 1: Open

前置条件

Prerequisites

  • 无活跃 change,或用户希望创建新 change
  • No active change, or the user wishes to create a new change

步骤

Steps

1. 探索想法

1. Explore Ideas

立即执行: 使用 Skill 工具加载
openspec-explore
技能。禁止跳过此步骤。
技能加载后,按其指引自由探索问题空间。
Immediate Action: Use the Skill tool to load the
openspec-explore
skill. Skipping this step is prohibited.
After loading the skill, freely explore the problem space following its guidance.

2. 创建 Change 结构 + 初始化状态

2. Create Change Structure + Initialize State

立即执行: 使用 Skill 工具加载
openspec-new-change
技能。若用户意图未明确、需要先形成建议,改为加载
openspec-propose
。禁止跳过此步骤。
确认以下产物已创建:
openspec/changes/<name>/
├── .openspec.yaml
├── .comet.yaml
├── proposal.md       # Why + What:问题、目标、范围
├── design.md         # How(高层):架构决策、方案选型
└── tasks.md          # 任务清单(勾选框)
创建
.comet.yaml
状态文件:
bash
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"

if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
  echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
  return 1
fi

bash "$COMET_STATE" init <name> full
Immediate Action: Use the Skill tool to load the
openspec-new-change
skill. If the user's intent is unclear and a proposal needs to be formed first, load
openspec-propose
instead. Skipping this step is prohibited.
Confirm the following artifacts have been created:
openspec/changes/<name>/
├── .openspec.yaml
├── .comet.yaml
├── proposal.md       # Why + What: Problem, Objectives, Scope
├── design.md         # How (high-level): Architectural Decisions, Solution Selection
└── tasks.md          # Task List (checkboxes)
Create the
.comet.yaml
state file:
bash
COMET_SEARCH_ROOTS=("." "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.cursor/skills")
COMET_STATE="${COMET_STATE:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-state.sh' -type f -print -quit 2>/dev/null)}"
COMET_GUARD="${COMET_GUARD:-$(find "${COMET_SEARCH_ROOTS[@]}" -path '*/comet/scripts/comet-guard.sh' -type f -print -quit 2>/dev/null)}"

if [ -z "$COMET_STATE" ] || [ -z "$COMET_GUARD" ]; then
  echo "ERROR: Comet scripts not found. Ensure the comet skill is installed." >&2
  return 1
fi

bash "$COMET_STATE" init <name> full

3. 入口状态验证

3. Entry State Validation

验证状态机已正确初始化:
bash
bash "$COMET_STATE" check <name> open
验证通过后继续 Step 4。验证失败时脚本会输出具体失败原因。
Verify the state machine has been initialized correctly:
bash
bash "$COMET_STATE" check <name> open
Proceed to Step 4 after successful verification. The script will output specific failure reasons if verification fails.

4. 内容完整性检查

4. Content Completeness Check

确认三个文档内容完整:
  • proposal.md:问题背景、目标、范围、非目标
  • design.md:高层架构决策、方案选型、数据流
  • tasks.md:任务列表,每个任务有明确描述
Confirm the three documents are fully populated:
  • proposal.md: Problem background, objectives, scope, out-of-scope items
  • design.md: High-level architectural decisions, solution selection, data flow
  • tasks.md: Task list with clear descriptions for each task

退出条件

Exit Criteria

  • proposal.md、design.md、tasks.md 均已创建且内容完整
  • 阶段守卫:运行
    bash "$COMET_GUARD" <change-name> open --apply
    ,全部 PASS 后自动流转到下一阶段
退出前必须使用
--apply
,否则
.comet.yaml
仍停留在
phase: open
,下一阶段入口检查会失败。
bash
bash "$COMET_GUARD" <change-name> open --apply
完整流程会自动更新为
phase: design
;hotfix/tweak preset 会自动更新为
phase: build
  • proposal.md, design.md, and tasks.md have all been created and are content-complete
  • Phase Guard: Run
    bash "$COMET_GUARD" <change-name> open --apply
    ; automatically transition to the next phase after all checks PASS
You must use
--apply
before exiting, otherwise
.comet.yaml
will remain in
phase: open
, and the entry check for the next phase will fail.
bash
bash "$COMET_GUARD" <change-name> open --apply
The full workflow will automatically update to
phase: design
; hotfix/tweak presets will automatically update to
phase: build
.

自动流转

Automatic Transition

退出条件满足后,无需等待用户再次输入,直接执行下一阶段:
REQUIRED NEXT SKILL: 调用
comet-design
skill 进入深度设计阶段。
After meeting the exit criteria, do not wait for user input again; directly execute the next phase:
REQUIRED NEXT SKILL: Invoke the
comet-design
skill to enter the deep design phase.