Built for agents
The people who run Metrics Book set it up, change it and use it mostly through an agent. So every command, file and API is built for an agent first and a person second.
Files are the interface
Section titled “Files are the interface”Everything that defines a project is a file in git: pipelines, dbt models, metrics, terms, reports, access policy, budgets and the brand. A command is a faster way to edit those files, and mb check guards both routes. An agent that edits a file by hand and an agent that runs a command end up in the same place, checked by the same rules.
Nothing prompts
Section titled “Nothing prompts”No command stops to ask a question. Each one finishes on its own and exits with one of three codes:
| Exit code | Means |
|---|---|
| 0 | done |
| 1 | refused, or a check failed |
| 2 | used wrongly: flags that conflict, or no project to run in |
One JSON result
Section titled “One JSON result”Every command takes --json and then prints one JSON document to stdout and nothing else. The shape is the same for every command: what it changed, every check it ran with the measured value, and every refusal. Output describes each field.
Refusals say how to pass
Section titled “Refusals say how to pass”A refusal carries a stable code, the field it is about, the measured value, the rule it broke and a suggestion that would pass. Here mb brand name refuses a name that is too long:
{ "code": "name_length", "field": "brand.name", "value": "45 characters", "rule": "1 to 40 characters", "suggestion": "Northwind Outdoor Group Sales and Margin"}The agent reads the suggestion and tries again, without asking anyone. Codes never change silently: refusal codes lists every one, and a test fails when that list and the code differ.
Changes apply all or none
Section titled “Changes apply all or none”A change that touches several files writes all of them or none. --dry-run runs the whole change on a copy and shows it as a diff, so an agent can check what would happen before it happens.
Documented where agents look
Section titled “Documented where agents look”Each feature is described in two places an agent reads anyway: the managed block of the project’s AGENTS.md, and mb <command> --help. mb --help --json lists every command, flag and refusal code in one document.
The same rules for Claude Code, Codex and Cursor
Section titled “The same rules for Claude Code, Codex and Cursor”A project made by mb init carries the instructions and settings for Claude Code, Codex and Cursor. All three read the same AGENTS.md; there is no CLAUDE.md. The agent proposes changes as pull requests, and a person merges them.