Skip to content

The method

Doctrine states the invariant. Policy applies it. A rule makes it decidable. Enforcement makes ignoring it impossible. Everything below is this repository's own governance, measured.

Most repositories that "adopt AI" write down how they would like to work. The writing is the whole intervention: a file of conventions, a paragraph in a README, a prompt that asks nicely. Nothing decides anything, so nothing changes, and six months later the document describes a project that no longer exists.

A rule that nothing enforces is a wish with syntax highlighting.

Majordomus separates three things that are usually one pile of Markdown, and gives only the last of them any authority.

01 / the layers

One invariant, all the way down

Each layer answers a different question and lives on a different clock. Mixing them is what produces a governance document that is simultaneously too vague to check and too specific to survive a refactor. The counts are this repository's, measured when the page was built.

layerthe question it answerswhat it is, herelifetimetoday
Doctrine What must remain true? a principle in the portable rule package; technology-neutral, and checked by nothing years 10principles
Policy How is the invariant applied here? one policy file, projected into the instruction file of every worker that opens the repository months to years 3projections
Rule What exactly must, or must not, be? a rule file with a class, a validator, the commands that run it and the test that proves it months 50rules
Enforcement How does a machine decide it? a validator, dispatched from a command, wired to a git hook and to CI the implementation that answers it 50validators
Diagnostic What broke, and what fixes it? a finding naming the rule, the file, the reason and the exit code the command leaves with one run 4reporting commands
One invariant, all the way downfrom the standard rule package and its wiring
flowchart TD
    L0["Doctrine<br/><small>10 principles · years</small>"]
    L1["Policy<br/><small>3 projections · months to years</small>"]
    L2["Rule<br/><small>50 rules · months</small>"]
    L3["Enforcement<br/><small>50 validators · the implementation that answers it</small>"]
    L4["Diagnostic<br/><small>4 reporting commands · one run</small>"]
    L0 --> L1 --> L2 --> L3 --> L4
    L4 -. "exit 10 · the commit does not land" .-> L2

The last edge is the whole argument. A diagnostic that a worker may ignore is documentation; one that leaves the command non-zero, fails the hook and stops the commit is governance.

02 / one chain, end to end

AI layer integrity

The repository's AI layer is real: the manifest declares a format this executable reads and names sections that exist, the local half is ignored by git with nothing under it tracked, and no project data remains under the pre-.ai path.

  1. 1 Doctrine Sessions are workers, not memory
  2. 2 Rule share/standard/majordomus/rules/ai-layout-integrity.v1.md
  3. 3 Validator mj_validate_ai_layout in lib/doctor.sh
  4. 4 Dispatched from majordomus doctor, majordomus watch
  5. 5 On violation FAIL · exit 10 · the pre-commit hook refuses the commit
  6. 6 Proved by test/cases/01_init.sh

03 / the whole thing

Governance as a graph, not a folder

154 nodes and 247 edges, projected from the rule package and the wiring the validators declare. Turn an edge kind off to ask a narrower question: which rules descend from which invariant, which rules depend on another being true first, what a single command actually decides.

share/standard/majordomus/

Select a node to see what it is and what it touches.

Every invariant this repository holds, the rule that makes it decidable, the validator that answers it, the command that dispatches it and the test that proves it. A node with nothing attached is a gap, not a rounding error.
The same graph as text — 154 nodes, 247 edges
  • Define done before executing principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.command-surface
    • derives → rule:majordomus.doctrine-wiring-integrity
    • derives → rule:majordomus.enforcement-wiring
    • derives → rule:majordomus.roadmap-integrity
    • derives → rule:majordomus.rule-package-integrity
  • Escalate capability and effort only when justified principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.profile-requirements
  • Externalise decisions and durable state principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.adr-integrity
    • derives → rule:majordomus.blocker-resolution
    • derives → rule:majordomus.decision-records
    • derives → rule:majordomus.questions-store-integrity
  • Handovers transfer state, not transcripts principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.handover-integrity
    • derives → rule:majordomus.note-integrity
    • derives → rule:majordomus.task-continuity
  • Load minimum sufficient context principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.bootstrap-integrity
    • derives → rule:majordomus.catalogue-integrity
    • derives → rule:majordomus.context-integrity
    • derives → rule:majordomus.policy-integrity
    • derives → rule:majordomus.context-budget
    • derives → rule:majordomus.prompt-integrity
    • derives → rule:majordomus.skill-integrity
  • One worker, one clear scope principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.dag-integrity
    • derives → rule:majordomus.scope-integrity
  • Sessions are workers, not memory principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.ai-layout-integrity
    • derives → rule:majordomus.checkpoint-freshness
    • derives → rule:majordomus.layout-integrity
    • derives → rule:majordomus.ledger-integrity
    • derives → rule:majordomus.policy-completeness
    • derives → rule:majordomus.project-integrity
    • derives → rule:majordomus.projection-integrity
    • derives → rule:majordomus.prompt-capture
    • derives → rule:majordomus.retention-caps
    • derives → rule:majordomus.schema-integrity
    • derives → rule:majordomus.session-records
    • derives → rule:majordomus.session-lifecycle
    • derives → rule:majordomus.state-consistency
  • Verify outcomes, not activity principle

    An invariant of the standard package. It is not checked; the rules under it are.

    • derives → rule:majordomus.command-coverage
    • derives → rule:majordomus.verification-integrity
  • knowledge-graph rule · advisory

    The graph the knowledge compiler builds from what the repository states has one node per identity, no edge with a missing end or without provenance, and no declared path or tracked source that no longer exists; a broken owned reference is a failure, a broken link an author wrote in prose is not.

    • decided_by → validator:knowledge_graph
    • proved_by → test:test/cases/3075_knowledge_validate_judges_the_graph.sh
  • knowledge-integrity rule · blocking

    Every knowledge record is one evidenced, well-formed assertion. It is valid against its schema with no unknown key, its identity is unique and equals its file name, a verified record carries provenance, every reference it names resolves, a superseded record says what replaced it or why it was rejected, a candidate never claims to be verified, and no record carries a conversation.

    • decided_by → validator:knowledge_integrity
    • proved_by → test:test/cases/707_knowledge_check_refuses_malformed_records.sh
    • rule:majordomus.candidates-reviewed depends_on → this
  • candidates-reviewed rule · advisory

    A review queue that grows without bound is not reviewed. More candidates than the policy cap, a candidate that has waited longer than the policy age, or a candidate the tree does not track, is reported, not stopped; both numbers are declared once in the policy.

    • depends_on → rule:majordomus.knowledge-integrity
    • decided_by → validator:knowledge_accumulation
    • proved_by → test:test/cases/711_candidates_are_reviewed_not_accumulated.sh
  • ai-layout-integrity rule · blocking

    The repository's AI layer is real: the manifest declares a format this executable reads and every section it names exists, the checkout-local half is ignored by git and nothing under it is tracked, and no project data remains under the pre-.ai .majordomus/ path.

    • decided_by → validator:ai_layout
    • proved_by → test:test/cases/01_init.sh
    • principle:sessions-are-workers-not-memory derives → this
    • rule:majordomus.context-integrity depends_on → this
    • rule:majordomus.deployment-contract depends_on → this
  • checkpoint-freshness rule · advisory

    A task whose last checkpoint is older than its profile's interval is reported, not stopped.

    • decided_by → validator:checkpoint
    • proved_by → test:test/cases/04_start_check.sh
    • principle:sessions-are-workers-not-memory derives → this
  • layout-integrity rule · advisory

    The directories the durable commands write into are installed rather than created on first use.

    • decided_by → validator:layout
    • proved_by → test:test/cases/25_continuity_lifecycle.sh
    • principle:sessions-are-workers-not-memory derives → this
  • ledger-integrity rule · blocking

    Every line of the append-only ledger is a well-formed event; the one durable record nothing else can reconstruct stays readable.

    • decided_by → validator:ledger
    • proved_by → test:test/cases/22_history.sh
    • principle:sessions-are-workers-not-memory derives → this
  • policy-completeness rule · blocking

    Every policy value the code reads is declared in the skeleton policy, and no reader carries its own default for one.

    • decided_by → validator:policy_defaults
    • proved_by → test:test/cases/28_no_hardcoded_values.sh
    • principle:sessions-are-workers-not-memory derives → this
  • bootstrap-integrity rule · blocking

    The path from a human reader to the AI layer is unbroken — README.md names AGENTS.md, every generated instruction file points at .ai/README.md, and none of them carries a rule of its own.

    • decided_by → validator:bootstrap
    • proved_by → test:test/cases/03_update.sh
    • principle:load-minimum-sufficient-context derives → this
  • catalogue-integrity rule · blocking

    Every use case and application describes the tool in terms the tool has — each command, doctrine and claim it names exists, and the two catalogues reference each other in both directions.

    • decided_by → validator:catalogue
    • proved_by → test:test/cases/28_catalogue.sh
    • principle:load-minimum-sufficient-context derives → this
    • rule:majordomus.use-case-coverage depends_on → this
  • context-integrity rule · blocking

    Every directory of the AI layer carries a context document, each one carries the contract, they compose into one deterministic chain for every path, and a tree that does not validate resolves nothing.

    • depends_on → rule:majordomus.ai-layout-integrity
    • decided_by → validator:context
    • proved_by → test:test/cases/69_context_documents.sh
    • principle:load-minimum-sufficient-context derives → this
  • policy-integrity rule · blocking

    The policy and every profile parse, declare version 1, and carry no key the schema does not define.

    • decided_by → validator:policy
    • proved_by → test:test/cases/02_doctor_basic.sh
    • principle:load-minimum-sufficient-context derives → this
  • adr-integrity rule · blocking

    Every architecture decision the repository holds parses against the decision contract, claims an identity nothing else claims, and every relation and reference it makes resolves.

    • decided_by → validator:adr
    • proved_by → test:test/cases/99_adr.sh
    • principle:externalise-decisions-and-durable-state derives → this
  • blocker-resolution rule · blocking

    No task can be completed while any question on this branch is unresolved; it can still be finished as blocked, partial, no_match or failed.

    • decided_by → validator:blockers
    • proved_by → test:test/cases/17_doctrine_enforcement.sh
    • principle:externalise-decisions-and-durable-state derives → this
  • decision-records rule · advisory

    Every entry in decisions.md carries the task, the head and the reason, so a decision can be found by the worker who needs it.

    • decided_by → validator:decisions
    • proved_by → test:test/cases/21_decision_question.sh
    • principle:externalise-decisions-and-durable-state derives → this
  • dag-integrity rule · blocking

    The issue dependency graph is acyclic, every edge names an issue that exists, and no issue is executing ahead of a dependency that is not done.

    • decided_by → validator:dag
    • proved_by → test:test/cases/44_model_doctrine.sh
    • principle:one-worker-one-clear-scope derives → this
  • command-surface rule · blocking

    Every command the binary dispatches is described by the shipped registry, every command the registry declares public is dispatched, and a command is public exactly when the usage text lists it.

    • decided_by → validator:command_surface
    • proved_by → test:test/cases/30_command_registry.sh
    • principle:define-done-before-executing derives → this
  • doctrine-wiring-integrity rule · blocking

    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.

    • decided_by → validator:doctrine_wiring
    • proved_by → test:test/cases/18_doctrine_wiring.sh
    • principle:define-done-before-executing derives → this
  • enforcement-wiring rule · blocking

    Every enforcement the policy declares is invoked by the hook it names, from a file the dispatcher will actually execute, without swallowing the exit code.

    • decided_by → validator:wiring
    • proved_by → test:test/cases/14_wiring_dispatcher.sh
    • principle:define-done-before-executing derives → this
  • command-coverage rule · blocking

    Every public command has a behavioural test and a negative test, computed from the registry and the coverage each case declares about itself rather than from a list someone maintains.

    • decided_by → validator:command_coverage
    • proved_by → test:test/cases/31_command_coverage.sh
    • principle:verify-outcomes-not-activity derives → this
  • handover-integrity rule · blocking

    The resolver runs and reports either the record for this worktree and branch or its clean absence; a malformed record is never silently skipped, and a record describing a history this checkout no longer has is reported.

    • decided_by → validator:resolver
    • proved_by → test:test/cases/23_context.sh
    • principle:handovers-transfer-state-not-transcripts derives → this
    • rule:majordomus.lifecycle-observed depends_on → this
    • rule:majordomus.record-changed-files depends_on → this
  • lifecycle-observed rule · blocking

    A store that can be read is not a store that is being written. While episodes go on opening, the records a future worker resumes from must go on advancing, every lifecycle event received must leave evidence it arrived, and an episode that outlives the staleness threshold must be named rather than left open.

    • depends_on → rule:majordomus.handover-integrity
    • decided_by → validator:lifecycle
    • proved_by → test:test/cases/130_lifecycle_survives_a_stale_task.sh
    • rule:majordomus.knowledge-observed depends_on → this
  • knowledge-observed rule · blocking

    While episodes keep closing, the knowledge they produced must keep being derived. A closed episode no derivation followed, once it is older than the freshness threshold, is a stopped writer; a lifecycle whose close path never calls the deriver while the policy switch is on is a writer that was never started.

    • depends_on → rule:majordomus.lifecycle-observed
    • decided_by → validator:knowledge_lifecycle
    • proved_by → test:test/cases/563_knowledge_is_derived_at_the_boundary.sh
  • note-integrity rule · blocking

    Every outcome needs a note carrying the sections that outcome requires, and no transcript.

    • decided_by → validator:note
    • proved_by → test:test/cases/06_finish.sh
    • principle:handovers-transfer-state-not-transcripts derives → this
  • profile-requirements rule · blocking

    A profile may demand more than the shared contract — a regression test, a decision record — and finish refuses without it.

    • decided_by → validator:profile_requirements
    • proved_by → test:test/cases/16_profiles.sh
    • principle:escalate-capability-and-effort-only-when-justified derives → this
  • project-integrity rule · blocking

    Every milestone and issue file parses, carries the id its filename claims, and contains no key nobody reads.

    • decided_by → validator:project
    • proved_by → test:test/cases/44_model_doctrine.sh
    • principle:sessions-are-workers-not-memory derives → this
  • projection-integrity rule · blocking

    Every generated instruction file exists, matches the stamp it carries, and is never silently overwritten after a hand edit.

    • decided_by → validator:projection
    • proved_by → test:test/cases/03_update.sh
    • principle:sessions-are-workers-not-memory derives → this
    • rule:majordomus.context-budget depends_on → this
    • rule:majordomus.deployment-contract depends_on → this
  • context-budget rule · blocking

    The always-loaded projection stays within its line budget, every reference in it resolves, it states no count that will go stale, and the assembled context fits the builder's own budget.

    • depends_on → rule:majordomus.projection-integrity
    • decided_by → validator:budget
    • proved_by → test:test/cases/02_doctor_basic.sh
    • principle:load-minimum-sufficient-context derives → this
  • deployment-contract rule · blocking

    A deployment of the executable is a canonical object of the layer against a closed contract; the container definition, its ignore file and the files of the provider it names are projections of it, never a second description.

    • depends_on → rule:majordomus.ai-layout-integrity
    • depends_on → rule:majordomus.projection-integrity
    • decided_by → validator:deployments
    • proved_by → test:test/cases/84_deployment_contract.sh
  • prompt-capture rule · blocking

    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.

    • decided_by → validator:prompt_capture
    • proved_by → test:test/cases/29_prompt_capture.sh
    • principle:sessions-are-workers-not-memory derives → this
    • rule:majordomus.prompt-continuity depends_on → this
  • prompt-continuity rule · blocking

    Every captured prompt names the episode it belongs to or says why it cannot; the archive is readable by its owner alone, bounded by a declared retention policy, and never holds credential material verbatim.

    • depends_on → rule:majordomus.prompt-capture
    • decided_by → validator:prompt_continuity
    • proved_by → test:test/cases/140_prompt_continuity.sh
  • prompt-integrity rule · blocking

    Every repository-local prompt asset renders, and every token in it is one the renderer knows.

    • decided_by → validator:prompts
    • proved_by → test:test/cases/24_prompt_search.sh
    • principle:load-minimum-sufficient-context derives → this
  • questions-store-integrity rule · blocking

    Every entry in open-questions.md parses, because a gate that cannot read an entry can be bypassed by mistyping one.

    • decided_by → validator:questions_store
    • proved_by → test:test/cases/21_decision_question.sh
    • principle:externalise-decisions-and-durable-state derives → this
  • retention-caps rule · blocking

    The ledger, the handovers, the checkpoints and the session records stay under the caps the policy sets, so durable state does not grow without bound.

    • decided_by → validator:retention
    • proved_by → test:test/cases/02_doctor_basic.sh
    • principle:sessions-are-workers-not-memory derives → this
  • roadmap-integrity rule · blocking

    No document is a second authority for the roadmap, and no milestone types its own version. While a hand-written roadmap table exists, it can neither list a release no milestone was released in nor hide one that carried a milestone; a milestone's release (released_in) is inferred from the release records, never typed.

    • decided_by → validator:roadmap
    • proved_by → test:test/cases/49_roadmap_doctrine.sh
    • principle:define-done-before-executing derives → this
  • rule-package-integrity rule · blocking

    The repository's effective rule set is real: the vendored baseline matches its manifest file for file, every rule resolves with its dependencies and no two claim one identity, and no project rule reuses the vendored namespace.

    • decided_by → validator:rule_package
    • proved_by → test:test/cases/67_rule_dag.sh
    • principle:define-done-before-executing derives → this
  • schema-integrity rule · blocking

    The order the rules apply in is written down rather than left in the code; every kind the tool reads declares a schema, every schema is named by a kind, and every path under the repository's AI layer is claimed by a source so that nothing is carried through unvalidated.

    • decided_by → validator:schema_integrity
    • proved_by → test:test/cases/32_schema_integrity.sh
    • principle:sessions-are-workers-not-memory derives → this
  • scope-integrity rule · blocking

    A task touches only the paths it claimed; work found elsewhere is not accepted as done.

    • decided_by → validator:scope
    • proved_by → test:test/cases/04_start_check.sh
    • principle:one-worker-one-clear-scope derives → this
  • session-records rule · blocking

    A closed execution episode is written once, into the layer's sessions section, against a schema that admits what the repository can prove and nothing else.

    • decided_by → validator:session_records
    • proved_by → test:test/cases/63_session_records.sh
    • principle:sessions-are-workers-not-memory derives → this
    • rule:majordomus.record-changed-files depends_on → this
    • rule:majordomus.session-lifecycle depends_on → this
  • record-changed-files rule · advisory

    The changed_files block of a checkpoint, a handover or a closed session names what the episode produced. Paths a declaration already calls generated, projected or local are classified out, and the classification reads those declarations rather than a list of its own.

    • depends_on → rule:majordomus.session-records
    • depends_on → rule:majordomus.handover-integrity
    • decided_by → validator:record_changed_files
    • proved_by → test:test/cases/136_changed_files_classifier.sh
  • session-lifecycle rule · blocking

    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.

    • depends_on → rule:majordomus.session-records
    • decided_by → validator:session_lifecycle
    • proved_by → test:test/cases/54_session_lifecycle_hooks.sh
    • principle:sessions-are-workers-not-memory derives → this
  • skill-integrity rule · blocking

    Every skill the repository declares parses against the skill contract, names the directory it lives in, carries its sections, describes itself in terms no other skill uses, and every skill or example it refers to exists.

    • decided_by → validator:skills
    • proved_by → test:test/cases/95_skills.sh
    • principle:load-minimum-sufficient-context derives → this
  • state-consistency rule · blocking

    The task record still describes this checkout — same branch, and HEAD at or ahead of the recorded commit.

    • decided_by → validator:state
    • proved_by → test:test/cases/04_start_check.sh
    • principle:sessions-are-workers-not-memory derives → this
  • task-continuity rule · advisory

    A task finished as partial or blocked should leave a handover record, not only a note section.

    • decided_by → validator:continuity
    • proved_by → test:test/cases/25_continuity_lifecycle.sh
    • principle:handovers-transfer-state-not-transcripts derives → this
  • task-on-the-mesh rule · blocking

    When the repository declares its mesh enabled, an active task's scope is claimed on the mesh — `start` brings the checkout's shared server up and claims it, `check` and `finish` claim it again when a server answers — and a task completed without that claim is refused.

    • decided_by → validator:task_on_the_mesh
    • proved_by → test:test/cases/3068_a_task_off_the_mesh_is_refused.sh
  • use-case-coverage rule · blocking

    Every public command, and every guaranteed claim and MCP tool the policy asks for, is named and run by at least one active use case whose scenario executes against the real tool; a gap is a failure or a report according to the policy, never silence.

    • depends_on → rule:majordomus.catalogue-integrity
    • decided_by → validator:use_case_coverage
    • proved_by → test:test/cases/94_use_cases.sh
  • verification-integrity rule · blocking

    Completion requires a verification command that actually ran and exited 0 over a tree that did not change under it; its exit code, duration and tree are recorded.

    • decided_by → validator:verification
    • proved_by → test:test/cases/19_end_to_end.sh
    • principle:verify-outcomes-not-activity derives → this
    • rule:majordomus.obligation-closure depends_on → this
  • obligation-closure rule · blocking

    A task that declares obligations reaches the outcome completed only when each one is established by the tool or has evidence, and that evidence still describes the tree or the commit it was taken over.

    • depends_on → rule:majordomus.verification-integrity
    • decided_by → validator:obligations
    • proved_by → test:test/cases/103_obligations.sh
    • rule:majordomus.completion-gates depends_on → this
  • completion-gates rule · blocking

    A task reaches the outcome completed only when no validation gate its own change set selects is known to be failing, and a gate's verdict discharges nothing once the files that select it have changed since the run.

    • depends_on → rule:majordomus.obligation-closure
    • decided_by → validator:completion_gates
    • proved_by → test:test/cases/131_completion_gates.sh
    • rule:majordomus.publication-currency depends_on → this
  • publication-currency rule · blocking

    A repository that publishes has a second tree — the one the public is being served — and no commit-level gate can measure it, because no change to any file can make it right or wrong. A session that lands work and leaves the publication owed has finished nothing the public can see, and every check stays green while that is true. The gates that measure a deployment are declared as such in the CI model, and finish asks them.

    • depends_on → rule:majordomus.completion-gates
    • decided_by → validator:publication_currency
    • proved_by → test:test/cases/275_publication_is_current.sh
  • mj_validate_adr validator

    Decides the rule. Declared in lib/adr.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.adr-integrity decided_by → this
  • mj_validate_ai_layout validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.ai-layout-integrity decided_by → this
  • mj_validate_blockers validator

    Decides the rule. Declared in lib/check.sh.

    • run_by → command:check
    • run_by → command:finish
    • rule:majordomus.blocker-resolution decided_by → this
  • mj_validate_bootstrap validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.bootstrap-integrity decided_by → this
  • mj_validate_budget validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.context-budget decided_by → this
  • mj_validate_catalogue validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.catalogue-integrity decided_by → this
  • mj_validate_checkpoint validator

    Decides the rule. Declared in lib/check.sh.

    • run_by → command:check
    • run_by → command:watch
    • rule:majordomus.checkpoint-freshness decided_by → this
  • mj_validate_command_coverage validator

    Decides the rule. Declared in lib/commands.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.command-coverage decided_by → this
  • mj_validate_command_surface validator

    Decides the rule. Declared in lib/commands.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.command-surface decided_by → this
  • mj_validate_completion_gates validator

    Decides the rule. Declared in lib/gates.sh.

    • run_by → command:check
    • run_by → command:finish
    • rule:majordomus.completion-gates decided_by → this
  • mj_validate_context validator

    Decides the rule. Declared in lib/context_docs.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.context-integrity decided_by → this
  • mj_validate_continuity validator

    Decides the rule. Declared in lib/finish.sh.

    • run_by → command:finish
    • rule:majordomus.task-continuity decided_by → this
  • mj_validate_dag validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.dag-integrity decided_by → this
  • mj_validate_decisions validator

    Decides the rule. Declared in lib/check.sh.

    • run_by → command:check
    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.decision-records decided_by → this
  • mj_validate_deployments validator

    Decides the rule. Declared in lib/deployment.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.deployment-contract decided_by → this
  • mj_validate_doctrine_wiring validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • rule:majordomus.doctrine-wiring-integrity decided_by → this
  • mj_validate_knowledge_accumulation validator

    Decides the rule. Declared in lib/knowledge.sh.

    • run_by → command:doctor
    • rule:majordomus.candidates-reviewed decided_by → this
  • mj_validate_knowledge_graph validator

    Decides the rule. Declared in lib/knowledge.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.knowledge-graph decided_by → this
  • mj_validate_knowledge_integrity validator

    Decides the rule. Declared in lib/knowledge.sh.

    • run_by → command:check
    • run_by → command:doctor
    • rule:majordomus.knowledge-integrity decided_by → this
  • mj_validate_knowledge_lifecycle validator

    Decides the rule. Declared in lib/knowledge.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.knowledge-observed decided_by → this
  • mj_validate_layout validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • rule:majordomus.layout-integrity decided_by → this
  • mj_validate_ledger validator

    Decides the rule. Declared in lib/check.sh.

    • run_by → command:check
    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.ledger-integrity decided_by → this
  • mj_validate_lifecycle validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.lifecycle-observed decided_by → this
  • mj_validate_note validator

    Decides the rule. Declared in lib/finish.sh.

    • run_by → command:finish
    • rule:majordomus.note-integrity decided_by → this
  • mj_validate_obligations validator

    Decides the rule. Declared in lib/evidence.sh.

    • run_by → command:check
    • run_by → command:finish
    • rule:majordomus.obligation-closure decided_by → this
  • mj_validate_policy validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.policy-integrity decided_by → this
  • mj_validate_policy_defaults validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.policy-completeness decided_by → this
  • mj_validate_profile_requirements validator

    Decides the rule. Declared in lib/finish.sh.

    • run_by → command:finish
    • rule:majordomus.profile-requirements decided_by → this
  • mj_validate_project validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.project-integrity decided_by → this
  • mj_validate_projection validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.projection-integrity decided_by → this
  • mj_validate_prompt_capture validator

    Decides the rule. Declared in lib/capture.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.prompt-capture decided_by → this
  • mj_validate_prompt_continuity validator

    Decides the rule. Declared in lib/capture.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.prompt-continuity decided_by → this
  • mj_validate_prompts validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.prompt-integrity decided_by → this
  • mj_validate_publication_currency validator

    Decides the rule. Declared in lib/gates.sh.

    • run_by → command:finish
    • rule:majordomus.publication-currency decided_by → this
  • mj_validate_questions_store validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.questions-store-integrity decided_by → this
  • mj_validate_record_changed_files validator

    Decides the rule. Declared in lib/changed.sh.

    • run_by → command:doctor
    • rule:majordomus.record-changed-files decided_by → this
  • mj_validate_resolver validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.handover-integrity decided_by → this
  • mj_validate_retention validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.retention-caps decided_by → this
  • mj_validate_roadmap validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.roadmap-integrity decided_by → this
  • mj_validate_rule_package validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.rule-package-integrity decided_by → this
  • mj_validate_schema_integrity validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.schema-integrity decided_by → this
  • mj_validate_scope validator

    Decides the rule. Declared in lib/check.sh.

    • run_by → command:check
    • run_by → command:finish
    • run_by → command:watch
    • rule:majordomus.scope-integrity decided_by → this
  • mj_validate_session_lifecycle validator

    Decides the rule. Declared in lib/session_context.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.session-lifecycle decided_by → this
  • mj_validate_session_records validator

    Decides the rule. Declared in lib/session.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.session-records decided_by → this
  • mj_validate_skills validator

    Decides the rule. Declared in lib/skills.sh.

    • run_by → command:doctor
    • run_by → command:watch
    • rule:majordomus.skill-integrity decided_by → this
  • mj_validate_state validator

    Decides the rule. Declared in lib/check.sh.

    • run_by → command:check
    • run_by → command:finish
    • run_by → command:watch
    • rule:majordomus.state-consistency decided_by → this
  • mj_validate_task_on_the_mesh validator

    Decides the rule. Declared in lib/common.sh.

    • run_by → command:check
    • run_by → command:finish
    • rule:majordomus.task-on-the-mesh decided_by → this
  • mj_validate_use_case_coverage validator

    Decides the rule. Declared in lib/usecase.sh.

    • run_by → command:check
    • run_by → command:doctor
    • run_by → command:finish
    • rule:majordomus.use-case-coverage decided_by → this
  • mj_validate_verification validator

    Decides the rule. Declared in lib/finish.sh.

    • run_by → command:finish
    • rule:majordomus.verification-integrity decided_by → this
  • mj_validate_wiring validator

    Decides the rule. Declared in lib/doctor.sh.

    • run_by → command:doctor
    • rule:majordomus.enforcement-wiring decided_by → this
  • majordomus check enforcer

    A command a worker or a git hook runs. It dispatches the validators wired to it.

    • validator:blockers run_by → this
    • validator:checkpoint run_by → this
    • validator:completion_gates run_by → this
    • validator:decisions run_by → this
    • validator:knowledge_integrity run_by → this
    • validator:ledger run_by → this
    • validator:obligations run_by → this
    • validator:scope run_by → this
    • validator:state run_by → this
    • validator:task_on_the_mesh run_by → this
    • validator:use_case_coverage run_by → this
  • majordomus doctor enforcer

    A command a worker or a git hook runs. It dispatches the validators wired to it.

    • validator:adr run_by → this
    • validator:ai_layout run_by → this
    • validator:bootstrap run_by → this
    • validator:budget run_by → this
    • validator:catalogue run_by → this
    • validator:command_coverage run_by → this
    • validator:command_surface run_by → this
    • validator:context run_by → this
    • validator:dag run_by → this
    • validator:decisions run_by → this
    • validator:deployments run_by → this
    • validator:doctrine_wiring run_by → this
    • validator:knowledge_accumulation run_by → this
    • validator:knowledge_graph run_by → this
    • validator:knowledge_integrity run_by → this
    • validator:knowledge_lifecycle run_by → this
    • validator:layout run_by → this
    • validator:ledger run_by → this
    • validator:lifecycle run_by → this
    • validator:policy run_by → this
    • validator:policy_defaults run_by → this
    • validator:project run_by → this
    • validator:projection run_by → this
    • validator:prompt_capture run_by → this
    • validator:prompt_continuity run_by → this
    • validator:prompts run_by → this
    • validator:questions_store run_by → this
    • validator:record_changed_files run_by → this
    • validator:resolver run_by → this
    • validator:retention run_by → this
    • validator:roadmap run_by → this
    • validator:rule_package run_by → this
    • validator:schema_integrity run_by → this
    • validator:session_lifecycle run_by → this
    • validator:session_records run_by → this
    • validator:skills run_by → this
    • validator:use_case_coverage run_by → this
    • validator:wiring run_by → this
  • majordomus finish enforcer

    A command a worker or a git hook runs. It dispatches the validators wired to it.

    • validator:blockers run_by → this
    • validator:completion_gates run_by → this
    • validator:continuity run_by → this
    • validator:note run_by → this
    • validator:obligations run_by → this
    • validator:profile_requirements run_by → this
    • validator:publication_currency run_by → this
    • validator:scope run_by → this
    • validator:state run_by → this
    • validator:task_on_the_mesh run_by → this
    • validator:use_case_coverage run_by → this
    • validator:verification run_by → this
  • majordomus watch enforcer

    A command a worker or a git hook runs. It dispatches the validators wired to it.

    • validator:adr run_by → this
    • validator:ai_layout run_by → this
    • validator:bootstrap run_by → this
    • validator:budget run_by → this
    • validator:catalogue run_by → this
    • validator:checkpoint run_by → this
    • validator:command_coverage run_by → this
    • validator:command_surface run_by → this
    • validator:context run_by → this
    • validator:dag run_by → this
    • validator:decisions run_by → this
    • validator:deployments run_by → this
    • validator:knowledge_graph run_by → this
    • validator:knowledge_lifecycle run_by → this
    • validator:ledger run_by → this
    • validator:lifecycle run_by → this
    • validator:policy run_by → this
    • validator:policy_defaults run_by → this
    • validator:project run_by → this
    • validator:projection run_by → this
    • validator:prompt_capture run_by → this
    • validator:prompt_continuity run_by → this
    • validator:prompts run_by → this
    • validator:questions_store run_by → this
    • validator:resolver run_by → this
    • validator:retention run_by → this
    • validator:roadmap run_by → this
    • validator:rule_package run_by → this
    • validator:schema_integrity run_by → this
    • validator:scope run_by → this
    • validator:session_lifecycle run_by → this
    • validator:session_records run_by → this
    • validator:skills run_by → this
    • validator:state run_by → this
  • test/cases/01_init.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.ai-layout-integrity proved_by → this
  • test/cases/02_doctor_basic.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.policy-integrity proved_by → this
    • rule:majordomus.context-budget proved_by → this
    • rule:majordomus.retention-caps proved_by → this
  • test/cases/03_update.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.bootstrap-integrity proved_by → this
    • rule:majordomus.projection-integrity proved_by → this
  • test/cases/04_start_check.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.checkpoint-freshness proved_by → this
    • rule:majordomus.scope-integrity proved_by → this
    • rule:majordomus.state-consistency proved_by → this
  • test/cases/06_finish.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.note-integrity proved_by → this
  • test/cases/103_obligations.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.obligation-closure proved_by → this
  • test/cases/130_lifecycle_survives_a_stale_task.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.lifecycle-observed proved_by → this
  • test/cases/131_completion_gates.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.completion-gates proved_by → this
  • test/cases/136_changed_files_classifier.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.record-changed-files proved_by → this
  • test/cases/140_prompt_continuity.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.prompt-continuity proved_by → this
  • test/cases/14_wiring_dispatcher.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.enforcement-wiring proved_by → this
  • test/cases/16_profiles.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.profile-requirements proved_by → this
  • test/cases/17_doctrine_enforcement.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.blocker-resolution proved_by → this
  • test/cases/18_doctrine_wiring.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.doctrine-wiring-integrity proved_by → this
  • test/cases/19_end_to_end.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.verification-integrity proved_by → this
  • test/cases/21_decision_question.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.decision-records proved_by → this
    • rule:majordomus.questions-store-integrity proved_by → this
  • test/cases/22_history.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.ledger-integrity proved_by → this
  • test/cases/23_context.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.handover-integrity proved_by → this
  • test/cases/24_prompt_search.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.prompt-integrity proved_by → this
  • test/cases/25_continuity_lifecycle.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.layout-integrity proved_by → this
    • rule:majordomus.task-continuity proved_by → this
  • test/cases/275_publication_is_current.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.publication-currency proved_by → this
  • test/cases/28_catalogue.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.catalogue-integrity proved_by → this
  • test/cases/28_no_hardcoded_values.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.policy-completeness proved_by → this
  • test/cases/29_prompt_capture.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.prompt-capture proved_by → this
  • test/cases/3068_a_task_off_the_mesh_is_refused.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.task-on-the-mesh proved_by → this
  • test/cases/3075_knowledge_validate_judges_the_graph.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.knowledge-graph proved_by → this
  • test/cases/30_command_registry.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.command-surface proved_by → this
  • test/cases/31_command_coverage.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.command-coverage proved_by → this
  • test/cases/32_schema_integrity.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.schema-integrity proved_by → this
  • test/cases/44_model_doctrine.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.dag-integrity proved_by → this
    • rule:majordomus.project-integrity proved_by → this
  • test/cases/49_roadmap_doctrine.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.roadmap-integrity proved_by → this
  • test/cases/54_session_lifecycle_hooks.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.session-lifecycle proved_by → this
  • test/cases/563_knowledge_is_derived_at_the_boundary.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.knowledge-observed proved_by → this
  • test/cases/63_session_records.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.session-records proved_by → this
  • test/cases/67_rule_dag.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.rule-package-integrity proved_by → this
  • test/cases/69_context_documents.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.context-integrity proved_by → this
  • test/cases/707_knowledge_check_refuses_malformed_records.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.knowledge-integrity proved_by → this
  • test/cases/711_candidates_are_reviewed_not_accumulated.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.candidates-reviewed proved_by → this
  • test/cases/84_deployment_contract.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.deployment-contract proved_by → this
  • test/cases/94_use_cases.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.use-case-coverage proved_by → this
  • test/cases/95_skills.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.skill-integrity proved_by → this
  • test/cases/99_adr.sh test

    A behavioural case. It proves the validator answers, not that the rule is written down.

    • rule:majordomus.adr-integrity proved_by → this

04 / what it costs to be honest

The gaps are on the page

A model that only ever renders its successes is a brochure. These come out of the same join as everything above, and there is nowhere to put them where they would not show.

2 principles no rule enforces
  • Execution depth is not output verbosity
  • Parallel work requires isolation
7 rules that only warn

Advisory: the command reports and carries on. 43 of the 50 stop it instead. An advisory rule is a rule whose enforcement is not finished, and saying so is cheaper than pretending.

05 / next

Governance says what is valid. It does not say who does the work.

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