.codebuddy/commands/opsx/continue.md
通过创建下一个产出物继续处理变更。
输入:可选择在 /opsx:continue 后指定变更名称(例如,/opsx:continue add-auth)。如果省略,检查是否可以从对话上下文中推断出来。如果模糊或不明确,你必须提示可用的变更。
步骤
如果没有提供变更名称,提示选择
运行 openspec-cn list --json 获取按最近修改排序的可用变更。然后使用 AskUserQuestion tool 让用户选择要处理哪个变更。
展示前 3-4 个最近修改的变更作为选项,显示:
schema 字段,否则为 "spec-driven")lastModified 字段)将最近修改的变更标记为 "(推荐)",因为它很可能是用户想要继续的。
重要提示:不要猜测或自动选择变更。始终让用户选择。
检查当前状态
openspec-cn status --change "<name>" --json
Parse the JSON to understand current state. The response includes:
schemaName: The workflow schema being used (e.g., "spec-driven")artifacts: Array of artifacts with their status ("done", "ready", "blocked")isComplete: Boolean indicating if all artifacts are complete根据状态行动:
如果所有产出物已完成 (isComplete: true):
如果产出物准备好创建(状态显示有 status: "ready" 的产出物):
status: "ready" 的产出物openspec-cn instructions <artifact-id> --change "<name>" --json
context: Project background (constraints for you - do NOT include in output)rules: Artifact-specific rules (constraints for you - do NOT include in output)template: The structure to use for your output fileinstruction: Schema-specific guidanceoutputPath: Where to write the artifactdependencies: Completed artifacts to read for contexttemplate as the structure - fill in its sectionscontext and rules as constraints when writing - but do NOT copy them into the file如果没有产出物准备好(全部受阻):
创建产出物后,显示进度
openspec-cn status --change "<name>"
输出
每次调用后,显示:
/opsx:continue 以创建下一个产出物"产出物创建指南
产出物类型及其用途取决于 Schema。使用指令输出中的 instruction 字段来了解要创建什么。
常见的产出物模式:
spec-driven schema (proposal → specs → design → tasks):
For other schemas, follow the instruction field from the CLI output.
Guardrails
context and rules are constraints for YOU, not content for the file
<context>, <rules>, <project_context> blocks into the artifact