sparc-methodology
它能做什么
这项技能引导智能体遵循一套结构化的开发方法,共五个阶段:规格说明、伪代码、架构、细化和完成。适合构建复杂功能、并希望先规划后编码的人。
适用场景
- ✓当你正在构建一个包含多个部分的新功能的时候。
- ✓当需求不明确,需要先弄清楚的时候。
- ✓当你计划的改动会影响整体系统设计的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/.agents/skills/sparc-methodology/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用 SPARC 方法规划我们的新账单功能,从规格说明开始。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会依次完成每个阶段,先编写需求,再编写伪代码、设计,然后是细化后的实现,并记录每个步骤。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Sparc Methodology Skill
Purpose
SPARC development workflow: Specification, Pseudocode, Architecture, Refinement, Completion. A structured approach for complex implementations that ensures thorough planning before coding.
When to Trigger
- new feature implementation
- complex implementations
- architectural changes
- system redesign
- integration work
- unclear requirements
When to Skip
- simple bug fixes
- documentation updates
- configuration changes
- well-defined small tasks
- routine maintenance
Commands
Specification Phase
Define requirements, acceptance criteria, and constraints
npx @claude-flow/cli hooks route --task "specification: [requirements]"
Example:
npx @claude-flow/cli hooks route --task "specification: user authentication with OAuth2, MFA, and session management"
Pseudocode Phase
Write high-level pseudocode for the implementation
npx @claude-flow/cli hooks route --task "pseudocode: [feature]"
Example:
npx @claude-flow/cli hooks route --task "pseudocode: OAuth2 login flow with token refresh"
Architecture Phase
Design system structure, interfaces, and dependencies
npx @claude-flow/cli hooks route --task "architecture: [design]"
Example:
npx @claude-flow/cli hooks route --task "architecture: auth module with service layer, repository, and API endpoints"
Refinement Phase
Iterate on the design based on feedback
npx @claude-flow/cli hooks route --task "refinement: [feedback]"
Example:
npx @claude-flow/cli hooks route --task "refinement: add rate limiting and brute force protection"
Completion Phase
Finalize implementation with tests and documentation
npx @claude-flow/cli hooks route --task "completion: [final checks]"
Example:
npx @claude-flow/cli hooks route --task "completion: verify all tests pass, update API docs, security review"
SPARC Coordinator
Spawn SPARC coordinator agent
npx @claude-flow/cli agent spawn --type sparc-coord --name sparc-lead
Scripts
| Script | Path | Description |
|---|---|---|
sparc-init |
.agents/scripts/sparc-init.sh |
Initialize SPARC workflow for a new feature |
sparc-review |
.agents/scripts/sparc-review.sh |
Run SPARC phase review checklist |
References
| Document | Path | Description |
|---|---|---|
SPARC Overview |
docs/sparc.md |
Complete SPARC methodology guide |
Phase Templates |
docs/sparc-templates.md |
Templates for each SPARC phase |
Best Practices
- Check memory for existing patterns before starting
- Use hierarchical topology for coordination
- Store successful patterns after completion
- Document any new learnings
常见问题
SPARC 代表什么?
它代表规格说明(Specification)、伪代码(Pseudocode)、架构(Architecture)、细化(Refinement)和完成(Completion)。
什么时候应该跳过它?
这项技能说明,对于简单的错误修复、文档更新和小型配置改动,应跳过它。
它需要特殊工具吗?
这项技能使用 claude-flow 命令来分派每个阶段,所以这些工具需要可以使用。
详情
作者的原始描述
SPARC development workflow: Specification, Pseudocode, Architecture, Refinement, Completion. A structured approach for complex implementations that ensures thorough planning before coding. Use when: new feature implementation, complex implementations, architectural changes, system redesign, integration work, unclear requirements. Skip when: simple bug fixes, documentation updates, configuration changes, well-defined small tasks, routine maintenance.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1538
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。