Watch
reports drift between policy, projections, state, scope, and git, each finding with the command that reproduces it
reports drift between policy, projections, state, scope, and git, each finding with the command that reproduces it
Where it lives
State it owns
What implements it
Specified in
The command that acts on it
majordomus watch
What has drifted since the last update — policy, projections, state, retention.
- read-only
- active task optional
- --json
majordomus watch [--json]
See it refuse, and accept
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.
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
exit
0
Exit 0. The policy hash matches the one recorded at the last update and every projection matches its fingerprint.
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
exit
11
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.
What is guaranteed
- guaranteed watch reports policy, projection, state, scope, handover, verification, staleness and retention driftproved by test/cases/07_watch.sh
- guaranteed The ledger is readable back as operational history, filtered by task, event and timeproved by test/cases/22_history.sh
- guaranteed Rotating the ledger archives the oldest lines and never deletes themproved by test/cases/22_history.sh
- guaranteed Durable records are searchable literally, across kinds, without an indexproved by test/cases/24_prompt_search.sh
- rejected Ranked or semantic retrieval over durable records is deliberately not implemented
Rules this command runs
Doctrines whose enforced_by names watch. Enforcing a rule and being governed by one are different relations, so they are listed separately.
- majordomus.ai-layout-integrity
- majordomus.checkpoint-freshness
- majordomus.ledger-integrity
- majordomus.policy-completeness
- majordomus.bootstrap-integrity
- majordomus.catalogue-integrity
- majordomus.context-integrity
- majordomus.policy-integrity
- majordomus.adr-integrity
- majordomus.decision-records
- majordomus.dag-integrity
- majordomus.command-surface
- majordomus.command-coverage
- majordomus.handover-integrity
- majordomus.project-integrity
- majordomus.projection-integrity
- majordomus.context-budget
- majordomus.deployment-contract
- majordomus.prompt-capture
- majordomus.prompt-integrity
- majordomus.questions-store-integrity
- majordomus.retention-caps
- majordomus.roadmap-integrity
- majordomus.rule-package-integrity
- majordomus.schema-integrity
- majordomus.scope-integrity
- majordomus.session-records
- majordomus.session-lifecycle
- majordomus.skill-integrity
- majordomus.state-consistency
The moments this answers
- found a task "in progress" that nobody had touched for three weeks A status that was authored rather than computed is true at the moment of writing and decays silently from then on.
- asked what the workers did last night and had only transcripts to grep A conversation log records what was said, not what happened, so the operational question has to be answered by a person reading prose.
- spent an hour discovering something the repository already knew, twice A worker learns something expensive about the codebase, uses it once, and it dies with the session because nothing turned it into a durable record.
- found five worktrees and could not say which of them still mattered Isolation is cheap to create and expensive to reason about: nothing records what a worktree was for or whether its work landed.
- found finished work on a branch that nobody ever merged Workers produce far more than integration absorbs, and nothing distinguishes work that is done from work that is done and landed.
- was asked how far the milestone had got and had to go and ask four people Progress is an aggregate that exists only in people, because the parts it aggregates were never recorded in a form anything can add up.
- could not say why one provider was used for that work and another for this Provider and model selection is made implicitly, per session, and recorded nowhere, so it cannot be reviewed or repeated.
- looked at the bill and could not say which of it produced anything Consumption is measured per account and outcomes are recorded per person, so the two can never be joined.
- lost a failure a worker had already reproduced, because the session ended A failure observed inside a session is described in that session and nowhere else, so the next one starts from the report rather than the evidence.
- watched a worker spend a day on an approach that had already been ruled out Negative results are the majority of experimental output and the part nobody records, so the search space is re-explored.
- was asked who made a change and under what policy, and had only a commit Attribution stops at the commit, so what authorised a change, what verified it and what governed it are unrecoverable.