SPARC is a methodology for structuring complex software development projects. It breaks down the development lifecycle into distinct, manageable stages, each handled by a specialized "mode" or agent. This approach promotes clarity, modularity, collaboration, and adherence to best practices, similar to an assembly line for software.
Each mode acts as an expert focused on a specific development phase:
ask(βAsk): Clarifies vague tasks into actionable prompts and identifies the correct mode for delegation. Uses Prompt Decomposition Thinking.sparc(β‘οΈ SPARC Orchestrator): The project manager. Breaks down high-level goals into subtasks and delegates them usingnew_task. Uses SPARC Orchestration Thinking.spec-pseudocode(π Specification Writer): Defines what the software should do (requirements, edge cases, constraints) via detailed pseudocode.architect(ποΈ Architect): Designs how the system is built (high-level structure, scalability, security, component interactions). Uses Architectural Systems Thinking and often visualization tools like Mermaid.code(π§ Auto-Coder): Writes clean, efficient, modular implementation code based on specs and architecture.tdd(π§ͺ Tester (TDD)): Writes tests before implementation using Test-Driven Development principles to ensure quality.security-review(π‘οΈ Security Reviewer): Audits code and infrastructure for security vulnerabilities.docs-writer(π Documentation Writer): Creates clear user and developer documentation.integration(π System Integrator): Merges outputs from different modes into a cohesive, working system.devops(π DevOps): Manages deployment, infrastructure automation, and CI/CD.- Other Modes: Specialized modes exist for debugging (
debug), optimization (refinement-optimization-mode), monitoring (post-deployment-monitoring-mode), etc.
- Define & Decompose: Start with a high-level task. Use
askorsparcto refine and break it down. - Delegate (
new_task): The orchestrator assigns subtasks to appropriate modes.- Example:
<new_task> <mode>spec-pseudocode</mode> <message>Define functional requirements and pseudocode for the password reset flow.
- Example: