Skip to main content

Crate magi

Crate magi 

Source
Expand description

magi — a blind multi-agent implementation competition.

One task, several agents, and a graph that decides which implementation survives without a human reading the diff:

  1. implement — N agents solve the same task in isolated git worktrees, unaware of each other.
  2. judge — M judges rank the candidates blind: labels A/B/C, a per-judge presentation order, attribution trailers stripped at write time by a commit-msg hook and again at presentation time.
  3. deliberate — if the first choices disagree, the judges argue, with magi as the facilitator. A facilitator made of code cannot leak an author.
  4. vote — final votes are collected one-to-one and privately, so nobody can drift toward a visible majority.
  5. review — the winner enters a bounded review + real-machine verification loop with a fixer that may reject a finding with an argument.
  6. gate — configured commands must pass before anything merges.

Everything is recorded, so the by-products are real numbers: per-agent win rates, per-reviewer precision, and how often execution caught what static review missed. See stats.

Modules§

advise
The headless design-deliberation stage between magi plan’s interview and the task file it files.
agent
Driving agent CLIs.
ask
Questions: what an agent does when the next decision is the owner’s.
blind
Blindness: label assignment, attribution stripping, and leak detection.
bump
Release version bumps, opened automatically once a merge lands.
chat
The browser interview: magi plan for somebody holding a phone.
clean
The disk janitor: finished runs get their worktrees folded and the shared build cache is pruned to its cap. A run whose state magi cannot read is left alone here — see fold_due — and is only ever removed by an explicit operator action (magi fold, or the equivalent phone route).
config
Run configuration: the agent roster, the shape of the graph, and the blindness / verification policy.
daemon
The unattended loop: take the next task, run the graph, record what happened, take the next one.
disk
Disk accounting: how much magi’s own directories occupy, how much space is left on the volume they live on, and how the shared build cache is pruned.
git
Git plumbing.
graph
The competition graph.
land
Landing the winner: watch the pull request, fix what it complains about, and merge it.
md
GFM markdown, parsed into a serializable node tree instead of HTML.
plan
magi plan: the interview that turns an idea into a task file worth competing.
proc
Spawning child processes without putting a window on the operator’s screen.
prompt
Prompt construction.
queue
The task queue: what magi should do next, and who asked for it.
report
Terminal rendering.
repos
Local repository discovery for the plan surface’s repository picker.
rng
A seeded PRNG, so that label assignment and session ids are reproducible from a run id.
run
Run state: what happened, where it is stored, and how a run is resumed.
stats
Aggregate statistics over every recorded run.
talk
The standing conversation: a place to think out loud with an agent between tasks, reachable from a phone.
tui
The observation deck.
updater
Self-update, via kaishin.
verdict
Structured answers extracted from free-form agent output.
web
The web UI: magi’s queue and run history, readable from a phone.