Skip to content

Provider instruction files are generated from the one policy, deterministically

CLAUDE.md, AGENTS.md, GEMINI.md and any other target the policy names are not written by hand. majordomus update generates them from one canonical policy, the profiles, and one shared body text, through a small template per provider. Running it twice with the same inputs produces byte-identical files.

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: not run Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

Running update twice leaves the byte-identical file. The test asserts the hash.

What it means

CLAUDE.md, AGENTS.md, GEMINI.md and any other target the policy names are not written by hand. majordomus update generates them from one canonical policy, the profiles, and one shared body text, through a small template per provider. Running it twice with the same inputs produces byte-identical files.

How it works

lib/update.sh hashes the policy and profiles, renders each target from its adapter — the templates under the distribution's share/providers/, or the repository's own override under its providers section — and writes each target atomically. Every generated file is a bootstrap: it names README.md, points at .ai/README.md, names the default profile and the lifecycle workflow, and carries no rule of its own. Its first line is a stamp naming the command that produced it, the policy hash it came from and the hash of its own content. Adapters translate; they do not add rules — a rule that exists for one provider and not another is a policy bug by definition, and doctor fails a generated file that has grown a rule corpus.

How to see it

majordomus update && sha256sum CLAUDE.md
majordomus update && sha256sum CLAUDE.md   # identical hash; output says "unchanged CLAUDE.md"

What it does not cover

majordomus update projects a deliberately narrow subset of the policy — the budget, the profile table, state locations, the finish contract, the identity-fields rule — and lists what is not projected. It does not merge an existing hand-written instruction file; you decide what moves into the body on first use.

Why it exists

In one workspace of about twenty repositories, the instruction files for two AI tools in the same repository shared between none and a tenth of their content. They were not duplicates; they were disjoint rulebooks, and which one applied depended on which tool was open.

Detail rendered from docs/claims/projection-generation.md.

From the statement to the proof

  1. 1 · the public statement

    Provider instruction files are generated from the one policy, deterministically

    Made on Policy, Projection.

  2. 2 · the canonical claim

    projection-generationdeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in read it on this site · docs/DESIGN.md

  3. 3 · the implementation

    lib/update.sh · majordomus update

  4. 4 · the test and the scenarios

    Test: test/cases/03_update.sh

    Executed in Keep every provider bootstrap thin, generated and within budget.

  5. 5 · the recorded runs

    recorded evidence: not run how evidence is recorded

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 03_update

Where this claim is used

Related claims same implementation

The moments this answers

Searches the titles and descriptions of every page this site publishes.