Only the codes this command can produce. The full contract is on the commands index.
0ok
2usage
10contract unmet
11drift found
What has moved since the last update
watch answers a different question from doctor: not what is wrong, but what has changed. It exits 11 for drift and never 10, so no hook blocks on it.
Nothing has drifted
policy edited since update
no
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 watch
Output contains
watch: 0 drift
exit0
Exit 0. The policy hash matches the one recorded at the last update and every projection matches its fingerprint.
The policy was edited and not regenerated
policy edited since update
yes
Given this repository
# Installed and generated, then the policy was edited without regenerating the projections.
. "$FIXTURE_SETUP/installed.sh"
printf '\nledger:\n retention_max_lines: 4000\n' >> .ai/repo/policy.yaml
Run
$ majordomus watch
Output contains
DRIFT
exit11
Exit 11 is DRIFT, which is information rather than a verdict. The generated instruction files no longer follow from the policy they were generated from, and `majordomus update` is the fix.
Reference
What has drifted? Read-only. Never used to block; exit 11 when findings exist so that
scripts can tell "drift" from "healthy" without confusing it with a contract failure.
Drift
Detected how
policy
the policy hash a projection's stamp names is not the policy on disk
projection
a projection's content differs from the hash its own stamp names
state
current.yaml outcome contradicts ledger, or label is diverged
scope
touched files outside claim (same check as check)
handover
task is handed_over but no handover names it, or that handover lacks a required section
verification
current.yaml has a terminal outcome with no task.finished ledger record for it
checkpoint
current.yaml older than the profile's checkpoint interval
retention
ledger.jsonl or handovers/ over cap
$ majordomus watchDRIFT policy .ai/repo/policy.yaml modified after last update [reproduce: majordomus update --dry-run]DRIFT projection AGENTS.md — content differs from its stamp (hand-edited?) [reproduce: majordomus update --diff AGENTS.md]DRIFT checkpoint t-20260903-193012-a4f1 — last checkpoint 48m ago, interval 15mwatch: 3 findings
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.