mg
← back

EILAID: an orchestrator for teams of coding agents

· 6 min read

Engineers decide. Agents build. The project remembers.

EILAID (Engineer-In-Loop AI Development) is a local orchestrator, and the first implementation of the methodology from part 1. It takes the coding-agent CLIs you already use (Claude Code, Codex, OpenCode or your own adapter) and runs them through a lane-based loop: shape, build, verify, merge. You stay in the loop at two gates, through a chat, and through an inbox of questions the agents couldn’t answer themselves. It has a site of its own at markgawlyk.com/eilaid, with the methodology and the docs.

Everything happens on a board. Cards move by themselves until they reach a gate, and then they wait for you. Go on, approve one:

eilaid · boardillustrative
An illustrative EILAID board for a payments project. Cards move left to right through six of the real lanes: Shaping, where the Shaper writes a brief; Gate 1, where you approve the brief; Building, where the Builder works test-first under a footprint lease; Verifying, where checks, then the Tester, then the Reviewer run; Gate 2, where you accept the change; and Done, once it has merged. Each card shows its key, who has it, its footprint and its token spend. Cards stop at each gate until you approve them with the card's Approve button, and a pause button stops the board. Inbox, Design, Ready and Merging are real lanes too, left out here for space.
Board
Shaping
PAY-415
Dunning emails
waiting on you
src/dunning/**
Gate 1brief
PAY-414
Receipt PDFs
waiting on you
src/receipts/**
Building
PAY-412
Partial refunds
waiting on you
src/refunds/**
PAY-409
Invoice queue
waiting on you
src/billing/**
Verifying
PAY-407
Session refresh
waiting on you
src/session.ts
Gate 2change
PAY-405
Checkout copy
waiting on you
src/checkout/**
Done
PAY-401
Revoke sessions
waiting on you
src/auth/**
PAY-398
Proration fix
waiting on you
src/prorate.ts
Six of the ten lanes. Gate cards wait on you: approve one to send it on.

The loop

Every lane change starts the right agent in the right place. A shaper writes a brief with testable acceptance criteria. A builder works test-first in its own git worktree. Then the project’s own checks run, a tester runs, and a reviewer and QA verify the work in parallel. The branch merges once you accept it.

eilaid · the loop
Step 1 of 8: Intake
laneinbox
Conductor

A request lands in the inbox and the Conductor triages it: kind, track, priority and flags. Set the kind yourself and triage is skipped.

Produces
  • kind
  • track
  • priority
  • flags: ui · perf · autoGate1
Step 2 of 8: Shape
lanesshaping→(design)
ShaperDesignerui only

The Shaper writes the brief. Epics go to the Architect instead, and UI work also gets design notes from the Designer.

Produces
  • briefs/<KEY>.md
  • acceptance checks
  • footprint
  • test plan
Step 3 of 8: Gate 1
lanegate1
EngineerPlan Criticautopilot

You read the brief and approve it, or reject it back to shaping with a comment. In autopilot the Plan Critic decides.

Produces
  • approved brief
  • gate.approved
Step 4 of 8: Build
lanesready→building
Builder

Once its dependencies are done, its footprint is free and a slot opens, the Builder works test-first in its own git worktree.

Produces
  • eilaid/<KEY>
  • footprint lease
  • test-first commits
Step 5 of 8: Verify
laneverifying
TesterReviewerQAapp or perfDesign Reviewerui

Project checks, then the Tester, then the rest in parallel. Failing checks or blocker/major findings go back to Build, up to maxAttempts.

Produces
  • check results
  • findings
  • verdict
Step 6 of 8: Gate 2
lanegate2
Engineerverify verdictautopilot

You accept the change, or send it back to building with your comment as a finding. In autopilot a passing verdict accepts it.

Produces
  • accepted change
  • gate.approved
Step 7 of 8: Merge
lanemerging
SystemMergeron conflict

EILAID merges the branch into the base with --no-ff and re-runs the tests there. On a conflict the Merger resolves it, keeping both intents.

Produces
  • --no-ff merge
  • tests on base
Step 8 of 8: Learn
lanedone
Coach

The lease and worktree are released and the Oracle re-indexes. If the item raised findings, the Coach turns them into lessons for a new agent version.

Produces
  • 1–3 lessons
  • role@N+1
  • Oracle re-index
next: Shape

The loop in order: Intake (the Conductor triages), Shape (the Shaper writes a brief, the Designer adds notes for UI work), Gate 1 (an engineer approves the brief), Build (the Builder works test-first in a worktree), Verify (project checks, then the Tester, then the Reviewer in parallel with QA when the app can run or performance is flagged and the Design Reviewer for UI work; failing checks or blocker and major findings go back to Build, up to maxAttempts), Gate 2 (an engineer accepts the change), Merge (merged with --no-ff, tests re-run on the base) and Learn (the Oracle re-indexes and the Coach turns findings into lessons).

Eight steps over the ten board lanes, inbox to done. The two gates are yours; EILAID and its agents do the rest.

Items never touch your working copy until they merge. When verification fails, the item goes back to building, up to a configurable number of attempts. And if every failing check looks like the environment’s fault rather than the change’s (a port another item holds, a command the shell can’t find), the checks are re-run once without using up an attempt.

Fifteen roles

There’s no single “agent”. There are 15 roles, each a versioned markdown spec, plus 24 shared skills. Each role has a default model tier, so the expensive models only go where judgement matters: the architect, the reviewer and the coach.

eilaid · agents15 roles
front doorinbox · chat
shapingshaping · design lanes
gate 1you, or the plan critic
buildingown git worktree
verifyingtester, then in parallel
gate 2you, or auto-accept
merginginto the base branch
knowledge & learningbeside the loop
Conductorbalancedeffort medium
The chat front door: answers, files the right tickets, starts research, reports status.
when Every chat message, and triage of inbox items that arrive without a kind.
model balanced = sonnet on Claude Code
Researcherbalancedeffort medium
Digs into what a lookup can't answer and writes a cited report that the Oracle indexes.
when Research items, or research that the Conductor or the Architect starts.
model balanced = sonnet on Claude Code
Architectfrontiereffort high
Plans an epic: stack, decisions, project commands, style guide and a DAG of child items.
when Shaping lane, for epics, often a whole new app. Its children then run in waves.
model frontier = opus on Claude Code
Shaperbalancedeffort high
Turns a request into a brief: a goal, testable acceptance criteria, a footprint and checks.
when Shaping lane, for features, bugs and chores.
model balanced = sonnet on Claude Code
Designerbalancedeffort high
Writes design notes for every state and breakpoint, and keeps the style guide current.
when Design lane, only for items flagged ui.
model balanced = sonnet on Claude Code
Plan Criticbalancedeffort medium
Reviews the brief at Gate 1: approves it, or rejects it with comments the Shaper can act on.
when Gate 1, when autonomy.gate1 is auto. Otherwise the gate is you.
model balanced = sonnet on Claude Code
Builderbalancedeffort high
Implements the approved brief test-first in the item's own git worktree, then hands off.
when Building lane, after Gate 1. A failed verify sends it back, up to 3 attempts by default.
model balanced = sonnet on Claude Code
Testerbalancedeffort medium
Maps each criterion to a test, writes missing ones, and tells real failures from flaky ones.
when Verifying lane, first and alone, as it commits tests. Also writes repros for patch bugs.
model balanced = sonnet on Claude Code
Reviewerfrontiereffort high
Reads the diff against the brief: correctness, security, scope creep, maintainability.
when Verifying lane, after the Tester, in parallel with QA and the Design Reviewer.
model frontier = opus on Claude Code
QAbalancedeffort medium
Runs the app and exercises every acceptance criterion end to end, budgets included.
when Verifying lane, in parallel, given a dev or e2e command or an item flagged perf.
model balanced = sonnet on Claude Code
Design Reviewerbalancedeffort medium
Checks screenshots against the design notes and style guide, and audits contrast and focus.
when Verifying lane, in parallel, only for items flagged ui.
model balanced = sonnet on Claude Code
Mergerbalancedeffort medium
Resolves merge conflicts so both intents survive, then re-runs the tests.
when Merging lane, only when the merge into the base branch conflicts.
model balanced = sonnet on Claude Code
Oraclefasteffort low
Answers from the project's own knowledge, with citations and an honest confidence.
when Any lane, whenever asked. Never waits for a slot; unsure answers go to a human.
model fast = haiku on Claude Code
Coachfrontiereffort high
Turns review findings and critiques into a few testable lessons or a revised spec.
when After an item is done with findings, or when you critique a role.
model frontier = opus on Claude Code
Stewardfasteffort low
Keeps the project healthy: dependencies, flaky tests, commands, docs and context.
when On request: maintenance you hand it. Small, reversible commits that avoid leased paths.
model fast = haiku on Claude Code
All 15 built-in roles, where each runs in the loop and the model tier it gets by default.

A role version is runtime + model + effort + spec. Change any of these and it becomes role@N+1, so the metrics stay comparable across versions.

Leases, not locks

Several builders run at once, each in its own worktree. What stops them from trampling each other is the brief’s footprint: a set of file globs that becomes a lease once the item starts building, and stays held until it’s done. If an item’s globs overlap an active lease, it waits in ready until that lease is released.

eilaid · buildersillustrative
Illustrative. Three builders work in parallel, each holding a lease on its footprint: PAY-412 partial refunds on src/refunds/**, PAY-410 image gallery on src/web/gallery/** and PAY-409 invoice queue on src/billing/**. PAY-413, retry failed invoices, waits in ready because its paths src/billing/retry.ts and src/billing/retry.test.ts fall inside PAY-409’s lease. When PAY-409 is verified, approved at Gate 2, merged and done, its lease is released and PAY-413 takes its own lease and starts building. The terminal follows the PAY-412 builder in its worktree .eilaid/state/worktrees/PAY-412 on branch eilaid/PAY-412: a situation report (4 in flight, 3 leases, none overlapping), request_lease for src/ledger.ts (granted), a failing test for partial refunds (1 failing, as expected), the implementation (+48 −6), 12 of 12 tests passing, a commit, and a final eilaid-result block with status done, a summary, and data with handoff, filesChanged and testsAdded. The item then moves to verifying.
PAY-409 merged and released its lease, so PAY-413 moved from ready to building.
Every builder works in its own git worktree, inside a leased footprint. Work whose footprint overlaps an active lease waits in ready until that lease is released.

Every run has to end with a fenced eilaid-result JSON block, checked against that role’s contract. Without it, the run counts as failed.

The Oracle

The Oracle is a knowledge base over your code, docs, decisions and briefs. Agents ask it before they guess. Anything it can’t answer goes to a human once, and the answer is remembered.

Retrieval is hybrid: BM25 via SQLite FTS5, a trigram index for paths and identifiers, exact grep via ripgrep, and optional embeddings. All of these are merged with Reciprocal Rank Fusion.

eilaid · oracle askillustrative

Animated mock of eilaid oracle ask. An agent’s question is expanded into five weighted queries. BM25 over SQLite FTS5 and optional vector search return a ranked list per query; a trigram index over paths and identifiers and ripgrep exact matching return one list each. A path list (files the question or its expansion names) and, for dependency questions, an inventory can join them. Weighted Reciprocal Rank Fusion merges the lists: every list adds weight / (30 + rank) to each passage it ranks. Decisions, saved answers and the asker’s own files get a small boost, and passages under a quarter of the best score are dropped. The Oracle answers with numbered citations and a confidence of none, low, medium or high. A low-confidence answer goes to the owning human once, and their reply is saved, indexed and found first the next time. Buttons below pick an example question, and each fused row shows how its score adds up.

Yes. Every mutating payments endpoint takes an Idempotency-Key . Wrap createRefund in the idem middleware , the way charges.ts already does .

Every list adds w / (30 + rank) to each passage it ranks. Hover, focus or tap a fused row to see its sum.

The fusion itself is this small:

/**
 * Reciprocal Rank Fusion: score(d) = Σ 1 / (k + rank_d), ranks from 1.
 * Rank-based, so bm25 (negative, unbounded) and cosine (-1..1) mix fairly.
 */
export function rrf(lists: Array<Array<{ id: string }>>, k = 60): Array<{ id: string; score: number }> {
  return weightedRrf(lists.map((items) => ({ items, weight: 1 })), k);
}

export function weightedRrf(lists: Array<{ items: Array<{ id: string }>; weight: number }>, k = 60): Array<{ id: string; score: number }> {
  const scores = new Map<string, number>();
  for (const { items, weight } of lists) {
    const seen = new Set<string>();
    items.forEach((it, rank) => {
      if (seen.has(it.id)) return; // a duplicate within one list counts once, at its best rank
      seen.add(it.id);
      scores.set(it.id, (scores.get(it.id) ?? 0) + weight / (k + rank + 1));
    });
  }
  return [...scores.entries()].map(([id, score]) => ({ id, score })).sort((a, b) => b.score - a.score || (a.id < b.id ? -1 : 1));
}

Retrieval calls it with RRF_K = 30 rather than the default 60. Each list is only 20 deep, and a smaller k keeps the rank differences meaningful.

Two deadlocks

Agents block on the Oracle while they wait for an answer. If Oracle runs had to queue behind the very agents waiting on them, nothing would ever finish. The fix is a set of purposes that never take a concurrency slot:

/** Purposes that never wait for (or take) a concurrency slot. */
export const SLOT_EXEMPT_PURPOSES: ReadonlySet<string> = new Set(["oracle", "oracle-expand", "chat"]);

The second one turned up in a real benchmark run. A blocked item keeps its lease, since it still owns the work in its worktree. That’s right, until a few blocked items hold up everything else and the board freezes with nothing running. Now, when nothing else can run and a blocked item’s lease is the only thing in the way, the lease is released, and the item takes a fresh one when it resumes.

Boring tech, on purpose

EILAID is one Node process, one SQLite file and your git repo. It’s TypeScript run directly by Node’s built-in type stripping, so the backend has no build step. The backend’s only dependencies are yaml and picomatch; everything else (node:sqlite, node:http, child_process, crypto) ships with Node. The MCP server that agents use to talk to the daemon is hand-written JSON-RPC.

Spending has limits at three levels. A run that blows its budget is stopped live, an item over its budget gets no new runs, and a daily cap pauses the dispatcher until tomorrow.

Does it work?

The honest way to answer that is to build real things with it, so that’s what I’m doing. Each project starts as a brief, I sit at the two gates, and EILAID does the rest. Every project gets a write-up of its own too, with the numbers and the bits that went wrong.

Click a picture to open the app itself, or read more for how it was built.

Syzygy showing the total solar eclipse of 8 April 2024: a dotted globe with the path of totality across Mexico and the United States, the eclipse list beside it and a timeline of eclipses below.Syzygy showing the total solar eclipse of 8 April 2024: a dotted globe with the path of totality across Mexico and the United States, the eclipse list beside it and a timeline of eclipses below.
8 April 2024, 18:17 UT. The Moon's shadow over Mexico.open syzygy ↗

Syzygy

A solar system explorer and eclipse finder that runs entirely in your browser and agrees with NASA on all 913 eclipses from 1900 to 2100. It's a cut-down version of one of EILAID's own benchmark briefs, and the first night shipped 43 items without a line of code from me.

read more about Syzygy
Ponder in a Ruy Lopez after 11.d4, with the engine thinking: a hatched ink chessboard with flat geometric pieces and numbered amber arrows for the line it expects, and on the right the search lens listing its candidate moves led by Qc7, the depth and the line written out.Ponder in a Ruy Lopez after 11.d4, with the engine thinking: a hatched ink chessboard with flat geometric pieces and numbered amber arrows for the line it expects, and on the right the search lens listing its candidate moves led by Qc7, the depth and the line written out.
11.d4 in the Ruy Lopez, and the engine mid-thought.open ponder ↗

Ponder

Chess with a visible mind: an engine written from scratch, about 2,320 on the CCRL Blitz scale, that shows you how it thinks while it thinks. Watch it play itself at different think times, x-ray its search, and review your games. 29 hours, 101 items, none of the app's code by hand.

read more about Ponder
A 3D Rubik's cube on a white page, solved, with white on top, green in front and red on the right, under the tabs play, set up and camera.A 3D Rubik's cube on a white page, solved, with white on top, green in front and red on the right, under the tabs play, set up and camera.
Scramble it, race the clock, show it to the camera, or ask it to show you.open twenty ↗

Twenty

A Rubik's cube you can play, and a solver for the one on your desk, from a camera or by hand, with its own two-phase solver written from scratch and six looks from classic to neon. EILAID built it in a day: 95 items, none of the code mine.

read more about Twenty

↑↓ move · ↵ run · esc close