What rules are enforced, by what, and whether each one is actually wired.
What rules are enforced, by what, and whether each one is actually wired.
read-only
system
--json
The registry ships with the tool rather than with a repository. A doctrine is a statement about how Majordomus behaves; a repository configures the tool without redefining it.
Only the codes this command can produce. The full contract is on the commands index.
0ok
2usage
10contract unmet
12missing artifact
13internal error
What is enforced, and whether it is wired
The registry ships with the tool rather than with a repository: a doctrine is a statement about how Majordomus behaves, and a repository configures the tool without redefining it. Every count this command prints is derived from the registry and the source, never written down.
The summary
registry present
yes
Given this repository
# A repository with Majordomus installed and projections generated, and one commit of work.
"$MJ" init >/dev/null
"$MJ" update >/dev/null
mkdir -p lib docs
echo a > lib/a
echo d > docs/d
git add . && git commit -qm base
Run
$ majordomus doctrine status
Output contains
doctrine
exit0
Declared, blocking, advisory, unwired and uncovered, each computed at the moment you ask. A number written into a document goes stale; a number derived from the registry cannot.
One line per rule
registry present
yes
Given this repository
# A repository with Majordomus installed and projections generated, and one commit of work.
"$MJ" init >/dev/null
"$MJ" update >/dev/null
mkdir -p lib docs
echo a > lib/a
echo d > docs/d
git add . && git commit -qm base
Run
$ majordomus doctrine list
Output contains
majordomus.scope-integrity
blocking
exit0
Each doctrine with its class, the validator that decides it, and the commands that enforce it. A rule with no validator, or a validator no command reaches, is what `doctor` refuses.
A subcommand it does not have
registry present
yes
Given this repository
# A repository with Majordomus installed and projections generated, and one commit of work.
"$MJ" init >/dev/null
"$MJ" update >/dev/null
mkdir -p lib docs
echo a > lib/a
echo d > docs/d
git add . && git commit -qm base
Run
$ majordomus doctrine explain
Output contains
unknown subcommand
exit2
Exit 2 is USAGE. A mistyped subcommand is refused rather than treated as the default, so a script cannot silently ask a different question from the one it meant.
Reference
Report what rules are enforced here, by what, and whether they are wired. Read-only.
Reads: the repository's effective rule set (.ai/repo/rules/vendor/majordomus/ and
.ai/repo/rules/project/, resolved as majordomus rules list resolves it), lib/,
docs/CLAIMS.yaml.
Writes: nothing.
majordomus doctrine [status] derived countsmajordomus doctrine list id, class, validator, enforcing commandsmajordomus doctrine show <id> the full record for one doctrine, and the rule file it lives in
Behaviour:
status prints how many doctrines are declared, how many block, how many are advisory,
how many name a validator that does not exist, and how many name a test file that does
not exist. Every number is derived on the spot; none is stored.
list prints one line per doctrine.
show <id> prints the record, including which claims it backs, the tests that prove it,
the rules it depends on, the rule file it lives in, and which file defines its
validator. An unknown id exits 12. A doctrine's id is its rule id,
majordomus.<name> for the baseline.
A rule set that does not resolve exits 10 with the reason; nothing is listed
partially.
Exits 0 when no validator and no test file is missing, 10 otherwise. Whether the
enforcement is actually reached is a stronger question, and majordomus doctor
answers it.
Evidence
Every case below runs in CI on Linux and macOS. The site refuses to build if a public command has no behavioural case, no negative case, or no demonstration.