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.
Boardpayments
4 agents running2 waiting on you
Shaping1
Empty
PAY-415Shaper
Dunning emails
reading the code
waiting on you
src/dunning/**
16k tok1/3$0.12
Gate 1brief1
Nothing waiting on you
PAY-414you
Receipt PDFs
waiting on you
src/receipts/**
58k tok1/3$0.43
Building2
Empty
PAY-412Builder
Partial refunds
running pnpm test
waiting on you
src/refunds/**
296k tok1/3$2.22
PAY-409Builder
Invoice queue
queue.test.ts
waiting on you
src/billing/**
112k tok1/3$0.84
Verifying1
Empty
PAY-407Tester
Session refresh
writing tests
waiting on you
src/session.ts
731k tok2/3$5.48
Gate 2change1
Nothing waiting on you
PAY-405you
Checkout copy
waiting on you
src/checkout/**
604k tok1/3$4.53
Done2
Nothing merged yet
PAY-401merged
Revoke sessions
waiting on you
src/auth/**
466k tok1/3$3.50
PAY-398merged
Proration fix
waiting on you
src/prorate.ts
512k tok1/3$3.84
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
01 / 08IntakeConductor
02 / 08ShapeShaper
03 / 08Gate 1Engineer
04 / 08BuildBuilder
05 / 08VerifyTester·Reviewer
06 / 08Gate 2Engineer
07 / 08MergeSystem
08 / 08LearnCoach
verify fails → back to Build, ≤ maxAttemptsclick any step to jump intap any step to jump in
01
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
02
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
03
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
04
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
05
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
06
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
07
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
08
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
default tier
followinga ui featureon autopilot
01front doorinbox · chat
02shapingshaping · design lanes
gate 1you, or the plan critic
03buildingown git worktree
04verifyingtester, then in parallel
gate 2you, or auto-accept
05merginginto the base branchmerged clean
∞knowledge & learningbeside the loop
running
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.
Leasesfootprints, held from building until doneoverlapping work waits in ready
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 ask1,284 chunksillustrative
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.
builder · PAY-412Does createRefund need an idempotency key?
Try
1Expandllm · the question plus the asker’s item and footprint
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.
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.
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.
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.