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.
already
Is a branch’s change already in the base under a different commit id?
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).
chat_control
Direct task and run control for the standing chat: magi task control ....
chat_notify
Telling a chat how a task it filed ended.
chat_watch
Durable, supervised jobs started by a standing chat. Results use the same draft/turn delivery as task completion notices; jobs never run twice.
choice_effect
One description of each executable question choice, shared by cards and briefs.
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.
consult
Handing an open question to the chat conversation its task came from.
daemon
The unattended loop: take the next task, run the graph, record what happened, take the next one.
deputy
Deputies: the seat that waits on a conductor’s question, so the conductor never has to - and on land’s merge approval, whose free-text reply used to reach nobody either.
direct
Runs started by hand are tasks.
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.
fixer
The [roles] fixer fallback chain, shared by every node that asks a fixer.
followup
Follow-up tasks for the findings a merged run left open.
git
Git plumbing.
github_text
Posting gate shared by GitHub titles, descriptions and comments.
graft
The graft phase’s decisions: whether it runs and what it is told.
graft_report
What a graft round was asked to port and what the fixer says it did, for the report.
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.
merge_decision
Persisted owner decisions at the merge gate. Tokens are independent of UI prose.
notices
Notices: what needs the operator’s attention but is not a question.
persona
Personas for the standing chat: a voice, never a behaviour.
persona_icon
Persona avatars: display only, never part of the briefing.
pr_outcome
What a pull request description may say about commits and verification.
pr_recovery
Explicit recovery of a task’s public implementation, independent of historical candidates.
proc
Spawning child processes without putting a window on the operator’s screen.
prompt
Prompt construction.
question_delivery
Admission of operator text: a saved deputy is history, not a listener. Called under the question update lock as well as when rendering its card.
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.
recovery
Carrying an earlier attempt’s evidence into the run that takes its branch over.
refs
Structured implementation source selection. Instruction text is never input.
release_local
Releasing without GitHub Actions ([release] mode = "local").
release_watch
Watches every open release-bump pull request until it lands.
report
Terminal rendering.
report_view
A structured view of the run report, for the web UI.
repos
Local repository discovery: magi repos and GET /api/repos.
retention
Bounded reclamation of retained attempts and Cargo outputs. Source recovery and build eviction have separate authority: evicting a target never retires a run.
review_repair
Durable requests for bounded repair of findings at the merge gate. Old review evidence stays immutable; no merge permission is carried forward.
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.
settings
The machine-config settings screen: which agent each role resolves to, and a safe way to change those assignments.
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.
worktree_setup
[worktree] setup: what a fresh worktree needs beyond its tracked files.