Manuscript Documentation
v2026.12.0

Working with an agent#

Install the standalone skill, let the agent iterate on ms check --test, and review its diff with ms map.

Give the agent the skill#

The skill is a short guide to writing Manuscript, with the language version it targets. It installs without the compiler, so an agent machine or a CI image can get it on its own:

sh
curl -fsSL https://manuscript-lang.github.io/manuscript/install-skill.sh | sh

On Windows:

powershell
irm https://manuscript-lang.github.io/manuscript/install-skill.ps1 | iex

It writes manuscript/SKILL.md and its references into .claude/skills and .agents/skills, and never overwrites an existing skill. Install it before the agent starts, so the agent loads it on its own. Each release also attaches manuscript-skill.tar.gz; set MS_VERSION to the release you want to take that version of the skill.

The agent’s loop#

The agent writes {totl} in invoice.ms where it meant {total}. ms check names the problem, and applies the repair when it is mechanical:

sh
ms check --only types invoice.ms --fix
text
ms: applied 1 fix in 1 file
Checked invoice.ms

Every diagnostic reads <cause>; <fix>, so it says what is wrong and what to write instead. When a repair needs a decision about meaning, the message explains it and leaves the edit to the agent. --json returns the same diagnostics as data.

Three commands cover the rest:

  • ms search read file finds a project or standard-library API and prints its signature, so the agent never needs the whole manual in context.
  • ms check --test runs the checker, the formatter check, lint and tests, and returns one exit code. The agent loops until it is zero.
  • ms test --json returns a failed test as data: kind, values, position and trace.

You review the change#

Instead of reading the diff top to bottom, start from what changed:

sh
ms map ms.toml --format html -o code-map.html
git diff main | ms map --view review ms.toml --diff -

The code map is one offline file with source, types, calls and ownership side by side. ms map --view review --diff compares the checked program before and after the diff and ranks what to look at first: changed contracts, error flow and resource scopes.

A change review in the code map: place_order can now print, with its edited lines inline, the callers that gain the effect, and the review queue on the left A change review in the code map: place_order can now print, with its edited lines inline, the callers that gain the effect, and the review queue on the left
Start from the first change in Look here first; J and K move between changes.

The code map’s Overview of run_command: run calls it, and it calls arity, place_order, quantity, report and valid_sku, with changed functions outlined The code map’s Overview of run_command: run calls it, and it calls arity, place_order, quantity, report and valid_sku, with changed functions outlined
Overview of a function: who calls it and what it calls, with changed functions outlined.

See the interactive code map .

Next: Cookbook . Exact rules: Commands for agents , Diagnostics .