Sparc Methodology

ruvnet/ruflo/.agents/skills/sparc-methodology

作者 ruvnet6051f6702b61无许可证74K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

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.

AI 生成的概览

通过 SPARC 阶段(规格、伪代码、架构、细化、完成)指导复杂的软件实现。

功能
该技能将结构化的 SPARC 工作流应用于复杂的软件实现,依次经过规格、伪代码、架构、细化和完成阶段。它提供通过 @claude-flow/cli 工具路由的各阶段命令、一个协调者代理的启动命令,以及两个辅助脚本,用于初始化工作流和运行阶段审查清单。它还指向介绍该方法论和阶段模板的参考文档。
适用场景
适用于新功能实现、复杂实现、架构变更、系统重新设计、集成工作或需求不明确的情况。对于简单缺陷修复、文档更新、配置变更、定义明确的小任务和日常维护,则应跳过。
运行要求
需要 npx 命令和 @claude-flow/cli 包(除非已缓存,否则需联网调用);随附两个可执行 shell 脚本(sparc-init.sh 和 sparc-review.sh)。

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

bash
npx @claude-flow/cli hooks route --task "specification: [requirements]"

Example:

bash
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

bash
npx @claude-flow/cli hooks route --task "pseudocode: [feature]"

Example:

bash
npx @claude-flow/cli hooks route --task "pseudocode: OAuth2 login flow with token refresh"

Architecture Phase

Design system structure, interfaces, and dependencies

bash
npx @claude-flow/cli hooks route --task "architecture: [design]"

Example:

bash
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

bash
npx @claude-flow/cli hooks route --task "refinement: [feedback]"

Example:

bash
npx @claude-flow/cli hooks route --task "refinement: add rate limiting and brute force protection"

Completion Phase

Finalize implementation with tests and documentation

bash
npx @claude-flow/cli hooks route --task "completion: [final checks]"

Example:

bash
npx @claude-flow/cli hooks route --task "completion: verify all tests pass, update API docs, security review"

SPARC Coordinator

Spawn SPARC coordinator agent

bash
npx @claude-flow/cli agent spawn --type sparc-coord --name sparc-lead

Scripts

ScriptPathDescription
sparc-init.agents/scripts/sparc-init.shInitialize SPARC workflow for a new feature
sparc-review.agents/scripts/sparc-review.shRun SPARC phase review checklist

References

DocumentPathDescription
SPARC Overviewdocs/sparc.mdComplete SPARC methodology guide
Phase Templatesdocs/sparc-templates.mdTemplates for each SPARC phase

Best Practices

  1. Check memory for existing patterns before starting
  2. Use hierarchical topology for coordination
  3. Store successful patterns after completion
  4. Document any new learnings

来源与署名

来源:ruvnet/ruflo位于.agents/skills/sparc-methodology提交6051f67

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架