"Why have just a slice when you can get the whole loaf?"
Loaf is an opinionated agentic framework (Levi's Opinionated Agentic Framework) that transforms how you work with AI coding assistants. Instead of ad-hoc prompting, Loaf provides a complete pipeline from idea to implementation to learningβwith full traceability at every step.
Spec-first development: Ideas are shaped into bounded specs before any code is written. No more scope creep or undefined requirements.
Multi-agent delegation: A PM agent orchestrates work, specialized agents implement. The orchestrator never touches code directlyβit plans, coordinates, and verifies.
Full traceability: Every piece of work flows through: Idea β Spec β Tasks β Code β Learnings. Nothing gets lost.
Session continuity: Work survives context loss, compaction, and /clear. Pick up exactly where you left off.
Loaf's commands form a three-phase workflow that mirrors how good software gets built:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 1: SHAPE β
β β
β /idea β /brainstorm β /shape β Bounded Spec β
β (capture) (explore) (define) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 2: BUILD β
β β
β /breakdown β /implement β
β (decompose) (single task or multi-task orchestration) β
β β
β Optional: /council-session for complex decisions β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 3: LEARN β
β β
β /review-sessions β /reflect β Updated Strategy β
β (outcomes) (learnings) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Transform raw ideas into implementable specs with clear boundaries.
| Command | Purpose |
|---|---|
/idea |
Quick capture of rough ideas into .agents/ideas/ |
/brainstorm |
Deep exploration of a problem space |
/shape |
Rigorous shaping into bounded spec (what's IN and OUT) |
/strategy |
Discover and document strategic direction |
Decompose specs into atomic tasks and execute with specialized agents.
| Command | Purpose |
|---|---|
/breakdown |
Split spec into agent-sized atomic tasks |
/implement |
Start single-task work or multi-task orchestration with dependency tracking |
/council-session |
Convene agents for multi-perspective decisions |
/resume |
Continue after context loss or new conversation |
Integrate outcomes into strategic knowledge.
| Command | Purpose |
|---|---|
/review-sessions |
Review completed sessions, identify patterns |
/reflect |
Integrate learnings into STRATEGY.md |
/reference-session |
Reuse patterns from prior sessions |
Shape Up Methodology: Inspired by Basecamp's Shape Up. Specs define appetite (how much effort), boundaries (what's out), and rabbit holes (known risks). Work is shaped, not just specified.
Strict Delegation: The PM agent plans and coordinates but never writes code. All implementation is delegated to specialized agents: backend-dev, frontend-dev, dba, qa, devops, design.
Sessions as State Machines: Every /implement creates a session file in .agents/sessions/. Sessions track: spec β tasks β agent assignments β outcomes. They survive /clear, compaction, and context switches.
Hooks as Quality Gates: Pre-tool hooks can block dangerous actions (secrets in commits). Post-tool hooks run linters, type checkers, security scans. Language-aware and automatic.
Orchestrator:
| Agent | Use For |
|---|---|
pm |
Orchestrating work, managing sessions, delegating to specialists |
Implementation Agents (write code):
| Agent | Use For |
|---|---|
backend-dev |
Python, Ruby/Rails, Go, or TypeScript services |
frontend-dev |
React, Next.js, UI components |
devops |
Docker, Kubernetes, CI/CD |
Advisory Agents (expertise in councils, delegate implementation):
| Agent | Use For |
|---|---|
dba |
Schema design, migrations, queries |
qa |
Testing, code review, security |
design |
UI/UX, accessibility |
power-systems |
Grid design, power electronics |
Domain knowledge that agents draw from:
| Skill | Coverage |
|---|---|
orchestration |
Sessions, councils, Linear integration, Shape Up |
foundations |
Code style, docs, security, commits |
python-development |
FastAPI, Pydantic, pytest, async |
typescript-development |
TypeScript, React, Next.js, type safety |
ruby-development |
Rails 8, Hotwire, Minitest, DHH philosophy |
go-development |
Go services, concurrency, testing |
database-design |
Schema design, migrations, optimization |
infrastructure-management |
Docker, K8s, Terraform |
interface-design |
Accessibility, design systems |
power-systems-modeling |
Grid design, power electronics |
Loaf is built once and deployed to multiple AI coding tools:
| Target | Features | Status |
|---|---|---|
| Claude Code | Full (agents, skills, hooks, MCP, LSP) | Primary |
| OpenCode | Full (agents, skills, commands, hooks) | Full support |
| Cursor | Agents, skills, hooks | Full support |
| Codex | Skills only | Partial |
| Gemini | Skills only | Partial |
Claude Code only.
MCP Servers:
- Serena - Code intelligence and semantic search
- Sequential Thinking - Structured reasoning
- Linear - Issue tracking and project management
LSP Servers:
- gopls, pyright, typescript-language-server, solargraph
/plugin marketplace add levifig/loafUpdates happen automatically via plugin marketplace.
curl -fsSL https://raw.githubusercontent.com/levifig/loaf/main/install.sh | bashThe installer detects installed tools, lets you select targets, and downloads pre-built distributions.
Update:
# Interactive
curl -fsSL https://raw.githubusercontent.com/levifig/loaf/main/install.sh | bash
# Unattended (CI, scripts)
curl -fsSL https://raw.githubusercontent.com/levifig/loaf/main/install.sh | bash -s -- --upgradeInstall locations:
| Target | Location |
|---|---|
| OpenCode | ~/.config/opencode/ or ~/.opencode/ |
| Cursor | ~/.cursor/ |
| Codex | $CODEX_HOME/skills/ or ~/.codex/skills/ |
| Gemini | ~/.gemini/skills/ |
Claude Code only.
Commands and agents are scoped to avoid conflicts:
/loaf:implement # Start implementation session
/loaf:council-session # Run a council deliberation
@loaf:backend-dev # Reference an agentgit clone https://github.com/levifig/loaf.git
cd loaf
npm install
npm run buildSee AGENTS.md for development guidelines.
Testing locally:
- Claude Code:
/plugin marketplace add /path/to/loaf - Others:
./install.sh(detects dev mode, builds first)
MIT