The effective rule set: every active rule vendored under the repository's rules section
plus every active rule the repository wrote, resolved as a dependency graph. Read-only in
every subcommand except vendor update.
A rule is a Markdown file with YAML front matter. Its identity is the front matter's id
and version, never the file name. docs/DOCTRINE.md describes the format, the
x-majordomus block that binds a rule to a validator, and what is authoritative today.
$ majordomus rules list
majordomus.scope-integrity v1 blocking vendor:majordomus enforced by check,finish,watch
majordomus.sessions-are-workers v1 advisory vendor:majordomus no validator; see the rule
project.english-only v1 blocking project no validator; see the rule
list [--json]prints the effective set in resolved order: identity, class, provenance (vendor:<name>orproject), and whether the tool enforces it. A rule without anx-majordomusblock is normative for whoever reads it and enforced by nobody, and the listing saysno validator; see the rulerather than hiding it: the rule is normative for whoever reads it, and nothing checks it by machine.show <id>prints one rule, front matter and body, with the repository-relative path it was read from as the first line. An id outside the effective set exits 12.vendor statuscompares the vendored baseline with the package the running executable ships. It prints both revisions, then the manifest integrity of the vendored copy, then whether the two packages are the same.vendor diffis the reviewable difference between the two, as a unified diff of the two directories. It exits 0 whether or not they differ;vendor statuscarries the exit code.vendor update [--force]replaces the vendored baseline with the executable's package. The write is atomic: the new package is staged beside the target and swapped in. It never touchesrules/project/.
Resolution fails closed. A missing dependency, a dependency on a deprecated rule, a
cycle, one id@version claimed by two files, a project rule in the vendor namespace,
malformed or incomplete front matter, an unknown front-matter key, or an x-majordomus
block that names no validator, no enforcing command or no test — each stops list, show
and every command that reads the set, with exit 10 and the reason. Nothing is applied
partially. The order is deterministic: two runs agree, and every dependency is listed before
the rule that depends on it.
The repository's vendored copy is authoritative. A newer executable reports a newer
baseline through vendor status and vendor diff; it never applies one. update,
doctor and check leave the vendored directory alone. The baseline changes only when
vendor update is asked for.
A hand edit under vendor/ is detected. The package manifest names every rule file
with its hash. A file whose hash no longer matches, a listed file that is absent, or a file
present beside the manifest that it does not list, is reported by vendor status and
refused by vendor update until --force.
| exit | meaning |
|---|---|
| 0 | the set resolves; the vendored baseline is current |
| 2 | unknown subcommand or option; show without an id |
| 10 | the set does not resolve, or the vendored copy fails its manifest |
| 11 | vendor status: the executable ships a different package than the one vendored |
| 12 | no rule with that id; nothing vendored yet; no rules section in this layout |
| 13 | the executable ships no standard rule package: a broken install, not a repository fault |
| 15 | vendor update refused over a hand-edited vendor directory (--force overrides) |
test/cases/67_rule_dag.sh proves each refusal by mutation, and proves that a newer
distribution's package is not applied until asked, that vendor update leaves
rules/project/ byte for byte what it was, and that the resolved order is the same across
runs.