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

Harness

The deterministic scaffolding around the work on a change, whoever does it: compiler errors, formatters, linters, checks, permission gates, typed contracts, leases, graph-backed answers and hooks, placed at points a person chose, with judgment covering the steps between them. It holds a person to the green path the same way it holds an agent (A harness is not an agent thing). Around a model's agent loop, magus supplies one (guard hooks, skills, MCP tools, job leases) and keeps it outside the host's loop. Some vendors use the word for the loop itself; magus keeps the two apart.

  • Is: code and reviewed text that answer or decide the same way every time.
  • Is not: the model, the agent loop that reads a tool call and runs it, an agent framework, or a prompt.
  • Layers, from the inside out: the model; the host's agent loop (Claude Code, Codex, Cursor, OpenCode); the harness magus supplies; magus's deterministic workspace model, which the harness reads.

Elsewhere

Anthropic calls Claude Code and the Claude Agent SDK an agent harness: the loop that sends the model a prompt, runs the tools it calls and feeds back the results. A test harness is the scaffolding that drives code under test. magus means neither: its harness is the deterministic checks around a host's loop, and the loop stays the host's.

Example

magus describe harness shows what a wired host needs: the guard hooks, the skills and the MCP tools magus supplies.

magus describe harness

Used in

In the docs:

See also

glossaryagents
Last updated (2df714e8)
Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. Workspace 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.

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.

Knowledge graph

The queryable graph of a workspace's spells, targets, docs, and code relationships; query it with magus query/explain/path. Knowledge graph 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.

Job

The unit of delegated work, and one row of the job store: what an orchestrating agent handed out, with its goal, the checkpoint it was cut against, the paths it may write or must not touch, and the one check it runs. A job's holder is either a session, for work an orchestrator handed out, or the daemon, for its own maintenance. The store records; the agent guard is what reads those facts back when grading a write. Job 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.

Lease

The grant a holder takes on a job: the write and read paths that job declared, enforced in the checkout that took it with magus job exec. A job is the piece of work; a lease is permission over it. Lease in full.

Conventions

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