Skip to content

Command line

The native command line of the Rust executable, every command and argument, as clap declares it.

Majordomus control plane: a data-driven MCP server over the repository's .ai/ layer

The Rust executable of Majordomus. It reads the repository's provider-neutral AI layer under .ai/ and serves it to MCP clients over stdio. Almost every capability is a query; the few that change anything declare themselves as commands and are listed by `capabilities list --kind command`. Most of the task lifecycle (init, start, check, finish, doctor, ...) is the shell tool bin/majordomus in the same repository. Development semantics are converging onto capabilities of this registry one at a time (ADR 0040); until one has, this executable does not implement that command.

Declared once in apps/majordomus-cli/src/cli.rs; this page, --help and docs/generated/cli.md are projections of it. The task lifecycle (init, start, finish, doctor, ...) is the shell tool, documented under Commands.

majordomus

Majordomus control plane: a data-driven MCP server over the repository's .ai/ layer

The Rust executable of Majordomus. It reads the repository's provider-neutral AI layer under .ai/ and serves it to MCP clients over stdio. Almost every capability is a query; the few that change anything declare themselves as commands and are listed by `capabilities list --kind command`. Most of the task lifecycle (init, start, check, finish, doctor, ...) is the shell tool bin/majordomus in the same repository. Development semantics are converging onto capabilities of this registry one at a time (ADR 0040); until one has, this executable does not implement that command.

majordomus <COMMAND>

/docs/cli/ — this command on its own page

Subcommands: mcp, serve, capabilities, generate, bench, scope, web, why, devtask, distribution, env, commands, completion, worktree, prs, offload, convergence, commit, product, release, quality, run, executions, devcontext, guard, mesh, monitor, models, reasoning, evidence, served, deploy, rules, intent, delivery, plan, economics, entity, shell, layout, pack, dashboard, brief, blackboard, skills, knowledge, continuity.

Arguments: none.

majordomus mcp

Serve the repository's AI layer to an MCP client over stdio

majordomus mcp [OPTIONS]

/docs/cli/mcp/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--inspect flag — Print what would be served, and every diagnostic, then exit without serving
--format text | json text Output shape of --inspect
  • text — Lines for a person
  • json — One JSON document, deterministic
--transport stdio stdio The transport to serve on
  • stdio — One JSON-RPC frame per line on stdin and stdout
--standalone flag — Serve this client alone: no shared server, no HTTP, no Swagger UI, no peers, and nothing written anywhere. The default is the shared server (below)
--http-host <HOST> — Interface the shared server binds when this process is the one that starts it; without it, the one `MAJORDOMUS_HTTP_HOST` names on this machine, and loopback (`127.0.0.1`) when that is unset
--http-port <PORT> — Port the shared server binds when this process starts it; without it, the port this checkout derives (8741 for the primary checkout). When it is taken, a free port is used instead and the URL is logged on stderr either way

Examples

  • See what would be served, without serving it

    Builds the registry and the index of the repository in the working directory and prints the repository, the capabilities, the objects and every diagnostic, then exits. Nothing is served and nothing is written.

    $ majordomus mcp --inspect

    What it asserts: exits 0; prints repository, capabilities.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as one JSON document for a script

    The shape `--inspect` prints for a person, as JSON: the repository, its discovery mode, the capabilities and the diagnostics, deterministic and safe to diff.

    $ majordomus mcp --inspect --format json

    What it asserts: exits 0; prints one JSON document carrying /repository/repository/root, /tools.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Serve one MCP client on stdio

    The form an MCP client spawns: JSON-RPC frames in on stdin, frames out on stdout, logs on stderr, and the session ends at end of input. `--standalone` keeps this process to itself: no shared server, no HTTP, nothing written anywhere.

    $ majordomus mcp --standalone

    What it asserts: answers initialize and tools/list on stdio, and exits 0 at end of input.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus serve

Serve the same capabilities over HTTP on the loopback interface, with the home page, /openapi.json, /swagger and the documentation under /docs/

majordomus serve [OPTIONS] [COMMAND]

/docs/cli/serve/ — this command on its own page

Subcommands: status, ensure, stop.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--host <HOST> — Interface to bind; without it, the one `MAJORDOMUS_HTTP_HOST` names on this machine, and loopback (`127.0.0.1`) when that is unset
--port <PORT> — Port to bind; without it, the port this checkout derives (8741 for the primary checkout); 0 picks a free one and the address is logged on stderr
--fallback flag — When the port is taken, bind a free one instead and log both; without this a taken port is an error
--idle <SECONDS> 0 Stop when no peer has been attached for this many seconds; 0 runs until stopped. What a server no client owns is started with
--deployment <ID> — Bind the address this deployment object declares (`.ai/repo/deployments/<ID>.yaml`) instead of the local default. What a hosted process is started with; the address is the object's, not this command line's
--node-seed-env <VAR> — The environment variable holding this node's mesh key, a 64-hex seed: a hosted hub keeps one key across restarts on a disk that does not survive them, and without the variable its mesh stays off rather than minting a key nobody trusts (ADR 0220). The value is read, never printed. What a deployment's generated start command passes
--advertise <URL> — The one endpoint this node advertises to the mesh, instead of the addresses of the interface it binds: the public URL a hosted hub answers on (ADR 0220). What a deployment's generated start command passes

Examples

  • Serve the same capabilities over HTTP on a free port

    Port 0 asks the operating system for a free port; the address is logged on stderr. `/` is the home page, generated from the surfaces this process resolved; the document at /openapi.json is the same one `majordomus generate` commits; /swagger is the Swagger UI over it; /docs/ is this repository's documentation when it has been built for that mount.

    $ majordomus serve --port 0

    What it asserts: binds a port, answers GET /openapi.json, exits 0 when stopped.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus serve status

Where this checkout's server stands — absent, starting, ready, outdated or stale — and every server of the repository

majordomus serve status [OPTIONS]

/docs/cli/serve/status/ — this command on its own page

argumentvaluedefaultdescription
--checkouts repository | this repository Which checkouts to answer for: every checkout of the repository, or this one alone — which reads no other checkout's lease and probes no other server
  • repository — Every checkout git registers for the repository, the primary first — a lease read and a probe each. The default, because it is the answer this capability gave before there was anything to ask
  • this — This checkout alone. No other checkout is enumerated, no other lease is read and no other server is probed; `servers` holds the one entry, and it is this one
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Where this checkout's server stands, and every server of the repository

    The standing of this checkout's server measured against what this executable would serve, the lease it holds, and every checkout git registers for the repository with its own server. Asked of the running server when there is one, so that the answer includes the lease that process holds; answered locally otherwise.

    $ majordomus serve status

    What it asserts: exits 0; prints standing.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus serve ensure

Make sure a ready server serves this checkout: start one when there is none or the lease is stale, wait for one that is starting, and report where it stands

majordomus serve ensure [OPTIONS]

/docs/cli/serve/ensure/ — this command on its own page

argumentvaluedefaultdescription
--port <PORT> — The port the started server asks for first, without it the one this checkout derives (8741 for the primary checkout); a taken one is replaced by a free one
--idle <SECONDS> — The started server stops when no peer has been attached for this many seconds; without it, the policy's declared `server.idle_seconds`, 900 when none is declared
--wait <SECONDS> 20 How long to wait for a server to become ready before reporting what stands
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Make sure a server serves this checkout, and let it end when idle

    Starts a server as a process of its own when none answers, waits until it is ready, and prints one line: the standing, the address, the pid. Run again, it finds the server ready and starts nothing. `--idle` is how long the started server outlives its last peer; one second here, so that the example leaves nothing behind.

    $ majordomus serve ensure --idle 1 --wait 30

    What it asserts: exits 0; prints ready.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus serve stop

Stop this checkout's server — the one its lease names, when it answers for this checkout — and wait for that server's lease to go, which another process taking the checkout over does not undo

majordomus serve stop [OPTIONS]

/docs/cli/serve/stop/ — this command on its own page

argumentvaluedefaultdescription
--wait <SECONDS> 10 How long to wait for the server to end
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Stop this checkout's server, when there is one

    Signals the server this checkout's lease names, when it answers for this checkout, and waits for that server's lease to go — the one it read, by its token, so a second process taking the checkout over in the same instant is reported rather than mistaken for a server that would not stop. A checkout with no lease has nothing to stop, and says so.

    $ majordomus serve stop

    What it asserts: exits 0; prints nothing to stop.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus capabilities

Introspect the capability registry: what exists, where it came from, how it is exposed

majordomus capabilities [OPTIONS] <COMMAND>

/docs/cli/capabilities/ — this command on its own page

Subcommands: list, describe, schema, projections, validate.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

majordomus capabilities list

Every capability, one line each, with its projections

majordomus capabilities list [OPTIONS]

/docs/cli/capabilities/list/ — this command on its own page

argumentvaluedefaultdescription
--kind <KIND> — Only this kind: query or resource
--exposure <EXPOSURE> — Only capabilities exposed through this projection: mcp, http or cli
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Which capabilities the command line itself dispatches to

    One line per capability exposed through the `cli` projection, with the projections of each. The registry answers this; no list of capabilities is written in the command line's own declaration.

    $ majordomus capabilities list --exposure cli

    What it asserts: exits 0; prints capabilities.list, capabilities.describe.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Every capability as one JSON document

    The whole registry for a script: each capability with its kind, its provenance and every projection it has.

    $ majordomus capabilities list --format json

    What it asserts: exits 0; prints one JSON document carrying /capabilities.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus capabilities describe

One capability by canonical id: schemas, provenance, every projection

majordomus capabilities describe [OPTIONS] <ID>

/docs/cli/capabilities/describe/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The canonical id
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • One capability in full, by its canonical id

    Its kind, its input and output schemas, where it was composed, and every projection of it: the MCP tool or resource, the HTTP route, the CLI path.

    $ majordomus capabilities describe objects.get

    What it asserts: exits 0; prints objects.get, GET /api/v1/object.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus capabilities schema

The canonical input or output JSON Schema of one capability

majordomus capabilities schema [OPTIONS] <ID>

/docs/cli/capabilities/schema/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The canonical id
--side input | output input Input or output
  • input — The schema of the input
  • output — The schema of the output
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • The canonical output schema of a capability

    The JSON Schema the MCP and OpenAPI projections are derived from; `--side input` prints the schema of what the capability accepts.

    $ majordomus capabilities schema objects.get --side output

    What it asserts: exits 0; prints one JSON document carrying /title.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus capabilities projections

Where each capability is projected, and every claim its surface does not answer

majordomus capabilities projections [OPTIONS]

/docs/cli/capabilities/projections/ — this command on its own page

argumentvaluedefaultdescription
--module <MODULE> — Only capabilities composed in this module
--unmet flag — Only the capabilities whose declared exposures are not all answered
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Every exposure a capability claims that its surface does not answer

    `rows: 0` is the closure `project.interfaces-are-projections` asks for: every declared command line, route and tool is answered by the surface that carries it. The commands no capability claims are reported beside it, as the measure of how much of the command line is still hand-written.

    $ majordomus capabilities projections --unmet

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Where one module's capabilities appear

    A row per capability with the command line, HTTP route and MCP tool it reaches, so a capability that exists but is reachable from nowhere is visible as one.

    $ majordomus capabilities projections --module worktree

    What it asserts: exits 0; prints worktree.topology, majordomus worktree topology.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus capabilities validate

Build the registry and every projection; exit 10 with every violation named

majordomus capabilities validate [OPTIONS]

/docs/cli/capabilities/validate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Prove the registry and every projection of it

    Builds the registry, the MCP and HTTP surfaces, the OpenAPI document, the command line's documentation and the benchmark coverage, and names every failure. Exit 10 when anything is unmet.

    $ majordomus capabilities validate

    What it asserts: exits 0; prints validate: 0 failure(s), OK cli.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus generate

Write the committed projections of the registry (docs/generated), or check that they are current

majordomus generate [OPTIONS] [TARGET]

/docs/cli/generate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
<TARGET> all | openapi | docs | benchmarks | registry | allow | providers | editors | site | manifest | distribution | web | changelog | deployment | graph | entities | design | economics all What to generate
  • all — Every target
  • openapi — `docs/generated/openapi.{json,yaml}`
  • docs — `docs/generated/capabilities.md`, `docs/generated/modules/<id>.md` and `docs/generated/cli.{md,json,yaml}`
  • benchmarks — `docs/generated/benchmarks.{md,json,yaml}`: every benchmark target and the coverage
  • registry — `docs/generated/registry.{json,yaml}`: the builtin registry as data
  • allow — The shell tool's allow-lists under share/allow, derived from the schemas
  • providers — The provider bootstraps the policy declares (AGENTS.md, CLAUDE.md, ...)
  • editors — The files Zed and Google Antigravity read: `.agents/skills/<id>/SKILL.md` for every active skill, and `.zed/tasks.json` from the tracked justfile
  • site — site/data/registry/registry.json, the registry dataset the site renders
  • manifest — docs/generated/artifacts.{json,yaml,md}: the index of every generated artifact
  • distribution — The installer, the installation guide, the release build matrix and the public release metadata, from share/distribution.yaml and .ai/repo/releases/; and share/version.txt, the version the shell tool ships with, from the crate manifest
  • web — `docs/generated/web.json`: the resolved web topology the site's route reference renders
  • changelog — `docs/generated/changelog.{json,yaml,md}`: the changelog composed from the layer's release records, its decisions and the repository's commits
  • deployment — deploy/Dockerfile and .dockerignore, from the deployment objects
  • graph — docs/generated/graph.json and its schema: the composed graph as data
  • entities — docs/generated/entities.json: the site's entity projection of the composed graph
  • design — The design system's projections, from share/design/tokens.yaml: the stylesheets both Tailwind builds import, the tokens and the declaration compiled into the crate, every copy of the brand, site/data/registry/design.json and docs/generated/design.*
  • economics — docs/generated/economics.{json,yaml,md}: the token-economics evidence and its report, computed from the recorded benchmark runs by the one calculator
--check flag — Compare with what is on disk and exit 10 when stale; write nothing
--out <DIR> — Write under this directory instead of the repository root (docs/generated is appended)

Examples

  • Write every committed projection

    The OpenAPI document, the capability reference, the command-line reference and its JSON, the registry manifest, the benchmark matrix, the shell tool's allow-lists, the provider bootstraps and the site's registry dataset — all from the one registry and the one clap declaration.

    $ majordomus generate

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Refuse a tree whose projections are stale

    Writes nothing and compares instead: exit 0 when every committed projection is what the sources produce, exit 10 with each stale file named. This is the form CI runs.

    $ majordomus generate
    $ majordomus generate --check

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • One target only

    Each target can be written on its own while a change is iterated on; `majordomus generate` with no target writes all of them.

    $ majordomus generate openapi

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Check one target without writing it

    `--check` composes with a target: here only the registry dataset the site renders is compared with what the sources produce, exit 10 naming it when it is stale.

    $ majordomus generate site
    $ majordomus generate site --check

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus bench

Time every externally callable operation (each capability directly, over MCP and over HTTP, and the transports' own operations), report coverage, compare with the accepted baseline

majordomus bench [OPTIONS] [COMMAND] [ID]

/docs/cli/bench/ — this command on its own page

Subcommands: coverage, baseline.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
<ID> <ID> — Only targets of this capability id, or whose key starts with this text
--transport all | direct | mcp | http | system all Only this transport
  • all — Every target
  • direct — Capabilities through the executor, in process
  • mcp — Capabilities through a real `majordomus mcp` child
  • http — Capabilities over a real loopback socket
  • system — The transports' own operations only
--profile quick | full | ci quick How much to measure
  • quick — Fast developer feedback: few samples
  • full — Stable evidence: many samples, many cold spawns
  • ci — Conservative: structural gates plus a modest measurement
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--check flag — Compare with the accepted baseline of this platform under .ai/repo/benchmarks/rust/policy.yaml; exit 10 on a regression
--no-write flag — Do not write the result under .ai/local/benchmarks/

Examples

  • Time the capabilities in process

    The quick profile takes few samples, and `--transport direct` measures the executor without spawning a server. Nothing is written under .ai/local/ with `--no-write`.

    $ majordomus bench --transport direct --profile quick --no-write --format json

    What it asserts: exits 0; prints one JSON document carrying /results, /profile.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus bench coverage

Every required target and whether it is covered; the denominator is generated from the registry

majordomus bench coverage [OPTIONS]

/docs/cli/bench/coverage/ — this command on its own page

argumentvaluedefaultdescription
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--check flag — Exit 10 when any required target is missing or waived
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Every required benchmark target and whether it is covered

    The denominator is generated from the registry: every executable capability, on every transport it is exposed on, plus the transports' own operations.

    $ majordomus bench coverage --format json

    What it asserts: exits 0; prints one JSON document carrying /lines, /tallies.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Fail when a target is missing

    Exit 10 when any required target is uncovered or waived, so a capability that nothing times cannot be merged.

    $ majordomus bench coverage --check

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus bench baseline

The accepted baseline of this platform under .ai/repo/benchmarks/rust/

majordomus bench baseline [OPTIONS] <COMMAND>

/docs/cli/bench/baseline/ — this command on its own page

Subcommands: update.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

majordomus bench baseline update

Run the benchmarks and record them as this platform's baseline (a reviewable, tracked file)

majordomus bench baseline update [OPTIONS]

/docs/cli/bench/baseline/update/ — this command on its own page

argumentvaluedefaultdescription
--profile quick | full | ci full How much to measure
  • quick — Fast developer feedback: few samples
  • full — Stable evidence: many samples, many cold spawns
  • ci — Conservative: structural gates plus a modest measurement
--allow-dirty flag — Record even from a dirty work tree
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • Record this platform's accepted baseline

    Runs the benchmarks and writes the result under .ai/repo/benchmarks/rust/ as a tracked, reviewable file. The full profile is the default; the quick profile is for trying the path out. A dirty work tree is refused unless --allow-dirty says otherwise.

    $ majordomus bench baseline update --profile quick --allow-dirty

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus scope

The repository scope: what a worker reads and what it never reads; with paths, whether each is in or out and why

majordomus scope [OPTIONS] [PATHS]

/docs/cli/scope/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
<PATHS> <PATHS> — Repository-relative paths to judge; none prints the declaration and the tally
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--check flag — Exit 10 when any path given is out of the scope

Examples

  • What a worker reads of this repository

    With no path, the declaration itself and the tally: how many tracked files are in the scope and how many are out.

    $ majordomus scope

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Judge paths, and say which rule decided

    For each path: in or out, and the rule that decided it. `--check` exits 10 when any path given is out, which is how a hook refuses to read one.

    $ majordomus scope docs/CLI.md --format json

    What it asserts: exits 0; prints one JSON document carrying /0/verdict, /0/rule.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web

The repository's web surfaces: what is exposed, where it is mounted, what produced it, and whether the topology is valid

majordomus web [OPTIONS] [COMMAND]

/docs/cli/web/ — this command on its own page

Subcommands: list, explain, validate, manifest, report, compose.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • The topology, from the command with no subcommand

    `web` with nothing after it lists, because listing is what a person wants when they ask what this repository exposes.

    $ majordomus web

    What it asserts: exits 0; prints ID, MOUNT.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web list

Every discovered surface: id, kind, mount, producer

majordomus web list [OPTIONS]

/docs/cli/web/list/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Every web surface this repository exposes

    The resolved topology, in route-precedence order: the routes the executable answers itself, the application's site, and every generated report that declared itself under the generated web root. Nothing is registered anywhere; each line was discovered.

    $ majordomus web list

    What it asserts: exits 0; prints MOUNT, /api/v1, /swagger.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web explain

Why each surface exists and where each of its values came from

majordomus web explain [OPTIONS] [ID]

/docs/cli/web/explain/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> — Only this surface; none explains every one
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Why a surface exists and where each of its values came from

    For each field a reader could be surprised by — the mount, the kind, the directory — the source that decided it: a producer's own declaration, the site configuration, the capability registry, or the model's documented default.

    $ majordomus web explain swagger

    What it asserts: exits 0; prints swagger, came from.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web validate

Check the topology's invariants; exit 10 on any error finding

majordomus web validate [OPTIONS]

/docs/cli/web/validate/ — this command on its own page

argumentvaluedefaultdescription
--artifacts flag — Also require every static surface's directory and index to exist
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Check the topology before anything serves or publishes it

    Two surfaces claiming one path, a surface nested inside another's subtree, a directory outside the generated root or one that walks out of the repository: each is a named finding with the surface, the value, its source and the fix. Exit 10 on any error finding. `--artifacts` also requires every static surface's directory and index to exist, which is what serving and publishing need.

    $ majordomus web validate

    What it asserts: exits 0; prints no conflict.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web manifest

Write the resolved topology to the generated manifest

majordomus web manifest [OPTIONS]

/docs/cli/web/manifest/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Write the resolved topology down for another tool to read

    The manifest under the generated web root is derived state: a publisher or a CI job may read it instead of resolving the topology again, and nothing may edit it, because the next run overwrites it from the same discovery.

    $ majordomus web manifest

    What it asserts: exits 0; prints web manifest, surface.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web report

Render a generated report into its own surface under the generated web root

majordomus web report [OPTIONS] <COMMAND>

/docs/cli/web/report/ — this command on its own page

Subcommands: tests, benchmarks, ui, ui-snapshot, cockpit-snapshot.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

majordomus web report tests

The test run: the behavioural cases' report, and the crate's own totals

majordomus web report tests [OPTIONS]

/docs/cli/web/report/tests/ — this command on its own page

argumentvaluedefaultdescription
--suite <SUITE> required The runner's TSV report (`MJ_TEST_REPORT=<file> bash test/run.sh`)
--crate-output <CRATE_OUTPUT> — The output of `cargo test`, for its totals
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Render the suite's own results into the /tests surface

    The runner writes its report with `MJ_TEST_REPORT=<file> bash test/run.sh`; this renders it, keeps the machine-readable results beside the page, and declares the directory so discovery finds it. Without that file there is nothing to render and the command says so rather than publishing an empty page.

    $ majordomus web report tests --suite target/web/run.tsv

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web report benchmarks

The benchmark run: a results document, or the accepted baseline

majordomus web report benchmarks [OPTIONS]

/docs/cli/web/report/benchmarks/ — this command on its own page

argumentvaluedefaultdescription
--from <FROM> required A results document from `majordomus bench`, or a baseline under the layer
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Render a benchmark run into the /benchmarks surface

    Reads a results document — a run's own output, or an accepted baseline under the layer's benchmarks section, which have the same shape — and renders every measured target ordered by median. It measures nothing itself: a figure on the page is a figure a run produced.

    $ majordomus web report benchmarks --from .ai/repo/benchmarks/rust/baseline.macos-aarch64-debug.json

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web report ui

The UI conformance audit, rendered as a section of the test surface (/tests/ui)

majordomus web report ui [OPTIONS]

/docs/cli/web/report/ui/ — this command on its own page

argumentvaluedefaultdescription
--from <FROM> required A results document from `scripts/ui audit`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Render the UI conformance audit into /tests/ui

    `scripts/ui audit` drives a browser over every page of the built site at every width the compiled stylesheet's breakpoints imply, and writes one results document; this renders it. The rendering is a section of the test surface rather than a surface of its own, because a conformance run is a test run and the topology refuses a surface mounted inside another's subtree. Without that document there is nothing to render and the command says so.

    $ majordomus web report ui --from target/web/run-ui.json

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web report ui-snapshot

The UI itself, read once at this commit and written as static pages a publication carries at /ui (ADR 0141)

majordomus web report ui-snapshot [OPTIONS]

/docs/cli/web/report/ui-snapshot/ — this command on its own page

argumentvaluedefaultdescription
--limit <LIMIT> 240 The most pages to write: every screen and panel first, then what they link to
--budget-seconds <BUDGET_SECONDS> 180 The most seconds to spend on the pages the screens link to; the screens and panels are written whatever they cost
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Read the UI once and write it as the pages a publication carries at /ui

    Asks the UI in-process for every screen and panel and then, one page per family in turn until `--limit` pages or `--budget-seconds` are reached, for the pages they link to, and writes each as a file under target/web/ui-snapshot: links between them relative, a link only a running process answers led to the snapshot's page about the live UI, the script told not to read again, and every page stamped with the commit, the time and the executable that read it. The declaration beside it makes the directory a surface of every publication and of no process.

    $ majordomus web report ui-snapshot --limit 20

    What it asserts: exits 0; prints web report, ui-snapshot.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web report cockpit-snapshot

The Cockpit itself, read once at this commit and written as static pages a publication carries at /cockpit (ADR 0147)

majordomus web report cockpit-snapshot [OPTIONS]

/docs/cli/web/report/cockpit-snapshot/ — this command on its own page

argumentvaluedefaultdescription
--limit <LIMIT> 240 The most pages to write: every static route first, then the pages the UI's snapshot links to, then what those link to
--budget-seconds <BUDGET_SECONDS> 180 The most seconds to spend on the pages the static routes link to; the routes themselves are written whatever they cost
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Read the Cockpit once and write it as the pages a publication carries at /cockpit

    Asks the Cockpit in-process for every static route except the one page about this machine, then for the pages the UI's snapshot links to, then, one page per family in turn until `--limit` pages or `--budget-seconds` are reached, for the pages those link to, and writes each as a file under target/web/cockpit-snapshot. Links between them are relative; a link into the UI leads to the UI's snapshot when that holds the page; a form, a query or a page past the bound leads to the snapshot's page about the live Cockpit; no page carries a script, because the Cockpit's scripts talk to a process; and every page is stamped with the commit, the time and the executable that read it.

    $ majordomus web report cockpit-snapshot --limit 12

    What it asserts: exits 0; prints web report, cockpit-snapshot.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus web compose

Compose every published surface into one publishable tree

majordomus web compose [OPTIONS]

/docs/cli/web/compose/ — this command on its own page

argumentvaluedefaultdescription
--destination <DESTINATION> — Where to write it; the default is target/site
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--only <ONLY> — Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand)
--exclude <EXCLUDE> — Every surface except these, by discovered id (accepted by every subcommand)

Examples

  • Compose every published surface into one publishable tree

    Each producer owns its own output directory; publication needs one tree, and the mapping is the resolved mount and nothing else. A surface that is discovered is published without a copy step being written anywhere, and a repository with nothing generated yet composes an empty tree rather than an error. Where a surface exists and its directory does not, composition refuses and names the producer to run.

    $ majordomus web compose --destination target/site

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why

The operational moments this tool answers: the catalogue, one moment, the audiences and areas, a diagnosis of your own week, and the catalogue's own validation

majordomus why [OPTIONS] [COMMAND]

/docs/cli/why/ — this command on its own page

Subcommands: list, show, audiences, areas, diagnose, validate.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • The operational moments this repository holds

    `why` with nothing after it lists, because listing is what a person wants when they ask what this section is. The count on the last line is computed from the catalogue; no number anywhere is written down.

    $ majordomus why

    What it asserts: exits 0; prints SLUG, moment(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why list

Every operational moment, narrowed by any facet the catalogue reports

majordomus why list [OPTIONS]

/docs/cli/why/list/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • Every public moment, in presentation order

    Drafts are excluded unless `--all` is given. The facets a listing may be narrowed by are the ones the catalogue itself reports, so an audience or an area added as a file is a filter without anything being registered.

    $ majordomus why list

    What it asserts: exits 0; prints SLUG.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Only what one audience recognises

    Membership is declared by each moment and never listed in the audience's own file, so this answer is derived. An audience the catalogue does not have is an invalid input naming the ones it does, not an empty answer.

    $ majordomus why list --audience fixture-team

    What it asserts: exits 0; prints SLUG.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    One domain model behind every projection: this document is what `GET /api/v1/why` returns and what the `majordomus_why` tool answers, including the derived facets and the catalogue's fingerprint.

    $ majordomus why list --format json

    What it asserts: exits 0; prints one JSON document carrying /counts/moments, /facets/audiences, /fingerprint.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why show

One moment in full, with every relation derived from its metadata

majordomus why show [OPTIONS] <ID>

/docs/cli/why/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The moment's id, which is also its slug and its route
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • One moment, with every relation derived from its metadata

    The record as its file declares it, then what nobody authored: the responsibilities its claims belong to, the moments that name it, and the moments nearest it by shared area, audience and tag.

    $ majordomus why show fixture-moment

    What it asserts: exits 0; prints fixture-moment, derived.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why audiences

Every audience, with the moments that name it

majordomus why audiences [OPTIONS]

/docs/cli/why/audiences/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • Who recognises what, with the counts derived

    Each audience with how many public moments name it. The number is computed from the moments; an audience's own file never lists one.

    $ majordomus why audiences

    What it asserts: exits 0; prints SLUG, TITLE.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why areas

Every operational area, with the moments that fall under it

majordomus why areas [OPTIONS]

/docs/cli/why/areas/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • The operational areas, with the counts derived

    The same relation read the other way: each area with the public moments that fall under it.

    $ majordomus why areas

    What it asserts: exits 0; prints SLUG, TITLE.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why diagnose

What the symptoms you recognise imply: the areas they weigh towards and the mechanisms that answer them

majordomus why diagnose [OPTIONS]

/docs/cli/why/diagnose/ — this command on its own page

argumentvaluedefaultdescription
--signal <SIGNALS> — A signal id or a moment id; repeat for each one you recognise. Without any, the questionnaire is printed
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • The questionnaire, assembled from the catalogue's own signals

    With no selection there is nothing to diagnose, so the questions are printed instead of an empty answer. Every line is a signal a moment declares; nothing here is a list of questions.

    $ majordomus why diagnose

    What it asserts: exits 0; prints Which of these happened to you this week?.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • What the symptoms you recognise imply

    A name is a signal id or a moment id. The answer is counting, not inference: each recommendation carries the moments that produced it, and there is no percentage because there is no model behind one.

    $ majordomus why diagnose --signal fixture-signal

    What it asserts: exits 0; prints moment(s) matched, fixture-moment.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus why validate

Every finding over the catalogue; exit 10 when any is an error

majordomus why validate [OPTIONS]

/docs/cli/why/validate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--audience <AUDIENCE> — Only moments this audience recognises (accepted by every subcommand)
--area <AREA> — Only moments in this operational area (accepted by every subcommand)
--tag <TAG> — Only moments carrying this tag (accepted by every subcommand)
--severity <SEVERITY> — Only moments of this severity (accepted by every subcommand)
--frequency <FREQUENCY> — Only moments of this frequency (accepted by every subcommand)
--lifecycle <LIFECYCLE> — Only moments at this stage of work (accepted by every subcommand)
--capability <CAPABILITY> — Only moments naming this capability of the executable (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only moments naming this command (accepted by every subcommand)
--featured flag — Only the moments the homepage features (accepted by every subcommand)
--all flag — Include drafts and deprecated moments, not only the public ones (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, hooks, summaries, tags, aliases, signals, examples and bodies (accepted by every subcommand)

Examples

  • Check the catalogue before anything projects it

    A reference that resolves to nothing, with the nearest candidate; a duplicate identity; a file name that disagrees with its id; a public record that does not meet the floor its status promises. Exit 10 on any error.

    $ majordomus why validate

    What it asserts: exits 0; prints moment(s), valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus devtask

One issue or one milestone as an executable development scope: what was authored, where the plan graph puts it, what happened to it, whether a worker may start it — with the origin of every value on the value

majordomus devtask [OPTIONS] <COMMAND>

/docs/cli/devtask/ — this command on its own page

Subcommands: issue, milestone.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus devtask issue

One issue as an executable development task, every field carrying where it came from

majordomus devtask issue [OPTIONS] <ID>

/docs/cli/devtask/issue/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The issue id, as the canonical model spells it. An id the model does not declare is answered, not refused
--no-git flag — Answer from the canonical records alone, without consulting git — a deterministic answer that is the same on every machine
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One issue as work to be done, not as metadata

    Identity, intent, status, milestone, dependencies, blockers, branches, commits, sessions and readiness in one answer, composed from the derivations that already own each half — the plan for the graph, `trace` for git, the canonical record for everything a person wrote. Nothing is manufactured: a key the record does not carry is `unknown` with the reason, never an empty string that reads as authored.

    $ majordomus devtask issue I0001

    What it asserts: exits 0; prints readiness, explicit.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    One domain model behind every projection: this document is what `GET /api/v1/devtask/issue` returns and what the `majordomus_devtask` tool answers, with the four groups kept apart by the type — what a person authored, what the plan derives, what happened locally, and where the external projection stands — and a provenance on every field.

    $ majordomus devtask issue I0001 --no-git --format json

    What it asserts: exits 0; prints one JSON document carrying /declaration/title/provenance, /position/status/provenance, /readiness/state, /attestation/explicit.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • An id the model does not declare is answered, not refused

    A typo that read as "nothing has been authored" is the one answer a work surface must never give, so an unknown id answers with `declared: false`, the readiness `undeclared`, and every canonical field `unknown` with the reason on it.

    $ majordomus devtask issue I9999 --no-git

    What it asserts: exits 0; prints undeclared.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus devtask milestone

One milestone as an executable dependency graph: ready, blocked, parallelizable, critical blockers, cycles

majordomus devtask milestone [OPTIONS] <ID>

/docs/cli/devtask/milestone/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The milestone id, as the canonical model spells it
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What to work on next in one outcome, and what to unblock first

    The issues partitioned by readiness, the critical blockers ordered by how much unfinished work each holds back, and the startable work partitioned into subsets that may genuinely run at the same time. A pure function of the canonical records — no git, no clock, no network — so two runs on two machines produce the same bytes and a reader derives nothing itself.

    $ majordomus devtask milestone foundation

    What it asserts: exits 0; prints READINESS.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The graph, as the shape the API and MCP answer with

    Every partition the plan implies and no surface should recompute: `ready`, `blocked`, `waiting`, `active`, `review`, `completion_blocked`, `complete`, `cancelled`, plus `critical_blockers`, `parallelizable` with the scope path behind each serialisation, and `cycles` as strongly connected components.

    $ majordomus devtask milestone foundation --format json

    What it asserts: exits 0; prints one JSON document carrying /counts/total, /ready, /critical_blockers, /parallelizable.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution

How this project is packaged, published and installed: the platforms, the artifact names, the installer, the releases

majordomus distribution [OPTIONS] [COMMAND]

/docs/cli/distribution/ — this command on its own page

Subcommands: show, status, validate, targets, matrix, artifact, releases, metadata, build.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • How this project is installed

    `distribution` with nothing after it shows the model: the one-line install command, where an installation goes, and how many platforms a release builds. Every value comes from share/distribution.yaml, which is the only place any of them is written.

    $ majordomus distribution

    What it asserts: exits 0; prints binary, install, targets.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution show

The model: the install command, where an installation goes, and every declared target

majordomus distribution show [OPTIONS]

/docs/cli/distribution/show/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The distribution model as one JSON document

    The same answer as a document a script can read: the install command, the default locations, and every declared target with the artifact name the naming function derives for it. This is what the website's install block and the cockpit's install card render.

    $ majordomus distribution show --format json

    What it asserts: exits 0; prints one JSON document carrying /install_command, /targets.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution status

Whether the advertised one-line installation works right now, and what is missing when it does not

majordomus distribution status [OPTIONS]

/docs/cli/distribution/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Whether the published one-line installation works right now

    The operator's question — *can a machine that has never seen this project install it with the advertised command?* — answered from the distribution model and the release records, without touching the network. Each check names what was observed; a failing one names its cause and the command that changes it. Shown here in a repository that has published nothing, where the answer is no and the exit code is 10, which is what makes it usable as a check rather than as prose. `distribution validate` is the gate over the model itself; this is the gate over the state a user meets.

    $ majordomus distribution status

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution validate

Every invariant of the model and of the release records; exit 10 with each violation named

majordomus distribution validate [OPTIONS]

/docs/cli/distribution/validate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every invariant of the model and of the release records

    Refuses a duplicate target id or triple, two targets deriving one artifact name, a Linux target with no C library, a published target with nothing to build it on, an unbuilt target with no recorded reason, a base URL that is not HTTPS, and a release record that misses a supported target, renames an artifact or serves one from another host. Exits 10 with each violation named.

    $ majordomus distribution validate

    What it asserts: exits 0; prints distribution.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution targets

Every declared target, one line each, with the artifact name it derives

majordomus distribution targets [OPTIONS]

/docs/cli/distribution/targets/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every platform, and whether a release builds it

    One line per declared target: its id, its Rust target triple, whether it is supported, experimental or unavailable, and how it is written in prose. The supported-platform table in the documentation and the installer's own refusal message are rendered from these same rows.

    $ majordomus distribution targets

    What it asserts: exits 0; prints RUST TARGET, supported.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution matrix

The release build matrix, as the release workflow reads it

majordomus distribution matrix [OPTIONS]

/docs/cli/distribution/matrix/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The release build matrix the workflow runs

    One entry per published target, with the runner it is built on, the packages that runner needs, and the artifact name with `{tag}` where a release's tag goes. The release workflow reads this and states no platform of its own; adding a target to the model adds a build here and nowhere else.

    $ majordomus distribution matrix

    What it asserts: exits 0; prints one JSON document carrying /include, /binary.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution artifact

The archive name and root directory a target and a tag derive

majordomus distribution artifact [OPTIONS]

/docs/cli/distribution/artifact/ — this command on its own page

argumentvaluedefaultdescription
--target <TARGET> required A target's id or its Rust target triple
--tag <TAG> required The tag, `v` and a version
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What one target and one tag are called

    The one naming function, asked directly: the archive's name, the directory it unpacks into, and where a release publishes it. `scripts/release-package` asks this rather than composing a name, so a change to the naming function reaches the packaging without an edit.

    $ majordomus distribution artifact --target aarch64-apple-darwin --tag v0.2.0 --format json

    What it asserts: exits 0; prints one JSON document carrying /name, /root, /url.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution releases

Every recorded release, newest first, and the one an unpinned installation resolves to

majordomus distribution releases [OPTIONS]

/docs/cli/distribution/releases/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What has been published, and what an unpinned install resolves to

    Every release record this repository holds, newest first, and which of them the stable pointer names: the highest version among the stable, unwithdrawn records. The pointer is derived on every read and is authored nowhere.

    $ majordomus distribution releases

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution metadata

The public metadata one release record publishes, rendered from the record alone

majordomus distribution metadata [OPTIONS]

/docs/cli/distribution/metadata/ — this command on its own page

argumentvaluedefaultdescription
--record <FILE> required A release record; the file the release pipeline writes under .ai/repo/releases/
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What one release record publishes

    The public metadata a record turns into, rendered from the record and the model alone: the release pipeline prints this before it commits anything, and the installer's own tests serve it as a release that never existed. Shown here in a repository that has published nothing, where the record does not exist and the command says which file it wanted and exits 10 rather than inventing one.

    $ majordomus distribution metadata --record .ai/repo/releases/v0.2.0.yaml

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus distribution build

What this executable is: version, target triple, profile, commit

majordomus distribution build [OPTIONS]

/docs/cli/distribution/build/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What this executable is

    The crate version, the Rust target triple, the profile and the commit, all compiled in at build time. An installed binary answers this without a repository, a toolchain or git, which is what makes a support question answerable.

    $ majordomus distribution build

    What it asserts: exits 0; prints version, target, commit.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env

What this checkout is: the project, version control, the toolchains it declares, what the layer holds, the workflows, the provider projections and the local services

majordomus env [OPTIONS] [COMMAND]

/docs/cli/env/ — this command on its own page

Subcommands: status, banner, export, enter, explain, preflight.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What this checkout is

    `env` with nothing after it resolves the whole snapshot: the project and its version, the repository and its layer, version control, the toolchains the repository declares, what the layer holds counted per kind, the workflows the runner describes, the provider projections against the policy that renders them, and the local services. This is the resolution that counts the layer, so it builds the index and writes the cache the banner reads.

    $ majordomus env

    What it asserts: exits 0; prints project, repository, resolution.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env status

The whole snapshot, resolved in full: what the layer holds is counted, and the cache the banner reads is written

majordomus env status [OPTIONS]

/docs/cli/env/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The snapshot as one document

    The same value the HTTP route `/api/v1/environment` and the MCP resource `majordomus://environment` answer with, and the value the banner renders. Every field carries where it came from under `provenance`, and a value nothing could resolve is absent rather than zero.

    $ majordomus env status --format json

    What it asserts: exits 0; prints one JSON document carrying /schema, /project/version, /repository/name, /provenance.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env banner

Render the snapshot for a terminal. Goes to standard error, never standard output, because direnv reads standard output as the environment it is setting

majordomus env banner [OPTIONS]

/docs/cli/env/banner/ — this command on its own page

argumentvaluedefaultdescription
--mode <MODE> — How much to show: `auto`, `full`, `compact` or `off`. Without it, MAJORDOMUS_BANNER decides, and without that, `auto` — which is silent when nothing is watching, shows the whole box when the repository has something new to say, and the two-line form when it does not
--width <COLUMNS> — Draw as if the terminal were this wide, whatever it is
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The two-line form, at a width you choose

    What `direnv` renders on entering the repository. It resolves fast — it never builds the index — and it writes to standard error, because direnv reads the standard output of a `.envrc` as the environment it is applying. `--width` renders as if the terminal were that wide, which is what makes the layout testable.

    $ majordomus env banner --mode compact --width 80

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env export

The variable assignments a shell in this repository benefits from, for `eval`. Assignments only: no command, no side effect

majordomus env export [OPTIONS]

/docs/cli/env/export/ — this command on its own page

argumentvaluedefaultdescription
--shell <SHELL> direnv The shell to write for: `direnv`, `bash`, `zsh`, `sh`, `ksh` or `fish`
--banner flag — Also draw the banner, to standard error, from the same snapshot. What an adapter asks for: one process on the path a shell takes on every entry, rather than two that each pay for a `git status`
--mode <MODE> — With --banner, how much to show; MAJORDOMUS_BANNER decides without it
--bridge flag — Also refresh the workflow bridge under .ai/local/cache/ when a declaration behind it has changed. A few `stat` calls when nothing has; never a build, never a network call
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The assignments a shell in this repository wants

    Assignments and nothing else, safe to `eval`: no command runs, no file is touched, and every value is quoted so that a repository path holding a quote or a `$(...)` cannot become shell code. This is the whole of what `.envrc` needs from Majordomus.

    $ majordomus env export --shell direnv

    What it asserts: exits 0; prints export MAJORDOMUS_ROOT=.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env enter

Enter the repository: the assignments a shell here benefits from on standard output, the banner on standard error, the workflow bridge refreshed when a declaration behind it moved, and the runtime ensured — the whole of what entering this repository is, as one call, so that no person and no agent has to remember a sequence. Never builds, never reaches a remote network, and never waits for a server it started to answer

majordomus env enter [OPTIONS]

/docs/cli/env/enter/ — this command on its own page

argumentvaluedefaultdescription
--shell <SHELL> direnv The shell to write for: `direnv`, `bash`, `zsh`, `sh`, `ksh` or `fish`
--mode <MODE> — How much banner to draw; MAJORDOMUS_BANNER decides without it
--no-banner flag — Do not draw the banner
--no-bridge flag — Do not refresh the workflow bridge
--no-runtime flag — Do not ensure the runtime: export, draw and refresh only. What MAJORDOMUS_RUNTIME=off says, as an argument
--wait <SECONDS> 0 Wait this many seconds for a server this call started to answer. Zero — the default, and what a shell prompt asks for — returns as soon as one has been started, and the entry file's watch over the lease brings the address in when it is published
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Everything entering this repository is, as one call

    What the file a shell evaluates on entry runs, and the only call it makes (ADR 0043): the assignments on standard output for `eval`, the banner on standard error, the workflow bridge refreshed when a declaration behind it moved, and the repository's shared server ensured when nothing is serving this checkout. It never builds, never ensures from an executable older than its sources, never waits for a server it started to answer, and never exits non-zero — a non-zero exit here would make direnv report that the whole environment failed. `--no-runtime` is what this example passes, because an example is not the place to start a server.

    $ majordomus env enter --shell direnv --no-banner --no-bridge --no-runtime

    What it asserts: exits 0; prints export MAJORDOMUS_ROOT=.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env explain

Where each value came from: the file, command or constant that decided it, the resolver that read it, and how far it can be trusted

majordomus env explain [OPTIONS] [FIELD]

/docs/cli/env/explain/ — this command on its own page

argumentvaluedefaultdescription
<FIELD> <FIELD> — One field in dotted form (`vcs.branch`, `layer.objects`), or a prefix; every field when absent
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Where one value came from

    An inferred system without provenance is magic. Every field of the snapshot can name the file, command or compile-time constant that decided it, the resolver that read it, and whether it was read now, taken from the cache, or not resolved at all.

    $ majordomus env explain project.version

    What it asserts: exits 0; prints project.version, source, resolver.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus env preflight

Whether Majordomus is in force in this checkout, claim by claim, with the evidence behind each verdict: git, the episode and its briefing, the task and handover, the policy, rules and ADRs, the shared server and the surfaces it serves, the peer board, recorded test runs, rule enforcement, provider projections and the deployment. A verdict that asserts something is in force always names its evidence. Resolves fast, from the rule tally a `--full` run cached; the HTTP route `/api/v1/environment/preflight` and the MCP tool `majordomus_preflight` answer the same value

majordomus env preflight [OPTIONS]

/docs/cli/env/preflight/ — this command on its own page

argumentvaluedefaultdescription
--compact flag — The short form entering the repository draws: one line of claims and the most urgent thing to look at
--full flag — Build the index and count the rule proofs now, and leave the tally for entry to read
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What is in force here, and what proves it

    One verdict per claim — `verified`, `active`, `fresh`, `stale`, `degraded`, `unavailable`, `failed`, `unknown` or `not_applicable` — and the evidence it rests on: the file, command or loopback answer that was read. A rule file on disk is not a rule anything enforces, an address that accepts a connection is not a server of this version, and a recorded test run at another commit does not verify this tree, so none of them is reported as one. `attention` lists what needs a look, most urgent first.

    $ majordomus env preflight --format json

    What it asserts: exits 0; prints one JSON document carrying /schema, /sections/0/checks/0/verdict, /attention.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commands

Every command this repository offers, from whichever program offers it: the graph, one command, where each one is projected, and the workflow bridge derived from it

majordomus commands [OPTIONS] [COMMAND]

/docs/cli/commands/ — this command on its own page

Subcommands: list, show, explain, graph, bridge.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every command this repository offers

    The command graph, composed from the three declarations that already exist: the clap tree of this executable, the shipped command registry of the shell tool, and the recipes the workflow runner describes. One line per command, with the program that runs it and what running it changes.

    $ majordomus commands

    What it asserts: exits 0; prints commands, executable, read-only.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commands list

Every command, one line each: what it is, what running it changes, and where it is projected

majordomus commands list [OPTIONS]

/docs/cli/commands/list/ — this command on its own page

argumentvaluedefaultdescription
--origin executable | tool | workflow — Only the commands of this program
  • executable — This executable
  • tool — The shell tool, bin/majordomus
  • workflow — A workflow the repository declares
--effect read-only | local-mutation | repository-mutation | network-mutation | destructive — Only the commands whose effect is at most this
  • read-only — Reads and answers
  • local-mutation — Writes only what no commit carries
  • repository-mutation — Writes tracked files
  • network-mutation — Reaches the network with an effect
  • destructive — Removes something
--search <TEXT> — Only the commands matching this text, in their invocation, summary, tags or identity
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Only what reads

    The filters are the graph's own vocabulary rather than a search over text: `--effect read-only` is every command that changes nothing anywhere, which is the same predicate the exposure policy uses to decide what a machine surface may call.

    $ majordomus commands list --effect read-only

    What it asserts: exits 0; prints read-only.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commands show

One command in full: its arguments, its effect, what it needs, and every surface that carries it

majordomus commands show [OPTIONS] <ID>

/docs/cli/commands/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The command's identity, `executable.worktree.status`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One command, and every surface that carries it

    The arguments with the source of each one's values, the effect, and the projections: the command line, the workflow recipe, the MCP tool, the HTTP route, the Cockpit and the page. A surface that withholds it says why.

    $ majordomus commands show executable.worktree.status

    What it asserts: exits 0; prints executable.worktree.status, projections.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commands explain

Why one command appears where it does: the declaration it came from, the policy that placed it, and the reason for every surface that withholds it

majordomus commands explain [OPTIONS] <ID>

/docs/cli/commands/explain/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The command's identity, `executable.worktree.status`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Why a command appears where it does

    The same command with its provenance: the file that declares it, the reader that found it, the capability behind it when there is one, what it requires, and the file the exposure policy lives in. Nothing about a command's placement is a mystery a grep has to solve.

    $ majordomus commands explain executable.serve

    What it asserts: exits 0; prints declared in, policy.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commands graph

The whole graph as one document, with its fingerprint and every diagnostic

majordomus commands graph [OPTIONS]

/docs/cli/commands/graph/ — this command on its own page

argumentvaluedefaultdescription
--check flag — Exit 10 when the graph carries an error
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The whole graph as one document

    Deterministic and fingerprinted: two builds over one tree produce the same bytes, which is what lets the workflow bridge, the completion index and the Cockpit all key on the fingerprint instead of regenerating.

    $ majordomus commands graph --format json

    What it asserts: exits 0; prints one JSON document carrying /schema, /fingerprint, /commands.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commands bridge

Materialise the workflow bridge from the graph, and refresh the cache the completion reads; writes nothing when the graph has not changed

majordomus commands bridge [OPTIONS]

/docs/cli/commands/bridge/ — this command on its own page

argumentvaluedefaultdescription
--check flag — Exit 10 when the materialised bridge is not the one this graph projects; write nothing
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The workflow runner's recipes, derived

    Every command of both programs, written as a recipe that runs the canonical program with the caller's own arguments. It goes under .ai/local/cache/, which no commit carries, and it is rewritten only when the graph's fingerprint changes.

    $ majordomus commands bridge

    What it asserts: exits 0; prints bridge, recipe.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus completion

Completion for any surface, answered from the command graph: the candidates a shell asks for, and the one-time integration that asks

majordomus completion [OPTIONS] [COMMAND]

/docs/cli/completion/ — this command on its own page

Subcommands: query, init, install.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • The integration a person installs once

    With no subcommand, the shell integration for zsh. It contains no command, no flag and no identifier: every candidate comes from a query against the command graph of the repository the shell is in, so one integration serves every checkout and never goes stale.

    $ majordomus completion

    What it asserts: exits 0; prints completion query, compdef.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus completion query

The candidates for one command line, from the command graph. What a shell adapter calls on every TAB

majordomus completion query [OPTIONS] [WORD]

/docs/cli/completion/query/ — this command on its own page

argumentvaluedefaultdescription
--surface cli | workflow cli Which surface the words are spelled for
  • cli — The command line of either program
  • workflow — The workflow runner
--cursor <N> — The index of the word the cursor is in; the default is a new word after the last
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
<WORD> <WORD> — The words of the command line, the program's own name first
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • What a shell asks on every TAB

    The words of the command line and the position of the cursor; back come the candidates with their descriptions. The same call answers the workflow runner's completion with `--surface workflow`, resolving the recipe name to the command it bridges and then completing that command's own arguments.

    $ majordomus completion query --surface cli -- majordomus work

    What it asserts: exits 0; prints worktree.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus completion init

The shell integration to load once, which carries no command of its own and asks this executable for every candidate

majordomus completion init [OPTIONS]

/docs/cli/completion/init/ — this command on its own page

argumentvaluedefaultdescription
--shell zsh | bash | fish zsh Which shell to print the integration for
  • zsh — zsh
  • bash — bash
  • fish — fish
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • The same, for bash

    A different shell's protocol, the same question. Both adapters read the words being completed, find the cursor, ask this executable and print what comes back.

    $ majordomus completion init --shell bash

    What it asserts: exits 0; prints completion query, complete -F.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus completion install

Put that integration into the shell's startup file, between managed markers, so that no one maintains it by hand

majordomus completion install [OPTIONS]

/docs/cli/completion/install/ — this command on its own page

argumentvaluedefaultdescription
--shell zsh | bash | fish zsh Which shell to install for; decides the startup file when --rc is not given
  • zsh — zsh
  • bash — bash
  • fish — fish
--rc <PATH> — The startup file to write, instead of the shell's usual one
--remove flag — Take the block out again, leaving the rest of the file as it was
--dry-run flag — Say what would change and write nothing
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)

Examples

  • The one line a person adds to their shell, added for them

    Writes the integration into the shell's startup file between `# >>> MAJORDOMUS >>>` markers: nothing outside them is touched, running it twice changes nothing, and `--remove` takes it out again. It is never a side effect of anything else — installing into a person's home directory is its own decision, so it is its own command. `--dry-run` says what would change and writes nothing.

    $ majordomus completion install --shell zsh --dry-run

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree

The branch-to-worktree topology: where every linked worktree belongs (`<repo>-wt/<branch>`), where each one is, and the lifecycle — create, migrate, repair, guard

majordomus worktree [OPTIONS] [COMMAND]

/docs/cli/worktree/ — this command on its own page

Subcommands: status, list, topology, root, path, inspect, create, ensure, migrate, validate, doctor, guard, repair, remove, cleanup, uncommitted, trunk, branches.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Where am I, and is that where I belong?

    `worktree` with nothing after it answers the question a worker asks before starting: which branch this is, whether this directory is that branch's canonical worktree (or the primary checkout on the trunk), what is uncommitted here, and how many errors the whole topology carries. The same answer from the primary checkout and from four directories deep inside a linked worktree.

    $ majordomus worktree

    What it asserts: exits 0; prints branch, worktree, container.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree status

Where this call is — branch, worktree, canonical or not, uncommitted work — and how many errors the whole topology carries; exit 10 when this worktree is out of place

majordomus worktree status [OPTIONS]

/docs/cli/worktree/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The current worktree as one document

    The same answer as JSON: the repository, the container, the trunk and how it was decided, this worktree with its standing and diagnostics, and whether it is where it belongs. This is what the MCP tool `majordomus_worktree_status` and `GET /api/v1/worktrees/status` answer.

    $ majordomus worktree status --format json

    What it asserts: exits 0; prints one JSON document carrying /worktree/standing, /container/path, /trunk/source, /canonical.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree list

Every registered worktree with its standing, one line each; exit 10 when the topology has an error

majordomus worktree list [OPTIONS]

/docs/cli/worktree/list/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every worktree, the misplaced ones obvious

    The primary checkout first, then every linked worktree with its standing, its branch, where it belongs when it is somewhere else, and its uncommitted work. The primary checkout is exempt from the path rule and held to the trunk rule instead.

    $ majordomus worktree create feature/example
    $ majordomus worktree list

    What it asserts: exits 0; prints PRIMARY, CANONICAL, -wt/feature/example.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree topology

The whole topology: repository, container, trunk, every worktree, every branch without a worktree, every diagnostic; exit 10 when it has an error

majordomus worktree topology [OPTIONS]

/docs/cli/worktree/topology/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The whole topology as one document

    The repository, the container, the trunk, every worktree, every branch with or without a worktree, every diagnostic with its code and remedy, and the tallies. This is what the MCP resource `majordomus://worktrees`, the tool `majordomus_worktrees`, `GET /api/v1/worktrees` and the Cockpit all render.

    $ majordomus worktree topology --format json

    What it asserts: exits 0; prints one JSON document carrying /container/path, /trunk/branch, /worktrees/0/standing, /branches/0/name, /tallies/worktrees, /valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree root

Print the container every linked worktree belongs under, and nothing else: `cd "$(majordomus worktree root)"`

majordomus worktree root [OPTIONS]

/docs/cli/worktree/root/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The container, for the shell

    Prints the container and nothing else, so a shell can use it: `cd "$(majordomus worktree root)"`. It is the primary checkout's sibling named with `-wt`, derived from git's own identity and never from the current directory — which is why running this inside a linked worktree does not answer a container inside that worktree.

    $ majordomus worktree root

    What it asserts: exits 0; prints -wt.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree path

Print the canonical path of a branch, and nothing else: `cd "$(majordomus worktree path feature/x)"`. Derived from the name; the branch need not exist

majordomus worktree path [OPTIONS] <BRANCH>

/docs/cli/worktree/path/ — this command on its own page

argumentvaluedefaultdescription
<BRANCH> <BRANCH> required The branch, full name
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The canonical path of a branch, for the shell

    A child process cannot change its parent shell's directory, so nothing here pretends to: this prints one path and the shell does the rest — `cd "$(majordomus worktree path feature/x)"`. The path is the branch name under the container, hierarchy kept; the branch need not exist yet.

    $ majordomus worktree path feature/providers/streaming

    What it asserts: exits 0; prints -wt/feature/providers/streaming.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree inspect

One branch: its canonical path, whether it exists, what occupies the path, the worktree holding it, and what stands in the way

majordomus worktree inspect [OPTIONS] <BRANCH>

/docs/cli/worktree/inspect/ — this command on its own page

argumentvaluedefaultdescription
<BRANCH> <BRANCH> required The branch, full name
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One branch, before creating its worktree

    Where the branch's worktree belongs, whether the branch exists, whether anything occupies the path, and what would stand in the way. For a branch that does not exist yet, the answer is the path `worktree create` would use and the command to run.

    $ majordomus worktree inspect feature/new-dashboard

    What it asserts: exits 0; prints -wt/feature/new-dashboard, does not exist yet.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree create

Create the canonical worktree of a branch. A branch that does not exist here is fetched from the trunk's remote and taken up when the remote has it; otherwise it is created from --base, else from the remote's trunk fetched now (the local trunk only when the remote cannot be read, and then said, with how far behind). The path is derived; none may be given

majordomus worktree create [OPTIONS] [BRANCH]

/docs/cli/worktree/create/ — this command on its own page

argumentvaluedefaultdescription
<BRANCH> <BRANCH> — The branch, full name (`feature/improve-cli`)
--base <REF> — Start a new branch from this ref. Never fetched: it must resolve locally
--issue <ID> — Name the branch after this issue of .ai/repo/project/issues: `feature/<id>-<slug>`, the form the topology reads the issue back from
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Start work on a branch without deciding where it goes

    Creates the branch `feature/improve-cli` from the trunk and checks it out in a new worktree at `<repository>-wt/feature/improve-cli`. No path is given and none may be: the destination follows from the repository's identity and the branch name, so the same command in the same repository always produces the same path — from the primary checkout, and from inside another worktree.

    $ majordomus worktree create feature/improve-cli

    What it asserts: exits 0; prints -wt/feature/improve-cli, feature/improve-cli (new.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree ensure

The canonical worktree of a branch: created when absent, answered when present, refused when the branch is checked out somewhere else

majordomus worktree ensure [OPTIONS] <BRANCH>

/docs/cli/worktree/ensure/ — this command on its own page

argumentvaluedefaultdescription
<BRANCH> <BRANCH> required The branch, full name
--base <REF> — Start a new branch from this ref (default: the trunk)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The canonical worktree, whether or not it exists yet

    `ensure` is `create` for a caller that does not care whether the worktree is already there: it creates it when it is absent and answers the existing one when it is present. What a script or an agent runs before starting on a branch.

    $ majordomus worktree create feature/improve-cli
    $ majordomus worktree ensure feature/improve-cli

    What it asserts: exits 0; prints exists, -wt/feature/improve-cli.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree migrate

Bring every misplaced worktree to its canonical path, dirty state included, with a fingerprint taken before and after each move; --plan shows the steps and changes nothing

majordomus worktree migrate [OPTIONS]

/docs/cli/worktree/migrate/ — this command on its own page

argumentvaluedefaultdescription
--plan flag — Show the plan and change nothing
--dry-run flag — The same as --plan
--allow-copy flag — When a move crosses filesystems, copy the tree, repair git's link, verify the copy against a manifest of every entry, and only then remove the original
--only <BRANCH> — Only these branches
--include-ephemeral flag — Also move the scratch checkouts of sessions (under the temporary directory or .claude/worktrees), which are otherwise reported and left alone
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What it would take to bring every worktree home

    `--plan` shows each misplaced worktree with where it belongs, how it would move, the uncommitted work that moves with it, and what blocks it, and changes nothing. Without `--plan` the movable steps are carried out: each worktree is fingerprinted, moved with `git worktree move`, fingerprinted again at its new path, and reported as moved only when the two are equal.

    $ majordomus worktree migrate --plan

    What it asserts: exits 0; prints nothing to migrate.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree validate

Every error of the topology, and nothing else; exit 10 when there is one

majordomus worktree validate [OPTIONS]

/docs/cli/worktree/validate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Is the topology valid?

    Every error-level diagnostic and nothing else, then the verdict; exit 10 when there is an error. What a script gates on.

    $ majordomus worktree validate

    What it asserts: exits 0; prints worktree topology: valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree doctor

Every diagnostic of the topology, errors, warnings and facts, each with its code and remedy; exit 10 when there is an error

majordomus worktree doctor [OPTIONS]

/docs/cli/worktree/doctor/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every diagnostic, with its code and its remedy

    Errors, warnings and facts — a misplaced worktree, a stale registration, a detached HEAD, the primary checkout off the trunk, an unknown trunk — each under a stable code the API and the Cockpit carry too, each with the command that addresses it.

    $ majordomus worktree doctor

    What it asserts: exits 0; prints worktree topology: valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree guard

May a mutation proceed from here? Exit 0 in a canonical worktree, in the primary checkout on the trunk, or detached; exit 10 with the reason otherwise. What the pre-commit hook asks

majordomus worktree guard [OPTIONS]

/docs/cli/worktree/guard/ — this command on its own page

argumentvaluedefaultdescription
-q, --quiet flag — Print nothing on success
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • May a commit proceed from here?

    The pre-commit hook's question. Exit 0 in a branch's canonical worktree, in the primary checkout on the trunk, or on a detached HEAD; exit 10 with the diagnostic and the remedy when a feature branch is being worked on somewhere it does not belong. The hook stays one line; this is the logic.

    $ majordomus worktree guard

    What it asserts: exits 0; prints worktree guard: ok.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree repair

Drop git's registrations of worktrees whose directories are gone, and repair the administrative links of the ones that exist. Deletes no directory

majordomus worktree repair [OPTIONS]

/docs/cli/worktree/repair/ — this command on its own page

argumentvaluedefaultdescription
--dry-run flag — Report what would be dropped and change nothing
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What git would forget

    `repair` drops git's registrations of worktrees whose directories no longer exist and lets git repair the administrative links of the ones that do. It deletes no directory and touches no branch; `--dry-run` reports what it would drop and changes nothing.

    $ majordomus worktree repair --dry-run

    What it asserts: exits 0; prints nothing to prune.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree remove

Remove one linked worktree by branch or path. Never the primary checkout, never a branch, never uncommitted work without --force

majordomus worktree remove [OPTIONS] <SELECTOR>

/docs/cli/worktree/remove/ — this command on its own page

argumentvaluedefaultdescription
<SELECTOR> <SELECTOR> required An exact branch name or an exact path
--force flag — Remove it even though it holds uncommitted work or is locked
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Remove a worktree, and keep its branch

    Removes the worktree and nothing else. The branch it held still exists: worktree lifecycle and branch lifecycle are separate, and deleting a branch is a git command a person types deliberately. A worktree with uncommitted work is refused rather than removed.

    $ majordomus worktree create feature/improve-cli
    $ majordomus worktree remove feature/improve-cli

    What it asserts: exits 0; prints removed, feature/improve-cli still exists.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree cleanup

The branches merged into the trunk whose worktree is clean or absent: what could be removed. Removes nothing without --remove

majordomus worktree cleanup [OPTIONS]

/docs/cli/worktree/cleanup/ — this command on its own page

argumentvaluedefaultdescription
--remove flag — Remove the worktrees listed, each re-measured immediately before it goes: a branch ahead of its remote, uncommitted work, or a process working inside is refused and named. Branches are never deleted; the listing still says how
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What could go, and what it would take

    Every branch merged into the trunk whose worktree is clean or absent, with the two commands that would remove the worktree and then the branch. Derived state only: nothing is deleted here, and a dirty or unmerged worktree is never listed.

    $ majordomus worktree cleanup

    What it asserts: exits 0; prints cleanup-eligible.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree uncommitted

Every linked worktree holding uncommitted work: how many paths, how old the oldest change, what holds it (an active task, an open episode, a process inside) and whether it is abandoned, with the command that would put it on a remote ref. Reads every worktree and writes none

majordomus worktree uncommitted [OPTIONS]

/docs/cli/worktree/uncommitted/ — this command on its own page

argumentvaluedefaultdescription
--older-than <DURATION> — Judge against this age instead of the policy's session.stranded_after (90s, 30m, 12h, 1d)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Work no commit carries, and whether anything holds it

    Every linked worktree holding staged, unstaged, untracked or conflicted paths, with the count, the age of the oldest change, the task, episode or process that holds it, and `abandoned` when nothing does and it is older than the policy's session.stranded_after. A repository with no linked worktree has nothing to list; the reading writes nothing either way.

    $ majordomus worktree uncommitted

    What it asserts: exits 0; prints 0 with uncommitted work, nothing was changed.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree trunk

How far this checkout and the local trunk are from the remote trunk, as of the last fetch, judged against the policy's checkout.trunk_distance: current, lagging, stale, unjudged or unmeasured, with the commands that bring it current. Fetches nothing; exit 10 when stale

majordomus worktree trunk [OPTIONS]

/docs/cli/worktree/trunk/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • How far this checkout is from the remote trunk

    The checkout's HEAD and the local trunk counted against the remote-tracking trunk, as of the last fetch, and judged against the policy's checkout.trunk_distance. A repository with no remote has nothing to be measured against and says so — `unmeasured`, never `current`; nothing is fetched either way.

    $ majordomus worktree trunk

    What it asserts: exits 0; prints unmeasured, no remote-tracking branch.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus worktree branches

Every local branch, one per line, for a shell completion that wants the live set

majordomus worktree branches [OPTIONS]

/docs/cli/worktree/branches/ — this command on its own page

argumentvaluedefaultdescription
--without-worktree flag — Only branches with no worktree
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The live branch set, for completion

    Every local branch, one per line, nothing else. A shell completion for `worktree path`, `create` or `remove` reads this rather than a list kept anywhere, so a branch created a second ago completes.

    $ majordomus worktree branches

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs

Pull-request integration: every open pull request classified against the current master with its evidence, the ranked plan, and the executor that merges the next provably safe one — one at a time, re-planning after each (ADR 0101)

majordomus prs [OPTIONS] [COMMAND]

/docs/cli/prs/ — this command on its own page

Subcommands: status, plan, explain, refresh, drain, cleanup, repair, events, trains, brief, prove-dry-run.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The queue, before the forge was ever observed

    `prs` with nothing after it is `prs status`. It reads the last recorded forge observation and never reaches the network, so in a checkout where `prs refresh` has never run it has nothing to rank: it says so, names the command that observes, and exits 10.

    $ majordomus prs

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs status

Every open pull request with its disposition, risk and reason, in rank order, from the last recorded observation; exit 10 when the observation is stale or absent

majordomus prs status [OPTIONS]

/docs/cli/prs/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The ranked queue as one document

    Every open pull request's assessment in rank order — disposition, lane, reasons, the master and head it was decided against, evidence, risk, overlaps — with the next merge and the tallies. The same value `GET /api/v1/pull-requests` and the MCP tool `majordomus_pull_requests` answer. With no observation recorded it exits 10.

    $ majordomus prs status --format json

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs plan

What the executor would do next: the next merge, the pull requests that need master brought in, and the lanes; nothing is changed

majordomus prs plan [OPTIONS]

/docs/cli/prs/plan/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What the executor would do next

    The next merge, the pull requests that need master brought in, and the repair, cleanup and held lanes. The plan is void after any merge: the executor observes again before its next step. With no observation recorded it exits 10.

    $ majordomus prs plan

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs explain

Why one pull request is where it is: the revisions it was decided against, every piece of evidence, its rank and the factors behind it

majordomus prs explain [OPTIONS] <NUMBER>

/docs/cli/prs/explain/ — this command on its own page

argumentvaluedefaultdescription
<NUMBER> <NUMBER> required The pull request number
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Why one pull request is where it is

    The revisions it was decided against, every piece of evidence, its rank and the factors behind it. The same answer `GET /api/v1/pull-requests/explain?number=` gives. With no observation recorded it exits 10.

    $ majordomus prs explain 1

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs refresh

Observe the forge now (the GitHub CLI and one `git fetch`) and record the observation; the only read that reaches the network

majordomus prs refresh [OPTIONS]

/docs/cli/prs/refresh/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Observing the forge, where there is none

    `refresh` is one of the three `prs` commands that reach the network: it asks the GitHub CLI about the repository, its branch protection and its open pull requests, and fetches their heads. A repository with no GitHub remote cannot be observed, and the answer is exit 12 — unusable, never an empty queue.

    $ majordomus prs refresh

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs drain

Merge the next ready pull request, verify it landed, observe again, and repeat — at most `--max` merges; `--dry-run` decides without acting

majordomus prs drain [OPTIONS]

/docs/cli/prs/drain/ — this command on its own page

argumentvaluedefaultdescription
--max <MAX> 1 At most this many merges
--dry-run flag — Observe and decide, change nothing
--refresh flag — When nothing is ready, bring master into the first pull request that needs it (a merge commit with the derived driver and a fresh derive, pushed as a fast-forward), so that its checks run against the current master
--continuous flag — Drain, wait `--interval` seconds, and drain again until stopped, holding the lease throughout; each cycle is bounded by `--max` and observes before every step. Ctrl-C or SIGTERM lets the step in progress finish, then releases the lease; a second signal ends it at once. Never with `--dry-run`, and refused (exit 10) until the audit trail holds five verified merges since the last one that could not be verified: the last stage of the rollout (ADR 0101 §13)
--interval <INTERVAL> 300 With `--continuous`: seconds between cycles, 30 to 900
--resume-after-failure flag — A merge an earlier drain could not verify stops every drain until a person has looked at it: this records that someone has (`failure_acknowledged` on the trail), then drains. Never with `--dry-run`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A dry run starts from a fresh observation

    Even a dry run observes the forge first — a decision is never taken from the recorded observation — so where the forge cannot be reached it stops with exit 12 before deciding anything, and nothing is merged, refreshed or recorded.

    $ majordomus prs drain --dry-run

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs cleanup

Close the pull requests whose work is provably on master already; without `--apply` it only lists them

majordomus prs cleanup [OPTIONS]

/docs/cli/prs/cleanup/ — this command on its own page

argumentvaluedefaultdescription
--apply flag — Close them: each one observed again first and closed only if it is still superseded at the head that was decided on
--dry-run flag — List them and close nothing: the default, spelled out
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Cleanup lists before it closes, and observes before it lists

    Without `--apply` cleanup only lists the pull requests whose work is provably on master; either way it observes the forge first, so where there is none it exits 12.

    $ majordomus prs cleanup

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs repair

Bring master into one named pull request whose only conflict with it is over derived (`merge=derived`) files. Eligible only when the classification says it is behind master and its merge conflicts on no authored path; an authored conflict is refused, naming the files. A dry run by default, decided offline on the last recorded observation, like `status`. With `--apply` it takes the integration lease, observes the forge again, records the act on the trail first, and merges master in a scratch worktree, derives, commits and pushes a fast-forward leased on the observed head; it never merges into master. Exit 10 on a refusal or an absent observation, 12 when it could not act

majordomus prs repair [OPTIONS] <TARGET>

/docs/cli/prs/repair/ — this command on its own page

argumentvaluedefaultdescription
<TARGET> <TARGET> required The pull request: its number, or its head branch
--apply flag — Act: take the lease, observe the forge again, record the act, merge, derive, commit and push. Without it nothing is changed, fetched or recorded
--dry-run flag — Decide and change nothing: the default, spelled out
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A repair is decided on the recorded observation, or not at all

    The dry run, which is the default, is a read: it decides whether the named pull request may have master brought in from the queue the last recorded observation built, as `prs status` does, and reaches no network. Where nothing was ever observed there is no classification to decide from, so it exits 10 and names `prs refresh`; nothing is merged, pushed or recorded.

    $ majordomus prs repair 1

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs events

The audit trail: every selection, merge, refusal, stale decision and closure this checkout's executor recorded

majordomus prs events [OPTIONS]

/docs/cli/prs/events/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The audit trail of this checkout's executor

    Every selection, stale decision, merge with the master before and after, refusal, refresh and closure, oldest first. A checkout whose executor never ran has none, and says so.

    $ majordomus prs events

    What it asserts: exits 0; prints no integration action.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs trains

The trains of stacked pull requests, in landing order: each link's disposition, relation to master, prepared head under `refs/prep/<n>` (pushed or pending) and turn. Offline and read-only, from the last recorded observation; exit 10 when it is stale or absent

majordomus prs trains [OPTIONS]

/docs/cli/prs/trains/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The trains of stacked pull requests, where nothing is observed

    Every open pull request stacked on another, grouped into trains in landing order, with each link's prepared head under refs/prep/<n> and whether it was pushed. The same answer `GET /api/v1/pull-requests/trains` gives and /cockpit/trains draws. With no observation recorded it says why and exits 10.

    $ majordomus prs trains

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs brief

One line for a session briefing: the last queue built in this checkout (open, by lane, the next merge, the starving), who holds the integration lease and whether it reaches across machines, the last merge, and the last refresh, failure or stale decision. Offline, decides no relation, and prints nothing where the forge was never observed

majordomus prs brief [OPTIONS]

/docs/cli/prs/brief/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The briefing line, where nothing was observed

    What `majordomus context` prints under INTEGRATION: the last queue this checkout built, the lease and the last merge, in one line, read from files and never from the network. A checkout whose forge was never observed has nothing to say, prints nothing, and exits 0 — a briefing does not grow a section about an empty queue.

    $ majordomus prs brief

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus prs prove-dry-run

Prove the non-mutating cycle moves nothing: snapshot origin's refs, the open pull requests, the audit trail, the lease and the local refs, run refresh, plan, drain --dry-run and cleanup (listing), snapshot again and compare; the refresh's fetched mirrors must equal what origin serves. Exit 10 naming what moved. Takes no flag: there is nothing to turn on

majordomus prs prove-dry-run [OPTIONS]

/docs/cli/prs/prove-dry-run/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The proof needs a forge to prove anything about

    The proof snapshots origin's refs and the forge's open pull requests around refresh, plan, drain --dry-run and cleanup, and compares them. A repository with no GitHub remote has nothing to snapshot, so it exits 12 before any step runs: a proof that could not look is not a proof that nothing moved.

    $ majordomus prs prove-dry-run

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus offload

A branch's derive run on another machine the repository declares (.ai/repo/offload/), in that machine's turn: the hosts and their limits, a probe that names the host a derive would take, and the derive itself — bundle in, a FIFO queue on the host, a build directory of its own, bundle back, staged and never committed

majordomus offload [OPTIONS] <COMMAND>

/docs/cli/offload/ — this command on its own page

Subcommands: hosts, probe, derive.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--declaration <FILE> — Read this derive-offload declaration file instead of the repository's (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus offload hosts

The declared hosts and their limits, the queue and the remote layout, as the declaration states them; reads no host. A repository that declares none says so and exits 0

majordomus offload hosts [OPTIONS]

/docs/cli/offload/hosts/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--declaration <FILE> — Read this derive-offload declaration file instead of the repository's (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The declared hosts, or the answer that there are none

    Reads the repository's derive-offload declaration (.ai/repo/offload/*.yaml) and prints it with every default filled in: the hosts in tie-break order, each one's free-space minimum and ssh identity file, the queue's paths and the layout on a host. No host is contacted. This fixture declares none, which is an answer, not an error: `declared` is false and the declaration is null.

    $ majordomus offload hosts --format json

    What it asserts: exits 0; prints one JSON document carrying /declared, /declaration.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus offload probe

Measure every declared host — free space, derives running or waiting — and name the one a derive would take; exit 12 when none can take one

majordomus offload probe [OPTIONS]

/docs/cli/offload/probe/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--declaration <FILE> — Read this derive-offload declaration file instead of the repository's (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • No declared host, no probe

    Measures every declared host over ssh — free space under its home, derives running or waiting in its queue — and names the one a derive would take: the eligible host with the fewest, ties to the one declared first. A repository that declares no host has nothing to measure, and the probe refuses with 12 rather than reporting an empty success.

    $ majordomus offload probe

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus offload derive

Derive a worktree on a declared host and stage what it changed; nothing is committed or pushed. Exit 2 on an untracked file or an unresolved merge, 10 when the derive fails, 11 when it deletes a tracked file, 12 when no host can take it, 75 when the queue's wait runs out

majordomus offload derive [OPTIONS] [WORKTREE]

/docs/cli/offload/derive/ — this command on its own page

argumentvaluedefaultdescription
<WORKTREE> <WORKTREE> . The worktree to derive
--host <HOST> — A declared host, by id or address, instead of the one the probe chooses
--keep flag — Keep the host's worktree after the derive (it is removed by default; a failed derive's is always kept)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--declaration <FILE> — Read this derive-offload declaration file instead of the repository's (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A derive with nowhere to go is refused before anything travels

    Sends the worktree as it stands to a declared host as a git bundle, waits its turn in the host's FIFO queue, derives in a build directory of its own and stages the files the derive changed; nothing is committed or pushed. With no host declared it refuses with 12 before it reads the worktree, contacts anything or writes a ref.

    $ majordomus offload derive .

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus convergence

Is any of this repository's work held where it can be lost? Every holding — a work tree with uncommitted files, a branch with commits, a stash — with the disposition read from git, and one verdict over them

majordomus convergence [OPTIONS]

/docs/cli/convergence/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the verdict
  • text — Lines for a person
  • json — One JSON document, deterministic
--all flag — List every holding, not only the ones whose work exists on one disk

Examples

  • Is any work held where it can be lost?

    Every holding of this repository — a work tree with uncommitted files, a branch with commits, a stash — with the disposition read from git for each: integrated when the trunk reaches it, published when a remote-tracking ref does, local_only when nothing but this disk has it, uncommitted when it was never committed at all. The last two are at risk, and the verdict over them is what the completion invariant's `no-stale-topology` question reads. Measured offline: a remote-tracking ref is what this checkout last fetched, which is exactly the question — whether the work left this disk.

    $ majordomus convergence --format json

    What it asserts: exits 0; prints one JSON document carrying /schema, /converged, /at_risk, /tallies.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commit

The commit as a value: what the working tree would commit and how it divides, the scope vocabulary this repository's history yields, and the verdict on one message against the commit policy

majordomus commit [OPTIONS] [COMMAND]

/docs/cli/commit/ — this command on its own page

Subcommands: plan, scopes, history, validate.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What this tree would commit, and why

    `commit` with nothing after it plans, because that is what a person wants when they ask about committing. The branch, its upstream and divergence, what is staged and what is not, and the commits the history's own scoping supports — each with the evidence for it rather than an assertion. A clean tree says so.

    $ majordomus commit

    What it asserts: exits 0; prints branch, tree, fingerprint.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commit plan

What the working tree would commit: branch, upstream, divergence, every staged, unstaged and untracked path, any merge or rebase in progress, and the commits the history's own scoping supports — under a fingerprint that makes the plan refusable once the tree moves

majordomus commit plan [OPTIONS]

/docs/cli/commit/plan/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The plan, with the fingerprint that makes it refusable

    The fingerprint is the repository, the worktree, HEAD and a hash over every change with its stage. A caller holding a plan compares it with the tree in front of it and is told what moved — `HEAD moved from a1b2c3d4e to e4f5a6b70` — rather than being told nothing and committing somebody else's staged work.

    $ majordomus commit plan

    What it asserts: exits 0; prints fingerprint, nothing staged.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same answer, as the shape the API and MCP return

    One domain model behind every projection: this document is what `GET /api/v1/commit/plan` returns and what the `majordomus_commit_plan` tool answers, with the working tree, every group with its rationale, and the fingerprint.

    $ majordomus commit plan --format json

    What it asserts: exits 0; prints one JSON document carrying /fingerprint/repository, /fingerprint/worktree, /tree/changes.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commit scopes

Every scope this repository's commit history uses, how often, and the directories each one is written about

majordomus commit scopes [OPTIONS]

/docs/cli/commit/scopes/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The scope vocabulary, learned rather than declared

    Every scope this repository's own commits use, how often, and the directories each one is written about — read from at most 1500 commits of the log. Nothing here is configured: a subsystem committed today is in the vocabulary today, and one nobody has touched sinks on its own. A repository whose history is not conventional yields an empty vocabulary and says how many commits it read.

    $ majordomus commit scopes

    What it asserts: exits 0; prints learned from.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commit history

Judge every commit in a range of history against the commit policy, in one pass; exit 10 when any carries an error

majordomus commit history [OPTIONS] [RANGE]

/docs/cli/commit/history/ — this command on its own page

argumentvaluedefaultdescription
<RANGE> <RANGE> — Anything `git log` accepts: `origin/master..HEAD`, `v0.6.0..`, a bare `HEAD`. None is `HEAD`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A whole range judged in one pass

    One process for the range rather than one per commit: this reads 1755 commits of this repository's own history in about three and a half seconds, which is what lets `scripts/ci/commit-policy` be a gate rather than a nightly job. It reports how many were read, how many git composed and are therefore exempt, and how many carry an error — and exits 10 when any does.

    $ majordomus commit history

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus commit validate

Judge one commit message against the repository's commit policy; exit 10 when a finding is an error

majordomus commit validate [OPTIONS] [FILE]

/docs/cli/commit/validate/ — this command on its own page

argumentvaluedefaultdescription
<FILE> <FILE> — The file holding the message; none reads standard input, which is what the `commit-msg` hook has
--paths <PATHS> — Judge it as a commit of these paths, comma-separated: what needs them — whether a fix carries a test — is otherwise not judged rather than guessed
--rev <REV> — Judge the message of this commit instead of a file: any revision `git show` accepts
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The verdict on a commit that is already made

    `--rev` judges the message of any revision `git show` accepts; without it the message is read from a file or from standard input, which is the shape the `commit-msg` hook has. The exit code is the verdict: 0 when nothing of error severity was found, 10 when something was. Here the repository's first commit is subject `install`, which is not `type(scope): subject`, so the answer is 10 and the finding names the eleven type words.

    $ majordomus commit validate --rev HEAD

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product

The product: what this repository's tool does for a person, as the features under the layer declare it, with every surface, count and moment derived; the matrix of features against interfaces; the providers; and the model's own validation

majordomus product [OPTIONS] [COMMAND]

/docs/cli/product/ — this command on its own page

Subcommands: list, show, domains, matrix, providers, validate.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • What the product does, as the layer declares it

    `product` with nothing after it lists the features, because listing is what a person wants when they ask what the tool is for. Every column is derived: the surfaces a feature is exposed through come from the modules, commands and kinds it names, never from the file.

    $ majordomus product

    What it asserts: exits 0; prints SLUG, SURFACES, feature(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product list

Every feature, narrowed by any filter, with the surfaces derived for each

majordomus product list [OPTIONS]

/docs/cli/product/list/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • Every stable feature, in presentation order

    Drafts are excluded unless `--all` is given; `--featured` narrows to the features the homepage shows. The filters are the facets the model derives — an area, a module, a command, a surface — so a module added to the executable is a filter without anything being registered.

    $ majordomus product list

    What it asserts: exits 0; prints SLUG, fixture-feature.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    One domain model behind every projection: this document is what `GET /api/v1/product/features` returns and what the `majordomus_features` tool answers, with the counts, the fingerprint and the surfaces of every feature.

    $ majordomus product list --format json

    What it asserts: exits 0; prints one JSON document carrying /counts/features, /features/0/surfaces, /fingerprint.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product show

One feature in full: what it is made of, resolved, and everything derived from that

majordomus product show [OPTIONS] <ID>

/docs/cli/product/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The feature's id, which is also its slug and its route
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • One feature, with everything derived from what it names

    The record as its file declares it, then what nobody authored: the capabilities of its modules with their tools and routes, the commands with their summaries, the objects of its kinds counted, the rules with their class, the documents, the decisions, the claims with their status, the moments it answers, and the interfaces all of that adds up to.

    $ majordomus product show fixture-feature

    What it asserts: exits 0; prints fixture-feature, surfaces, derived.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product domains

The domains of the product, each with the stable features that name it and what they add up to

majordomus product domains [OPTIONS]

/docs/cli/product/domains/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • The few things the product controls, and the features under each

    One block per domain in presentation order: its promise, the failure it answers, and the stable features that name it, with the interfaces, claims and use cases they add up to. A domain lists nothing itself; every member and count is derived from the features.

    $ majordomus product domains

    What it asserts: exits 0; prints domain(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product matrix

Every feature against every interface, and every module, command and kind against the features that name it

majordomus product matrix [OPTIONS]

/docs/cli/product/matrix/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • Every feature against every interface, and what no feature names

    One row per feature with a mark per surface, then every module of the executable, every public command and every kind of the layer with the features that name it. A row with no feature is a gap the product page cannot hide.

    $ majordomus product matrix

    What it asserts: exits 0; prints FEATURE, cli, MODULE.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product providers

Every provider the tool has an adapter for, with what this repository does with it

majordomus product providers [OPTIONS]

/docs/cli/product/providers/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • Every provider the tool has an adapter for

    One line per template the distribution ships, with the bootstraps this repository's policy renders through it, the client configuration it carries for the shared MCP server, and the hooks the policy wires. The set is the templates; nothing here is a list of vendors.

    $ majordomus product providers

    What it asserts: exits 0; prints PROVIDER, agents.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus product validate

Every finding over the model; exit 10 when any is an error

majordomus product validate [OPTIONS]

/docs/cli/product/validate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic
--featured flag — Only the features the homepage shows (accepted by every subcommand)
--all flag — Include drafts and deprecated features, not only the stable ones (accepted by every subcommand)
--area <AREA> — Only features serving this operational area of the why catalogue (accepted by every subcommand)
--domain <DOMAIN> — Only features filed under this product domain (accepted by every subcommand)
--module <MODULE> — Only features made of this capability module (accepted by every subcommand)
--names-command <NAMES_COMMAND> — Only features made of this shell command (accepted by every subcommand)
--surface <SURFACE> — Only features exposed through this surface: cli, api, mcp, cockpit or docs (accepted by every subcommand)
-q, --query <QUERY> — Case-insensitive text over identities, titles, headlines, summaries, tags and bodies (accepted by every subcommand)

Examples

  • Check the model before anything projects it

    A reference that resolves to nothing, with the nearest candidate; a duplicate identity; a file name that disagrees with its id; a draft that is featured; a stable feature under its floors; and every module, command or kind no feature names. Exit 10 on any error.

    $ majordomus product validate

    What it asserts: exits 0; prints feature(s), valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus release

What this project has shipped and what it would ship next: the changelog derived from the layer's own records, the version authored in one place and projected for the shell tool, and the one command that raises it

majordomus release [OPTIONS] [COMMAND]

/docs/cli/release/ — this command on its own page

Subcommands: changelog, version, analyze, next, bump.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What has shipped, and what has not

    `release` with nothing after it renders the changelog. Every line of it is derived — a section per release the layer records, its decisions the ADRs dated inside that release's window, its changes the conventional commits in its range — so there is no file anyone can forget to update.

    $ majordomus release

    What it asserts: exits 0; prints Changelog.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus release changelog

The changelog, composed from the layer's release records, the decisions dated inside each release's window, and the conventional commits in its range

majordomus release changelog [OPTIONS]

/docs/cli/release/changelog/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The same document every other surface answers with

    What `GET /api/v1/changelog` returns, what the MCP resource `majordomus://changelog` carries, and what `majordomus generate changelog` writes into the reference. One value, four renderings.

    $ majordomus release changelog --format json

    What it asserts: exits 0; prints one JSON document carrying /schema, /current, /sections.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus release version

The version the crate manifest declares, whether the projection the shell tool reads states it, any version written by hand where the tool's files live, and the bump the commits since the last release imply

majordomus release version [OPTIONS]

/docs/cli/release/version/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The version, and the one the contract requires next

    The version is authored in one place, the crate manifest, and the shell tool reads its projection, share/version.txt, because an installed tree has no Cargo.toml. This says what the manifest declares, whether the projection states it, and — exit 10 — any version written down by hand where the tool's own files live. `next` is the public contract's answer, the version `release analyze` requires (the declared version when it already satisfies the contract, otherwise the smallest one it allows); `decided_by` names who answered, and the bump the commit subjects imply is carried as evidence. This fixture has published no release with a registry, so the contract cannot be measured: `next` is absent and `decided_by` is `undecided`, with the reason in `contract_unreadable` — an unmeasurable baseline is refused, not guessed.

    $ majordomus release version --format json

    What it asserts: exits 0; prints one JSON document carrying /declared, /agree, /bump, /decided_by.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus release analyze

What the public contract did since the last release, and the smallest version this tree may therefore declare

majordomus release analyze [OPTIONS]

/docs/cli/release/analyze/ — this command on its own page

argumentvaluedefaultdescription
--since <REF> — Measure against this ref instead of the last release
--explain flag — Name every movement of the contract and the reason it counts for what it does
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What the contract did, and the smallest version it allows

    The public capability surface of this tree against the one the last release published, and the smallest version this tree may therefore declare. The compatibility level is measured from the contract rather than read off the commit subjects: a capability, route, MCP tool, command or required field a caller could hold and cannot any more is breaking whatever the commit that removed it called itself. The same value answers `GET /api/v1/release/analysis`, the `majordomus_release_analysis` MCP tool, the Cockpit's Release page and the `version-surface` gate. A repository that has published nothing has no baseline to measure against, and says so with exit 12 rather than reporting an empty diff — which would read as "nothing changed".

    $ majordomus release analyze --format json

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus release next

The version a landing of HEAD onto the trunk allocates, and why: the trunk's version, the measured movement, the policy floor and any exemption (ADR 0134)

majordomus release next [OPTIONS]

/docs/cli/release/next/ — this command on its own page

argumentvaluedefaultdescription
--base <REF> — The trunk the landing raises from; when absent, the remote-tracking ref of the trunk this repository names
--head <REF> HEAD What lands
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What a landing would raise the version to

    The version the integration executor allocates when it lands a head on the trunk (ADR 0134): the trunk's version, the head's movement of the public contract measured against the trunk's committed registry, the policy floor and any exemption, and the larger of the requirement and the floor — read from git at the two refs, never from the branch's own version. This fixture has no trunk to raise from, and says so with exit 12 rather than inventing a number.

    $ majordomus release next --format json

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus release bump

Raise the version in the one place it is authored, to at least what the public contract requires; scripts/derive derives the rest

majordomus release bump [OPTIONS]

/docs/cli/release/bump/ — this command on its own page

argumentvaluedefaultdescription
--level <LEVEL> — Raise by this much instead of by the measured minimum; never below it
--exact <VERSION> — Set exactly this version; refused when it is below the measured minimum
--dry-run flag — Say what would change and write nothing
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text How to render the answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Raising it, in the one place it is authored

    The one writer, and it computes nothing: it reads the plan `release analyze` prints and applies it, so the version it writes is the measured minimum rather than a judgement of its own. `--level` and `--exact` name a higher version when a person means more than the contract did, and are refused below the minimum with nothing written — an override that could undershoot would make the measurement decorative. It rewrites the manifest's one version line and the lock's record of it, reads both back, and leaves share/version.txt and the generator stamps to scripts/derive. A repository that has published nothing has no baseline to raise from — the example runs in one — and says so with exit 12 rather than inventing a number.

    $ majordomus release bump --dry-run

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus quality

What this executable's own public surface is held to: documentation, executable examples, module coverage, and every command accounted for against the capability registry

majordomus quality <COMMAND>

/docs/cli/quality/ — this command on its own page

Subcommands: report, rustdoc.

Arguments: none.

majordomus quality report

Measure the crate and report every finding, with the rule it breaks and what to do about it

majordomus quality report [OPTIONS]

/docs/cli/quality/report/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--code <CODE> — Only findings carrying this code, e.g. RUST_PUBLIC_MISSING_EXAMPLE
--path <PATH> — Only findings under this repository-relative path prefix
--summary flag — Print the counts and leave the findings out
--include-baselined flag — Show the findings the baseline already accepts, which are left out by default
--write-baseline flag — Record today's findings as the accepted baseline, so the debt can shrink and cannot grow

Examples

  • Where the crate's public surface stands

    The counts alone: how much of the exported surface is documented and exampled, how many modules something exercises, and how the canonical operations stand against the command line, HTTP, OpenAPI and MCP. Exits 10 when any finding stands outside the recorded baseline.

    $ majordomus quality report --summary

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • One kind of finding, with the rule and the remedy

    Filtered to one violation code. Every finding carries the rule that requires it, where it is, why it matters and what to do — which is what lets a person and an agent act on the same report.

    $ majordomus quality report --code RUST_MODULE_MISSING_EXAMPLE --format json

    What it asserts: exits 0; prints one JSON document carrying /measured, /passes, /report/schema.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus quality rustdoc

Judge the crate's rustdoc tree against the crate: every page present, HEAD's, nothing broken or leaked

majordomus quality rustdoc [OPTIONS]

/docs/cli/quality/rustdoc/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--kind <KIND> — Only findings of this kind, e.g. missing-page, orphan-page, stale, link, machine-path
--summary flag — Print the verdict and the counts and leave the findings out
--tree <DIR> — Judge this directory instead of the rustdoc surface's artifact, e.g. site/public/rustdoc

Examples

  • Whether the crate's rustdoc tree is complete, current and sound

    The rustdoc surface's tree judged against the crate's own inventory: every exported item's page at its route, no page without an item, built from HEAD, the index and its assets present, every relative link resolved, nothing naming the machine or shaped like a credential. Exits 0 clean, 10 with findings, and 12 when there is nothing to judge — as here, in a repository that carries no Rust crate, or wherever the producer (scripts/rust-check --doc) has not run. A check that cannot see its subject says so; it never reports clean.

    $ majordomus quality rustdoc

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Another copy of the tree, judged the same way

    A directory named on the command line — the tree scripts/site-build composed into the site — judged by the same judgement, as the document every transport answers with: the verdict, the counts, every exported module with its page, and one typed finding per defect. Only a person at their own terminal names a directory; over HTTP and MCP the subject is always the surface's artifact.

    $ majordomus quality rustdoc --tree site/public/rustdoc --format json

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus run

Run a capability as an execution and follow it: its steps, its progress and its output as they happen

majordomus run [OPTIONS] <CAPABILITY>

/docs/cli/run/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
<CAPABILITY> <CAPABILITY> required The capability to run, by its canonical id (`health.report`, `objects.verify`)
--input <JSON> — Its input, as one JSON object; the capability's input schema is what validates it
--follow flag — Print the events as they arrive on stderr; on by default when stderr is a terminal
--quiet flag — Print nothing but the final output
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Watch an execution happen

    `run` starts a capability as an execution and follows it to its end: every step, every line it logs and every advance of its progress, as the handler reports them. `executions.demonstrate` exists to make that visible without waiting for real work — it reads nothing and writes nothing, and its only effect is the events it produces. The same execution, started from the Cockpit, streams the same events to a browser.

    $ majordomus run executions.demonstrate --input '{"steps":2,"delay_ms":0}' --format json

    What it asserts: exits 0; prints one JSON document carrying /state, /id, /output/steps, /steps/0/name.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus executions

The executions of the server serving this repository: what has run, what is running, and what each one said

majordomus executions [OPTIONS] [COMMAND]

/docs/cli/executions/ — this command on its own page

Subcommands: list, show, events, cancel, protocol.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What has run

    `executions` with nothing after it lists what the server serving this repository has run, newest first. In a checkout where no server is running it says so rather than pretending: an execution lives in the process that accepted it.

    $ majordomus executions

    What it asserts: exits 0; prints execution.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus executions list

Every execution the server remembers, newest first

majordomus executions list [OPTIONS]

/docs/cli/executions/list/ — this command on its own page

argumentvaluedefaultdescription
--state <STATE> — Only executions in this state (queued, running, cancelling, succeeded, failed, cancelled)
--capability <CAPABILITY> — Only executions of this capability
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every execution, as one document

    The same answer `GET /api/v1/executions`, the MCP tool `majordomus_executions` and the Cockpit's Executions page render, with the counts beside it: how many are remembered, how many are active, how many are waiting for a worker and how many live channels are following them.

    $ majordomus executions list --format json

    What it asserts: exits 0; prints one JSON document carrying /count, /active, /queued, /live_channels.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus executions show

One execution in full: its state, its steps, its diagnostics and what it produced

majordomus executions show [OPTIONS] <ID>

/docs/cli/executions/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The execution's id
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • An execution that is not there

    An execution lives in the process that accepted it and is remembered in bounded numbers, so asking for one nothing ran says so and exits with the missing-artifact code rather than inventing an empty answer. Against a running server, the same command prints that execution's state, its steps and what it produced.

    $ majordomus executions show x-20260101T120000Z-4c3b2a19

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus executions events

One execution's retained events, oldest first

majordomus executions events [OPTIONS] <ID>

/docs/cli/executions/events/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The execution's id
--after <AFTER> — Only events after this sequence number
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The events of an execution that is not there

    The retained events of one execution, oldest first, after a sequence number — what a reconnecting client reads before it opens the live channel. For an execution nothing ran, the same refusal as `show`.

    $ majordomus executions events x-20260101T120000Z-4c3b2a19

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus executions cancel

Ask an execution to stop

majordomus executions cancel [OPTIONS] <ID>

/docs/cli/executions/cancel/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The execution's id
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Asking an execution that is not there to stop

    Cancellation is cooperative: the flag is set and a task stops when it next looks at it. There is nothing to set for an execution nothing ran, and the command says so rather than reporting a success it did not have.

    $ majordomus executions cancel x-20260101T120000Z-4c3b2a19

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus executions protocol

The live channel's contract: where it is, what it writes, and the schema of each message

majordomus executions protocol [OPTIONS]

/docs/cli/executions/protocol/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The live channel's contract, from the types that implement it

    Where the WebSocket is, how a subscription and a reconnect are expressed, every message type, and the JSON Schema of each — derived from the Rust types, so a client validating against this is validating against the implementation. OpenAPI cannot describe a socket, which is why this is a capability and not a paragraph.

    $ majordomus executions protocol --format json

    What it asserts: exits 0; prints one JSON document carrying /protocol_version, /websocket, /event_types/0, /stream_types/0, /limits/max_events.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus devcontext

The context a development session should be given, compiled from the repository: for an issue, a milestone, an intent or a set of paths, what is selected and why, what was left out and why, what collapsed into what, and the budget

majordomus devcontext [OPTIONS] <COMMAND>

/docs/cli/devcontext/ — this command on its own page

Subcommands: compile, explain, policy.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus devcontext compile

Compile the context for a piece of work: every selected object with its provenance, the reason and the confidence, everything left out with the reason, what was deduplicated, and the per-tier budget; exit 10 when what may not be dropped already exceeds the budget

majordomus devcontext compile [OPTIONS]

/docs/cli/devcontext/compile/ — this command on its own page

argumentvaluedefaultdescription
--issue <ISSUE> — An issue id (`I0301`) or its canonical identifier
--milestone <MILESTONE> — A milestone id or slug, or its canonical identifier
--intent <INTENT> — What the session is trying to do, in words; the only input the compiler infers from
--path <PATHS> — A repository-relative path the work touches; repeat for each
--uri <URIS> — A canonical identifier to seed with directly; repeat for each
--budget-tokens <BUDGET_TOKENS> — The ceiling in estimated tokens
--max-depth <MAX_DEPTH> — How far from a seed the walk goes
--floor <FLOOR> — Relevance below which an entry is reported rather than given, between 0 and 1
--all-blocking-rules flag — Every blocking rule of the layer, not only the ones the work reaches
--source-ranges flag — Outline the Rust source under the work's paths into ranges (path, lines, symbol, reason, cost), spent by the budget beside the layer's objects
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The context a session working on one issue should be given

    The issue is the seed. Its milestone follows along the `belongs_to` edge of the composed graph, the code and the cases under the scope it declares follow from the paths, and the policy and the scope are governance every session is held to. Every selected line names the selector that reached it and why; everything left out is listed with the reason.

    $ majordomus devcontext compile --issue I0001

    What it asserts: exits 0; prints SELECTED, majordomus://issue/I0001, EXCLUDED.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the structure every other surface answers with

    The canonical form: `GET /api/v1/devcontext` and the `majordomus_devcontext` tool return this document. Entries keep their canonical identifier, the index's provenance, every discovery path with its confidence, and the cost in estimated tokens; nothing is flattened to prose.

    $ majordomus devcontext compile --issue I0001 --format json

    What it asserts: exits 0; prints one JSON document carrying /selected/0/uri, /selected/0/discovered_by/0/reason, /budget/limit_tokens, /fingerprint.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus devcontext explain

Why one canonical identifier is or is not in the context a request compiles to

majordomus devcontext explain [OPTIONS] <URI>

/docs/cli/devcontext/explain/ — this command on its own page

argumentvaluedefaultdescription
<URI> <URI> required The canonical identifier, `majordomus://<kind>/<identity>`
--issue <ISSUE> — An issue id (`I0301`) or its canonical identifier
--milestone <MILESTONE> — A milestone id or slug, or its canonical identifier
--intent <INTENT> — What the session is trying to do, in words; the only input the compiler infers from
--path <PATHS> — A repository-relative path the work touches; repeat for each
--uri <URIS> — A canonical identifier to seed with directly; repeat for each
--budget-tokens <BUDGET_TOKENS> — The ceiling in estimated tokens
--max-depth <MAX_DEPTH> — How far from a seed the walk goes
--floor <FLOOR> — Relevance below which an entry is reported rather than given, between 0 and 1
--all-blocking-rules flag — Every blocking rule of the layer, not only the ones the work reaches
--source-ranges flag — Outline the Rust source under the work's paths into ranges (path, lines, symbol, reason, cost), spent by the budget beside the layer's objects
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Why one thing is in the context

    The identifier is judged under the same request `compile` takes: selected, excluded with the reason, folded into another identifier, held by the index and never reached, or unknown.

    $ majordomus devcontext explain majordomus://issue/I0001 --issue I0001

    What it asserts: exits 0; prints selected, majordomus://issue/I0001.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus devcontext policy

The compiler's own rules: the tiers, every edge of the composed graph and what is done with it, the selectors, the defaults

majordomus devcontext policy [OPTIONS]

/docs/cli/devcontext/policy/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The compiler's own rules

    The tiers in the order the budget spends in, every edge kind the composed graph declares with the weight it is followed by or the reason it is refused, and which selectors infer rather than read.

    $ majordomus devcontext policy

    What it asserts: exits 0; prints TIER, is_a, REFUSED.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus guard

The edit guard: whether a provider's tool may write a file of this checkout now, judged from the active task's scope and the writing session's live mesh claims

majordomus guard <COMMAND>

/docs/cli/guard/ — this command on its own page

Subcommands: hook.

Arguments: none.

majordomus guard hook

Judge the edit a provider's pre-tool payload (on stdin) is about to make; exit 2 with the reason and the remedy when no claim covers it, 0 otherwise

majordomus guard hook [OPTIONS]

/docs/cli/guard/hook/ — this command on its own page

argumentvaluedefaultdescription
--provider <PROVIDER> claude-code The provider whose payload stdin carries; its session id on the mesh is `<provider>-<session_id>`
--repo <PATH> — Where a relative path in the payload is resolved from (default: the current directory); the checkout judged is the one the written file belongs to

Examples

  • Judge the edit a provider's pre-tool payload names

    What a provider's pre-tool hook runs before an edit: the payload arrives on stdin, and the command exits 2 with the reason and the remedy when no claim covers the path it names, 0 otherwise. Here stdin is empty, so it names no path, and the command lets the tool run.

    $ majordomus guard hook --provider claude-code

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh

The mesh: the nodes this repository's running server has discovered on the network, this machine's node identity, and the self-check that proves the prerequisites on this machine alone

majordomus mesh <COMMAND>

/docs/cli/mesh/ — this command on its own page

Subcommands: status, nodes, identity, enrol, doctor, firewall, peers, peer, state, events, verify, claim, release, session, handover, review, build-cache.

Arguments: none.

majordomus mesh status

Whether the mesh runs in this checkout's server and why not when it does not, with every provider's state and the registry's tallies

majordomus mesh status [OPTIONS]

/docs/cli/mesh/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Whether this checkout's server runs a mesh

    The mesh lives inside the shared server, so the command asks the running server for `mesh.status` and renders it. No server, or no mesh declaration, is an answer with its reason — never an error: the default posture is that nothing leaves the machine until a declaration says otherwise.

    $ majordomus mesh status

    What it asserts: exits 0; prints mesh.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh nodes

Every node the running server has observed, deduplicated by node identity, with trust, presence, endpoints and provenance

majordomus mesh nodes [OPTIONS]

/docs/cli/mesh/nodes/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The nodes the running server has observed

    One row per node, deduplicated by node identity across every discovery source, in node-id order: trust, presence, endpoints and where each observation came from. The registry lives in the server's memory; without a running server there are no nodes to list, and the command says so.

    $ majordomus mesh nodes

    What it asserts: exits 0; prints mesh.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh identity

This machine's node identity, public half only; absent is an answer, not an error

majordomus mesh identity [OPTIONS]

/docs/cli/mesh/identity/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • This machine's node identity, public half only

    The node id is a digest of the machine's Ed25519 public key, kept under the user's state directory — never inside a repository, and the signing key appears in no output. Absent is an answer: the identity is created when a mesh first activates.

    $ majordomus mesh identity

    What it asserts: exits 0; prints present.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh enrol

Add this machine's public key to the mesh declaration's trust list, once; commit it to join

majordomus mesh enrol [OPTIONS]

/docs/cli/mesh/enrol/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Enrol this machine in the repository's mesh

    Adds this machine's public key to trust.allow under a comment naming the machine, once; a listed key changes nothing. A repository that declares no mesh is refused (exit 13) before an identity is created or a file is touched: `majordomus init --extend` seeds the declaration.

    $ majordomus mesh enrol

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh doctor

Prove the mesh prerequisites on this machine alone: declaration, identity, sockets, multicast, broadcast, the protocol end to end, and the host firewall

majordomus mesh doctor [OPTIONS]

/docs/cli/mesh/doctor/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every mesh prerequisite, and the server's verdict on the declaration

    Deterministic checks in a fixed order — the declaration parses, the identity loads, a UDP socket binds, the multicast group joins, broadcast enables, and the protocol signs, encodes, parses and verifies in memory — then `runtime`: asked of this checkout's running server when one serves it, whether an enabled declaration actually activated the mesh. With no server, as here, the report is this process's and `runtime` says nothing was decided. Every check holds here, so the command exits 0; a failed check is a row that says why, and exits 10.

    $ majordomus mesh doctor

    What it asserts: exits 0; prints protocol.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh firewall

What the host firewall must admit for the declared mesh and whether it does; `apply` admits it, as root

majordomus mesh firewall [OPTIONS] [COMMAND]

/docs/cli/mesh/firewall/ — this command on its own page

Subcommands: apply.

argumentvaluedefaultdescription
--port <PORT> — The port this checkout's server listens on beyond loopback, when it does
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What the host firewall must admit for the declared mesh, and whether it does

    The admissions derived from the declaration and this machine's addresses — the multicast group's port, the hub ports whose address is this machine's, the server's port beyond loopback — the firewall front this host runs, the commands that admit them there, the firewall's own word about them, and what the kernel logged it dropping toward those ports in the last five minutes. Here, with no declaration, nothing is needed and the report says so; a rule observed missing or a logged drop exits 10.

    $ majordomus mesh firewall

    What it asserts: exits 0; prints backend, verdict.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh firewall apply

Run the commands that admit the plan on this host's firewall; needs root, and exits 10 when it refuses or the firewall still does not admit the mesh

majordomus mesh firewall apply [OPTIONS]

/docs/cli/mesh/firewall/apply/ — this command on its own page

argumentvaluedefaultdescription
--port <PORT> — The port this checkout's server listens on beyond loopback, when it does
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Admit the mesh through the host firewall, as root

    Runs the commands `mesh firewall` renders — one allow per rule and source network on ufw or nftables, the executable admitted on the macOS application firewall — and asks the firewall again, so the verdict is its own. It refuses, running nothing, without root or without a backend, and exits 10, as here, where nothing is declared and the example does not run as root.

    $ majordomus mesh firewall apply

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh peers

Every machine and runtime this checkout's server cooperates with, each link's state, and the active sessions; --full for every session and claim

majordomus mesh peers [OPTIONS]

/docs/cli/mesh/peers/ — this command on its own page

argumentvaluedefaultdescription
--full flag — Every session, claim, handover and review, not the summary
--live-claims flag — Only claims that are still held
--after <AFTER> — Only what moved after this Lamport stamp
--session <SESSION> — Only this session: its key or its bare id
--runtime <RUNTIME> — Only this runtime (`<node>-<runtime>`), or every runtime of a node id
--kind <KIND> — Only this collection: sessions, claims, overlaps, handovers or reviews
--limit <LIMIT> — At most this many of each collection, the newest first kept
--open flag — Only what is still open: active sessions, live claims, unanswered reviews, untaken handovers
--matching <MATCHING> — Only what mentions this text: a path, a branch, an issue, a pull request, a word
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Who cooperates, machine by machine

    Machines, runtimes, sessions and claims, from this checkout's running server. With no server, or with cooperation off, the answer says so and why — the mesh lives in the server's memory.

    $ majordomus mesh peers

    What it asserts: exits 0; prints cooperation inactive.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh peer

One runtime: its machine, liveness, link, sessions and claims; exits 10 when it is not known here

majordomus mesh peer [OPTIONS] <RUNTIME>

/docs/cli/mesh/peer/ — this command on its own page

argumentvaluedefaultdescription
<RUNTIME> <RUNTIME> required The runtime key `<node>-<runtime>`, or a node id for its first runtime
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One runtime, by its key

    A runtime's machine, liveness, link, sessions and claims. A runtime the running server does not know is `not found`; with no server there is nobody to ask, and the answer says that rather than reporting an absence it never measured.

    $ majordomus mesh peer 00000000000000000000000000000000-0000000000000000

    What it asserts: exits 0; prints cooperation inactive.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh state

The state every linked runtime converges on, summarised with its digest; --full for every session, claim, handover and review

majordomus mesh state [OPTIONS]

/docs/cli/mesh/state/ — this command on its own page

argumentvaluedefaultdescription
--full flag — Every session, claim, handover and review, not the summary
--live-claims flag — Only claims that are still held
--after <AFTER> — Only what moved after this Lamport stamp
--session <SESSION> — Only this session: its key or its bare id
--runtime <RUNTIME> — Only this runtime (`<node>-<runtime>`), or every runtime of a node id
--kind <KIND> — Only this collection: sessions, claims, overlaps, handovers or reviews
--limit <LIMIT> — At most this many of each collection, the newest first kept
--open flag — Only what is still open: active sessions, live claims, unanswered reviews, untaken handovers
--matching <MATCHING> — Only what mentions this text: a path, a branch, an issue, a pull request, a word
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The state every linked runtime converges on

    Sessions, claims with their standing, handovers, reviews and the digest two runtimes compare — or, with no running server, why there is none.

    $ majordomus mesh state

    What it asserts: exits 0; prints cooperation inactive.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Every claim still held

    The whole state with only the claims still held, as docs/MESH.md lists it — or, with no running server, why there is none.

    $ majordomus mesh state --full --live-claims

    What it asserts: exits 0; prints cooperation inactive.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh events

The cooperation journal's events after a Lamport stamp, in Lamport order

majordomus mesh events [OPTIONS]

/docs/cli/mesh/events/ — this command on its own page

argumentvaluedefaultdescription
--after <AFTER> — Only events whose Lamport stamp is above this
--cursor <CURSOR> — Resume after the cursor the previous answer printed: every event exactly once
--limit <LIMIT> — At most this many (default 100, at most 1000)
--newest flag — The newest events instead of the first ones after `--after`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One page of the cooperation journal

    The journal's signed events above a Lamport stamp; `--after` is the previous page's `lamport`. With no running server the answer is the reason.

    $ majordomus mesh events --after 0 --limit 50

    What it asserts: exits 0; prints cooperation inactive.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh verify

Prove cooperation now: local health, a live round with every peer this server dials, and convergence; exits 10 when a check fails

majordomus mesh verify [OPTIONS]

/docs/cli/mesh/verify/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Prove cooperation now, or say why it cannot

    A live round with every peer the server dials and the local checks, each failure with its impact and remedy. It exits 10 when anything fails — here, because no server runs to verify.

    $ majordomus mesh verify

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh claim

Claim repository paths for a session; exits 10 naming the claims it meets when an exclusive claim on any linked runtime holds them

majordomus mesh claim [OPTIONS] <SCOPE>

/docs/cli/mesh/claim/ — this command on its own page

argumentvaluedefaultdescription
<SCOPE> <SCOPE> required Repository-relative paths to claim
--session <SESSION> required The claiming session's id within this runtime (opened when new)
--intent <INTENT> — What the claim is for
--advisory flag — An advisory claim: overlaps are reported, never refused
--issue <ISSUE> — The issue the claim is for
--task <TASK> — The task the session works under
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Claim paths for a session across the mesh

    An exclusive claim that meets a live exclusive claim on any linked runtime exits 10 with claim_conflict naming it. A claim needs the running server that replicates it; without one the command exits 10 and says so.

    $ majordomus mesh claim docs --session s1 --issue '#184'

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh release

Release a claim this server's current run holds

majordomus mesh release [OPTIONS] <CLAIM>

/docs/cli/mesh/release/ — this command on its own page

argumentvaluedefaultdescription
<CLAIM> <CLAIM> required The claim's key, `<stream>/<claim>`, as `mesh claim` printed it
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Release a claim this server holds

    Only the holder's current run releases a claim; a dead holder's claim expires instead. Without a running server there is nothing to release, and the command exits 10.

    $ majordomus mesh release stream/c-000000000000

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh session

Open, update or close a session on the mesh

majordomus mesh session <COMMAND>

/docs/cli/mesh/session/ — this command on its own page

Subcommands: open, close.

Arguments: none.

majordomus mesh session open

Open or update a session: what it is, what it does, where

majordomus mesh session open [OPTIONS]

/docs/cli/mesh/session/open/ — this command on its own page

argumentvaluedefaultdescription
--session <SESSION> required The session's id within this runtime
--client <CLIENT> — The client (`claude-code`, `codex`, `cli`)
--worker <WORKER> — The worker's name for itself
--intent <INTENT> — What the session is doing
--task <TASK> — The task id
--issue <ISSUE> — The issue
--milestone <MILESTONE> — The milestone
--branch <BRANCH> — The branch
--head <HEAD> — The head commit
--client-pid <PID|auto> — The client process the session belongs to: a pid, or `auto` for the nearest ancestor that is not a shell. The runtime closes the session once it has ended
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Say what a session is doing, to every linked runtime

    Client, intent, issue and branch of a session, replicated to every linked runtime. It needs the running server; without one it exits 10.

    $ majordomus mesh session open --session s1 --client codex --issue '#184'

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh session close

Close a session; its claims end with it on every linked runtime

majordomus mesh session close [OPTIONS]

/docs/cli/mesh/session/close/ — this command on its own page

argumentvaluedefaultdescription
--session <SESSION> required The session's id within this runtime
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Close a session and end its claims

    Every claim the session holds ends with it, on every linked runtime. It needs the running server; without one it exits 10.

    $ majordomus mesh session close --session s1

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh handover

Publish a handover of this checkout to the mesh, or consume one another runtime published

majordomus mesh handover <COMMAND>

/docs/cli/mesh/handover/ — this command on its own page

Subcommands: publish, consume.

Arguments: none.

majordomus mesh handover publish

Publish this checkout's newest handover record (or the one named) to every linked runtime

majordomus mesh handover publish [OPTIONS]

/docs/cli/mesh/handover/publish/ — this command on its own page

argumentvaluedefaultdescription
--path <PATH> — The record, relative to the repository root, under .ai/local/state/handovers/
--issue <ISSUE> — The issue the handover belongs to
--milestone <MILESTONE> — The milestone it belongs to
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Publish this checkout's newest handover

    The newest record under .ai/local/state/handovers/ travels to every linked runtime, bounded and identified by its body's digest. It needs the running server; without one it exits 10.

    $ majordomus mesh handover publish --issue '#184'

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh handover consume

Consume a handover another runtime published, writing it as a local record `handover --resolve` finds

majordomus mesh handover consume [OPTIONS] <HANDOVER>

/docs/cli/mesh/handover/consume/ — this command on its own page

argumentvaluedefaultdescription
<HANDOVER> <HANDOVER> required The handover's id, as `mesh state` lists it
--session <SESSION> required The consuming session's id within this runtime
--no-materialize flag — Record the consumption without writing a local handover record
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Consume a handover another runtime published

    Records the consumption and writes the handover where `majordomus handover --resolve` finds it on the same branch. It needs the running server; without one it exits 10.

    $ majordomus mesh handover consume 00000000000000000000000000000000 --session s1

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh review

Ask the mesh for a review, or answer a request

majordomus mesh review <COMMAND>

/docs/cli/mesh/review/ — this command on its own page

Subcommands: request, answer, withdraw.

Arguments: none.

majordomus mesh review request

Ask for a review of a branch, commit or pull request

majordomus mesh review request [OPTIONS] <SUBJECT>

/docs/cli/mesh/review/request/ — this command on its own page

argumentvaluedefaultdescription
<SUBJECT> <SUBJECT> required What to review: a branch, a commit, a pull request
--session <SESSION> required The requesting session's id within this runtime
--scope <SCOPE> — A path the review covers (repeatable)
--issue <ISSUE> — The issue
--reviewer <REVIEWER> — The runtime asked, `<node>-<runtime>`
--body <BODY> — What the reviewer needs beyond the subject: evidence, commands, the question (up to 8 KiB)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Ask the mesh for a review

    A named reviewer must be a linked runtime carrying the reviews feature, or the request exits 10 with feature_unsupported. It needs the running server; without one it exits 10.

    $ majordomus mesh review request feature/x --session s1

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh review answer

Answer a review request

majordomus mesh review answer [OPTIONS] <REQUEST>

/docs/cli/mesh/review/answer/ — this command on its own page

argumentvaluedefaultdescription
<REQUEST> <REQUEST> required The request's key, `<stream>/<review>`
--session <SESSION> required The answering session's id within this runtime
--verdict approved | changes_requested | commented required What the reviewer decided
  • approved — the work is good as it stands and the requester may proceed
  • changes_requested — the work needs changing before it proceeds; the note says what
  • commented — an observation with no verdict: neither approval nor a request to change
--note <NOTE> — The note
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Answer a review request from any runtime

    approved, changes_requested or commented, with a note, replicated to every linked runtime. It needs the running server; without one it exits 10.

    $ majordomus mesh review answer stream/r-000000000000 --session s1 --verdict approved

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh review withdraw

Withdraw a review request this runtime asked for, with its result

majordomus mesh review withdraw [OPTIONS] <REQUEST>

/docs/cli/mesh/review/withdraw/ — this command on its own page

argumentvaluedefaultdescription
<REQUEST> <REQUEST> required The request's key, `<stream>/<review>`
--session <SESSION> required The withdrawing session, within the runtime that asked
--note <NOTE> — What came of it, or why it is void (up to 8 KiB)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Withdraw a review request with its result

    Only the runtime that asked may withdraw its request, from any of its sessions; the note is the requester's own result and never an answer. It needs the running server; without one it exits 10.

    $ majordomus mesh review withdraw stream/r-000000000000 --session s1 --note superseded

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh build-cache

The mesh build cache: what each dependency install and build directory is cached under

majordomus mesh build-cache <COMMAND>

/docs/cli/mesh/build-cache/ — this command on its own page

Subcommands: key, ensure, env, provision.

Arguments: none.

majordomus mesh build-cache key

Every lockfile the repository tracks, with the key its install or build directory is cached under: schema version, platform, toolchain and input digest

majordomus mesh build-cache key [OPTIONS]

/docs/cli/mesh/build-cache/key/ — this command on its own page

argumentvaluedefaultdescription
--kind cargo-build-dir | mix-deps | npm-modules — Only this kind
  • cargo-build-dir — The cargo build directory of a workspace: the dependencies compiled on the way, without incremental state. Restored only into a directory that is cold
  • mix-deps — The `deps/` directory `mix deps.get` fills
  • npm-modules — The `node_modules/` directory `npm ci` fills
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What each lockfile's install is cached under

    Every lockfile the repository tracks becomes a cacheable thing with a key: a schema version, the platform, the toolchain as its executables state it, and the digest of its inputs. `--kind` narrows it to one kind; a repository with no lockfile of that kind says nothing here is cacheable, and a kind whose toolchain is absent says why it has no key.

    $ majordomus mesh build-cache key --kind mix-deps

    What it asserts: exits 0; prints platform.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh build-cache ensure

Restore a dependency install or a cold cargo build directory from the local level or this node's store, verified by its digest; on a miss run the command and save what it left. MAJORDOMUS_BUILD_CACHE=off bypasses every level

majordomus mesh build-cache ensure [OPTIONS] <KIND> [COMMAND]

/docs/cli/mesh/build-cache/ensure/ — this command on its own page

argumentvaluedefaultdescription
<KIND> cargo-build-dir | mix-deps | npm-modules required What is cached: npm-modules, mix-deps or cargo-build-dir
  • cargo-build-dir — The cargo build directory of a workspace: the dependencies compiled on the way, without incremental state. Restored only into a directory that is cold
  • mix-deps — The `deps/` directory `mix deps.get` fills
  • npm-modules — The `node_modules/` directory `npm ci` fills
--dir <DIR> — The directory holding the lockfile, relative to the repository (default: the only one, or the current one)
<COMMAND> <COMMAND> — The install or build command, after `--`: run on a miss (and for mix and cargo on every run)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Run an install through the build cache

    The command after `--` is what the install would run anyway. With the lockfile's key already in place nothing runs; a hit is restored from the local level or this node's store after its SHA-256 matches, and npm's install is then not run; a miss runs the command and saves what it left. A repository that tracks no such lockfile runs the command uncached and says why, as here; MAJORDOMUS_BUILD_CACHE=off bypasses every level. The exit code is the command's.

    $ majordomus mesh build-cache ensure npm-modules -- true

    What it asserts: exits 0; prints source uncached.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh build-cache env

The sccache client configuration for the store this node selected, as a script `eval` reads: local disk first, the store second only when it is healthy now, the credential by file path only

majordomus mesh build-cache env [OPTIONS]

/docs/cli/mesh/build-cache/env/ — this command on its own page

argumentvaluedefaultdescription
--sccache <SCCACHE> — The sccache executable to ask (a name on PATH or a path); `sccache` when unset
--node-file <NODE_FILE> — The node file that names the store this node offers or knows; `~/.config/majordomus/build-cache.json` when unset
--credentials <CREDENTIALS> — The AWS-format credential file, mode 0600, profile `mesh-build-cache`; `~/.config/mesh-build-cache/credentials` when unset
--format text | json text `text` is the script an `eval` reads; `json` is the full answer, with its reason
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The sccache client of this node, derived

    The environment the process that starts the sccache server should have: local disk first and the selected store second, only when sccache has the chain, a credential file of mode 0600 exists and the store answers now; otherwise nothing, and the comment line says which condition did not hold. The credential is a file path, never a key. `--format json` gives the whole answer.

    $ majordomus mesh build-cache env --sccache no-such-sccache

    What it asserts: exits 0; prints build cache: local-only.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus mesh build-cache provision

Plan what this host still owes as a cache provider, or with --apply bring it there as root; idempotent, no secret reported

majordomus mesh build-cache provision [OPTIONS]

/docs/cli/mesh/build-cache/provision/ — this command on its own page

argumentvaluedefaultdescription
--dry-run flag — Only plan (the default)
--apply flag — Carry the plan out; needs root on the real root
--root <ROOT> — Read and write the host's paths under this directory instead of `/`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What this host still owes as a mesh build cache provider

    The plan of the provider's host layer against what this machine holds: the disk guard and its timer, the always-restart service drop-ins, the bounded journal and container log, the identity and credential of every node and the rustc wrapper, each file marked missing, different, wrong mode or current, and the commands an apply would run. It plans only and names no secret; `--apply` as root brings the host to it, and a second apply changes nothing.

    $ majordomus mesh build-cache provision --dry-run

    What it asserts: exits 0; prints disk-guard, plan.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus monitor

Everything that happens around this repository, followed in one stream: mesh sessions, claims, handovers and reviews on every linked machine, the executor's merges and failures, and GitHub's pull requests and runs, with what is addressed to you marked

majordomus monitor [OPTIONS]

/docs/cli/monitor/ — this command on its own page

argumentvaluedefaultdescription
--follow flag — Keep following: ask again every `--interval` seconds and print only what is new
--after <AFTER> — Start after this cursor (a page's `cursor`), instead of the newest signals
--cursor-file <FILE> — Keep the cursor in this file: start after the one it holds (unless `--after` is given) and write each page's cursor back, so a restarted watcher repeats nothing
--limit <LIMIT> — At most this many signals per page (default 50, at most 500)
--sources <SOURCES> — A comma-separated subset of mesh, executor and github (default: all three)
--for <READER> — Your names, comma-separated (a worker such as 1b, a role, a login): what names them is marked for you; default $MAJORDOMUS_MONITOR_FOR
--since <SINCE> — How far back the first page reaches: seconds, or a number with s, m, h or d (default 1h)
--match <PATTERN> — Keep only signals whose summary contains this text (case-insensitive)
--count <COUNT> — Stop following after this many signals
--until <UNTIL> — Stop following at the first signal of this kind (e.g. merged, review_requested, run_failed)
--timeout <TIMEOUT> — Give up following after this long, exiting 10: seconds, or a number with s, m, h or d
--interval <INTERVAL> 2 Seconds between two asks while following
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What happened in the last half hour

    One page of the stream — the mesh, the executor's trail and GitHub — with what names you listed first. With no running server the answer is the reason.

    $ majordomus monitor --since 30m --for 1b

    What it asserts: exits 0; prints no running server.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • Wait for a pull request to merge

    Follow the stream and exit 0 at the first merge whose summary names #885; `--timeout` gives up with exit 10, as it does here within a second when no server answers.

    $ majordomus monitor --follow --match '#885' --until merged --timeout 1s --interval 1

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus models

The model catalogue the distribution declares, and the explainable routing over it: vendors, canonical model references, typed capabilities, and which model a stated need selects — with why, for every candidate

majordomus models <COMMAND>

/docs/cli/models/ — this command on its own page

Subcommands: list, route.

Arguments: none.

majordomus models list

Every declared vendor and model, optionally narrowed; the order is the declaration's, which is routing's preference order

majordomus models list [OPTIONS]

/docs/cli/models/list/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--vendor <VENDOR> — Only this vendor
--capability <CAPABILITY> — Only models declaring this capability word
--id <ID> — One model, by canonical id or alias
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The declared model catalogue

    Every vendor and model share/models.yaml declares, in declaration order — which is also routing's preference order. Vendors show whether their named credential variable is set: presence only, never a value. An empty catalogue is an answer, not an error.

    $ majordomus models list

    What it asserts: exits 0; prints model(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus models route

Which model a stated need selects, the fallback chain behind it, and why every excluded model fell out

majordomus models route [OPTIONS]

/docs/cli/models/route/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--require <REQUIRE> — Capability words the model must declare, comma-separated: `vision,tools`
--min-context <MIN_CONTEXT> — The least context window, tokens
--vendor <VENDOR> — Only this vendor
--local-only flag — Only local inference
--model <MODEL> — A model named outright, by canonical id or alias; still checked against the other requirements
--format text | json text `text` for a person, `json` for a machine; both render the same answer
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Which model a need selects, and why

    The first declared model satisfying every requirement wins; the qualifying rest are the fallback chain, and every excluded model carries the first check it failed. Pure over the declared data — the same question always gets the same answer, and the reasons are in it.

    $ majordomus models route --require text

    What it asserts: exits 0; prints selected.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus reasoning

Provider-independent reasoning: the optional advisors and what they can do now, what an uncertainty calls for, the session's reasoning records, their state and provenance, and the checks that keep reasoning independent of any advisor

majordomus reasoning [OPTIONS] <COMMAND>

/docs/cli/reasoning/ — this command on its own page

Subcommands: advisors, plan, record, status, explain, check.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus reasoning advisors

Every advisor with its status and why, the mode in force, and who can provide each advisory capability now; no advisor at all is an ordinary answer

majordomus reasoning advisors [OPTIONS]

/docs/cli/reasoning/advisors/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The advisors, and what they can do now

    Every declared advisor with its status and why — available, unavailable, not_configured, disabled, temporarily_failed, rate_limited — from presence alone (an executable on PATH, a credential variable set, never a value), the mode in force and the recorded outcomes of earlier consultations; then who can provide each advisory capability now. Reasoning is operational whether or not any advisor is.

    $ majordomus reasoning advisors

    What it asserts: exits 0; prints reasoning operational.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same answer as one document

    The report the API and the MCP tool return: `operational`, the mode and what decided it, every advisor with its status and reason, and the capacity per capability. A script reads this rather than the text form.

    $ majordomus reasoning advisors --format json

    What it asserts: exits 0; prints one JSON document carrying /operational, /mode, /advisors, /capacity.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus reasoning plan

Whether a stated uncertainty warrants independent review, how much, and from which available advisors — with every advisor left out and why; records nothing

majordomus reasoning plan [OPTIONS]

/docs/cli/reasoning/plan/ — this command on its own page

argumentvaluedefaultdescription
--materiality <MATERIALITY> material trivial, low, material, high or critical
--confidence <CONFIDENCE> medium low, medium or high
--capabilities <CAPABILITIES> — Advisory capabilities review needs, comma-separated
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What a material uncertainty calls for

    Whether independent review is worth having, how many advisors the mode allows, which available advisors a capability-driven selection asks, and why every other advisor is left out. With no suitable advisor the plan is the structured local review. Nothing is recorded.

    $ majordomus reasoning plan --materiality material

    What it asserts: exits 0; prints outcome, budget.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • A high uncertainty that asks for named capabilities

    The selection covers the requested capabilities first, then prefers an advisor reached through a different adapter, then declaration order; every advisor not selected carries its reason. With none available the outcome is the structured local review.

    $ majordomus reasoning plan --materiality high --capabilities independent_reasoning,code_review

    What it asserts: exits 0; prints outcome, budget.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus reasoning record

Record one reasoning step of the open task from JSON (`{"kind":"assessment",...}`) read from --file or standard input; a record that breaks a rule is refused and nothing is written

majordomus reasoning record [OPTIONS]

/docs/cli/reasoning/record/ — this command on its own page

argumentvaluedefaultdescription
--file <FILE> — The JSON record; standard input when absent
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Input that is not a record is refused

    The writer reads one JSON record (`{"kind":"assessment",...}`) from --file or standard input. Anything else — here a YAML file — is refused with exit 13 and nothing is written; so is a record that breaks a rule, such as a plan for an assessment nobody recorded.

    $ majordomus reasoning record --file share/advisors.yaml

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus reasoning status

The reasoning state of the open task — assessments, consultations, disagreements, conclusions, the timeline — and the report a handover carries

majordomus reasoning status [OPTIONS]

/docs/cli/reasoning/status/ — this command on its own page

argumentvaluedefaultdescription
--task <TASK> — A task id, or `all`
--report flag — Print only the Markdown report (empty when there is nothing to report)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The reasoning state of the open task

    Assessments and where each stands, consultations and how each ended, disagreements and what settled them, conclusions with their computed review and validation, and the timeline — derived from the records alone.

    $ majordomus reasoning status --task all

    What it asserts: exits 0; prints records.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus reasoning explain

One record with the whole chain of its assessment: why a decision was made

majordomus reasoning explain [OPTIONS] <ID>

/docs/cli/reasoning/explain/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The record id
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Why a decision was made

    One record with the whole chain of its assessment. An id nothing recorded is refused as not found.

    $ majordomus reasoning explain conclusion-absent

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus reasoning check

Check that reasoning stays provider-independent and that every record is consistent; exit 10 on a finding

majordomus reasoning check [OPTIONS]

/docs/cli/reasoning/check/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text `text` for a person, `json` for a machine; both render the same answer (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Check that reasoning stays provider-independent

    The advisor catalogue's references, the transport adapters, the provider-independent sources, CI, the documents and every stored record; exit 10 on a finding.

    $ majordomus reasoning check

    What it asserts: exits 0; prints checks.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus evidence

What actually ran and what it proves: every claim of the matrix against the runs recorded for it, one claim's proof, one test's claims, and the recording of a run that happened

majordomus evidence [OPTIONS] <COMMAND>

/docs/cli/evidence/ — this command on its own page

Subcommands: show, claim, proves, record, stamp.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus evidence show

Every claim against the evidence recorded for it

majordomus evidence show [OPTIONS]

/docs/cli/evidence/show/ — this command on its own page

argumentvaluedefaultdescription
--state <STATE> — Only claims in this proof state (proven, inputs_unchanged, stale, failing, not_run, unrunnable, no_test)
--status <STATUS> — Only claims declaring this status (guaranteed, advisory, planned, rejected)
--findings flag — Only the claims whose declared status the evidence does not support
--check flag — Exit 10 when a claim declares a guarantee the evidence does not support
--presented <REV> — Judge at the checked-out commit as committed (HEAD, or any name of it), from the ledger that commit holds, instead of at the working tree
--presented-tree clean | dirty | unknown — What you know about the presented commit's tree (clean, dirty, unknown); it can only weaken the measured state
  • clean — Nothing you know of: the measured state stands
  • dirty — The build did not come from the commit as committed; nothing reads as proven
  • unknown — You cannot say whether it did; nothing reads as proven
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The whole join, as one document

    The same answer `GET /api/v1/evidence` and the MCP tool `majordomus_evidence` return: every claim with its proof state, the sentence that explains how that state was derived, the execution behind it, the files that have changed since, and the command that produces the proof again. The tallies count the whole matrix even when the claims are filtered, so a narrowed answer never misreports how much of it was examined.

    $ majordomus evidence show --format json

    What it asserts: exits 0; prints one JSON document carrying /claims, /totals, /ledger/path, /findings.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The checked-out commit, judged as committed

    The reading a site built from this commit needs: every claim judged from the ledger the commit holds rather than the working tree's, against the commit's own tree, measured without the ledger's working copy. The first line names what was judged. A run the working ledger holds that the commit's does not can only withhold `proven`, and is named when there is one; a revision other than the checked-out commit is refused.

    $ majordomus evidence show --presented HEAD

    What it asserts: exits 0; prints judged at, as committed.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus evidence claim

One claim: its proof state, the execution behind it, and how to reproduce it

majordomus evidence claim [OPTIONS] <ID>

/docs/cli/evidence/claim/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The claim id, as docs/CLAIMS.yaml spells it
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A claim the matrix does not declare

    A claim id nothing declares is a not-found rather than an empty answer. A typo that read as `this claim has no evidence` is the one answer this command must never give, because it is indistinguishable from the finding the whole subsystem exists to report.

    $ majordomus evidence claim no-such-claim-exists

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus evidence proves

One test: its latest execution and every claim it proves

majordomus evidence proves [OPTIONS] <ID>

/docs/cli/evidence/proves/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required `suite:<case>`, `crate:<binary>`, or the path a claim names it with
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Something that names no test

    A test is named by its identity (`suite:<case>`, `crate:<binary>`) or by the path a claim writes down, and the two resolve to the same thing. An argument that is neither is refused with the spellings it could have been, rather than answered with a test that proves nothing.

    $ majordomus evidence proves not-a-test

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus evidence record

Record a run that happened into the ledger

majordomus evidence record [OPTIONS]

/docs/cli/evidence/record/ — this command on its own page

argumentvaluedefaultdescription
--suite <SUITE> — The runner's TSV report (`MJ_TEST_REPORT=<file> bash test/run.sh`)
--crate-output <CRATE_OUTPUT> — A file holding `cargo test`'s output, for the crate's own integration tests
--origin <ORIGIN> — Where the run happened: local (the default), ci or release
--provenance <[PRODUCER=]FILE> — The file `evidence stamp --out` wrote; prefix `suite=`, `crate=` or `coverage=` when the file names no producer and several reports are given
--coverage <COVERAGE> — The summary `scripts/rust-coverage --summary-json` wrote
--ledger <LEDGER> — repo (the default) or local
--run-record <RUN_RECORD> — Also write the run record to this file
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Recording a report that is not there

    The recorder reads what a run already wrote — the suite's TSV report, `cargo test`'s output — and stamps it with the provenance the run did not carry. A report it cannot read is refused: recording nothing would leave every claim reading `not run` after a run that ran, which is a lie in the safe direction and still a lie.

    $ majordomus evidence record --suite target/no-such-run.tsv

    What it asserts: exits 13.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus evidence stamp

Measure the checkout as a run left it, for `record --provenance`

majordomus evidence stamp [OPTIONS]

/docs/cli/evidence/stamp/ — this command on its own page

argumentvaluedefaultdescription
--producer <PRODUCER> — The producer whose run this is: suite, crate or coverage
--report <REPORT> — The report the run wrote
--exclude <EXCLUDE> — One of the run's own untracked outputs (a file, or a directory with everything under it)
--out <OUT> — Write the measurement to this file
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What a run measured, as one document

    The measurement a runner takes when its run ends: the commit, the tree with the evidence ledger ignored and the run's own untracked outputs excluded, the producer, its toolchain, the recorder's version and the host. `evidence record --provenance` carries it into the executions of that run's report.

    $ majordomus evidence stamp --producer suite --format json

    What it asserts: exits 0; prints one JSON document carrying /producer, /commit, /working_tree, /recorder, /host.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus served

Whether a deployment serves the commit it was meant to: observe the build identity it serves, judged by commit containment, and read each deployment's recorded standing against a commit

majordomus served [OPTIONS] <COMMAND>

/docs/cli/served/ — this command on its own page

Subcommands: observe, forge, show.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus served observe

Probe the build identity a deployment serves, judge it against a commit and record it

majordomus served observe [OPTIONS]

/docs/cli/served/observe/ — this command on its own page

argumentvaluedefaultdescription
--commit <COMMIT> — The commit expected to be served (default HEAD)
--url <URL> — The base URL (default: the provider URL of the deployment object --deployment names, else base_url of site/config.toml)
--identity <IDENTITY> — The identity under the base (default: that object's liveness route, else build.json)
--deployment <DEPLOYMENT> — The name the observation is recorded under (default pages)
--timeout <TIMEOUT> — Bound on the probe, in seconds (default 10)
--dry-run flag — Judge without recording
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A deployment that could not be reached is not a deployment that is current

    One bounded probe of the build identity under the base URL, judged against HEAD. Nothing listens on the discard port, so nothing is received and the verdict is `unreachable` with exit 12 — the unanswered question, never the yes. `--dry-run` judges without recording. Against the public site the same command answers `served` (0) when the build contains the commit and `stale` (10) when it does not.

    $ majordomus served observe --url http://127.0.0.1:9 --timeout 1 --dry-run

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus served forge

Ask the forge which deployments and releases it recorded, and keep the answer for the readers

majordomus served forge [OPTIONS]

/docs/cli/served/forge/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A forge that cannot be asked is said, and what was recorded before stands

    Asks the forge, through its own command-line tool, for the newest deployments to every environment and the newest releases, and records the answer `deploy.observed` reads. Here the repository has no remote the forge knows, so nothing is asked and the command says why with exit 12 — not answered, never an empty list read as none. In a checkout of a repository on the forge, with a credential, it prints how many deployments, environments and releases the answer held and exits 0.

    $ majordomus served forge

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus served show

Each deployment's newest record, re-judged against a commit

majordomus served show [OPTIONS]

/docs/cli/served/show/ — this command on its own page

argumentvaluedefaultdescription
--commit <COMMIT> — The commit to judge against (default HEAD)
--deployment <DEPLOYMENT> — Only this deployment
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What each deployment was last seen serving, judged against HEAD now

    The newest recorded observation of each deployment, re-judged against the commit asked about without probing anything. The same answer `GET /api/v1/served` and the MCP tool `majordomus_served` give. A checkout that has observed nothing answers with an empty list rather than a verdict.

    $ majordomus served show --format json

    What it asserts: exits 0; prints one JSON document carrying /expected, /observations, /unreadable, /deployments.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus deploy

The tree a deployment's provider receives, assembled outside the checkout from the deployment object at one commit: its build inputs, the provider's generated files, the buildpack line and the executable built at that commit

majordomus deploy [OPTIONS] <COMMAND>

/docs/cli/deploy/ — this command on its own page

Subcommands: slug.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus deploy slug

Assemble the tree a provider receives into a directory outside the checkout

majordomus deploy slug [OPTIONS]

/docs/cli/deploy/slug/ — this command on its own page

argumentvaluedefaultdescription
--deployment <DEPLOYMENT> — The deployment (default: the one deployment that names a provider)
--commit <COMMIT> — The commit every file is read at (default HEAD)
--executable <EXECUTABLE> required The executable built at that commit
--out <OUT> required The directory the slug is written into: outside the checkout, absent or empty
--site <SITE> — The site built at that commit, required when the deployment declares build.site
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A repository whose deployments name no provider has no tree to assemble

    Nothing hosts a deployment that names no provider, so there is no slug: refused with exit 15, and nothing is written. Where a deployment names one, `--commit <sha> --executable <built at that commit> --out <a directory outside the checkout>` writes its build inputs at that commit, the provider's generated files at the slug's root, the buildpack line, the executable and `.majordomus/SOURCE.json` — the tree the provider workflow pushes.

    $ majordomus deploy slug --executable majordomus --out /nonexistent/slug

    What it asserts: exits 15.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus rules

Every rule against the proof there is for it: what each one names, whether it is in the tree, whether a runner drives it, whether anything ran, and whether what ran is older than what it is about

majordomus rules [OPTIONS] <COMMAND>

/docs/cli/rules/ — this command on its own page

Subcommands: report, show, proves.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus rules report

Every rule against the proof there is for it

majordomus rules report [OPTIONS]

/docs/cli/rules/report/ — this command on its own page

argumentvaluedefaultdescription
--state <STATE> — Only rules in this proof state (proven, inputs_unchanged, stale, gated, failing, not_run, reviewed, unrunnable, dangling, unproven)
--class <CLASS> — Only rules of this class (blocking, advisory)
--namespace <NAMESPACE> — Only rules of this namespace (project, majordomus)
--findings flag — Only the rules whose declared class the proof does not support
--check flag — Exit 10 when a rule declares a class the proof does not support
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every rule against the proof there is for it

    The same answer `GET /api/v1/rules` and the MCP tool `majordomus_rules` return: per rule, its class, the mode it declares, the validator and the cases it names, whether each is in the tree, the execution behind each, the gates that run them, and the sentence explaining how the state was derived. The tallies count the whole corpus even when the rules are filtered, and `review_only` is counted apart from `passing` so that a rule a person enforces is never added to a total that reads as proof.

    $ majordomus rules report --format json

    What it asserts: exits 0; prints one JSON document carrying /rules, /states, /coverage/rules, /findings.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus rules show

One rule: what proves it, what it depends on, and what is missing

majordomus rules show [OPTIONS] <ID>

/docs/cli/rules/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The rule id, with or without its version
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A rule the repository does not declare

    A rule id nothing declares is a not-found rather than an empty answer. A typo that read as `this rule has no proof` is the one answer this command must never give, because it is indistinguishable from the finding the whole subsystem exists to report.

    $ majordomus rules show project.no-such-rule

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus rules proves

One test: every rule it proves, and the rules that would be left with none

majordomus rules proves [OPTIONS] <ID>

/docs/cli/rules/proves/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required `suite:<case>`, `crate:<binary>`, or the path a rule names it with
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What a case proves, and what would lose its only proof

    The reverse of `rules show`, reading the same derivation so the two directions cannot disagree. It names every rule that names this test and, separately, the rules that would be left with no proof at all if it were deleted — the question to ask before renaming a case, and the one that could not be asked while the relation ran one way only.

    $ majordomus rules proves test/cases/125_rule_proof.sh --format json

    What it asserts: exits 0; prints one JSON document carrying /proves, /sole_proof_of, /path.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent

What must become true above the milestones: every intent with its stage derived from the plan and its satisfaction from the recorded evidence, one intent, the model's own validation, and which intent a piece of work serves

majordomus intent [OPTIONS] <COMMAND>

/docs/cli/intent/ — this command on its own page

Subcommands: list, show, validate, coverage, preflight, binding, realization, explain, propose.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus intent list

Every intent, with the stage derived from its milestones and its evidence

majordomus intent list [OPTIONS]

/docs/cli/intent/list/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every intent, with its derived stage

    The stage is derived on every read from the status the plan gives each milestone the intent names and from the evidence recorded for each criterion; no file stores it.

    $ majordomus intent list

    What it asserts: exits 0; prints STAGE, intent(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    What `GET /api/v1/intents` returns and the `majordomus_intents` tool answers: the count, the tally by stage, and every intent with its milestones and criteria.

    $ majordomus intent list --format json

    What it asserts: exits 0; prints one JSON document carrying /count, /stages, /intents/0/stage, /intents/0/satisfaction.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent show

One intent in full: each milestone's derived status and each criterion's evidence state

majordomus intent show [OPTIONS] <ID>

/docs/cli/intent/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The intent's id, which is also its file name
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One intent, with each milestone and criterion derived

    The statement and invariants as authored, each milestone with its derived status, and each criterion with the state of its evidence and the command that reproduces it.

    $ majordomus intent show fixture-intent

    What it asserts: exits 0; prints fixture-intent, stage.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent validate

Every finding over the intents; exit 10 when any is a failure

majordomus intent validate [OPTIONS]

/docs/cli/intent/validate/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Check the intents before anything relies on them

    An intent naming no milestone, a milestone or evidence reference that resolves to nothing, governance that names nothing: each a failure, and exit 10. A milestone no intent serves is a warning.

    $ majordomus intent validate

    What it asserts: exits 0; prints intent(s), valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent coverage

Which work carries which criterion, and the reason every issue exists

majordomus intent coverage [OPTIONS]

/docs/cli/intent/coverage/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Which work carries which criterion, and why every issue exists

    Every criterion of every live intent with the issues that serve it and how strongly — covered, weakly covered, observed by the recorded gap, or uncovered — and every issue with the reason it exists: the criteria it serves, or maintenance under a milestone no intent names.

    $ majordomus intent coverage

    What it asserts: exits 0; prints CRITERION, criterion(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    What `GET /api/v1/intents/coverage` returns and the `majordomus_intent_coverage` tool answers: each criterion with its strength and the issues serving it, and each issue with its origin.

    $ majordomus intent coverage --format json

    What it asserts: exits 0; prints one JSON document carrying /criteria/0/strength, /criteria/0/issues, /issues/0/origin.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent preflight

Which intent the work on an issue, or on some paths, serves, whether it is maintenance, or why it may not proceed; exit 10 when refused

majordomus intent preflight [OPTIONS]

/docs/cli/intent/preflight/ — this command on its own page

argumentvaluedefaultdescription
--issue <ISSUE> — The issue the work executes
--path <PATHS> — A path the work will touch; repeat for each
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Which intent the work on an issue serves, or why it may not proceed

    The issue followed through the criteria it declares it serves to the intent each belongs to, with what that intent asks of the worker: its statement, the served criteria and their evidence, invariants, non-goals, governance, critique and gap. A broken link, or an intent whose plan was never critiqued or has a blocking finding open, is a refusal naming its cause, and exit 10; the example fixture's intent has no critique, so this is that refusal. Work under milestones no intent names is maintenance, and exits 0.

    $ majordomus intent preflight --issue I0001

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent binding

What a piece of work is bound to before it starts: the issue, the intent or the paths it names resolved to the criteria it serves, or an exemption the policy declares, with the two pins a resumed worker compares; exit 10 when refused

majordomus intent binding [OPTIONS]

/docs/cli/intent/binding/ — this command on its own page

argumentvaluedefaultdescription
--issue <ISSUE> — The issue the work executes
--intent <INTENT> — The intent the work serves, named directly
--path <PATHS> — A path the work will touch; repeat for each
--exempt <EXEMPT> — An exemption class the policy declares under intent.exemptions
--because <BECAUSE> — Why the exemption applies
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What a task is bound to before it starts

    What `majordomus start --issue` asks: the issue resolved to the intent and the criteria it serves, with what the intent asks of the worker and the two pins a handover carries. The example fixture's intent has no critique, so the binding is refused naming that cause, and exits 10; a bound issue answers `bound`, an issue under a milestone no intent names `maintenance`, and `--exempt <class> --because <reason>` answers `exempt` when the policy declares the class.

    $ majordomus intent binding --issue I0001

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent realization

Which work realises which intent — tasks, episodes, providers, handovers, peer claims — each link with its provenance, and each intent's unmet criteria and drift; exit 10 when an intent whose milestones are all DONE is contradicted by its evidence

majordomus intent realization [OPTIONS]

/docs/cli/intent/realization/ — this command on its own page

argumentvaluedefaultdescription
--intent <INTENT> — Only this intent and the work linked to it
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Which work realises which intent, and what each still lacks

    Every intent with its unmet criteria and the work realising it, then every task, session record and peer claim with its strongest link — declared, observed, derived or inferred — or the first missing link. Exit 10 when an intent whose milestones are all DONE is contradicted by its evidence.

    $ majordomus intent realization

    What it asserts: exits 0; prints fixture-intent, unit(s) of work.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    What `GET /api/v1/intents/realization` returns and the `majordomus_intent_realization` tool answers: each intent's unmet criteria, work and providers, and each unit of work with its links.

    $ majordomus intent realization --format json

    What it asserts: exits 0; prints one JSON document carrying /intents/0/stage, /intents/0/unmet, /work, /orphans.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent explain

Why an intent stands where it stands: its stage, each criterion, the work realising it

majordomus intent explain [OPTIONS] <ID>

/docs/cli/intent/explain/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The intent's id
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Why an intent stands where it stands

    A sentence for the stage naming each milestone's derived status, one per criterion naming its evidence state and coverage, and one for the work realising it — all derived, none stored.

    $ majordomus intent explain fixture-intent

    What it asserts: exits 0; prints fixture-intent, the-case-passes.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus intent propose

Write a new, unplanned intent: what must become true (ADR 0144)

majordomus intent propose [OPTIONS]

/docs/cli/intent/propose/ — this command on its own page

argumentvaluedefaultdescription
--statement <STATEMENT> required What must become true, kept verbatim
--title <TITLE> — One line naming it; the statement's first line when absent
--id <ID> — The identity and file name; the title's slug when absent
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Propose an intent: what must become true

    Writes a new record under `.ai/repo/project/intents/` holding the statement and nothing else yet (ADR 0144): no milestone, criterion or invariant. Its stage derives as `declared`, `intent validate` reports the two absences as warnings, and no work can serve it until it is planned. `--title` and `--id` default to the statement's first line and that line's slug; an identity that exists is refused, never overwritten.

    $ majordomus intent propose --statement 'Every page answers within 100 ms when warm'

    What it asserts: exits 0; prints proposed every-page-answers-within-100-ms-when-warm, .ai/repo/project/intents/every-page-answers-within-100-ms-when-warm.yaml.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus delivery

Whether each product feature exists: on master, deployed, publicly verified, tested, its evidence published and linked — every dimension computed, unknown never a pass

majordomus delivery [OPTIONS] <COMMAND>

/docs/cli/delivery/ — this command on its own page

Subcommands: report, show.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus delivery report

Every feature against every dimension, with the development stage of what does not exist

majordomus delivery report [OPTIONS]

/docs/cli/delivery/report/ — this command on its own page

argumentvaluedefaultdescription
--check flag — Exit 10 when any feature does not exist
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Does each feature exist, dimension by dimension

    The same answer `GET /api/v1/delivery` and the MCP tool `majordomus_delivery` return: every feature ordered by id, each of the six dimensions with its verdict, reason and remediation, the development stage of a feature that does not exist, the paths it is implemented by, and the publication read once for all of them. A repository with no site and no trunk says unknown, and unknown is never a pass, so nothing here exists.

    $ majordomus delivery report --format json

    What it asserts: exits 0; prints one JSON document carrying /features/0/dimensions, /tallies/exists, /publication/identity/state.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus delivery show

One feature: every dimension with its reason and remediation

majordomus delivery show [OPTIONS] <ID>

/docs/cli/delivery/show/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The feature's id, as `product list` gives it
--check flag — Exit 10 when the feature does not exist
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One feature, and what stands between it and existing

    Every dimension of one feature with the sentence that decided it and what would change it. `--check` turns the conjunction into the exit code: 10 unless every dimension passes. An id the layer does not declare is not found, never reported as not delivered.

    $ majordomus delivery show fixture-feature

    What it asserts: exits 0; prints fixture-feature, on_master, NOT DELIVERED.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus plan

How far each issue's work has travelled: none, branch, pr_open, merged, released or deployed, each with the object that proved it; the plan's records are read and moved by the shell tool's `plan`

majordomus plan [OPTIONS] <COMMAND>

/docs/cli/plan/ — this command on its own page

Subcommands: delivery, drift.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus plan delivery

Every issue's furthest delivery stage, with the object that proved it and its declared status beside it

majordomus plan delivery [OPTIONS] [ISSUE]

/docs/cli/plan/delivery/ — this command on its own page

argumentvaluedefaultdescription
<ISSUE> <ISSUE> — One issue; default every issue of the plan
--at <REV> — Observe as of this commit: its history and the tree's release records, nothing live (no branch, forge, deployment or clock)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • How far every issue's work has travelled

    The same answer `GET /api/v1/plan/delivery` and the MCP tool `majordomus_plan_delivery` return: every issue with its declared status and the furthest stage proved — none, branch, pr_open, merged, released, deployed — each stage with the branch, pull request, merge commit, tag or `latest.json` that proved it. A checkout that never observed the forge says the forge is unread, and an issue it could have moved further is not settled.

    $ majordomus plan delivery --format json

    What it asserts: exits 0; prints one JSON document carrying /observed/commit, /tallies/none, /issues/0/stage, /sources.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • One issue, as of a commit

    `--at` reads the merges in that commit's history and the tree's release records, and nothing live — no branch, no forge, no deployment, no clock — so it proves only merged and released and the answer is a function of the commit alone. That is what `scripts/generate-site-data` writes to `site/data/generated/delivery.json` and reproduces under `--check`.

    $ majordomus plan delivery I0001 --at HEAD

    What it asserts: exits 0; prints I0001, none, unread.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus plan drift

Every contradiction between an issue's declared status and its delivery — merged_not_recorded, active_without_work, done_without_trace — each with its proof; with --gate, judged against the window .ai/repo/ci/plan.yaml declares

majordomus plan drift [OPTIONS] [ISSUE]

/docs/cli/plan/drift/ — this command on its own page

argumentvaluedefaultdescription
<ISSUE> <ISSUE> — One issue; default every issue of the plan
--at <REV> — Observe as of this commit, as `plan delivery --at` does
--gate head | trunk — Judge as a gate: on a `head` merged work is pending, on the `trunk` past the window it is refused (exit 10 under blocking enforcement); a missing window exits 12
  • head — A head: merged work the plan has not recorded is pending
  • trunk — The trunk: merged work unrecorded past the window is refused
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Where the plan's stamps contradict the delivered work

    The same answer `GET /api/v1/plan/drift` and the MCP tool `majordomus_plan_drift` return: every merged_not_recorded, active_without_work and done_without_trace finding with the pull request, merge commit and release that prove it, its age against the window `.ai/repo/ci/plan.yaml` declares, and the command that settles it.

    $ majordomus plan drift --format json

    What it asserts: exits 0; prints one JSON document carrying /observed/commit, /window/model, /tallies/merged_not_recorded, /verdict.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • As of a commit

    `--at` reads that commit's history and the tree's records only, as `plan delivery --at` does, so the open pull requests are unread and a finding says it is not settled. `--gate head|trunk` judges the answer as `scripts/ci/plan-drift-check` does: on a head merged work the plan has not recorded is pending; on the trunk one merged longer than the window ago is refused, naming `majordomus plan verify|done <id>`, and a missing window refuses with exit 12.

    $ majordomus plan drift --at HEAD

    What it asserts: exits 0; prints plan drift, window.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics

Token economics, measured: matched runs with and without Majordomus, every metric with its measurement class and sample size, the statement the evidence allows, and the check that refuses an unsupported savings claim

majordomus economics <COMMAND>

/docs/cli/economics/ — this command on its own page

Subcommands: summary, explain, runs, check, tasks, measure, run, references.

Arguments: none.

majordomus economics summary

Every metric with its class, sample size and interval, the pairs, the segments, the state of the evidence, and the one statement the publication rule allows

majordomus economics summary [OPTIONS]

/docs/cli/economics/summary/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--suite <SUITE> — Only this suite
--category <CATEGORY> — Only tasks of this category
--task <TASK> — Only this task
--model <MODEL> — Only runs that asked for this model

Examples

  • What the evidence allows to be said about tokens

    Every metric with its measurement class, sample size and interval, the state of each suite's evidence, and the one statement the publication rule allows. In a repository that declares no benchmark methodology — which is where the examples run — the statement is that no verified total-token-savings claim is available, and no number is printed.

    $ majordomus economics summary

    What it asserts: exits 0; prints No verified total-token-savings claim.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same answer as the API and MCP give it

    The typed summary: the verdict, the metrics, the pairs and the segments, exactly as GET /api/v1/economics and the majordomus_economics tool return them.

    $ majordomus economics summary --format json

    What it asserts: exits 0; prints one JSON document carrying /present, /verdict/statement, /metrics.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics explain

One metric and everything it rests on: formula, class, pairs, runs, exclusions, and how to reproduce it

majordomus economics explain [OPTIONS] <METRIC>

/docs/cli/economics/explain/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
<METRIC> <METRIC> required The metric, e.g. effective_token_reduction

Examples

  • Everything one metric rests on

    The metric's formula, class, pairs, runs, exclusions and the commands that reproduce it. In a repository that declares no benchmark methodology — which is where the examples run — there is no metric: any id is answered with the statement why, exit 0 and no number. A metric id a declared methodology does not have is refused with the list of those that do (exit 12).

    $ majordomus economics explain effective_token_reduction

    What it asserts: exits 0; prints no benchmark methodology is declared.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics runs

The recorded runs every metric is computed from

majordomus economics runs [OPTIONS]

/docs/cli/economics/runs/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--suite <SUITE> — Only this suite
--task <TASK> — Only this task
--variant <VARIANT> — Only this variant

Examples

  • The raw facts behind every number

    Every recorded run with its gate verdicts and the totals derived from its provider usage. None where nothing was run.

    $ majordomus economics runs --format json

    What it asserts: exits 0; prints one JSON document carrying /count, /runs.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics check

Refuse an unsupported savings claim: quantities next to the economics vocabulary in hand-written prose, and bound claims whose evidence does not stand

majordomus economics check [OPTIONS]

/docs/cli/economics/check/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Refuse a savings claim nothing measured

    Scans the hand-written prose and claim sentences for a quantity next to the economics vocabulary, and checks every claim bound to a metric. Exits 10 naming each finding; exits 0 here, where nothing claims anything.

    $ majordomus economics check

    What it asserts: exits 0; prints economics check:, 0 finding(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics tasks

Each task's wall time, refusals and episodes, from every checkout's ledger; the fields nothing observes yet are named as not observed

majordomus economics tasks [OPTIONS]

/docs/cli/economics/tasks/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic
--since <SINCE> — Only tasks started at or after this time (YYYY-MM-DDTHH:MM:SSZ)
--until <UNTIL> — Only tasks started before this time (YYYY-MM-DDTHH:MM:SSZ)

Examples

  • Each task's wall time and episodes

    One record per task from every checkout's ledger, with the fields nothing observes yet named as not observed. A repository with no ledger answers no task and lists its checkout as not read.

    $ majordomus economics tasks --format json

    What it asserts: exits 0; prints one JSON document carrying /count, /tasks, /ledgers, /unread.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics measure

Run a deterministic suite (no model is called) and record its measurement

majordomus economics measure [OPTIONS]

/docs/cli/economics/measure/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--suite <SUITE> context The deterministic suite to measure
--dry-run flag — Measure and print, write nothing

Examples

  • Count what the context compiler selects

    Runs the deterministic context suite: no model is called; every seed's candidates and selection are counted with a pinned tokenizer. Refused with exit 12 where no methodology is declared.

    $ majordomus economics measure --dry-run

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics run

Run a live suite: real harness sessions with and without Majordomus, recorded as raw usage and gate verdicts. Spends provider usage

majordomus economics run [OPTIONS]

/docs/cli/economics/run/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--suite <SUITE> pilot The live suite to run
--task <TASKS> — Only this task (repeatable)
--repetition <REPETITIONS> — Only this repetition (repeatable)
--work-dir <PATH> — Where transcripts go; never inside the repository. Workspaces are fresh directories of the system temporary directory, removed when their run ends
--harness <PATH> claude The harness executable
--parallel <PARALLEL> 2 Runs in flight at once
--session-timeout <SESSION_TIMEOUT> 1800 Per-session wall-clock limit, in seconds
--force flag — Refused: a recorded run is evidence and is never overwritten; exclude it in the methodology with a reason and record another repetition
--dry-run flag — Prepare every workspace and print the harness command; run nothing, spend nothing

Examples

  • Prepare a live suite without spending anything

    Builds every control and treatment workspace and prints the harness command each session would run; nothing is sent to a provider. Refused with exit 12 where no methodology is declared.

    $ majordomus economics run --suite pilot --dry-run

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus economics references

Prove every task's hidden tests fail on its starting state and pass on its reference solution. No model is called

majordomus economics references [OPTIONS]

/docs/cli/economics/references/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--work-dir <PATH> — Where the workspaces go

Examples

  • Prove every task can be failed and can be passed

    Applies each task's reference solution to its fixture: the hidden tests must fail on the starting state and pass on the reference. Refused with exit 12 where no methodology is declared.

    $ majordomus economics references

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus entity

Every object of the layer as an addressable node: the kinds and their routes, and one entity with its references, its backlinks, the surfaces that answer for it and the state of what it names

majordomus entity [OPTIONS] <COMMAND>

/docs/cli/entity/ — this command on its own page

Subcommands: kinds, show.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus entity kinds

Every kind of the layer, the route of its index, and every route collision there is

majordomus entity kinds [OPTIONS]

/docs/cli/entity/kinds/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every kind of the layer, and whether every object of it has an address

    The catalogue the Cockpit's navigation and the site's indexes are both derived from. Nothing enumerates kinds: each one is here because the index holds an object of it, and each carries the route of its own listing. `collisions` is the one way an object can fail to be addressable — two identities of one kind that reduce to one route — and the healthy answer is none.

    $ majordomus entity kinds --format json

    What it asserts: exits 0; prints one JSON document carrying /kinds, /count, /routable.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus entity show

One entity: its route, what it references, what references it, where it is served

majordomus entity show [OPTIONS] <ADDRESS>

/docs/cli/entity/show/ — this command on its own page

argumentvaluedefaultdescription
<ADDRESS> <ADDRESS> required The entity, as `majordomus://<kind>/<identity>` or as `<kind>/<slug>`
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • One entity at its own address

    The same answer `GET /api/v1/entity` and the MCP tool `majordomus_entity` return, and the same one the Cockpit lays out: the entity's route, the references it declares, the references that resolve to it — derived, never declared — the surfaces that answer for it, what can be said about the executable artefacts it names, and its public documentation page (`documentation`, null here because this fixture has no site/data/publication.toml). The address is the route's two segments, which is the shorter spelling of the URI and the one the Cockpit's address bar holds.

    $ majordomus entity show rule/project-alpha-1 --format json

    What it asserts: exits 0; prints one JSON document carrying /uri, /route, /relations, /surfaces, /evidence/state.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • An address the layer does not serve

    An entity nothing declares is a not-found rather than an empty answer, for the reason `rules show` gives: a typo that read as `this entity is joined to nothing` is indistinguishable from the finding the page exists to show.

    $ majordomus entity show rule/no-such-rule

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus shell

The repository's shell automation against the tracked migration inventory: every shell unit declared with an exemption, and every exemption naming a unit the tree still has

majordomus shell [OPTIONS] <COMMAND>

/docs/cli/shell/ — this command on its own page

Subcommands: check.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus shell check

Refuse every shell unit the inventory does not declare, and every declaration whose unit is gone; exit 10 on a finding, 12 when the tree cannot be measured

majordomus shell check [OPTIONS]

/docs/cli/shell/check/ — this command on its own page

argumentvaluedefaultdescription
--canonical flag — Rewrite .ai/repo/automation/inventory.jsonl with its records in canonical order, then check
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every shell unit against the automation inventory

    The shell units under the governed directories, how many records the inventory holds, the exemptions by disposition, and every finding with its remedy, as `/units`, `/exemptions`, `/findings` and `/passes`. The exit code is the verdict: 0 when every unit is declared and every record names a unit the tree still has, 10 on a finding, and 12 when the tree could not be measured, which is not a pass. Here the repository holds the bash library `lib/a.sh` and no inventory, so the answer is 10 and the finding names the file and the remedy.

    $ majordomus shell check --format json

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus layout

The boundary between the layer's tracked and local halves, checked against the layouts their contracts declare: every path a contract excludes, named with the contract

majordomus layout [OPTIONS] <COMMAND>

/docs/cli/layout/ — this command on its own page

Subcommands: check.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus layout check

Refuse every path a declared layout excludes, naming the contract; exit 10 on a finding, 12 when the halves cannot be read

majordomus layout check [OPTIONS]

/docs/cli/layout/check/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Both halves of the layer against their declared layouts

    How many paths were judged and every path a declared layout excludes, each named with the contract it violates, as `/checked`, `/findings` and `/passes`. The exit code is the verdict: 0 when the boundary holds, 10 on a finding, and 12 when the halves could not be read, which is not a pass. Only what a contract declares is judged, so a repository whose contracts declare no layout passes with nothing found.

    $ majordomus layout check --format json

    What it asserts: exits 0; prints "checked", "findings", "passes".

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus pack

The tracked tree as token-bounded text shards for a language model's file search: plan what a profile carries and leaves out, build it under tmp/packs/, and verify a written pack against its manifest; never a binary, a worktree, a link or build output

majordomus pack [OPTIONS] <COMMAND>

/docs/cli/pack/ — this command on its own page

Subcommands: plan, build, verify.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus pack plan

What a profile would pack: files carried, files left out by reason, the shards and every finding that refuses the build; exit 10 on a finding, 12 when the tree cannot be read

majordomus pack plan [OPTIONS] [PROFILE]

/docs/cli/pack/plan/ — this command on its own page

argumentvaluedefaultdescription
<PROFILE> <PROFILE> — A profile of share/archive.yaml (default: its `default`)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • What the ChatGPT profile would pack, before anything is written

    The same answer `GET /api/v1/pack/plan?profile=chatgpt` and the MCP tool `majordomus_pack_plan` return: the files carried with their bytes and o200k_base tokens, every file left out by reason under `/dropped` and `/dropped_files`, the shards under `/shards`, and every finding that would refuse the build under `/findings`. The exit code is the verdict: 0 when the pack can be built, 10 on a finding, 12 when the tree cannot be read.

    $ majordomus pack plan chatgpt --format json

    What it asserts: exits 0; prints one JSON document carrying /dropped, /shards, /findings, /passes.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus pack build

Write the pack (index, shards, pack.json) and verify what was written; exit 10 when the plan or the written pack has a finding, and nothing is built from a plan with one

majordomus pack build [OPTIONS] [PROFILE]

/docs/cli/pack/build/ — this command on its own page

argumentvaluedefaultdescription
<PROFILE> <PROFILE> — A profile of share/archive.yaml (default: its `default`)
--out <DIR> — Write here instead of `tmp/packs/<repo>-<profile>-<commit>`
--force flag — Replace a pack already at the destination (never a directory that is not a pack)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Write the ChatGPT pack and read it back

    Plans with the profile, writes `00-INDEX.md`, the shards and `pack.json` under `tmp/packs/` only when the plan passes, then verifies what it wrote: every digest, no stray file, no binary, artifact, link or worktree, every file within the token budget. It prints the plan and the verdict; the files to upload are the index and the shards.

    $ majordomus pack build chatgpt

    What it asserts: exits 0; prints pack verify: clean.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus pack verify

Verify a written pack against its manifest and the profile it names; exit 10 on a finding, 12 when the manifest cannot be read

majordomus pack verify [OPTIONS] <DIR>

/docs/cli/pack/verify/ — this command on its own page

argumentvaluedefaultdescription
<DIR> <DIR> required The pack's directory, inside the repository
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A directory that holds no pack

    A directory without a `pack.json` cannot be verified, and that is reported as unmeasured with exit 12 rather than as a clean pack: a verifier that passed what it could not read would pass anything.

    $ majordomus pack verify tmp/packs/absent

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus dashboard

The Dashboard Suite: each page a projection of the capabilities that hold its facts, every card carrying its source capability, the JSON pointer its value was read from, the Cockpit page with the evidence and the command that acts on it

majordomus dashboard [OPTIONS] <COMMAND>

/docs/cli/dashboard/ — this command on its own page

Subcommands: overview.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus dashboard overview

Is it healthy, what changed, what is broken, what needs action: every card with its value, the source's verdict, and the capability and pointer it was read from; exit 10 when the overview is fail or unknown

majordomus dashboard overview [OPTIONS]

/docs/cli/dashboard/overview/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The four questions, every card with the answer it was read from

    The same answer `GET /api/v1/dashboard/overview`, the MCP tool `majordomus_dashboard_overview` and the first section of the Cockpit's overview return: is it healthy, what changed, what is broken, what needs action, each answered by cards read out of `health.report`, `release.version`, `plan.status`, `worktree.status`, `plan.next`, `continuity.state` and `peers.list`. Every card carries its source capability, the input it was asked with and the JSON pointer its value was read from, so `majordomus run <capability>` read at that pointer gives the same value. The exit code is the overview's own word: 0 for ok and warn, 10 for fail and unknown. This fixture commits no registry manifest, so `health.report` cannot decide one of its checks, the health card is `unknown` rather than ok, and the answer is 10.

    $ majordomus dashboard overview --format json

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus brief

What surrounds this session, in one line and in a few: its episode and task, the peers of every board, the mesh, the integration queue and the derive queue, asked of the server holding this checkout's lease

majordomus brief [OPTIONS]

/docs/cli/brief/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--line flag — Print the one-line brief alone: the status line's text
--keep-awake flag — Print what a session is told at its start about keeping itself awake, then the one-line brief
--session <ID> — The provider's own session identity: the brief names the open episode it owns
--this-checkout flag — Read this checkout's board alone instead of every checkout's
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The one-line brief, composed here when no server answers

    The same answer `GET /api/v1/brief` and the MCP tool `majordomus_brief` return, rendered as its one line: this session's task or episode and branch, the peers of the boards read, the mesh, the integration queue and the derive lock, every section present whatever its state. The command line asks the server holding this checkout's lease, which holds the board and the mesh; this fixture has no server, so the brief is composed by this process and says so in its multi-line form.

    $ majordomus brief --line --this-checkout

    What it asserts: exits 0.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus blackboard

Who works on what in this repository, on every board and every linked machine: each worker with its client, intent, checkout, branch and claims, the claims that meet, the reviews and handovers that wait, typed relations verified only by an explicit identifier, and whether every source could be read — asked of the server holding this checkout's lease

majordomus blackboard [OPTIONS]

/docs/cli/blackboard/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--this-checkout flag — Read this checkout's board alone instead of every checkout's
--for <NAMES> — Comma-separated names of the reader, so that the signals addressed to it are marked for it
--sources <LIST> — The monitor sources the signals are read from, a comma-separated subset of mesh, executor and github (default: mesh,executor)
--format text | json text Output shape
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Who works on what, with what could not be read

    The same answer `GET /api/v1/blackboard` and the MCP tool `majordomus_blackboard` return: every worker of the boards read and of the mesh, the claims that meet, the reviews and handovers that wait, the typed relations and the newest signals, with each source and how it was read. The command line asks the server holding this checkout's lease, which holds the board and the mesh; this fixture has no server, so the answer is composed here and its sources say what that left unread.

    $ majordomus blackboard --this-checkout --format json

    What it asserts: exits 0; prints one JSON document carrying /complete, /sources, /workers, /conflicts, /cursor.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus skills

Every skill as a proven capability: the tests that name it and the evidence behind them, its page, the doctrine and gates that hold it, what invokes it, and the orphans

majordomus skills [OPTIONS] <COMMAND>

/docs/cli/skills/ — this command on its own page

Subcommands: status, explain, verify.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus skills status

Every skill with its derived standing: tested, documented, enforced, used

majordomus skills status [OPTIONS]

/docs/cli/skills/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every skill, with its derived standing

    Tested, documented, enforced and used are derived on every read from the tests that name the skill, the evidence ledger, the site projection, the CI model and the invocation surfaces; no file stores them. A repository with no skill answers with none.

    $ majordomus skills status

    What it asserts: exits 0; prints skill(s).

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

  • The same, as the shape the API and MCP answer with

    What `GET /api/v1/skills` returns and the `majordomus_skills` tool answers: the count, the tally by standing, and every skill with its four derived facts.

    $ majordomus skills status --format json

    What it asserts: exits 0; prints one JSON document carrying /count, /standings, /skills.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus skills explain

One skill in full: each naming test and its evidence, its page, its gates, every invocation

majordomus skills explain [OPTIONS] <ID>

/docs/cli/skills/explain/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The skill's id, which is also its directory name
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A skill the repository does not hold is a refusal, not an empty answer

    `skills explain <id>` answers one skill in full: each naming test with the state of its latest run and how to reproduce it, its page, its gates and every invocation by path and line. An id that names no skill exits 12 and names what was looked for.

    $ majordomus skills explain no-such-skill

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus skills verify

Every finding over the skills; exit 10 when any is a failure

majordomus skills verify [OPTIONS]

/docs/cli/skills/verify/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Check every skill is a proven capability

    An active skill no test names or nothing invokes, a failing run, a contract violation, or a test or invocation naming a skill that does not exist: each a failure, and exit 10. Evidence that is not current, a missing page or a missing gate: a warning.

    $ majordomus skills verify

    What it asserts: exits 0; prints skill(s), valid.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus knowledge

What the knowledge deriver left for review and whether it is still writing: the candidate records awaiting promotion, one record by id with every reference it names resolved, and the derivation status of this checkout judged against the policy's freshness thresholds

majordomus knowledge [OPTIONS] <COMMAND>

/docs/cli/knowledge/ — this command on its own page

Subcommands: candidates, record, status.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus knowledge candidates

The candidate records awaiting review, with the branch of the episode each came from and how long each has waited

majordomus knowledge candidates [OPTIONS]

/docs/cli/knowledge/candidates/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The review queue, as one document

    The same answer `GET /api/v1/knowledge/candidates`, the MCP tool `majordomus_knowledge_candidates` and the resource `majordomus://knowledge-candidates` serve: every record with status candidate under the candidates class, the branch of the episode each came from, how long each has waited, and the policy's cap beside the count. A repository whose deriver has not run yet answers with an empty queue, which is an answer and not an error.

    $ majordomus knowledge candidates --format json

    What it asserts: exits 0; prints one JSON document carrying /total, /on_this_branch, /branch, /over_cap.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus knowledge record

One knowledge record by id: its front matter, and every reference it names resolved against the index, the ledger and git

majordomus knowledge record [OPTIONS] <ID>

/docs/cli/knowledge/record/ — this command on its own page

argumentvaluedefaultdescription
<ID> <ID> required The record id, which is also its file name
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A record the repository does not hold

    An id nothing carries is a not-found rather than an empty answer, with the exit code that says which: a typo that read as `this record names no evidence` would be indistinguishable from the dangling reference the integrity validator exists to report.

    $ majordomus knowledge record no-such-record

    What it asserts: exits 12.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus knowledge status

Whether the deriver is still writing: the last derivation, the newest closed episode, and the stopped-writer judgement against session.freshness

majordomus knowledge status [OPTIONS]

/docs/cli/knowledge/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Whether the deriver is still writing

    The freshness half of the stopped-writer judgement: the newest derivation, the newest closed episode, how many closed episodes no derivation names, and — once a derivation has run in this checkout — whether the newest close went underived past the stale threshold. A fresh repository, in which no episode has closed, reports that it was not judged and why, and never a stopped writer.

    $ majordomus knowledge status --format json

    What it asserts: exits 0; prints one JSON document carrying /present, /judged, /stopped_writer, /freshness.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity

Continue work on another machine: publish this checkout's newest handover as a signed record in refs/majordomus/continuity, exchange records with a git remote, and plan and resume a handover another device published — with its source compatibility, lineage and trust decided before anything is written

majordomus continuity [OPTIONS] <COMMAND>

/docs/cli/continuity/ — this command on its own page

Subcommands: status, records, device, plan, publish, sync, resume.

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

majordomus continuity status

This device, the record this checkout continues, the store against its remote (no network), every line of work, and what other devices published that could be resumed here

majordomus continuity status [OPTIONS]

/docs/cli/continuity/status/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Where this device stands in the work published from every device

    The same value `GET /api/v1/continuity/status` and the MCP tool `majordomus_continuity_status` return: this repository's identity (a digest of its root commits, the same in every clone), this device, the record this checkout continues on its branch, how the local store stands towards the remote's — read from refs, with no network — and what other devices published that could be resumed here. A repository that has published nothing answers with an empty store, which is an answer and not an error.

    $ majordomus continuity status --format json

    What it asserts: exits 0; prints one JSON document carrying /repository, /device/node, /store/sync, /resumable.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity records

Every published handover the local store admits, by line, and every file it refused

majordomus continuity records [OPTIONS]

/docs/cli/continuity/records/ — this command on its own page

argumentvaluedefaultdescription
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Every published handover, by line

    Every record of refs/majordomus/continuity that passed admission, every line of work with its heads, and a diagnostic for each refused file. Empty in a repository that has published nothing.

    $ majordomus continuity records --format json

    What it asserts: exits 0; prints one JSON document carrying /records, /lines, /diagnostics.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity device

This device's identity — the mesh node key, created when absent — and its label; with --label, rename it

majordomus continuity device [OPTIONS]

/docs/cli/continuity/device/ — this command on its own page

argumentvaluedefaultdescription
--label <LABEL> — A label for this device (macbook-pro, mac-mini)
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • This device, as a published handover names it

    The node id and public key of this device's mesh key — created on first use in the user's state directory, never in a repository — and its label. `--label mac-mini` renames it without changing the key.

    $ majordomus continuity device --format json

    What it asserts: exits 0; prints one JSON document carrying /device/node, /device/label, /public_key.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity plan

Decide, writing nothing, whether and how a published handover can be resumed here: trust, lineage, source compatibility, uncommitted work at the origin

majordomus continuity plan [OPTIONS]

/docs/cli/continuity/plan/ — this command on its own page

argumentvaluedefaultdescription
--record <RECORD> — A record id or a unique prefix; the one resumable handover when absent
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A plan with nothing to resume

    With no handover published from another device, the plan says so — `nothing_to_resume` — and exits 0: absence is an answer. With one, the same command decides trust, lineage and source compatibility and lists the commands that resolve each blocker without running any of them.

    $ majordomus continuity plan --format json

    What it asserts: exits 0; prints one JSON document carrying /status, /blockers, /warnings, /actions.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity publish

Publish this checkout's newest handover as a signed record for another machine; refused when it carries a secret or a machine path

majordomus continuity publish [OPTIONS]

/docs/cli/continuity/publish/ — this command on its own page

argumentvaluedefaultdescription
--handover <HANDOVER> — A handover record's file name under .ai/local/state/handovers/; the newest when absent
--issue <ISSUE> — The issue the work belongs to
--milestone <MILESTONE> — The milestone it belongs to
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • Nothing to publish without a handover

    A publication reads the newest handover record; a checkout that has written none is told to write one with `majordomus handover` and exits 10, before any device key is created.

    $ majordomus continuity publish

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity sync

Exchange published handovers with a git remote: fetch, merge as a union, push; an unreachable remote leaves what is pending pending

majordomus continuity sync [OPTIONS]

/docs/cli/continuity/sync/ — this command on its own page

argumentvaluedefaultdescription
--remote <REMOTE> — The git remote; the current branch's, else origin, when absent
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A repository with no remote keeps its records

    Sync moves records only through a git remote. A repository with none answers `no_remote` and exits 0: the records stay in this clone, and that is a valid state rather than a failure.

    $ majordomus continuity sync --format json

    What it asserts: exits 0; prints one JSON document carrying /action, /store/sync.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

majordomus continuity resume

Resume a published handover when its plan is ready: write it into this checkout's handovers, carry its decisions, and continue its line

majordomus continuity resume [OPTIONS]

/docs/cli/continuity/resume/ — this command on its own page

argumentvaluedefaultdescription
--record <RECORD> — A record id or a unique prefix; the one resumable handover when absent
--repo <PATH> — Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract); a layer none of which is tracked is read from the work tree
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag — Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> — The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
--format text | json text Output shape (accepted by every subcommand)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • A resume with nothing to resume writes nothing

    Resume acts only on a ready plan. With no published handover it writes nothing and exits 10, printing the plan that declined.

    $ majordomus continuity resume

    What it asserts: exits 10.

    Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.

Claims about the command line

Attached by the file that implements each claim; every one links to its page with the implementation and the test that proves it.

Searches the titles and descriptions of every page this site publishes.