This repository contains a RooCode configuration for implementing the SPARC methodology for AI-driven software development. The configuration is based on the concept described in .docs/idea.md and uses RooCode's Custom Modes and Boomerang Tasks features to orchestrate a team of specialized AI agents.
-
Iteration 000: MVP β DONE
- Initial implementation of SPARC methodology
- Basic agent roles and communication protocols
- Project memory structure
- Cycle detection and context continuity mechanisms
-
Iteration 001: Orchestrator Improvements π IN PROGRESS
- New EpicCoordinator role for managing orchestrator recycling
- Enhanced memory system for better context preservation
- Improved agent communication with better result handling
- Standardized .gitignore and git management
- Command line validation for code execution
The SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) provides a structured approach to AI-driven software development. This implementation uses RooCode's Custom Modes to define specialized agents for each aspect of the development process, with the SPARC Orchestrator coordinating the workflow.
Key features:
- Specialized AI Agents: Each agent has a specific role and expertise
- Orchestrated Workflow: The SPARC Orchestrator delegates tasks and manages the process
- Persistent Memory: The
.project-memory/directory serves as the project's persistent memory - Test-Driven Development: Tests are written before implementation code
- Structured Communication: Agents communicate using standardized protocols
- Cycle Detection: System detects and resolves cyclic errors
- Context Continuity: Mechanisms ensure work continuity across context window recycling
- Epic-Based Development: Projects are divided into epics managed by the EpicCoordinator
The following custom modes (agents) are defined:
| Agent | Role | Description |
|---|---|---|
| π EpicCoordinator | Project Management | Manages the project at epic level, recycles orchestrators, and maintains high-level project overview |
| β‘οΈ SPARC Orchestrator | Epic Coordination | Manages the development process for a single epic, delegates tasks, maintains epic memory, and ensures context continuity |
| π Specification Writer | Requirements | Transforms business requirements into detailed specifications and pseudocode with focus on testability |
| ποΈ Architect | Design | Designs system architecture, data models, and APIs through HLD and LLD documents |
| π§ Auto-Coder | Implementation | Implements code based on specifications and tests following TDD principles |
| π§ͺ Tester (TDD) | Testing | Writes comprehensive tests before implementation code for various test types |
| π Documentation Writer | Documentation | Generates and maintains project documentation for different audience types |
| π‘οΈ Security Reviewer | Security | Conducts security audits, vulnerability analysis, and recommends mitigations |
| π€ Mediator Agent | Conflict Resolution | Resolves conflicts, prevents cyclic errors, and ensures alignment between agents |
.
βββ .roo/ # RooCode configuration
β βββ .roomodes # Custom modes definitions
β βββ rules/ # Global rules for all modes
β β βββ 06-context-continuity-guidelines.md # Context continuity guidelines
β βββ rules-epic-coordinator/ # Rules for EpicCoordinator
β βββ rules-orchestrator/ # Rules for SPARC Orchestrator
β β βββ 04-context-management-and-continuity.md # Context management rules
β βββ rules-spec-pseudocode/ # Rules for Specification Writer
β βββ rules-architect/ # Rules for Architect
β βββ rules-code/ # Rules for Auto-Coder
β βββ rules-tdd/ # Rules for TDD Tester
β βββ rules-docs-writer/ # Rules for Documentation Writer
β βββ rules-security/ # Rules for Security Reviewer
β βββ rules-mediator/ # Rules for Mediator Agent
βββ .docs/ # Project documentation
β βββ idea.md # Original concept document
β βββ iterations/ # Iteration planning and documentation
β β βββ 001/ # Current iteration
β β βββ todo.md # Todo list for the iteration
β β βββ epic-coordinator-design.md # Design of EpicCoordinator
β β βββ enhanced-memory-system.md # Enhanced memory system design
β βββ test_scenarios/ # Test scenarios for validation
β βββ role_instructions_todolist.md # Implementation todolist
β βββ sample-instructions.md # Sample role instructions
βββ README.md # This file
During project execution, the EpicCoordinator and Orchestrators will create and maintain the .project-memory/ directory, which serves as the project's persistent memory.
To use this template:
- Ensure you have RooCode installed in your VS Code environment
- Clone this repository
- Open the repository in VS Code
- Start a conversation with the EpicCoordinator mode
- Describe your project requirements
- The EpicCoordinator will guide you through the development process
The typical workflow follows the SPARC methodology with epic-based development:
-
Project Initialization:
- The Business Owner describes requirements to the EpicCoordinator
- The EpicCoordinator captures the initial idea and divides the project into epics
- The EpicCoordinator delegates the first epic to an Orchestrator
-
Epic Implementation (for each epic):
- Specification: The Orchestrator delegates to the Specification Writer to create detailed specifications
- Pseudocode: The Specification Writer creates pseudocode to guide implementation
- Architecture: The Architect designs or refines the system architecture
- Refinement:
- The TDD Tester writes tests based on specifications
- The Auto-Coder implements code that passes the tests
- The Security Reviewer conducts security audits
- Completion:
- The Documentation Writer creates or updates documentation
- The Orchestrator returns results to the EpicCoordinator
- The EpicCoordinator updates the epic tracker and delegates the next epic
Throughout this process, the EpicCoordinator maintains the high-level project overview, while each Orchestrator manages the workflow for a single epic. This approach ensures that the context window remains manageable and that all important information is preserved between orchestrator recycling.
The system includes mechanisms to detect and resolve cyclic errors (zacyklenΓ) and ensure work continuity across context window recycling:
- Pattern Recognition: Identifies repetitive patterns in agent interactions
- Root Cause Analysis: Determines underlying causes of cyclic errors
- Intervention Strategies: Implements techniques to break cycles
- Documentation: Records cycles and resolutions in
cycle_detection_log.md
- Regular Summarization: Creates concise summaries of project state
- Checkpoints: Establishes checkpoints at natural project milestones
- Context Recovery: Implements protocols for recovering context after recycling
- Hierarchical Documentation: Maintains documentation at multiple levels of detail
Agents communicate using standardized protocols:
The Orchestrator delegates tasks to specialized agents using the new_task protocol:
{
"taskId": "UNIQUE-TASK-ID-001",
"parentTaskId": "PARENT-TASK-ID-001",
"delegatedToMode": "agent-slug",
"objective": "Clear, concise description of what needs to be accomplished",
"context": "Summary of relevant project context and background information",
"inputs": [
{
"type": "document",
"path": ".project-memory/path/to/input_document.md",
"version": "commit-hash or version",
"description": "Description of this input"
}
],
"expectedOutputs": [
{
"type": "document",
"path": ".project-memory/path/to/expected_output.md",
"description": "Description of what this output should contain"
}
],
"constraintsAndRules": [
"Constraint or rule 1",
"Constraint or rule 2"
],
"acceptanceCriteria": [
"Criterion 1",
"Criterion 2"
],
"priority": "high|medium|low",
"deadlineHint": "YYYY-MM-DDTHH:MM:SSZ or descriptive timeframe"
}Agents report task completion (or issues) back to the Orchestrator using the attempt_completion protocol:
{
"taskId": "UNIQUE-TASK-ID-001",
"result": "success|failure|clarification_needed|conflict_detected",
"summary": "Concise summary of what was accomplished or the issues encountered",
"outputArtifacts": [
{
"type": "document",
"path": ".project-memory/path/to/output_document.md",
"version": "commit-hash or version",
"description": "Description of this output"
}
],
"issues_encountered": [
{
"type": "clarification_needed|technical_issue|conflict|other",
"description": "Detailed description of the issue",
"suggestedResolution": "Suggested approach to resolve this issue"
}
]
}The .project-memory/ directory serves as the project's persistent memory. It is structured as follows:
.project-memory/
βββ project_meta/ # Metadata projektu
β βββ documentation_structure_config.md
β βββ project_glossary.md
βββ idea_clarification/ # PoΔΓ‘teΔnΓ myΕ‘lenka a upΕesnΔnΓ
β βββ 01_initial_idea_capture.md
β βββ 02_architect_clarification_log.md
β βββ 03_architectural_explanations_for_bv.md
β βββ 04_refined_idea_and_scope.md
β βββ bv_architect_sync_log.md
βββ project_context/ # GlobΓ‘lnΓ kontext projektu
β βββ product_overview.md # PΕehled produktu
β βββ epic_tracker.md # PΕehled vΕ‘ech epicΕ―
β βββ global_decision_log.md # GlobΓ‘lnΓ rozhodnutΓ
β βββ bv_communication_log.md # Komunikace s Business VlastnΓkem
β βββ system_patterns.md # Vzory systΓ©mu
β βββ progress_tracker.md # SledovΓ‘nΓ postupu
β βββ conflict_resolution_log.md # ΕeΕ‘enΓ konfliktΕ―
β βββ cycle_detection_log.md # Detekce cyklΕ―
β βββ summaries/ # Sumarizace projektu (vysokΓ‘ ΓΊroveΕ)
βββ hld/ # GlobΓ‘lnΓ High-Level Design
βββ lld/ # GlobΓ‘lnΓ Low-Level Design (architektura)
βββ epics/ # Struktura pro epicy
β βββ EPIC-001/ # SpecifickΓ© informace pro Epic 1
β β βββ epic_state.md # Stav epicu
β β βββ task_tracker.md # SledovΓ‘nΓ ΓΊkolΕ― v rΓ‘mci epicu
β β βββ epic_decision_log.md # RozhodnutΓ specifickΓ‘ pro epic
β β βββ agent_communication_log.md # Komunikace mezi agenty v rΓ‘mci epicu
β β βββ epic_lld/ # LLD specifickΓ© pro implementaci epicu
β β βββ checkpoints/ # Checkpointy epicu
β β βββ ...
β βββ ...
βββ project_postulates.md # PostulΓ‘ty projektu
Additional directories may be added as needed based on project requirements.
You can customize this template by:
- Modifying the agent definitions in
.roo/custom_modes.json - Updating the rules in the
.roo/rules/and.roo/rules-*/directories - Adjusting the project memory structure in the Orchestrator's guidelines
- Customizing the cycle detection and context continuity mechanisms
- Modifying the communication protocols between agents
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
- Based on the SPARC methodology concept in
.docs/idea.md - Implemented using RooCode's Custom Modes and Boomerang Tasks features
- Enhanced with cycle detection and context continuity mechanisms
- Detailed role instructions available in
.docs/directory