Skip to content

Prove what a task owed before calling it done

A task declares what it owes, records evidence against each obligation, and is refused when that evidence no longer describes the tree it was taken over.

guaranteed Completion and quality gatesbasicmaintaineragentwrites state

Situation

A worker says the work is done. The finish contract already asks whether the change stayed in its scope, whether a verification command ran, whether the record still matches the branch and whether anything is open — all facts about the working tree. It does not ask whether the tests that were run describe the code that now exists.

The gap is not that evidence is absent. It is that evidence, once recorded, stays true. A test run before a change says nothing about the tree after it, and a report that treats the two as one is how "done" comes to mean nothing.

Scenario

setup: task-owes
given:
  - a repository with the layer installed and a task active
steps:
  - id: owes-and-cannot-prove-it
    run: ['finish', '--outcome', 'completed', '--note', 'done']
    expect:
      exit: 10
      output: 'owed, and no evidence was recorded'
  - id: honest-is-never-refused
    run: ['check']
    expect:
      exit: 0
      output: 'obligation'
  - id: record-it
    run: ['evidence', '--covers', 'tests', '--type', 'test', '--command', 'bash test/run.sh']
    expect:
      exit: 0
      output: 'evidence: tests recorded'
  - id: now-it-discharges
    run: ['check']
    expect:
      exit: 0
      output: 'discharged over inputs'
then:
  - the obligation is discharged while the files it names are unchanged
  - a change to any of those files makes the same evidence stale, and finish refuses again
  - an outcome other than completed is never refused for owing something

Outcome

The task cannot reach completed on assertion. Each obligation it declared is discharged by a recorded command, and the discharge is bound to the hash of the files the obligation names, so that changing them takes the proof away rather than leaving it behind. What a report says about the work is then a fact about the repository instead of a claim about the worker.

The scenario

Executed against the real tool, in a repository prepared by task-owes, every time this site is generated. What follows is not a description of what should happen; it is what happened.

given

  • a repository with the layer installed and a task active

when

  1. 1majordomus finish --outcome completed --note done
  2. 2majordomus check
  3. 3majordomus evidence --covers tests --type test --command bash test/run.sh
  4. 4majordomus check

then

  • the obligation is discharged while the files it names are unchanged
  • a change to any of those files makes the same evidence stale, and finish refuses again
  • an outcome other than completed is never refused for owing something

What the tool did

Evidence of the run this page was generated from: pass, 4 step(s). Output is normalised: the repository's path, timestamps, ids and durations are placeholders; nothing else is edited.

Tested by test/cases/94_use_cases.sh, which runs every scenario and refuses a step whose recorded output is not what it produced.

  1. OK   blockers    t-<id> — none open
    FAIL note        t-<id> — no --note file and no handover for this task  [reproduce: majordomus handover < note.md]
    INFO regression  t-<id> — profile implementation adds no requirement beyond the shared contract
    OK   scope       t-<id> — 1 touched file(s), all within scope
    OK   state       t-<id> — exact (head <head>)
    INFO continuity  t-<id> — applies to partial and blocked
    INFO mesh        t-<id> — the repository declares no enabled mesh
    INFO use-case    30 advisory gap(s) — not covered by an active use case, and the policy does not require it: command:init command:update command:doctor command:watch command:start command:context command:checkpoint command:handover command:check command:finish command:history command:decision command:question command:prompt command:evidence command:skills command:capture command:search command:doctrine command:plan command:version command:session command:knowledge command:adr command:usecase command:rules command:migrate command:recover command:bench command:archive  [reproduce: majordomus usecase coverage]
    OK   use-case    0 of 30 target(s) covered — every public command the policy requires is named and run by an active use case (policy use_cases.coverage)
    FAIL verification t-<id> — profile implementation requires --verify-command  [reproduce: majordomus finish --outcome completed --verify-command "<cmd>"]
    FAIL obligation  tests — owed, and no evidence was recorded  [reproduce: majordomus evidence --covers tests --command 'usecase impact']
    INFO gate        t-<id> — this repository declares no CI model at .ai/repo/ci/gates.yaml; nothing can be planned
    INFO gate        t-<id> — not in verification.finish_requires
    finish: refused, 3 unmet
    blocking doctrines:
    - majordomus.note-integrity
    - majordomus.verification-integrity
    - majordomus.obligation-closure
    • exit 10
  2. OK   knowledge   records — 0 record(s) valid against knowledge/v1; every reference resolves  [reproduce: majordomus knowledge check]
    ·    checkpoint  t-<id> — <timed against the checkpoint interval>
    OK   records     ledger.jsonl — every line is a well-formed event
    OK   blockers    t-<id> — none open
    OK   records     decisions.md — every entry is attributable
    OK   scope       t-<id> — 1 touched file(s), all within scope
    OK   state       t-<id> — exact (head <head>)
    INFO mesh        t-<id> — the repository declares no enabled mesh
    INFO use-case    30 advisory gap(s) — not covered by an active use case, and the policy does not require it: command:init command:update command:doctor command:watch command:start command:context command:checkpoint command:handover command:check command:finish command:history command:decision command:question command:prompt command:evidence command:skills command:capture command:search command:doctrine command:plan command:version command:session command:knowledge command:adr command:usecase command:rules command:migrate command:recover command:bench command:archive  [reproduce: majordomus usecase coverage]
    OK   use-case    0 of 30 target(s) covered — every public command the policy requires is named and run by an active use case (policy use_cases.coverage)
    INFO obligation  tests — owed, and no evidence was recorded (not refused: the outcome is not completed)
    INFO gate        t-<id> — this repository declares no CI model at .ai/repo/ci/gates.yaml; nothing can be planned
    check: 12 finding(s), 0 failing
    • exit 0
  3. evidence: tests recorded for t-<id> (inputs <hash12>)
    • exit 0
  4. OK   knowledge   records — 0 record(s) valid against knowledge/v1; every reference resolves  [reproduce: majordomus knowledge check]
    ·    checkpoint  t-<id> — <timed against the checkpoint interval>
    OK   records     ledger.jsonl — every line is a well-formed event
    OK   blockers    t-<id> — none open
    OK   records     decisions.md — every entry is attributable
    OK   scope       t-<id> — 1 touched file(s), all within scope
    OK   state       t-<id> — exact (head <head>)
    INFO mesh        t-<id> — the repository declares no enabled mesh
    INFO use-case    30 advisory gap(s) — not covered by an active use case, and the policy does not require it: command:init command:update command:doctor command:watch command:start command:context command:checkpoint command:handover command:check command:finish command:history command:decision command:question command:prompt command:evidence command:skills command:capture command:search command:doctrine command:plan command:version command:session command:knowledge command:adr command:usecase command:rules command:migrate command:recover command:bench command:archive  [reproduce: majordomus usecase coverage]
    OK   use-case    0 of 30 target(s) covered — every public command the policy requires is named and run by an active use case (policy use_cases.coverage)
    OK   obligation  tests — discharged over inputs <hash12>
    INFO gate        t-<id> — this repository declares no CI model at .ai/repo/ci/gates.yaml; nothing can be planned
    check: 12 finding(s), 0 failing
    • exit 0

Why the tool knows this

The chain from this page to the code: the use case names commands, rules and claims; each rule is dispatched from the registry and each claim names the test that proves it; the scenario above executed the commands. Nothing in this chain is prose about intent.

The rules that make it hold

Guarantees exercised

Related use cases

Computed from what they share: claims, rules, commands, category, applications. Nobody maintains this list.

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