magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
2 min read

The outer harness stays outside

magus is the outer harness: deterministic guides and sensors around an agent host's loop, never the loop itself (Prior art and terminology). The host is the inner harness. It decides what reaches the model and what a tool call does, and magus never enters that path.

So magus judges and informs; it does not transform. A guard verdict allows, advises or denies an action and gives its reason. It never rewrites the command, the prompt or the reply on the way through. The text an agent loads from magus (skills, MAGUS.md, the AGENTS.md section) is written ahead of time. It lives in version control, and people review it like code. Compression, proofreading and regeneration happen to those files, never at session start and never per request. magus runs no proxy between an agent and its provider and no step that edits context in flight.

The reason is ownership. A provider changes how its harness loads context, caches it and calls tools on its own schedule, and a layer that rewrote text in flight would break quietly when it did: the same trade as The host wiring is yours. It would also make the text a model saw differ from the text a person reviewed, and then version control no longer records what the model read.

Enforced by

  • A guard verdict has three outcomes, allow, advise and deny, and none of them carries a rewritten command.
  • Skills, MAGUS.md and the AGENTS.md section are files in version control. Targets regenerate them, and the drift gate checks them.
  • A record of refusals lists the proxy and the model adapter as not built.

Good

The guard refuses and names the command to run instead; the agent runs it itself:

`buzz | head` needs no pipe: `-s` stays quiet until something fails, then prints the diagnostics and the log path.

Bad

hook: rewrite `go test ./...` to `magus run test .` and continue

The model believes it ran one command while another ran. The transcript a person reviews no longer says what happened.

See also

designjudgmentagentsharness
Last updated (2df714e8)
Glossary

Target

A named operation (build, test, ...) you invoke with magus run <target>; it may compose a spell's tool-native operations and depend on other targets. Target in full.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). Op in full.

Buzz

The language magusfiles are written in (the .buzz engine). Buzz in full.

Cache

The content-addressed store magus consults before running a target, so unchanged work is skipped. Cache in full.

CI

An ordinary target you compose yourself with ctx.needs; magus does not hardcode its stages. It is the anchor magus affected ci keys off, and ci strips the rw charm. CI in full.

MAGUS.md

The committed routing index at a workspace root, regenerated from the knowledge graph: it lists every node and points at the exact query for a given question, so it is the entry point an agent reads first. MAGUS.md in full.

Ownership

An insight lens for author concentration: the primary author and their share, the distinct-author count (the bus factor), and abandonment. Ownership in full.

Agent

A model working through an agent host such as Claude Code, Codex, Cursor or OpenCode. magus treats an agent as one more caller of its CLI, MCP tools and console, held to the same checks as a person. Agent in full.

Tool

An action a model can call through its host: a name, a description, a typed input and a result. magus serves its tools over MCP, each a read of the workspace model or a run of the CLI it already has. Tool in full.

Harness

The deterministic scaffolding around the work on a change, for a person or an agent: compiler errors, formatters, linters, checks, gates, leases and hooks, placed at points a person chose. Around an agent's loop, magus supplies one and keeps it outside. Harness in full.

Skill

A packaged set of instructions an agent host loads when a task matches its description: a directory holding a SKILL.md. magus ships its magus-* skills in the binary and writes them with magus agent install. Skill in full.

Session

An agent host's conversation, by the id the host delivers to its hooks. magus never mints one: a record with no session is unattributed, and the OS user it carries says whose account ran it. Session in full.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate. Run in full.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.