openspec-continue-change by atilladeniz/kubeli
npx skills add https://github.com/atilladeniz/kubeli --skill openspec-continue-change通过创建下一个工件来继续处理变更。
输入:可选地指定变更名称。如果省略,检查是否可以从对话上下文中推断。如果模糊或含糊不清,你必须提示可用的变更。
步骤
运行 openspec list --json 以获取按最近修改时间排序的可用变更。然后使用 AskUserQuestion 工具 让用户选择要处理的变更。
将最近修改的 3-4 个变更作为选项呈现,显示:
* 变更名称
* 模式(如果存在则来自 `schema` 字段,否则为 "spec-driven")
* 状态(例如,"0/5 tasks"、"complete"、"no tasks")
* 最近修改时间(来自 `lastModified` 字段)
将最近修改的变更标记为"(推荐)",因为这很可能是用户想要继续处理的。
重要:不要猜测或自动选择变更。始终让用户选择。
检查当前状态
openspec status --change "<name>" --json
解析 JSON 以了解当前状态。响应包括:
* `schemaName`:正在使用的工作流模式(例如,"spec-driven")
* `artifacts`:包含其状态("done"、"ready"、"blocked")的工件数组
* `isComplete`:指示所有工件是否已完成的布尔值
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
3. 根据状态采取行动:
如果所有工件都已完成(isComplete: true):
* 祝贺用户
* 显示最终状态,包括使用的模式
* 建议:"所有工件已创建!您现在可以实现此变更或将其归档。"
* 停止
如果有工件准备创建(状态显示状态为 status: "ready" 的工件):
* 从状态输出中选取第一个状态为 `status: "ready"` 的工件
* 获取其指令:
openspec instructions <artifact-id> --change "<name>" --json
* 解析 JSON。关键字段是:
* `context`:项目背景(对你的约束 - 不要包含在输出中)
* `rules`:工件特定规则(对你的约束 - 不要包含在输出中)
* `template`:用于输出文件的结构
* `instruction`:模式特定的指导
* `outputPath`:写入工件的位置
* `dependencies`:为获取上下文而读取的已完成工件
* **创建工件文件**:
* 读取任何已完成的依赖文件以获取上下文
* 使用 `template` 作为结构 - 填写其各个部分
* 在编写时应用 `context` 和 `rules` 作为约束 - 但不要将它们复制到文件中
* 写入指令中指定的输出路径
* 显示创建了什么以及现在解锁了什么
* 创建一个工件后停止
如果没有工件准备就绪(全部被阻塞):
* 对于有效的模式,这不应该发生
* 显示状态并建议检查问题
4. 创建工件后,显示进度
openspec status --change "<name>"
输出
每次调用后,显示:
工件创建指南
工件的类型及其用途取决于模式。使用指令输出中的 instruction 字段来了解要创建什么。
常见的工件模式:
spec-driven 模式(提案 → 规范 → 设计 → 任务):
对于其他模式,遵循 CLI 输出中的 instruction 字段。
防护措施
context 和 rules 是对你的约束,不是文件的内容
<context>、<rules>、<project_context> 块复制到工件中每周安装次数
1
仓库
GitHub 星标数
308
首次出现
1 天前
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Continue working on a change by creating the next artifact.
Input : Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
Run openspec list --json to get available changes sorted by most recently modified. Then use the AskUserQuestion tool to let the user select which change to work on.
Present the top 3-4 most recently modified changes as options, showing:
* Change name
* Schema (from `schema` field if present, otherwise "spec-driven")
* Status (e.g., "0/5 tasks", "complete", "no tasks")
* How recently it was modified (from `lastModified` field)
Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
IMPORTANT : Do NOT guess or auto-select a change. Always let the user choose.
Check current status
openspec 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
3. Act based on status :
If all artifacts are complete (isComplete: true):
* Congratulate the user
* Show final status including the schema used
* Suggest: "All artifacts created! You can now implement this change or archive it."
* STOP
If artifacts are ready to create (status shows artifacts with status: "ready"):
* Pick the FIRST artifact with `status: "ready"` from the status output
* Get its instructions:
openspec instructions <artifact-id> --change "<name>" --json
* Parse the JSON. The key fields are:
* `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 file
* `instruction`: Schema-specific guidance
* `outputPath`: Where to write the artifact
* `dependencies`: Completed artifacts to read for context
* **Create the artifact file** :
* Read any completed dependency files for context
* Use `template` as the structure - fill in its sections
* Apply `context` and `rules` as constraints when writing - but do NOT copy them into the file
* Write to the output path specified in instructions
* Show what was created and what's now unlocked
* STOP after creating ONE artifact
If no artifacts are ready (all blocked) :
* This shouldn't happen with a valid schema
* Show status and suggest checking for issues
4. After creating an artifact, show progress
openspec status --change "<name>"
Output
After each invocation, show:
Artifact Creation Guidelines
The artifact types and their purpose depend on the schema. Use the instruction field from the instructions output to understand what to create.
Common artifact patterns:
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 artifactWeekly Installs
1
Repository
GitHub Stars
308
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketFailSnykPass
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
147,400 周安装