An autonomous multi-agent system for long-running project execution powered by Claude.
The Fireteam is a sophisticated orchestration framework that manages three specialized agents in an infinite cycle of planning, execution, and review until project completion:
- Planner Agent: Creates and updates project plans
- Executor Agent: Executes planned tasks
- Reviewer Agent: Assesses progress and estimates completion
Orchestrator (Infinite Loop)
↓
[Plan] → [Execute] → [Review] → [Git Commit]
↑___________________________________|
- Autonomous Operation: Runs continuously until project completion
- Git Integration: Automatic repo initialization, branching, commits, and pushing
- State Isolation: Clean state separation between projects to prevent contamination
- Completion Validation: Triple-check validation system (3 consecutive >95% reviews)
- Error Recovery: Automatic retry logic and graceful degradation
- Production Focus: Emphasis on production-ready code with comprehensive testing
-
Prerequisites
- Python 3.12+
- Git
- Claude CLI (installation guide)
-
Setup
cd /home/claude/fireteam bash setup.sh source ~/.bashrc # or restart your shell
start-agent --project-dir /path/to/project --prompt "Your project goal here"Example:
start-agent --project-dir ~/my-calculator --prompt "Build a Python command-line calculator with support for basic arithmetic operations"agent-progressThis shows:
- Current status (running/stopped)
- Project information
- Current cycle number
- Completion percentage
- Recent activity logs
stop-agentThis gracefully shuts down the orchestrator and all running agents.
- Creates/validates Git repository in project directory
- Creates timestamped branch (e.g.,
agent-20240315-143022) - Initializes clean project state
Each cycle consists of three phases:
-
Planning Phase
- Planner agent reviews goal, previous plan, and recent results
- Creates or updates project plan
- Breaks down remaining work into actionable tasks
-
Execution Phase
- Executor agent implements tasks from the plan
- Writes actual, working code (no placeholders)
- Tests implementations
- Documents work
-
Review Phase
- Reviewer agent examines the codebase
- Tests functionality
- Estimates completion percentage (0-100%)
- Identifies gaps or issues
-
Git Commit
- Commits all changes with descriptive message
- Pushes to remote if origin exists
- System runs infinite cycles until completion
- When Reviewer estimates >95% complete: enter validation mode
- Validation requires 3 consecutive reviews confirming >95%
- Each validation review takes a fresh, critical look
- Upon completion: system stops and logs success
State is stored in state/current.json (runtime data directory) and includes:
project_dir: Absolute path to projectgoal: Project objectivestatus: Current phase (planning/executing/reviewing)cycle_number: Current cycle countcompletion_percentage: Latest estimate (0-100)validation_checks: Consecutive validation passesgit_branch: Current branch namecurrent_plan: Latest planlast_execution_result: Latest execution outputlast_review: Latest review output
Important: State is completely reset between projects to prevent cross-contamination.
Edit src/config.py to customize:
MAX_RETRIES: Number of retry attempts for failed agent calls (default: 3)COMPLETION_THRESHOLD: Percentage to trigger validation (default: 95)VALIDATION_CHECKS_REQUIRED: Consecutive checks needed (default: 3)LOG_LEVEL: Logging verbosity (default: INFO)
Logs are stored in logs/:
orchestrator_YYYYMMDD_HHMMSS.log: Per-run orchestrator logssystem.log: Combined system output (when running in background)
fireteam/
├── src/ # Source code directory
│ ├── orchestrator.py # Main orchestration loop
│ ├── config.py # Configuration settings
│ ├── __init__.py
│ ├── agents/
│ │ ├── __init__.py
│ │ ├── base.py # Base agent class
│ │ ├── planner.py # Planner agent
│ │ ├── executor.py # Executor agent
│ │ └── reviewer.py # Reviewer agent
│ └── state/
│ └── manager.py # State management module
├── state/ # Runtime state data (gitignored)
│ └── current.json # Active project state
├── cli/
│ ├── start-agent # Start system
│ ├── stop-agent # Stop system
│ └── agent-progress # Check status
├── logs/ # Log directory
├── service/
│ └── claude-agent.service # Systemd service file
├── setup.sh # Installation script
└── README.md # This file
- Check Claude CLI is installed:
claude --version - Ensure project directory is accessible
- Check logs in
logs/system.log
- Check Claude CLI credentials
- Verify network connectivity
- Review agent logs for specific errors
- Ensure sufficient disk space
- Stop the system:
stop-agent - Remove state file:
rm state/current.json - Restart with fresh state
- Ensure git is configured:
git config --list - Check remote access:
git remote -v(in project dir) - Verify credentials for pushing
- Clear Goals: Provide specific, detailed project goals
- Monitor Progress: Check
agent-progressperiodically - Review Commits: Examine git commits to understand changes
- Iterate on Plans: Let the system adapt through multiple cycles
- Trust Validation: The triple-check ensures quality
Each project maintains isolated state. To work on multiple projects:
# Start project 1
start-agent --project-dir ~/project1 --prompt "Goal 1"
# Wait for completion or stop
stop-agent
# Start project 2 (completely fresh state)
start-agent --project-dir ~/project2 --prompt "Goal 2"The system automatically creates timestamped branches. To continue from a specific commit:
- Manually checkout desired branch in project directory
- System will create new branch from that point
To push to a remote:
cd /path/to/project
git remote add origin <url>
# System will automatically push subsequent commitsAgents don't communicate directly. The orchestrator:
- Passes outputs as inputs to the next agent
- Maintains state in shared state file
- Ensures proper sequencing
Agents invoke Claude CLI with:
claude --dangerously-skip-permissions --prompt "<prompt>" --cwd <project-dir>The --dangerously-skip-permissions flag enables fully autonomous operation.
- Each agent call has retry logic (3 attempts by default)
- Exponential backoff between retries
- Graceful degradation on persistent failures
- Comprehensive logging for debugging
This is a production system. Contributions should:
- Follow Python best practices (PEP 8)
- Include error handling
- Update documentation
- Maintain backward compatibility
MIT License - See LICENSE file for details
- Documentation: Claude Code Docs
- Issues: Report via project repository
- Sub-agents: Sub-agent Documentation
1.0.0 - Initial release