openspec-new-change
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStart 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
-
If no clear input provided, ask what they want to buildUse 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-authIMPORTANT: Do NOT proceed without understanding what the user wants to build. -
Determine the workflow schemaUse the default schema (omit) unless the user explicitly requests a different workflow.
--schemaUse a different schema only if the user mentions:- A specific schema name → use
--schema <name> - "show workflows" or "what workflows" → run and let them choose
openspec schemas --json
Otherwise: Omitto use the default.--schema - A specific schema name → use
-
Create the change directorybash
openspec new change "<name>"Addonly if the user requested a specific workflow. This creates a scaffolded change at--schema <name>with the selected schema.openspec/changes/<name>/ -
Show the artifact statusbash
openspec status --change "<name>"This shows which artifacts need to be created and which are ready (dependencies satisfied). -
Get instructions for the first artifact The first artifact depends on the schema (e.g.,for spec-driven). Check the status output to find the first artifact with status "ready".
proposalbashopenspec instructions <first-artifact-id> --change "<name>"This outputs the template and context for creating the first artifact. -
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格式)或对要构建内容的描述。
步骤
-
若未提供明确输入,询问用户要构建的内容使用AskUserQuestion工具(开放式,无预设选项)询问:"你想要处理什么变更?描述你要构建或修复的内容。"根据用户的描述,生成kebab-case格式的名称(例如:"add user authentication" →)。
add-user-auth重要提示:在未明确用户要构建的内容前,请勿继续操作。 -
确定工作流模式除非用户明确要求使用其他工作流,否则使用默认模式(省略参数)。
--schema仅在用户提及以下内容时使用其他模式:- 特定模式名称 → 使用
--schema <name> - "show workflows"或"what workflows" → 运行并让用户选择
openspec schemas --json
其他情况:省略以使用默认模式。--schema - 特定模式名称 → 使用
-
创建变更目录bash
openspec new change "<name>"仅当用户要求使用特定工作流时,添加参数。此操作会在--schema <name>路径下创建一个基于所选模式的脚手架变更。openspec/changes/<name>/ -
查看工件状态bash
openspec status --change "<name>"该命令会显示哪些工件需要创建,哪些已准备就绪(依赖项已满足)。 -
获取首个工件的创建说明 首个工件取决于所使用的模式(例如,规范驱动模式下为)。查看状态输出,找到状态为"ready"的首个工件。
proposalbashopenspec instructions <first-artifact-id> --change "<name>"该命令会输出创建首个工件的模板和上下文信息。 -
停止操作并等待用户指示
输出
完成上述步骤后,总结以下内容:
- 变更名称和位置
- 正在使用的模式/工作流及其工件序列
- 当前状态(已完成0/N个工件)
- 首个工件的模板
- 提示语:"准备好创建首个工件了吗?只需描述此变更的内容,我会为你起草,或者让我继续下一步。"
约束规则
- 目前请勿创建任何工件,仅展示说明内容
- 请勿推进到展示首个工件模板之后的步骤
- 若名称无效(非kebab-case格式),请用户提供有效的名称
- 若该名称的变更已存在,建议用户继续处理该现有变更
- 若使用非默认工作流,需传入--schema参数