# Writ

> Agent orchestration as contract enforcement. Author a writ; mandate, grants, bounds, proof of done and a runtime governs every action

- **Type:** MCP server
- **Install:** `agentstack add mcp-sirrobot01-writ`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sirrobot01](https://agentstack.voostack.com/s/sirrobot01)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [sirrobot01](https://github.com/sirrobot01)
- **Source:** https://github.com/sirrobot01/writ

## Install

```sh
agentstack add mcp-sirrobot01-writ
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Writ

- [Explainer](https://blog.writ.build)
- [Design Paper](https://blog.writ.build/design-paper)
- [Docs](https://docs.writ.build)

Writ is a language and runtime for bounded agent authority.

A writ file states what an agent can do and how much it can spend. It also
states what the agent must not change. The registrar checks each action
against these terms. It writes each action, check, and result to a record.

## Writ file

A writ can contain these terms:

| Term | Purpose |
| --- | --- |
| `mandate` | States the goal. |
| `grants` | Give permission for actions and resources. |
| `bounds` | Limit iterations, cost, time, and changes. |
| `invariants` | State conditions that must remain true. |
| `obligations` | State checks that must pass before satisfaction. |
| `satisfaction` | States the proof that the work is complete. |
| `remedies` | State the response to a breach. |

Example:

```yaml
writ: bug-fixer
mandate: "The failing tests pass without changes to the tests."

grants:
  - read:  { paths: ["**/*"] }
  - shell: { commands: ["pytest *"] }
  - edit:  { paths: ["src/**"] }

bounds:
  iterations: 40
  cost: $2.50
  wall_clock: 20m
  edits:
    max_changed_lines: 200

invariants:
  - layer: letter
    untouched: "tests/**"

satisfaction:
  all:
    - layer: letter
      run: "pytest -x -q"
      exit: 0

remedies:
  on_bound_breach: { do: halt, inform: issuer }
```

## Check layers

Each clause names the party that makes its check.

| Layer | Check |
| --- | --- |
| `letter` | The registrar makes a deterministic check. |
| `judgment` | A separate judge model evaluates the clause. |
| `assent` | A person makes the decision. |

The record keeps the layer with each check. A judgment is not shown as a
deterministic result.

## Run modes

Writ supports three run modes.

| Mode | Command | Coverage |
| --- | --- | --- |
| Embedded | `writ issue ` | Model turns, tool actions, effects, bounds, invariants, satisfaction, and remedies. |
| Model gateway | `writ gate ` | Model iterations, model cost, and tool names that cross the model API. |
| MCP sidecar | `writ proxy  -- ` | Tool names and arguments that cross the MCP boundary. |

The model gateway does not run tools. It cannot verify tool effects.

The MCP sidecar cannot see model iterations or model cost. It cannot verify
effects outside the MCP calls.

## Install

Install Writ with Homebrew:

```sh
brew install sirrobot01/tap/writ
```

You can also download a binary from the
[releases page](https://github.com/sirrobot01/writ/releases).

Check the installation:

```sh
writ --version
```

## Start a run

1. Create the engagement configuration.

   ```sh
   writ configure
   ```

2. Create a writ file.

   ```sh
   writ init bug-fixer
   ```

3. Add the required terms to `bug-fixer.yaml`.

4. Check the file.

   ```sh
   writ check bug-fixer.yaml --explain
   ```

5. Issue the writ.

   ```sh
   writ issue bug-fixer.yaml
   ```

6. Read the record.

   ```sh
   writ record bug-fixer
   ```

## Commands

| Command | Purpose |
| --- | --- |
| `writ init` | Create a writ file. |
| `writ check` | Validate and explain a writ file. |
| `writ configure` | Configure holders, judges, the sandbox, and assent. |
| `writ issue` | Run an agent under a writ. |
| `writ gate` | Govern an external agent at the model API boundary. |
| `writ proxy` | Govern an MCP server at the tool boundary. |
| `writ record` | Show the record of a run. |
| `writ amend` | Change the terms of a writ. |

## Development

Run all Go checks:

```sh
task check
```

Build the command:

```sh
task build
```

Read [CONTRIBUTING.md](./CONTRIBUTING.md) before you send a change.

## License

Writ uses the [Apache License 2.0](./LICENSE).

Brand files are in [`blog/brand/`](./blog/brand).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sirrobot01](https://github.com/sirrobot01)
- **Source:** [sirrobot01/writ](https://github.com/sirrobot01/writ)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-sirrobot01-writ
- Seller: https://agentstack.voostack.com/s/sirrobot01
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
