Junhanliu-dev/espalier-engineering

72 stars · Last commit 2026-07-23

Train your AI coders the way you'd train a vine — discover your codebase's actual patterns, then encode them as Claude Code rules, skills, agents, hooks, and a guided pipeline so generated code lands inside your conventions on the first try, not the fifth.

README preview

# Espalier Engineering

> An espalier trains a fruit tree to grow flat along a wall — pruned, wired, productive, and impossible to mistake for a wild one. **Espalier does the same thing for your AI coding agents:** it discovers the patterns already in your codebase, then encodes them as constraints so generated code grows along your conventions on the first try, not the fifth.

```text
/plugin marketplace add Junhanliu-dev/espalier-engineering
/plugin install espalier-engineering@espalier-engineering
/espalier-init
```

> **v0.13.0 — the coder gets a laziness ladder; the reviewer gets a minimalism lens.** Espalier enforced *fit* — conventions, layers, production seeds — but had no notion of *size*: a convention-perfect 200-line date-picker component passed every gate while `<input type="date">` was never considered. Now the coder climbs a **Solution Selection Ladder** before choosing a change's shape (reuse what the project has → the convention-named mechanism → stdlib/native/installed dep → the leanest compliant implementation; a NEW dependency needs a `requirements.md` line), and the reviewer runs an **advisory Minimalism Review** — `delete:`/`stdlib:`/`native:`/`yagni:` findings capped at **P2/P3** so they can never re-open the Stage 4 fixpoint loop, with ONE objectively-checkable P1: a new dependency covering what stdlib or an installed dep already provides. The governing rule everywhere: **conventions first, correctness within them, brevity only breaks ties** — a construct your rules mandate is never "over-build", and "the convention itself is bloat" routes to the human promotion path, never a blocking finding. Idea adapted from [ponytail](https://github.com/DietrichGebert/ponytail) (MIT), re-grounded convention-first. Gated on both eval suites (coder **4/4** incl. a new overbuild-trap fixture; review **8/8**, catch-rate 1.00, FP 0 — incl. a planted new-dependency P1 and a severity-inflation guard) and quality-scored by independent agents on the darwin 8-dimension rubric: **avg 82.3 → 85.9** after the scorer-finding fix round (reviewer 91.0, coder 88.6). Full report: [`docs/quality-report-v0.13.0.md`](./docs/quality-report-v0.13.0.md).
>
> **Existing users:** run `/espalier-migrate`. It auto-detects your install version and applies the needed migration chain (… v0.10.0→v0.11.0→v0.12.0→v0.13.0) in order. The v0.12→v0.13 step is surgical (anchored section inserts into the four per-project coder/reviewer files — never a template overwrite, backups at `<file>.pre-v0.13.bak`). See [`docs/migrating-v0.12-to-v0.13.md`](./docs/migrating-v0.12-to-v0.13.md).

---

## The Problem

AI coders write plausible-looking code that **doesn't fit your codebase**. They invent helpers when you already have one. They split files the team would keep together. They pick a logging library the project doesn't use. They handle errors with `throw` when your repo standardised on `Result<T>` three years ago.

View full repository on GitHub →