openspec-new-change

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Start a new change using the experimental artifact-driven approach.
Input: The user's request should include a change name (kebab-case) OR a description of what they want to build.
Steps
  1. If no clear input provided, ask what they want to build
    Use the AskUserQuestion tool (open-ended, no preset options) to ask:
    "What change do you want to work on? Describe what you want to build or fix."
    From their description, derive a kebab-case name (e.g., "add user authentication" →
    add-user-auth
    ).
    IMPORTANT: Do NOT proceed without understanding what the user wants to build.
  2. Determine the workflow schema
    Use the default schema (omit
    --schema
    ) unless the user explicitly requests a different workflow.
    Use a different schema only if the user mentions:
    • A specific schema name → use
      --schema <name>
    • "show workflows" or "what workflows" → run
      openspec schemas --json
      and let them choose
    Otherwise: Omit
    --schema
    to use the default.
  3. Create the change directory
    bash
    openspec new change "<name>"
    Add
    --schema <name>
    only if the user requested a specific workflow. This creates a scaffolded change at
    openspec/changes/<name>/
    with the selected schema.
  4. Show the artifact status
    bash
    openspec status --change "<name>"
    This shows which artifacts need to be created and which are ready (dependencies satisfied).
  5. Get instructions for the first artifact The first artifact depends on the schema (e.g.,
    proposal
    for spec-driven). Check the status output to find the first artifact with status "ready".
    bash
    openspec instructions <first-artifact-id> --change "<name>"
    This outputs the template and context for creating the first artifact.
  6. STOP and wait for user direction
Output
After completing the steps, summarize:
  • Change name and location
  • Schema/workflow being used and its artifact sequence
  • Current status (0/N artifacts complete)
  • The template for the first artifact
  • Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
Guardrails
  • Do NOT create any artifacts yet - just show the instructions
  • Do NOT advance beyond showing the first artifact template
  • If the name is invalid (not kebab-case), ask for a valid name
  • If a change with that name already exists, suggest continuing that change instead
  • Pass --schema if using a non-default workflow
使用实验性工件驱动方法启动新的变更。
输入:用户的请求应包含变更名称(kebab-case格式)或对要构建内容的描述。
步骤
  1. 若未提供明确输入,询问用户要构建的内容
    使用AskUserQuestion工具(开放式,无预设选项)询问:
    "你想要处理什么变更?描述你要构建或修复的内容。"
    根据用户的描述,生成kebab-case格式的名称(例如:"add user authentication" →
    add-user-auth
    )。
    重要提示:在未明确用户要构建的内容前,请勿继续操作。
  2. 确定工作流模式
    除非用户明确要求使用其他工作流,否则使用默认模式(省略
    --schema
    参数)。
    仅在用户提及以下内容时使用其他模式
    • 特定模式名称 → 使用
      --schema <name>
    • "show workflows"或"what workflows" → 运行
      openspec schemas --json
      并让用户选择
    其他情况:省略
    --schema
    以使用默认模式。
  3. 创建变更目录
    bash
    openspec new change "<name>"
    仅当用户要求使用特定工作流时,添加
    --schema <name>
    参数。此操作会在
    openspec/changes/<name>/
    路径下创建一个基于所选模式的脚手架变更。
  4. 查看工件状态
    bash
    openspec status --change "<name>"
    该命令会显示哪些工件需要创建,哪些已准备就绪(依赖项已满足)。
  5. 获取首个工件的创建说明 首个工件取决于所使用的模式(例如,规范驱动模式下为
    proposal
    )。查看状态输出,找到状态为"ready"的首个工件。
    bash
    openspec instructions <first-artifact-id> --change "<name>"
    该命令会输出创建首个工件的模板和上下文信息。
  6. 停止操作并等待用户指示
输出
完成上述步骤后,总结以下内容:
  • 变更名称和位置
  • 正在使用的模式/工作流及其工件序列
  • 当前状态(已完成0/N个工件)
  • 首个工件的模板
  • 提示语:"准备好创建首个工件了吗?只需描述此变更的内容,我会为你起草,或者让我继续下一步。"
约束规则
  • 目前请勿创建任何工件,仅展示说明内容
  • 请勿推进到展示首个工件模板之后的步骤
  • 若名称无效(非kebab-case格式),请用户提供有效的名称
  • 若该名称的变更已存在,建议用户继续处理该现有变更
  • 若使用非默认工作流,需传入--schema参数