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
Data and pure logic for the design-deliberation stage.
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.
blockers
Dependency inventory for blocked tasks.
bump
Release version bumps, opened automatically once a merge lands.
cache
Durable ownership of the shared Cargo build cache (CARGO_TARGET_DIR).
clean
The disk janitor: finished runs get their worktrees folded, worktrees whose run record is already gone get reclaimed too, and the shared build cache is pruned to its cap.
conduct
The conductor: a single agent seat that arranges the queue.
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.
dupes
Duplicate-work detection at the moment work is filed.
git
Git plumbing.
graph
The competition graph.
handover
Taking a branch over from an earlier attempt at the same task.
land
Landing the winner: watch the pull request, fix what it complains about, and merge it.
lang
One reading of [graph] language, shared by everything that has a translated wording table.
md
GFM markdown, parsed into a serializable node tree instead of HTML.
notices
Notices: what needs the operator’s attention but is not a question.
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.
rebase
Rebasing the winning branch onto a moved base, with a fixer for conflicts.
reconcile
Deciding what a local branch and its remote twin mean when both moved.
refs
References a task makes to work that already exists in the repository.
report
Terminal rendering.
repos
Local repository discovery: magi repos and GET /api/repos.
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.
scrub
Last-line scrub for text that lands on GitHub.
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.
triage
Held-task triage: walking held tasks so a hold left by an accident does not sit unread forever next to one a human placed on purpose.
tui
The observation deck.
updater
Self-update, via kaishin.
verdict
Structured answers extracted from free-form agent output.
waiter
The waiter: something that keeps waiting on a question after the process that asked it is gone.
web
The web UI: magi’s queue and run history, readable from a phone.