openspec-implementation by forztf/open-skilled-sdd
npx skills add https://github.com/forztf/open-skilled-sdd --skill openspec-implementation通过按顺序执行任务并进行适当的测试和验证,系统地实施已批准的规范提案。
实施遵循每个任务的 读取 → 执行 → 测试 → 验证 循环:
关键规则:使用 TodoWrite 跟踪进度。切勿跳过任务或将未完成的工作标记为已完成。
复制此清单并跟踪进度:
实施进度:
- [ ] 步骤 1:加载并理解提案
- [ ] 步骤 2:设置 TodoWrite 任务跟踪
- [ ] 步骤 3:按顺序执行任务
- [ ] 步骤 4:测试和验证每个任务
- [ ] 步骤 5:更新现行规范(如适用)
- [ ] 步骤 6:将提案标记为实施完成
开始前,阅读所有上下文:
# 阅读提案
cat spec/changes/{change-id}/proposal.md
# 阅读所有任务
cat spec/changes/{change-id}/tasks.md
# 阅读规范差异以理解需求
find spec/changes/{change-id}/specs -name "*.md" -exec cat {} \;
理解:
开始工作前,将 tasks.md 中的任务加载到 TodoWrite 中:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
**模式**:
读取 tasks.md → 提取编号列表 → 创建 TodoWrite 条目
**示例**:
如果 tasks.md 包含:
1. 创建数据库迁移
2. 实现 API 端点
3. 添加测试
4. 更新文档
则在 TodoWrite 中创建:
- content: "创建数据库迁移", status: "in_progress"
- content: "实现 API 端点", status: "pending"
- content: "添加测试", status: "pending"
- content: "更新文档", status: "pending"
为什么这很重要:TodoWrite 让用户了解进度,并确保不会遗漏任何内容。
按顺序一次一个地处理任务:
对于每个任务:
1. 在 TodoWrite 中标记为 "in_progress"
2. 执行工作
3. 测试工作
4. 仅在验证后标记为 "completed"
切勿在测试前跳过或批量处理多个任务。
任务执行模式:
## 任务:{任务描述}
**内容**:[简要说明此任务的作用]
**实施**:
[代码变更、文件编辑、运行的命令]
**验证**:
[如何验证此任务已完成]
- [ ] 代码编译/运行
- [ ] 测试通过
- [ ] 满足需求场景
**状态**:✓ 完成 / ✗ 受阻 / ⚠ 部分完成
每个任务完成后,验证其是否正常工作:
对于代码任务:
# 运行相关测试
npm test # 或 pytest, cargo test 等
# 运行 linter
npm run lint
# 检查类型(如适用)
npm run type-check
对于数据库任务:
# 验证迁移运行
npm run db:migrate
# 检查模式是否符合预期
npm run db:schema
对于 API 任务:
# 手动测试端点
curl -X POST http://localhost:3000/api/endpoint \
-H "Content-Type: application/json" \
-d '{"test": "data"}'
# 或运行集成测试
npm run test:integration
只有在所有验证都通过后,才标记任务完成。
在实施过程中,如果发现规范差异需要更新:
注意:规范差异在归档期间(步骤 6)合并,而不是在实施期间。
所有任务完成后:
# 创建完成标记
echo "实施完成:$(date)" > spec/changes/{change-id}/IMPLEMENTED
告知用户:
## 实施完成
**变更**:{change-id}
**已完成任务**:{count}
**测试**:全部通过
**下一步**:归档此变更,将规范差异合并到现行文档中。
准备好后,请说 "openspec archive {change-id}" 或 "archive this change"。
如果任务无法完成:
**标记为受阻**:
- 保持状态为 "in_progress"(而非 "completed")
- 清晰地记录受阻原因
- 为解决受阻问题创建新任务
- 立即通知用户
**示例**:
任务:"实施支付处理"
受阻原因:"缺少支付网关的 API 凭证"
操作:创建新任务"获取支付网关凭证"
如果任务存在依赖关系,在开始前验证先决条件:
# 示例:数据库迁移必须在 API 代码之前运行
# 检查迁移状态
npm run db:status
# 仅在迁移成功后继续 API 任务
增量测试,而不是在最后测试:
良好做法:
任务 1:创建模型 → 测试模型 → 标记完成
任务 2:创建 API → 测试 API → 标记完成
任务 3:添加验证 → 测试验证 → 标记完成
不良做法:
任务 1, 2, 3 → 全部实施 → 测试所有内容 → 调试失败
在进行过程中保持 README、API 文档和注释的更新:
当添加新的 API 端点时,同时:
- 更新 API 文档
- 添加请求/响应示例
- 更新 OpenAPI/Swagger 规范
- 添加内联代码注释
并行工作:如果任务真正独立(例如,单独的模块),可以并行处理,但每个任务必须独立测试。
集成点:当存在任务依赖关系时,使用集成测试来验证连接是否正常工作。
回滚策略:对于有风险的变更,在部署前创建回滚任务。
典型顺序:
用于逐步推出:
对于 API 破坏性变更:
不要:
要:
解决方案:
1. 不要标记任务完成
2. 调试失败原因
3. 修复代码
4. 重新运行测试
5. 仅在通过后标记完成
解决方案:
1. 分解为子任务
2. 使用子任务更新 TodoWrite
3. 按顺序完成子任务
4. 所有子任务完成后标记父任务完成
解决方案:
1. 暂停当前任务
2. 首先完成依赖任务
3. 测试依赖任务
4. 恢复原始任务
令牌预算:此 SKILL.md 大约 430 行,低于推荐的 500 行限制。
每周安装次数
171
仓库
GitHub 星标数
6
首次出现
2026年1月20日
安全审计
安装于
opencode160
gemini-cli153
github-copilot153
codex153
cursor151
kimi-cli135
Systematically implements approved spec proposals by executing tasks sequentially with proper testing and validation.
Implementation follows a read → execute → test → validate cycle for each task:
Critical rule : Use TodoWrite to track progress. Never skip tasks or mark incomplete work as done.
Copy this checklist and track progress:
Implementation Progress:
- [ ] Step 1: Load and understand the proposal
- [ ] Step 2: Set up TodoWrite task tracking
- [ ] Step 3: Execute tasks sequentially
- [ ] Step 4: Test and validate each task
- [ ] Step 5: Update living specifications (if applicable)
- [ ] Step 6: Mark proposal as implementation-complete
Before starting, read all context:
# Read the proposal
cat spec/changes/{change-id}/proposal.md
# Read all tasks
cat spec/changes/{change-id}/tasks.md
# Read spec deltas to understand requirements
find spec/changes/{change-id}/specs -name "*.md" -exec cat {} \;
Understand :
Load tasks from tasks.md into TodoWrite before starting work :
**Pattern**:
Read tasks.md → Extract numbered list → Create TodoWrite entries
**Example**:
If tasks.md contains:
1. Create database migration
2. Implement API endpoint
3. Add tests
4. Update documentation
Then create TodoWrite with:
- content: "Create database migration", status: "in_progress"
- content: "Implement API endpoint", status: "pending"
- content: "Add tests", status: "pending"
- content: "Update documentation", status: "pending"
Why this matters : TodoWrite gives the user visibility into progress and ensures nothing gets skipped.
Work through tasks one at a time, in order :
For each task:
1. Mark as "in_progress" in TodoWrite
2. Execute the work
3. Test the work
4. Only mark "completed" after verification
NEVER skip ahead or batch multiple tasks before testing.
Task execution pattern :
## Task: {Task Description}
**What**: [Brief explanation of what this task does]
**Implementation**:
[Code changes, file edits, commands run]
**Verification**:
[How to verify this task is complete]
- [ ] Code compiles/runs
- [ ] Tests pass
- [ ] Meets requirement scenarios
**Status**: ✓ Complete / ✗ Blocked / ⚠ Partial
After each task, verify it works:
For code tasks :
# Run relevant tests
npm test # or pytest, cargo test, etc.
# Run linter
npm run lint
# Check types (if applicable)
npm run type-check
For database tasks :
# Verify migration runs
npm run db:migrate
# Check schema matches expected
npm run db:schema
For API tasks :
# Test endpoint manually
curl -X POST http://localhost:3000/api/endpoint \
-H "Content-Type: application/json" \
-d '{"test": "data"}'
# Or run integration tests
npm run test:integration
Only mark task complete after all verifications pass.
During implementation , if you discover the spec deltas need updates:
Note : Spec deltas are merged during archiving (Step 6), not during implementation.
After all tasks are complete:
# Create a completion marker
echo "Implementation completed: $(date)" > spec/changes/{change-id}/IMPLEMENTED
Tell the user :
## Implementation Complete
**Change**: {change-id}
**Tasks completed**: {count}
**Tests**: All passing
**Next step**: Archive this change to merge spec deltas into living documentation.
Say "openspec archive {change-id}" or "archive this change" when ready.
If a task cannot be completed:
**Mark as blocked**:
- Keep status as "in_progress" (NOT "completed")
- Document the blocker clearly
- Create a new task for resolving the blocker
- Inform the user immediately
**Example**:
Task: "Implement payment processing"
Blocker: "Missing API credentials for payment gateway"
Action: Create new task "Obtain payment gateway credentials"
If tasks have dependencies, verify prerequisites before starting:
# Example: Database migration must run before API code
# Check migration status
npm run db:status
# Only proceed with API task if migration succeeded
Test incrementally, not at the end:
Good :
Task 1: Create model → Test model → Mark complete
Task 2: Create API → Test API → Mark complete
Task 3: Add validation → Test validation → Mark complete
Bad :
Task 1, 2, 3 → Implement all → Test everything → Debug failures
Keep README, API docs, and comments up to date as you go :
When adding a new API endpoint, also:
- Update API documentation
- Add example request/response
- Update OpenAPI/Swagger spec
- Add inline code comments
Parallel work : If tasks are truly independent (e.g., separate modules), you can work on them in parallel, but each must be tested independently.
Integration points : When task dependencies exist, use integration tests to verify the connection works.
Rollback strategy : For risky changes, create rollback tasks before deploying.
Typical order:
For gradual rollouts:
For API breaking changes:
Don't :
Do :
Solution :
1. Do NOT mark task complete
2. Debug the failure
3. Fix the code
4. Re-run tests
5. Only mark complete after pass
Solution :
1. Break into subtasks
2. Update TodoWrite with subtasks
3. Complete subtasks sequentially
4. Mark parent task complete after all subtasks done
Solution :
1. Pause current task
2. Complete dependency first
3. Test dependency
4. Resume original task
Token budget : This SKILL.md is approximately 430 lines, under the 500-line recommended limit.
Weekly Installs
171
Repository
GitHub Stars
6
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode160
gemini-cli153
github-copilot153
codex153
cursor151
kimi-cli135
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装
baoyu-translate 三模式翻译工具:快速、常规、精炼,支持 Markdown 分块与自定义偏好设置
8,500 周安装
资深Go开发专家 | Go 1.21+、并发编程、云原生微服务、性能优化
8,500 周安装
PostgreSQL代码审查助手 - 专业SQL优化、JSONB最佳实践与模式设计审查
8,500 周安装
数据库迁移指南:跨ORM(Sequelize/TypeORM/Prisma)模式转换与零停机部署
8,500 周安装
Nuxt UI - 基于Reka UI和Tailwind的Vue组件库,支持Nuxt/Vue/Laravel/AdonisJS
8,600 周安装
Rust异步编程模式:使用Tokio构建高性能并发网络服务
8,600 周安装