-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
deployment-contract
rule · blocking
A deployment of the executable is a canonical object of the layer against a closed contract; the container definition and the provider configuration 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
-
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
-
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
-
retention-caps
rule · blocking
The ledger and the handover directory 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
-
roadmap-integrity
rule · blocking
No document is a second authority for the roadmap. While a hand-written roadmap table exists, it can neither list a version no milestone declares nor hide one the model does.
- decided_by validator:roadmap
- proved_by test:test/cases/49_roadmap_doctrine.sh
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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; its exit code and duration are recorded.
- decided_by validator:verification
- proved_by test:test/cases/19_end_to_end.sh
-
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
-
mj_validate_adr
validator
Decides the rule. Declared in lib/adr.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_ai_layout
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_blockers
validator
Decides the rule. Declared in lib/check.sh.
- run_by command:check
- run_by command:finish
-
mj_validate_bootstrap
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_budget
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_catalogue
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_checkpoint
validator
Decides the rule. Declared in lib/check.sh.
- run_by command:check
- run_by command:watch
-
mj_validate_command_coverage
validator
Decides the rule. Declared in lib/commands.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_command_surface
validator
Decides the rule. Declared in lib/commands.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_context
validator
Decides the rule. Declared in lib/context_docs.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_continuity
validator
Decides the rule. Declared in lib/finish.sh.
-
mj_validate_dag
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_decisions
validator
Decides the rule. Declared in lib/check.sh.
- run_by command:check
- run_by command:doctor
- run_by command:watch
-
mj_validate_deployments
validator
Decides the rule. Declared in lib/deployment.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_doctrine_wiring
validator
Decides the rule. Declared in lib/doctor.sh.
-
mj_validate_layout
validator
Decides the rule. Declared in lib/doctor.sh.
-
mj_validate_ledger
validator
Decides the rule. Declared in lib/check.sh.
- run_by command:check
- run_by command:doctor
- run_by command:watch
-
mj_validate_note
validator
Decides the rule. Declared in lib/finish.sh.
-
mj_validate_obligations
validator
Decides the rule. Declared in lib/evidence.sh.
- run_by command:check
- run_by command:finish
-
mj_validate_policy
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_policy_defaults
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_profile_requirements
validator
Decides the rule. Declared in lib/finish.sh.
-
mj_validate_project
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_projection
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_prompt_capture
validator
Decides the rule. Declared in lib/capture.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_prompts
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_questions_store
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_resolver
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_retention
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_roadmap
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_rule_package
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_schema_integrity
validator
Decides the rule. Declared in lib/doctor.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_scope
validator
Decides the rule. Declared in lib/check.sh.
- run_by command:check
- run_by command:finish
- run_by command:watch
-
mj_validate_session_lifecycle
validator
Decides the rule. Declared in lib/session_context.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_session_records
validator
Decides the rule. Declared in lib/session.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_skills
validator
Decides the rule. Declared in lib/skills.sh.
- run_by command:doctor
- run_by command:watch
-
mj_validate_state
validator
Decides the rule. Declared in lib/check.sh.
- run_by command:check
- run_by command:finish
- run_by command:watch
-
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
-
mj_validate_verification
validator
Decides the rule. Declared in lib/finish.sh.
-
mj_validate_wiring
validator
Decides the rule. Declared in lib/doctor.sh.
-
majordomus check
enforcer
A command a worker or a git hook runs. It dispatches the validators wired to it.
-
majordomus doctor
enforcer
A command a worker or a git hook runs. It dispatches the validators wired to it.
-
majordomus finish
enforcer
A command a worker or a git hook runs. It dispatches the validators wired to it.
-
majordomus watch
enforcer
A command a worker or a git hook runs. It dispatches the validators wired to it.
-
test/cases/01_init.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/02_doctor_basic.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/03_update.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/04_start_check.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/06_finish.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/103_obligations.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/14_wiring_dispatcher.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/16_profiles.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/17_doctrine_enforcement.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/18_doctrine_wiring.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/19_end_to_end.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/21_decision_question.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/22_history.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/23_context.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/24_prompt_search.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/25_continuity_lifecycle.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/28_catalogue.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/28_no_hardcoded_values.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/29_prompt_capture.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/30_command_registry.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/31_command_coverage.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/32_schema_integrity.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/44_model_doctrine.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/49_roadmap_doctrine.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/54_session_lifecycle_hooks.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/63_session_records.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/67_rule_dag.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/69_context_documents.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/84_deployment_contract.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/94_use_cases.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/95_skills.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.
-
test/cases/99_adr.sh
test
A behavioural case. It proves the validator answers, not that the rule is written down.