Expand description
The command line, declared with clap’s derive API. Every command starts from the same
RepoArgs; capabilities reaches the registry through the registry’s own
introspection capabilities, so no list of capabilities lives here.
Re-exports§
pub use docs::tree;pub use docs::document;pub use docs::render;pub use docs::route;pub use docs::ArgDoc;pub use docs::CliDocument;pub use docs::CommandDoc;pub use docs::ExampleView;pub use docs::PossibleValueDoc;pub use docs::SetupView;pub use docs::DECLARATION;pub use docs::ROUTE_PREFIX;pub use docs::SCHEMA;
Modules§
- docs
- The command line as documentation data.
- local
- Why a command of the command line is not itself a capability.
Structs§
- Bench
Args majordomus bench.- Brief
Args majordomus brief: thebrief.sessioncapability on the command line (ADR 0136).- Capabilities
Args majordomus capabilities.- Cli
- The command line: one of the commands below.
- Command
Examples - The examples of one command, by the command’s path without
majordomus. The root is the empty string.cli::validaterefuses a set whose command the clap declaration does not have, a command that can be run and has no set, and an example whose argv this crate’s own parser does not accept. - Commands
Args majordomus commands.- Commands
Bridge Args majordomus commands bridge.- Commands
Graph Args majordomus commands graph.- Commands
List Args majordomus commands list.- Commands
Show Args majordomus commands showandexplain.- Commit
Args majordomus commit: the commit as a value.- Completion
Args majordomus completion.- Completion
Init Args majordomus completion init.- Completion
Install Args - The arguments of
completion install. - Completion
Query Args majordomus completion query.- Continuity
Args majordomus continuity. The output shape is global, so it reads where a person writes it, and the group runs nothing of its own.- Convergence
Args majordomus convergence: whether any of this repository’s work is held where only one disk can see it. It exits 10 when it is, so a hook or a script refuses on the verdict rather than on a parsed report.- Dashboard
Args majordomus dashboard. Every subcommand is one page of the Dashboard Suite, run through the capability that answers it.- Delivery
Args majordomus delivery: every product feature against the delivery invariant. The output shape is global, so it reads the way a person writes it —delivery report --format json.- Devcontext
Args majordomus devcontext. Every subcommand is the projection of onedevcontext.*capability; the request flags are declared once and shared bycompileandexplain.- Devcontext
Request - What to compile a context about; every flag is optional, and naming nothing is a legitimate request.
- Devtask
Args majordomus devtask. The output shape is global, so a person writes it where it reads naturally —devtask issue I0901 --format json— and it is declared once.- Distribution
Args majordomus distribution.- Economics
Args majordomus economics. A group with no action of its own: a subcommand is required, and each one is either the command line of aneconomics.*capability or one of the three producers of evidence thatcli::localclassifies as command-line-only.- Economics
Check Args majordomus economics check. It takes no filter, because a gate that could be narrowed could be narrowed past the claim it exists to refuse. It exits 10 when it finds a quantity stated beside the economics vocabulary in hand-written prose, or a bound claim whose evidence does not stand.- Economics
Explain Args majordomus economics explain. The metric is a required positional identifier, spelled as the summary lists it; one the methodology does not declare is refused as not found, with the declared metrics named, rather than answered with an empty explanation.- Economics
Measure Args majordomus economics measure. Runs a deterministic suite, the context compiler over the suite’s seeds with no model called, and writes its record asruns/<suite>/<commit>.jsonunder the benchmark directory, so a second measurement at the same commit replaces the first. A live suite is refused with theruncommand that runs it;--dry-runmeasures, prints and writes nothing.- Economics
References Args majordomus economics references. Proves every task can fail: its hidden tests must fail on the starting fixture and pass once the reference solution is applied, or a failed run would say nothing about the agent. No model is called; the workspaces are built on this machine, under the system temporary directory unless--work-dirnames another, and a task that breaks the rule makes the command exit 10.- Economics
RunArgs majordomus economics run. Spends provider usage: each selected task runs as real harness sessions with and without Majordomus installed, and each run is recorded as raw usage and gate verdicts. Emptytasksandrepetitionsmean every one the suite declares.--dry-runprepares each workspace, prints the harness command and removes the workspace again without starting a session, so it spends nothing. A run already recorded is skipped and never written over;--forceis accepted only to be refused with the reason, because a recorded run is evidence.- Economics
Runs Args majordomus economics runs. The recorded runs themselves, before any pairing or statistics: the raw facts a disputed metric is checked against. The filters combine as a conjunction and select whole records; they change no number inside one.- Economics
Summary Args majordomus economics summary. Every filter is optional and they combine as a conjunction. They narrow the pairs and the metrics computed from them; the verdict is always stated over all the live evidence, so a narrowed view cannot make publishable a statement the whole evidence does not support.- Entity
Args majordomus entity. Every object of the layer as an addressable node.- EnvArgs
majordomus env.- Evidence
Args majordomus evidence. The output shape is global, so it reads the way a person writes it —evidence show --findings --format json— and is declared once.- Example
Doc - One documented example of one command: what it shows, the argument vector it runs, what must happen when it runs, and anything that has to be done first. The argument vector is the canonical form; the command line a reader copies is rendered from it, never written out a second time.
- Executions
Args majordomus executions. What the server serving this repository has run.- Generate
Args majordomus generate.- Guard
Args majordomus guard: the edit guard (I2735).- Guard
Hook Args guard hook: the provider whose payload stdin carries, and the repository.- Intent
Args majordomus intent. The output shape is global, so it reads where a person writes it.- Knowledge
Args majordomus knowledge. What the knowledge deriver left for review and whether it is still writing. The deriver itself is the shell tool’s (lib/knowledge.sh); this reads what it wrote — the candidate records under the tracked knowledge section, one record by id with its references resolved, and the derivation status of this checkout — through theknowledge_basecapabilities, so the command line answers what HTTP and MCP answer.- McpArgs
majordomus mcp.- Mesh
Args majordomus mesh.- Mesh
Claim Args mesh claim: the paths a session takes, the session taking them, and whether the claim refuses an overlap or only reports one. The scope is positional and repeatable because a claim over nothing is not a claim;--sessionis required because a claim belongs to a session and ends with it, and--advisoryis the difference between a claim that can refuse another runtime’s and one that only makes the overlap visible.- Mesh
Events Args mesh events: a window onto the cooperation journal, in Lamport order.--afteris a resume point rather than a timestamp, so a caller that remembers the last stamp it saw reads each event exactly once however the clocks of the machines involved disagree;--limitbounds one answer. Both are optional, and saying neither asks for the newest page under the server’s own default.- Mesh
Firewall Apply Args mesh firewall apply: the same--portthe report takes, because the commands it runs are the report’s, and the same repository and output arguments, so that--format jsonprints the apply report unchanged for a script that records what ran.- Mesh
Firewall Args mesh firewall: the inbound admissions the declared mesh needs on this host, which firewall the host runs, the commands that admit them, and the firewall’s own word — a report, exit 10 when the host does not admit the mesh.mesh firewall applyruns those commands, and needs root.--portnames the port this checkout’s server listens on beyond loopback, when it does, because a peer dials it there.- Mesh
Handover Args mesh handover: the group that moves a handover record between runtimes. Continuity between two workers of one repository is otherwise a file one of them cannot see, and the two verbs here are the two halves of that move; the group runs neither by itself.- Mesh
Handover Consume Args mesh handover consume: which offered handover to take, and on whose behalf. The consumption is recorded on the mesh so that two workers cannot silently pick up the same handover, which is why the session is required and not inferred.--no-materializerecords the act without writing the local record, for a caller that wants the claim on the handover but will read it some other way.- Mesh
Handover Publish Args mesh handover publish: which record to offer, and what it belongs to. Every flag is optional because the useful default is the newest handover this checkout wrote — the one a worker has just finished — and--pathexists for the case where that is not the one meant. The issue and milestone travel with the record so that a runtime receiving it can file it without reading it.- Mesh
Peer Args mesh peer: which single runtime of the mesh to describe. The runtime key is<node>-<runtime>, and a bare node id is accepted as a shorthand for that node’s first runtime, because a machine running one server is the common case and spelling its runtime out adds nothing. The key is positional and required: apeerquestion with no subject ispeers, which is a different command.- Mesh
Query Args - One read-only
meshquestion. - Mesh
Release Args mesh release: the one claim to give back, by the<stream>/<claim>keymesh claimprinted when it took it. The key names the stream that made the claim as well as the claim itself, so a runtime can only release what it holds, and a person who kept the linemesh claimprinted needs nothing else.- Mesh
Review Answer Args mesh review answer: the request being answered, the session answering it, and the verdict. The verdict is one of three declared words rather than free text, so that a requester can act on an answer without reading it, and clap refuses anything else at the boundary; the note is where the reasoning goes.- Mesh
Review Args mesh review: the group that carries a review across runtimes, so that a worker can have its branch read by a worker it cannot otherwise address. Asking and answering are separate acts by separate runtimes, which is why they are separate subcommands and the group itself runs nothing.- Mesh
Review Request Args mesh review request: what is to be read, who is asking, and optionally who is asked. The subject is a branch, a commit or a pull request, written as the requester refers to it;--scopeis repeatable and narrows the request to the paths that matter, which is what makes an answer cheap enough to be worth asking for. Leaving--reviewerunsaid offers the request to every linked runtime rather than to none.- Mesh
Review Withdraw Args mesh review withdraw: end a request this runtime asked for, because it is done, void or superseded, with what came of it. Any session of the asking runtime may, no other runtime may; the note is its own result, shown with the request, and never an answer.- Mesh
Session Args mesh session: the group that carries a session’s lifecycle on the mesh. The group itself runs nothing — every runnable path under it isopenorclose— so it refuses to be invoked bare rather than guessing which half of a lifecycle was meant.- Mesh
Session Close Args mesh session close: the id of the session that has finished. Closing is the one act that ends a session’s claims everywhere at once, so it takes the session and nothing else — there is no partial close, and no flag that could make one.- Mesh
Session Open Args mesh session open: everything a session says about itself, so that another runtime’s operator can tell who is here and what they are doing. Only--sessionis required; the rest — client, worker, intent, task, issue, milestone, branch, head — are what the session knows about its own work, and opening the same id twice updates the record rather than refusing, which is what makes this usable from a hook that cannot know whether it has run before.- Mesh
View Args mesh peersandmesh state: how much of the mesh to show. Without a flag the answer is the summary, which stays the same size however long the mesh’s history grows;--fullis every session, claim, handover and review the fold holds. The filters narrow either.- Models
Args majordomus models.- Models
List Args majordomus models list.- Models
Route Args majordomus models route.- Monitor
Args monitor: one page of the stream, or--followto keep printing what is new.--countand--untilend a follow, so a script or an agent can wait for one event and go on;--matchkeeps only the signals whose summary contains a text.- Offload
Args majordomus offload. The declaration is the repository’s own unless--declarationnames a file; the output shape is global, as forworktree.- Pack
Args majordomus pack. The output shape is global, so it reads where a person writes it.- Product
Args majordomus product. The filters and the output shape are global, so they read the way a person writes them —product list --featured— and are declared once.- PrsArgs
majordomus prs(aliaspr). Every subcommand butrefresh,drainandcleanupreads the last recorded forge observation and never reaches the network.- Quality
Args majordomus quality. Declared as a group so that each measurement of the crate joins it rather than crowding the root: the public surface’s quality, and the tree rustdoc renders from it.- Quality
Report Args majordomus quality report.- Quality
Rustdoc Args majordomus quality rustdoc: the tree rustdoc rendered from the crate, judged against the crate’s own inventory of exported items.- Reasoning
Args majordomus reasoning: the command-line projection of thereasoningcapabilities. The repository arguments and the output shape are shared by every subcommand, and the shape is global, so--formatreads the same before or after the subcommand.- Release
Args majordomus release. The read half is derived and the write half is one command, so that raising a version is one edit to the one place it is authored, and the rest is derived.- Repo
Args - Where and how the repository is read; shared by every command that reads it.
- Rules
Args majordomus rules. The rule corpus against the proof there is for it: what each rule 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.- RunArgs
majordomus run. One capability, run as an execution in this process, followed to its end.- Scope
Args majordomus scope.- Serve
Args majordomus serve.- Served
Args majordomus served: what a deployment serves, observed from outside and judged against a commit.ServedArgscarries the repository the question is asked of, the subcommand and the output shape.- Shell
Args majordomus shell. The output shape is global, so it reads the way a person writes it.- Skills
Args majordomus skills. The output shape is global, so it reads where a person writes it.- Violation
- One thing missing from the command line’s documentation.
- WebArgs
majordomus web.- WhyArgs
majordomus why. The facets and the output shape are global, so they read the way a person writes them —why list --audience solo-builder— and are declared once.- Worktree
Args majordomus worktree(aliaswt). The output shape is global, so it reads the way a person writes it —worktree list --format json— and is declared once.
Enums§
- Baseline
Command - The
bench baselinesubcommands. - Bench
Command - The
benchsubcommands. - Capabilities
Command - The introspection commands;
listanddescribedispatch through the registry’s CLI exposure. - Command
- The commands. A command listed here is implemented; nothing is advertised ahead of its behaviour.
- Command
Effect - What running a command changes, as a filter.
- Command
Origin - Which program a command belongs to, as a filter.
- Commands
Command - What
majordomus commandscan be asked. - Commit
Command - The subcommands of
majordomus commit:plan,scopes,historyandvalidate. - Completion
Command - What
majordomus completioncan be asked. - Completion
Shell - A shell the integration is printed for.
- Completion
Surface - The surface a completion request is spelled for.
- Continuity
Command - The subcommands of
majordomus continuity: the command line ofcontinuity.status,continuity.records,continuity.device,continuity.plan,continuity.publish,continuity.syncandcontinuity.resume. - Dashboard
Command - The subcommands of
majordomus dashboard: one per page of the suite. - Delivery
Command - The subcommands of
majordomus delivery: the command line ofdelivery.reportanddelivery.feature. - Devcontext
Command - What to ask of the context compiler: compile an answer, ask why one identifier is or is not in it, or read the rules the compiler decides by.
- Devtask
Command - The subcommands of
majordomus devtask. - Discovery
Mode - How files are enumerated.
- Distribution
Command - The subcommands of
majordomus distribution. - Economics
Command - The subcommands of
majordomus economics: four readers and three producers of evidence. - Entity
Command - The subcommands of
majordomus entity. - EnvCommand
- The subcommands of
majordomus env. - Evidence
Command - The subcommands of
majordomus evidence: the whole matrix, one claim, one test, and the recorder. - Executions
Command - The subcommands of
majordomus executions. - Expect
- What an example’s run must show for the example to be true. Small on purpose: enough to prove that the command line printed in the documentation does what the documentation says, and no more. A new variant is a new kind of evidence, not a new test framework.
- Generate
Target - What
generatewrites. - Guard
Command - The
guardsubcommands: one today,hook, which a provider’s pre-tool hook runs before every write; an unknown subcommand is refused rather than read as a path. - Host
Origin - Where the interface a local server binds came from.
- Intent
Command - The subcommands of
majordomus intent: the command line ofintents.list,intents.record,intents.validateandintents.preflight. - Knowledge
Command - The subcommands of
majordomus knowledge. - Mesh
Command - The
meshsubcommands. - Mesh
Firewall Command - The
mesh firewallsubcommands: onlyapply, because the report is the command itself with nothing after it.applyis the one mesh operation offered on the command line alone — it runs a privileged host tool, which nothing reachable over HTTP or MCP may do — and it refuses without root rather than failing half-way. - Mesh
Handover Command - The two halves of moving continuity across the mesh:
publishoffers this checkout’s handover to every linked runtime, andconsumetakes one another runtime offered and writes it wherehandover --resolvewill find it. Publishing does not choose a reader and consuming does not ask the publisher, so neither side has to be running when the other acts. - Mesh
Review Command - The two sides of a review on the mesh:
requestputs a subject and its scope in front of the other runtimes, andanswerrecords one runtime’s verdict on it. A request names a reviewer only when it wants a particular one; unaddressed, it is an offer any linked runtime may answer. - Mesh
Session Command - The two ends of a session’s life on the mesh:
open, which announces a session and updates what it says about itself, andclose, which ends it and with it every claim it held on every linked runtime. There is no third verb, because everything a session does between those two ends is a claim, a handover or a review. - Models
Command - The
modelssubcommands. - Offload
Command - The subcommands of
majordomus offload:hostsreads the declaration and contacts nobody,probemeasures every declared host over ssh and names the one a derive would take, andderivesends a worktree there and stages what the derive changed. - Output
Format - Output shape for commands that print to a person or a script.
mcpspeaks its own protocol and does not use it;mcp --inspectdoes. - Pack
Command - The subcommands of
majordomus pack:planis the verdict before anything is written,buildwrites the pack and verifies what it wrote, andverifyreads a written pack. - Product
Command - The subcommands of
majordomus product. - Profile
Arg - How much
benchmeasures. - PrsCommand
- The subcommands of
majordomus prs.status,plan,explainandeventsrender the recorded observation offline;refresh,drainandcleanupreach the forge, and a drain is bounded by--maxmerges and, without--dry-run, holds the base branch’s integration lease while it acts. - Quality
Command - The
qualitysubcommands. - Reasoning
Command - The
reasoningsubcommands, one per capability:advisors,planandstatusread,explaintraces one record,checkgates, andrecordis the one that writes. - Release
Command - The subcommands of
majordomus release. - Report
Command - The reports this executable can render. Each reads evidence a run already produced and writes a surface; none of them runs anything or decides what passed.
- Rules
Command - The subcommands of
majordomus rules. - Schema
Side - Which schema of a capability to print.
- Serve
Command - The subcommands of
majordomus serve: the server’s lifecycle as something a person or a hook converges on rather than remembers.statusis the projection ofserver.status;ensureandstopare process lifecycle, which no capability served by the process could be. - Served
Command - The subcommands of
majordomus served:observeis the command line ofserved.observe,forgeofserved.forgeandshowofserved.show.observeandforgereach the network, and each is a command line and nothing else. - Shell
Command - The subcommands of
majordomus shell:checkmeasures the repository’s shell units against the automation inventory, and--canonicalputs the inventory’s records back in canonical order before it measures. - Skills
Command - The subcommands of
majordomus skills: the command line ofskills.status,skills.explainandskills.verify. - Transport
- The transports available. One today; the option exists so that a second one is an addition, not a redesign.
- Transport
Arg - The transports
benchcan be limited to. - WebCommand
- The subcommands of
majordomus web. - WhyCommand
- The subcommands of
majordomus why. - Worktree
Command - The subcommands of
majordomus worktree.
Constants§
- DEFAULT_
IDLE_ SECONDS - How long a server started by
serve ensureoutlives its last peer, in seconds: long enough that an agent’s next attach finds it, short enough that a checkout nobody works in does not keep a process. The default ofserver.idle_seconds:in.ai/repo/policy.yaml, which a repository may declare beside the other server timings (lease::Timings::idle);--idleon the command line overrides both (I2701). - DEFAULT_
PORT - The port of the HTTP projection a repository’s primary checkout asks for:
serve, and the shared servermcpstarts. A linked worktree asks for one of its own (checkout_port). - EXAMPLES
- Every documented example of the native command line.
- EXIT_
USAGE - The exit code for a usage error, per the exit-code contract.
- HTTP_
HOST_ ENV - The variable that names, for one machine, the interface a local server binds.
- LOOPBACK_
HOST - The interface a local server binds when nothing says otherwise.
Functions§
- checkout_
http_ host - The machine’s interface for one checkout: a linked worktree does not take the one
HTTP_HOST_ENVnames. The variable is the machine’s face on its network, and that face is the repository’s primary server — the one other machines dial and whose mesh the worktrees cooperate through; a worktree’s own server serves its own sessions, and a variable inherited by every shell would otherwise put each of them on the network beside it. A flag still binds where it says, because a person typed it. - checkout_
port - The port this checkout’s server asks for first, the same on every start (I2702).
- linked_
port - The port a linked worktree with this identity asks for: the identity’s leading 32 bits,
reduced into the block above
DEFAULT_PORT. - local_
http_ host resolve_http_hostagainst this process’s environment: whatserve,mcpandserver.statusall read, so that the address a server binds and the address the status calls desired cannot disagree.- parse
- The example’s argv through the canonical parser. Public so that a test can hold one argument vector to the declaration without going through the whole tree.
- parse_
duration - A duration as a person writes it:
90,90s,30m,2h,1d, in seconds. - resolve_
checkout_ http_ host resolve_http_hostfor a checkout that is, or is not, a linked worktree: an environment’s interface becomes loopback in a linked worktree; a flag never changes.- resolve_
http_ host - The interface a local server binds: the flag when one was given, else what
HTTP_HOST_ENVnames, else loopback. A variable that is set and blank is unset. - validate
- Every violation in the tree, in command order, then in example order. An empty result is the contract met.