A convenience wrapper for Agent Flywheel — a multi-agent development methodology. This repo provides shell scripts and tmux orchestration to streamline the Flywheel workflow.
Ship faster with AI agent swarms. An orchestration layer for multi-model AI development workflows.
One command. Multiple AI models. Parallel execution. Real results.
Traditional AI-assisted coding uses one model at a time. Flywheel changes the game:
- Multi-model synthesis — Opus, Codex, GPT-5.2, and Gemini working together
- Parallel agent swarms — 6+ agents implementing simultaneously in tmux
- Battle-tested prompts — Structured delegation, failure recovery, evidence requirements
- Safety rails — Destructive command blocking + two-person authorization
Why trust one model when four can compete?
flywheel compete planning/PLAN_v0.mdGenerates 4 independent plans in parallel:
- 2× Claude Opus (different focus areas)
- 1× Codex with extended reasoning
- 1× GPT-5.2 with extended reasoning
Then synthesizes the best ideas into a unified plan. Different models catch different edge cases.
Plans improve through iteration, not perfection on first try.
flywheel refine --iters 5Each iteration:
- AI reviews the plan against codebase reality
- Identifies gaps, ambiguities, missing edge cases
- Produces improved version
- Stops when changes converge
Result: Plans that actually work when implemented.
The Doodlestein method for bulletproof implementation plans.
flywheel polish --max 9Interactive refinement loop:
- Run polish prompt in Claude
- Review output — are improvements still happening?
- Choose: [C]ontinue / [F]resh session / [X] Codex final / [D]one
- Repeat 6-9 times until steady state
- Final pass with different model for fresh perspective
Philosophy: Cheap planning tokens prevent expensive implementation mistakes.
Leverage GPT Pro's extended thinking for complex architectural decisions.
flywheel plan-pro --rounds 3Workflow:
- Copies plan + critique prompt to clipboard
- Opens GPT Pro web interface
- You paste and get extended reasoning response
- Paste response back → next iteration
Best for: Architecture decisions requiring deep reasoning chains.
One command launches a full development team.
flywheel startwork --cc 3 --cod 2 --gmi 1Spawns in tmux:
- 3 Claude agents — Primary implementation
- 2 Codex agents — Parallel code generation
- 1 Gemini agent — Review and verification
Each agent gets:
- System prompt with intent classification
- Project context and current plan
- Structured task delegation format
- Failure recovery protocols
Turn plans into actionable, parallelizable work units.
flywheel beads --min-beads 50Analyzes your plan and creates:
- Atomic implementation tasks
- Clear acceptance criteria
- Dependency ordering
- Complexity estimates (S/M/L)
Integration: Works with the beads task management system (br, bv).
Isolated workspaces for parallel feature development.
wt add feature/auth # Create worktree
cd $(wt cd feature/auth) # Jump to it
wt sync # Update all worktreesWhy worktrees? Each agent swarm can work in its own worktree without conflicts.
From zero to fully-configured in seconds.
new-repo my-projectAutomatically:
- Creates local directory with git
- Creates GitHub repo (private by default)
- Adds to sync system
- Initializes flywheel + beads
- Commits and pushes
# Install
./install.sh
# Verify dependencies
flywheel doctor
# In any project:
cd /path/to/your-project
flywheel init
# The full workflow:
flywheel plan --rounds 2 # Interview → initial plan
flywheel refine --iters 3 # AI-powered refinement
flywheel compete planning/PLAN.md # Multi-model competition
flywheel polish # Interactive final polish
flywheel beads --min-beads 50 # Generate tasks
flywheel startwork # Launch agent swarmFlywheel loads agent behavior prompts from ~/.config/flywheel/prompts/:
| File | Purpose |
|---|---|
SYSTEM_PROMPT.md |
Base rules for ALL agents |
INTERVIEW.md |
Planning interview prompt |
AGENT_WORKER.md |
Implementation agent work loop |
QA_AGENT.md |
QA verification checklist |
DELEGATION_RULES.md |
7-section task delegation structure |
LIBRARIAN.md |
External research pattern |
Intent Classification — Agents classify every task before acting:
- Trivial, Explicit, Exploratory, Open-ended, Ambiguous
Evidence Requirements — No task complete without proof:
- File edits need clean lint
- Builds need exit code 0
- Tests must pass
Failure Recovery — After 3 consecutive failures:
- STOP, REVERT, DOCUMENT, ESCALATE
Blocks dangerous commands before execution:
rm -rfoutside safe directoriesgit reset --hard,git push --forcegit branch -D,git clean -f
High-risk commands require approval:
| Risk Level | Examples | Approval |
|---|---|---|
| CRITICAL | DROP DATABASE, terraform destroy |
2+ approvals |
| DANGEROUS | git push --force, DELETE FROM |
1 approval |
| CAUTION | rm file, git stash drop |
Auto after 30s |
slb init && slb daemon startGlobal: ~/.config/flywheel/config.env
Local: .flywheel/config.env
# Agent mix
FW_CC=3 # Claude agents
FW_COD=2 # Codex agents
FW_GMI=1 # Gemini agents
# Models
FW_CLAUDE_MODEL=opus
FW_CODEX_IMPL_MODEL=gpt-5.2-codex
FW_CODEX_REASONING=high
# Iteration limits
FW_INTERVIEW_ROUNDS=2
FW_PLAN_ITERS=3| File | Purpose |
|---|---|
config/claude-settings.json.template |
Claude Code settings with dcg+slb hooks |
config/slb/config.toml.template |
SLB configuration |
Required setup: In config/claude-settings.json.template, replace:
"Authorization": "Bearer YOUR_AGENT_MAIL_TOKEN_HERE"with your actual Agent Mail MCP token.
| Command | Description |
|---|---|
flywheel doctor |
Verify dependencies |
flywheel init |
Initialize repo |
flywheel plan [--rounds N] |
Planning interview |
flywheel refine [--iters N] |
AI plan refinement |
flywheel compete <plan> |
Multi-model competition |
flywheel plan-pro [--rounds N] |
GPT Pro guided planning |
flywheel polish [--max N] |
Interactive polish loop |
flywheel beads [--min-beads N] |
Generate tasks |
flywheel startwork [--cc N] [--cod N] [--gmi N] |
Launch agents |
flywheel qa |
QA verification |
flywheel nudge |
Nudge idle agents |
flywheel watchdog [N] |
Auto-nudge every N seconds |
flywheel finalize [--push] |
Commit work |
flywheel sync |
Finalize + push |
wt add/list/remove/cd/sync |
Worktree management |
new-repo <name> [--public] |
Create new project |
- Agent toolchain:
claude,codex,gemini - Task management:
ntm,br/bd,bv,apr,ubs - Standard tools:
tmux,git,gh
Run flywheel doctor to verify.
"Planning tokens are far fewer and cheaper than implementation tokens."
Flywheel invests heavily in planning:
- Multiple models competing on plans
- Iterative refinement until convergence
- Human review at key checkpoints
- Only then: parallel implementation
The result? Less rework. Faster shipping. Better code.
This project is built on top of the Agent Flywheel methodology. Full credit to the original authors for the core concepts of multi-agent planning, beads-based task decomposition, and parallel implementation workflows.
Flywheel-Lite is an independent convenience layer — not affiliated with or endorsed by the Agent Flywheel project.
MIT