The Fat Controller - AI-assisted development system that orchestrates Claude Code agents like Sir Topham Hatt runs his railway
npm install create-fat-controller"Really useful engines, every one."
A complete AI-assisted development system that orchestrates Claude Code agents to build software. Like having an entire engineering team in your terminal.
> Named after Sir Topham Hatt from Thomas the Tank Engine - the one who keeps all the engines running on time. That's what this does for your AI agents.
- Generic Commands & Agents: Reusable workflow tools that work across any project
- AI Memory System: Persistent project knowledge in .ai/ that prevents context loss
- Sync System: Keep your projects up-to-date with /pull-fc and /push-fc
Install into any project with a single command:
``bash`
npx create-fat-controller
The installer will:
1. Ask if you're setting up a new or existing project
2. Copy all necessary files (.claude/, .ai/, installers)
3. Guide you to the next steps
| Scenario | Installer Will Guide You To |
|----------|------------------------------|
| New project (empty or minimal code) | @INSTALL-NEW.md - Asks questions, populates .ai/ from your answers |@INSTALL-EXISTING.md
| Existing project (has code already) | - Explores your codebase, extracts knowledge into .ai/ |
1. Run the installer in your project directory:
`bash`
cd your-project
npx create-fat-controller
2. Follow the installer prompts (new vs existing)
3. Open Claude Code and run the appropriate installer:
- For new projects: @INSTALL-NEW.md@INSTALL-EXISTING.md
- For existing projects:
4. Start building:
``
/prd β /TaskGen β /execute β /commit β /update
If you prefer to install manually:
`bash`
git clone https://github.com/iainforrest/fat-controller.git
cp -r fat-controller/.claude your-project/
cp -r fat-controller/.ai your-project/
cp fat-controller/INSTALL-*.md your-project/
Then run the appropriate installer with Claude Code.
`
.claude/ # Generic (syncs across projects)
βββ commands/ # Workflow commands (/prd, /TaskGen, /execute, etc.)
βββ agents/ # Specialized AI agents (CTO, Security, UI/UX, etc.)
βββ skills/ # Domain-specific skills loaded by agents
βββ WORKFLOW.md # Command/agent documentation
.ai/ # Project-specific (never syncs)
βββ ARCHITECTURE.json # Your project's patterns and data flows
βββ BUSINESS.json # Your features and requirements
βββ FILES.json # Your file index with cross-references
βββ PATTERNS.md # Your implementation patterns
βββ QUICK.md # Your build commands and shortcuts
βββ ... # Other memory files
`
The key insight: Commands and agents are fully generic - they read from .ai/ for all project-specific context. This means:.ai/
- Commands work identically across all projects
- Updates can be synced without customization
- Project knowledge lives in one place ()
``
/prd [feature idea] β Generate Product Requirements Document
/TaskGen [prd-file] β Break PRD into implementation tasks
/execute [tasks-file] β Systematically execute tasks
/commit β Intelligent grouped git commits
/update β Update .ai/ memory from git diffs
``
/pull-fc β Pull latest commands/agents from this repo
/push-fc β Push improvements back as PR
| Command | Purpose | Output |
|---------|---------|--------|
| /prd | Generate requirements from feature idea | /tasks/prd-[name].md |/TaskGen
| | Convert PRD to implementation tasks | /tasks/task-[name].xml |/execute
| | Orchestrate task execution via agents | Implemented code + commits |/commit
| | Group and commit changes intelligently | Git commits |/update
| | Update memory system from git diffs | Updated .ai/ files |/pull-fc
| | Sync latest from starter repo | Updated commands/agents |/push-fc
| | Contribute improvements back | GitHub PR |
Agents provide domain expertise and are invoked automatically or on request:
| Agent | Expertise |
|-------|-----------|
| execution-agent | Fresh-context task execution with domain skill loading |code-review-agent
| | Code quality review with domain-specific checks |research-agent
| | Deep research with plan/execute/synthesize phases |cto-technical-advisor
| | Architecture decisions, feasibility assessment |security-auditor
| | Security reviews, vulnerability detection |ui-ux-expert
| | Interface design, accessibility, user flows |prd-writer
| | Requirements documentation |task-writer
| | Task breakdown in XML format with complexity ratings |update-memory-agent
| | Git diff analysis, memory updates |
)The memory system is your project's brain. It's populated during installation and grows with your project.
| File | Purpose |
|------|---------|
| ARCHITECTURE.json | Patterns, data flows, integration points |BUSINESS.json
| | Features, requirements, performance targets |FILES.json
| | File index with dependencies and cross-refs |PATTERNS.md
| | Implementation templates and examples |QUICK.md
| | Build commands, debugging tips, shortcuts |TODO.md
| | Current and completed tasks |SPRINT_UPDATE.md
| | Process for updating memory |README.md
| | Guide to the memory system |
Key rule: Commands reference .ai/ for context. Keep it updated with /update.
When new commands or agents are added to this repo:
``
/pull-fc
This compares your .claude/ with the latest, shows diffs, and lets you selectively update.
When you improve a command or agent:
``
/push-fc
This validates your changes are generic (no project-specific content), then creates a PR.
| Syncs | Never Syncs |
|-------|-------------|
| .claude/commands/.md | .ai/ (project-specific) |.claude/agents/*.md
| | .claude/settings.local.json |.claude/skills/*.md
| | Project-specific commands |.claude/WORKFLOW.md
| | |
The /execute command now runs non-conflicting tasks in parallel, dramatically reducing execution time for features with independent components:
``
Wave 1 (parallel): [Task 1: frontend] [Task 2: backend] [Task 3: infra]
β β β
commit commit commit
βββββββββββββββββββββ΄βββββββββββββββββ
merge STATE
β
Wave 2 (sequential): [Task 4: touches frontend + backend]
Tasks are grouped into waves based on file dependencies:
| Conflict Type | Example | Result |
|---------------|---------|--------|
| File-level | Both tasks modify auth.ts | Run in separate waves |
| Import-level | Task B imports file Task A modifies | Run in separate waves |
| No conflict | Frontend vs Backend files | Run in parallel |
Each parallel agent writes learnings to its own STATE file:
``
/tasks/STATE-feature-agent-1.0.md # Agent 1
/tasks/STATE-feature-agent-2.0.md # Agent 2
/tasks/STATE-feature-agent-3.0.md # Agent 3
After wave completes, orchestrator merges into main STATE-feature.md.
- Other tasks in wave continue if one fails
- Failed task retried once with bumped model (Sonnet β Opus)
- User must explicitly approve skipping a failed task
- Next wave only starts after current wave fully passes
`
ββββββββββββββββββββββββββββββββββββββββ
π Wave 1: 3 tasks executing in parallel
ββββββββββββββββββββββββββββββββββββββββ
β³ [1.0] Create Frontend Component (sonnet, frontend)
β³ [2.0] Create API Endpoint (sonnet, backend)
β³ [3.0] Setup Infrastructure (opus, infrastructure)
β
[1.0] Create Frontend Component - commit abc123
β
[2.0] Create API Endpoint - commit def456
β
[3.0] Setup Infrastructure - commit ghi789
Wave 1 complete: 3/3 tasks
`
---
Agents now dynamically load domain-specific skills based on the files being modified. This provides specialized guidance without bloating agent context:
``
Base Agent Γ Domain Skill = Specialized Behavior
βββββββββββββββββββββββββββββββββββββββββββββββββββ
execution Γ frontend = React patterns, a11y checks
execution Γ backend = Service layers, API design
code-review Γ security = OWASP checks, crypto review
research Γ data = Query optimization research
Available Domain Skills:
| Skill | File Patterns | Focus Areas |
|-------|---------------|-------------|
| frontend | .tsx, /components/, /hooks/* | React/Vue patterns, state management, accessibility |backend
| | /api/, /services/, /routes/ | Service layers, REST design, error handling |data
| | /repositories/, .sql, /models/* | Query optimization, N+1 prevention, transactions |mobile
| | /ios/, /android/, .swift, .kt | Platform patterns, lifecycle, offline-first |security
| | /auth/, /crypto/, security | OWASP Top 10, auth flows, secrets management |infrastructure
| | Dockerfile, .yaml, /terraform/* | Container patterns, IaC, CI/CD pipelines |general
| | (fallback) | Senior dev best practices, code quality |
The orchestrator automatically detects domains from file paths in each task:
`xml
...
...
`
| Agent | Change |
|-------|--------|
| execution-agent | Refactored: Now accepts and applies domain skills |code-review-agent
| | Refactored: Domain-specific review checks |research-agent
| | New: Plan β Execute β Synthesize research workflow |
| File | Purpose |
|------|---------|
| .claude/skills/domain-*.md | 7 domain skill files (~2KB each) |
---
The /execute command has been refactored from a monolithic executor to a lightweight orchestrator that spawns fresh-context execution agents per parent task:
``
/execute task-feature-name
β
βββ Parses XML task file
βββ Initializes STATE.md for cross-task learning
βββ Loads EXPLORE_CONTEXT.json
β
βββ For each parent task:
βββ Selects model (Sonnet 1-3, Opus 4-5)
βββ Spawns execution-agent with fresh context
βββ Agent executes subtasks β verifies β commits
βββ Updates STATE.md with learnings
βββ Continues to next task
Benefits:
- Eliminates context debt: Fresh context per parent task
- Cross-task learning: STATE.md passes learnings between agents
- Dynamic model selection: Complex tasks (4-5) use Opus, others use Sonnet
- Atomic commits: One commit per parent task with full traceability
- Progress tracking: Status attributes on tasks enable resumability
Task files are now generated in XML format for structured parsing:
`xml`
The status attribute tracks progress (pending β in_progress β completed), enabling you to stop and resume execution without losing progress.
Migration: Run /TaskGen prd-{name} to regenerate existing PRDs in XML format.
| File | Purpose |
|------|---------|
| .claude/agents/execution-agent.md | Fresh-context agent for executing parent tasks |/tasks/STATE-{feature}.md
| | Cross-task learning state file (generated during execution) |.ai/EXPLORE_CONTEXT.json
| | Cached exploration context for execution agents |
- Sync System: /pull-fc and /push-fc commands for keeping projects updated.ai/
- Cleaner Architecture: Commands/agents are now fully generic
- Memory-First Design: All project context lives in
- Dual Installation: Separate paths for new vs existing projects
- Better Agents: Enhanced prd-writer and task-writer with structured output
`claude init
your-project/
βββ .claude/
β βββ commands/ # Workflow commands
β β βββ prd.md
β β βββ TaskGen.md
β β βββ execute.md
β β βββ commit.md
β β βββ update.md
β β βββ pull-fc.md
β β βββ push-fc.md
β βββ agents/ # Specialized agents
β β βββ execution-agent.md # Task executor with skill loading
β β βββ code-review-agent.md # Domain-aware code review
β β βββ research-agent.md # NEW: Deep research workflow
β β βββ prd-writer.md
β β βββ task-writer.md
β β βββ update-memory-agent.md
β β βββ cto-technical-advisor.md
β β βββ security-auditor.md
β β βββ ui-ux-expert.md
β βββ skills/ # Domain-specific skills (NEW)
β β βββ domain-general.md
β β βββ domain-frontend.md
β β βββ domain-backend.md
β β βββ domain-data.md
β β βββ domain-mobile.md
β β βββ domain-security.md
β β βββ domain-infrastructure.md
β βββ WORKFLOW.md
βββ .ai/
β βββ ARCHITECTURE.json # Your patterns
β βββ BUSINESS.json # Your features
β βββ FILES.json # Your files
β βββ PATTERNS.md # Your templates
β βββ QUICK.md # Your commands
β βββ ...
βββ tasks/ # Generated PRDs and task lists
βββ CLAUDE.md # Project overview (create with )`
AI works best with persistent, structured knowledge.
The memory system prevents Claude from "forgetting" your project between sessions. The generic commands ensure consistent workflows. Together, they enable rapid, high-quality development.
- Zero Context Loss: Memory system preserves project knowledge
- Consistent Quality: Commands enforce best practices
- Rapid Development: Templates and patterns enable fast implementation
- Stay Current: Sync commands keep all projects updated
- Contribute Back: Improvements benefit everyone
This project builds on ideas from the Claude Code community:
PRD β Tasks β Execute workflow:
- Ryan Carson's AI Dev Tasks - The original PRD and task-based execution approach
- How to AI with Claire Vo - YouTube - Where I first discovered this workflow
Subagent orchestration and fresh context patterns:
- GSD (Get Shit Done) by TΓCHES - Pioneered the subagent execution model with fresh context windows per task. The wave-based parallel execution and "context debt" prevention in The Fat Controller were directly inspired by GSD's approach.
---
Ready to start? Choose your installation path:
- New project β INSTALL-NEW.mdINSTALL-EXISTING.md`
- Existing project β