openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 7
- Forks
- 4
01 前言 Front Matter
- name
- openspec-apply-change
- license
- MIT
- metadata
- { "author": "openspec", "version": "1.0", "generatedBy": "1.4.1" }
- description
- Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
- compatibility
- Requires openspec CLI.
03 SKILL.md 正文
Implement tasks from an OpenSpec change.
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
-
Select the change
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run
openspec list --jsonto get available changes and use the AskUserQuestion tool to let the user select
Always announce: "Using change: <name>" and how to override (e.g.,
/opsx:apply <other>). -
Check status to understand the schema
openspec status --change "<name>" --jsonParse the JSON to understand:
schemaName: The workflow being used (e.g., "spec-driven")planningHome,changeRoot, andactionContext: planning scope and edit constraints- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
-
Get apply instructions
openspec instructions apply --change "<name>" --jsonThis returns:
contextFiles: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
Handle states:
- If
state: "blocked"(missing artifacts): show message, suggest using openspec-continue-change - If
state: "all_done": congratulate, suggest archive - Otherwise: proceed to implementation
Workspace guard: If status JSON reports
actionContext.mode: "workspace-planning"andallowedEditRootsis empty, explain that full workspace apply is not supported in this slice. Treat linked repos and folders as read-only context, ask the user to select an affected area through an explicit implementation workflow, and STOP before editing files. -
Read context files
Read every file path listed under
contextFilesfrom the apply instructions output. The files depend on the schema being used:- spec-driven: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output
-
Show current progress
Display:
- Schema being used
- Progress: "N/M tasks complete"
- Remaining tasks overview
- Dynamic instruction from CLI
-
Implement tasks (loop until done or blocked)
For each pending task:
- Show which task is being worked on
- Make the code changes required
- Keep changes minimal and focused
- Mark task complete in the tasks file:
- [ ]→- [x] - Continue to next task
Pause if:
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- Error or blocker encountered → report and wait for guidance
- User interrupts
-
On completion or pause, show status
Display:
- Tasks completed this session
- Overall progress: "N/M tasks complete"
- If all done: suggest archive
- If paused: explain why and wait for guidance
Output During Implementation
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
Output On Completion
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! Ready to archive this change.
Output On Pause (Issue Encountered)
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
Guardrails
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- Use contextFiles from CLI output, don't assume specific file names
Fluid Workflow Integration
This skill supports the "actions on a change" model:
- Can be invoked anytime: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
- Allows artifact updates: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
04 同仓库更多 Skills
错题梳理与强化练习
根据学生上传的试卷照片,自动识别错题、按题型分类分析薄弱环节,并生成包含原错题和同类型变式题的 Word 练习卷。适用于考试后错题梳理、薄弱知识点巩固、针对性复习、家长帮孩子整理错题、老师为学生生成针对性练习等场景。当用户上传试卷图片、提到错题整理、考试复习、薄弱环节分析、错题卷、练习卷、试卷批改、错题本等关键词时,都应使用此技能。
task-manager
任务管理技能,帮助用户通过对话式界面管理项目中的任务
solution-design
AI Native 解决方案架构师。通过对话式引导将业务本体转化为 Agent 协作架构,推荐建模维度(事/人),规划 Agent 职责与协作关系。Use when user says "设计方案", "规划 Agent 架构", "开始解决方案设计", "生成事的维度方案", or "基于vX.X调整".
skill-creator-app
创建、迭代和优化 OriginOS 技能。当用户想要从零创建技能、改进现有技能、运行评测验证技能效果、或优化技能描述以提升触发准确率时触发。
搜索并安装市场技能
自动根据用户输入的技能关键词或分类,从技能市场搜索匹配项,分析来源平台,下载并安装。
印章盖章
根据用户上传的公司印章图片和 Word 文档,自动去除印章背景生成透明底图,并将印章图片以"浮于文字上方"的布局嵌入到 Word 文档的指定盖章位置。当用户提到盖章、印章、公司章、公章、签章、印章透明、去印章背景、Word盖章、合同盖章等场景时,请使用此技能。