Agent Frameworks
Agent frameworks are structured approaches to working with coding agents. Instead of ad-hoc prompting, these methodologies provide repeatable patterns for complex development tasks.
Why Use Frameworks?
Working with coding agents without structure often leads to:
- Context rot - The agent loses track of what it's doing over long sessions
- Premature exits - The agent declares "done" when work remains
- Inconsistent results - Same prompt, different outcomes
- Wasted tokens - Revisiting the same context repeatedly
Frameworks address these issues through spec-driven development, structured iteration, and clear phase boundaries.
RALPH Loop
Created by Geoffrey Huntley in February 2024, the RALPH Loop (Repeat, Agent, Loop, Prompt, History) is a methodology for autonomous development.
Core Concept
The key insight: repeat the same prompt and let the agent see the Git history. Git becomes the memory layer that persists across context windows.
┌────────────────────────────────────────────────────┐
│ RALPH Loop │
├─────────────────────────────────────────────────────┤
│ 1. Give agent a task with clear success criteria │
│ 2. Agent works, commits changes to Git │
│ 3. Context fills up → agent stops │
│ 4. Start fresh session with same prompt │
│ 5. Agent reads Git history, continues where │
│ it left off │
│ 6. Repeat until task complete │
└────────────────────────────────────────────────────┘
What It Solves
- Context limits - Git history carries context across sessions
- Premature exits - Agent keeps trying until success criteria met
- Cost efficiency - ~$10/hour for autonomous development
Learn More
GSD (Get Shit Done)
GSD combines meta-prompting with spec-driven development for rapid shipping.
Core Principles
- Maximum 3 tasks per plan - Fits within 50% of a 200k context window
- Fresh subagent per task - Prevents context rot
- Atomic commits - Each task = one commit
- Spec-driven - Write the specification before implementation
Workflow
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Specify │───►│ Plan │───►│ Execute │
│ (write │ │ (max 3 │ │ (subagent │
│ spec) │ │ tasks) │ │ per task) │
└─────────────┘ └─────────────┘ └─────────────┘
What It Solves
- Scope creep - Strict task limits prevent runaway sessions
- Context pollution - Fresh agents for each task
- Process overhead - Replaces many Agile ceremonies
Learn More
BMAD Method
BMAD (Business, Method, Architecture, Development) is an enterprise-grade framework with 21 specialized agents and 50+ workflows.
Structure
The framework defines four phases:
| Phase | Purpose | Key Agents |
|---|---|---|
| Analysis | Understand requirements | Business Analyst, User Researcher |
| Planning | Define approach | Project Manager, Technical Lead |
| Solutioning | Design architecture | Architect, Security Specialist |
| Implementation | Build and deploy | Developer, DevOps Engineer |
Agent-as-Code
BMAD treats agent personas as code—each specialist is defined in markdown with specific responsibilities, constraints, and handoff protocols.
Enterprise Adoption
The methodology has been studied in enterprise contexts including Microsoft and Accenture case studies, focusing on structured AI-assisted development at scale.
Learn More
GitHub Spec Kit
An official GitHub toolkit for spec-driven development with AI agents.
Workflow
Specify → Plan → Execute
- Specify - Write detailed specifications in markdown
- Plan - Let the agent create an implementation plan
- Execute - Agent implements against the spec and plan
Features
- Templates for common specification types
- Integration with GitHub workflows
- Built for GitHub-centric development
Learn More
Choosing a Framework
| Framework | Best For | Team Size | Structure Level |
|---|---|---|---|
| RALPH Loop | Autonomous long-running tasks | Solo | Low |
| GSD | Rapid shipping, small teams | 1-3 | Medium |
| BMAD | Enterprise, structured roles | 5+ | High |
| Spec Kit | GitHub-centric workflows | Any | Medium |
Starting Recommendations
- New to frameworks? Start with GSD—it's simple and effective
- Working solo on big features? Try RALPH Loop
- Enterprise team with defined roles? Evaluate BMAD
- Heavy GitHub users? Spec Kit integrates naturally
Common Principles
Despite their differences, these frameworks share core principles:
- Specs before code - Define what you're building before building it
- Git as memory - Use version control to persist context
- Fresh contexts - Don't let sessions get too long
- Clear boundaries - Define when tasks start and end
- Iteration over perfection - Ship incrementally, refine continuously
Building Your Own Approach
You don't need to adopt a framework wholesale. Extract the principles that fit your workflow:
- From RALPH: Use Git as a memory layer for long tasks
- From GSD: Limit concurrent tasks, use fresh subagents
- From BMAD: Define specialist roles for complex projects
- From Spec Kit: Write specs before implementation
The best framework is one your team will actually use.