Skip to content

The finish contract

The conditions majordomus finish evaluates before it accepts work, what each one proves, and what happens when one of them fails.

"Done" is the most expensive word in AI-assisted work, because it is usually free to say. A worker that has finished and a worker that believes it has finished produce the same sentence. The contract below is what replaces that sentence: conditions, written down before the work starts, evaluated afterwards by something that was not doing the work.

Turn any line off below and watch what the command does. It does not warn. It refuses, names the line, and tells you the command that reproduces the failure.

Try refusing it

Each row is one line of the contract. Switch one off and the verdict below changes — as it would in a terminal, for the same reason.

  • scope

    policy key scope_respected

    OK scope t-20260903193012-a4f1 — 12 touched file(s), all within scope

  • verification

    policy key verification_ran

    OK verification t-20260903193012-a4f1 — make test — exit 0, 41s

  • state

    policy key state_updated

    OK state t-20260903193012-a4f1 — advanced (head 9b1e2d4)

  • blockers

    policy key no_open_blockers

    FAIL blockers t-20260903193012-a4f1 — unresolved entry in open-questions.md [reproduce: grep -n 'unresolved' .ai/local/state/open-questions.md]

  • note

    policy key note_present

    OK note t-20260903193012-a4f1 — 20260903T201455Z--main--9b1e2d4--c0ffee1234567890.md

What the transcript actually looks like

real output, from README.md
$ majordomus finish --outcome completed --verify-command "make test"
OK   scope         t-20260903193012-a4f1 — 12 touched file(s), all within scope
OK   verification  t-20260903193012-a4f1 — make test — exit 0, 41s
OK   state         t-20260903193012-a4f1 — advanced (head 9b1e2d4)
FAIL blockers      t-20260903193012-a4f1 — unresolved entry in open-questions.md  [reproduce: grep -n 'unresolved' .ai/local/state/open-questions.md]
OK   note          t-20260903193012-a4f1 — 20260903T201455Z--main--9b1e2d4--c0ffee1234567890.md
finish: refused, 1 unmet

What is guaranteed here, and what proves it