An espalier trains a fruit tree to grow flat along a wall — pruned, wired, productive, impossible to mistake for a wild one. Espalier does the same for your AI coding agents: discover the patterns already in your codebase, encode them as constraints, get code that lands inside your conventions on the first try, not the fifth.
AI coders write plausible-looking code that doesn't match your codebase. It's not a model intelligence problem. It's an unwritten rules problem — patterns every experienced developer on the team knows but nobody documented. The model can't read your team's Slack history.
It writes a new formatDate() helper when you already have one three folders away.
It carves a component into four files when the team keeps colocated views in one.
It reaches for winston when the project standardised on pino two years ago.
It handles errors with throw when your repo committed to Result<T> in 2022.
The model can't read your team's Slack history.
Espalier reads your code, extracts those rules, and writes them down as machine-enforceable constraints. The next time the AI codes, it loads your project's rules automatically and follows them. A reviewer agent — different agent, different tool set — checks against the same rules before any commit lands.
Ten concurrent scouts inspect architecture, coding patterns, testing posture, CI, unwritten rules, and per-layer specs. An oracle pulls vendor docs in parallel. No templates from other projects.
Patterns become rules/ always-loaded into Claude Code, skills/ loaded per phase, wiki/ on demand. Every rule cites the observed pattern that justifies it.
A separate reviewer agent (Read/Grep only — no Write) checks each output. Pre-push hooks block layer-boundary violations. Failed gates roll back; rollback counters escalate to humans.
After /espalier-init, a single per-project directory wires into Claude Code via symlinks. Hover any path to see what it does and when it loads.
After init, your repo exposes two orchestrators. Each stage has a programmatic gate, each gate either passes deterministically or rolls back. Brass dots are gates; failed gates accumulate into a counter that triggers human escalation.
git blame + reverse-lookup cache + squash-merge mapping to bind the fix back to the feature change that caused it.| Prefix | Type | Output directory |
|---|---|---|
| feat: (or no prefix) | Feature | espalier/changes/feat/<slug>/ |
| refactor: | Refactor | espalier/changes/refactor/<slug>/ |
| docs: | Docs | espalier/changes/docs/<slug>/ |
| fix: | Bug fix | use /espalier-fix instead |
The artifacts /espalier-init generates describe your codebase on init day. As code evolves, v0.5.0 keeps them in sync — without ever silently overwriting anything you wrote.
Existing users on v0.4.x or earlier run /espalier-migrate — it auto-detects your installed version and applies the migration chain (v0.1 → v0.2 → v0.4 → v0.5) in order.
Drift detection is additive. Non-breaking for v0.4 installs.
/espalier-init is a heavy one-time tax — typically 10–15 minutes on a medium codebase (~150 source files). Every subsequent /espalier and /espalier-fix reuses what's generated.
rules/, always cached, no re-discovery.
/espalier-doctor flag artifacts as they age.
/espalier-init in USDMedium repo, ~150 source files. Across ~5–10 features you earn this back via dropped rework rounds.
| Setup | Per run |
|---|---|
| Opus everywhere (no cache) | $10–20 |
| Opus main + Sonnet scouts (no cache) | $4–8 |
| Opus main + Sonnet scouts + cache hits (typical) | $2–5 |
| Sonnet everywhere + cache | $1–3 |
When an agent makes an error, engineer its elimination — not with prompt tweaks, but with files, rules, automated checks, and system structure.
Read the actual code, extract patterns. Never impose templates from other projects.
ci_status == 'success' AND tests_passed == total, not "check if CI passes".
Coder and reviewer are different invocations with different tool sets. Reviewer gets Read/Grep only.
Rules always loaded. Skills per phase. Agents see only their scope. Wiki on demand.
Either reflects an observed pattern, or prevents a known failure mode. Nothing arbitrary.
An espalier is a tree that hasn't forgotten what shape it's meant to hold.
Marketplace install is the standard path. Manual clone is for hacking on Espalier itself. Project-scoped drops a single skill into one repo without going global.
Recommended. Updates flow in via /plugin update espalier-engineering.
For users not on the plugin path, or while iterating on Espalier itself.
Update with cd ~/repos/espalier-engineering && git pull.
Drop the skill inside a single project rather than installing globally.