Skip to main content

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

  1. Maximum 3 tasks per plan - Fits within 50% of a 200k context window
  2. Fresh subagent per task - Prevents context rot
  3. Atomic commits - Each task = one commit
  4. 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:

PhasePurposeKey Agents
AnalysisUnderstand requirementsBusiness Analyst, User Researcher
PlanningDefine approachProject Manager, Technical Lead
SolutioningDesign architectureArchitect, Security Specialist
ImplementationBuild and deployDeveloper, 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
  1. Specify - Write detailed specifications in markdown
  2. Plan - Let the agent create an implementation plan
  3. 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

FrameworkBest ForTeam SizeStructure Level
RALPH LoopAutonomous long-running tasksSoloLow
GSDRapid shipping, small teams1-3Medium
BMADEnterprise, structured roles5+High
Spec KitGitHub-centric workflowsAnyMedium

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:

  1. Specs before code - Define what you're building before building it
  2. Git as memory - Use version control to persist context
  3. Fresh contexts - Don't let sessions get too long
  4. Clear boundaries - Define when tasks start and end
  5. 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.