Policy
one provider-neutral policy.yaml; unknown keys are errors
one provider-neutral policy.yaml; unknown keys are errors
Where it lives
State it owns
The command that acts on it
majordomus update
Regenerate every provider instruction file from the one policy, deterministically.
- generated-output-mutating
majordomus update [--dry-run] [--diff <target>] [--force]
See it refuse, and accept
One policy, several provider instruction files, generated deterministically. Running it twice leaves byte-identical files, which is what makes a stamp able to detect a hand edit.
Given this repository
# Installed, but the provider instruction files have not been generated yet. "$MJ" init >/dev/null mkdir -p lib && echo a > lib/a && git add . && git commit -qm base
Run
$ majordomus update
Output contains
- create CLAUDE.md
- carries its own stamp
exit
0
Each target named in the policy's projections is written, and a stamp of each is recorded together with the hash of the policy that produced it.
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 update
Output contains
- unchanged CLAUDE.md
exit
0
Deterministic output is not a nicety here. If regeneration produced a different file each time, a stamp could never distinguish a hand edit from the generator's own noise.
What enforces it
- majordomus.policy-completeness blocking enforced by doctor, watch Every policy value the code reads is declared in the skeleton policy, and no reader carries its own default for one.
- majordomus.policy-integrity blocking enforced by doctor, watch The policy and every profile parse, declare version 1, and carry no key the schema does not define.
- majordomus.doctrine-wiring-integrity blocking enforced by doctor Every doctrine in this registry resolves to a validator that exists, is reached from every command it names, propagates failure, is proved by a test, and is run by CI — and every validator in the source is declared here.
- majordomus.prompt-capture blocking enforced by doctor, watch A repository that declares prompt capture has it wired below the model and proven by running it; the archive stays ignored and untracked, every prompt is present as both a record and a rendering, and neither carries anything the model said.
- majordomus.prompt-integrity blocking enforced by doctor, watch Every repository-local prompt asset renders, and every token in it is one the renderer knows.
- majordomus.session-lifecycle blocking enforced by doctor, watch Where a provider fires session events, the episode is opened and closed by that provider's hook rather than by the model, the start event hands the worker the bounded briefing the policy declares, and the working context each open freezes stays under the ignored half of the layer, carries the declared keys, and never carries a conversation.
What is guaranteed
- guaranteed The canonical policy is parsed and rejected if it contains an unknown keyproved by test/cases/00_yaml_flatten.sh
- guaranteed A doctrine's class is what decides whether a violation stops the command, not a label beside itproved by test/cases/17_doctrine_enforcement.sh
- guaranteed A declared provider hook captures the person's raw prompts below the model, and doctor proves it by running itproved by test/cases/29_prompt_capture.sh
- guaranteed Every repository-local prompt asset renders, and an unknown token is a failureproved by test/cases/24_prompt_search.sh
- guaranteed A repository-local prompt renders against a closed set of state tokens, and an unknown token is an errorproved by test/cases/24_prompt_search.sh
- guaranteed What the tool knows about itself is written once and derived everywhere else, and a second copy is a test failureproved by test/cases/28_no_hardcoded_values.sh
- guaranteed A commit whose derived data is behind its canonical inputs is refused before it exists, and a repository that unwires that gate is a doctor failureproved by test/cases/56_derived_current_gate.sh
- guaranteed A provider hook opens the episode below the model and hands the worker what the last one left, records what a compaction is about to discard, and closes the episode with a continuation record beside its envelopeproved by test/cases/54_session_lifecycle_hooks.sh
The moments this answers
- found a rule everyone believed was enforced and nothing ever invoked Every artefact of enforcement exists — the rule, the script, the test — and no path connects them, so the control is fiction.
- reviewed a well-written contribution that broke a convention it had no way to discover Assistants let anybody produce plausible contributions at volume; the conventions that make one correct are still only in the maintainers.