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

Optimize the loop that verifies, never the loop that generates

Producing code was never the bottleneck. Reviewing it and trusting it were, and both got harder as generating got cheap. So every mechanism here attacks the verify side: the cache makes re-checking free, affected makes the check minimal, the drift gate makes generated output self-verifying, the explain lenses make verdicts inspectable, describe file makes a diff triageable. Nothing in magus exists to make producing code faster. That is a commitment, not a gap.

The test for a proposed feature is whose loop it accelerates. A pitch of "produce more, faster" fails by construction; "know sooner, trust cheaper" is at least aimed at the right loop. This prevents magus from becoming a tool whose product is throughput: volume is the one metric that gets easier to move every year and proves less every year, and a build tool that helps ship more unverified work faster has joined the problem it was built against.

The horizon for that test is years. A tool that generates on your behalf compounds dependence: what its operator can ship drifts past what they can judge, and the gap is the crutch. A tool that verifies compounds judgment, one answered question at a time.

Enforced by

Good

Each of these shortens the time to a trustworthy answer about a change that already exists:

magus affected ci
magus describe file internal/config/load.go
magus affected ci --explain

Bad

nx generate @nx/react:component Button

A scaffolder in the build tool makes more code to review, faster. It moves the loop magus exists to keep small, and the review it adds is the cost it hides.

See also

designprincipleverification
Last updated (2df714e8)
Glossary

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.

Cache

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

Affected

The set of projects touched by a change; magus affected <target> runs a target only over them. Affected 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.

Scope test

The question every proposed capability has to answer: does it read the model magus already had to build, or does it make magus learn something new about the world? Reads stay small; acquisitions are where a tool loses its shape. Scope test 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.

Conventions

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