Skip to content

Decide whether finished work is actually finished

Evaluate a contract line by line instead of accepting a sentence that says the work is done.

guaranteed Completion and quality gatesintermediaterevieweragentwrites state

Situation

A worker reports success. The report is a paragraph, the evidence is the paragraph, and accepting it is a matter of trust rather than of checking.

What you run

  • question: anything unresolved is recorded as state, and refuses completion while it stands
  • finish: --verify-command runs the project's own verification and records its exit code, its duration and the tree it ran over

Scenario

setup: finish-ready
given:
  - 'an active task with its completion note written'
steps:
  - id: open-a-question
    run: ['question', 'add', 'should tabs be an error or a warning?']
    note: 'an unresolved question naming the task'
    expect:
      exit: 0
      stdout_contains: ['^opened for t-']
  - id: refused-while-open
    run: ['finish', '--outcome', 'completed', '--verify-command', 'test -d .ai']
    note: 'an open question is a blocker; completed is refused'
    expect:
      exit: 10
      stdout_contains: ['^FAIL blockers', 'refused']
  - id: resolve-it
    run: ['question', 'resolve', '1', '--answer', 'an error']
    note: 'the question is answered as state, not in prose'
    expect:
      exit: 0
      stdout_contains: ['resolved']
  - id: accepted
    run: ['finish', '--outcome', 'completed', '--verify-command', 'test -d .ai']
    note: 'every line of the finish contract passes and the outcome is recorded'
    expect:
      exit: 0
      stdout_contains: ['completed']
then:
  - 'finish writes nothing while any line of the contract fails'
  - 'the verification command, its exit code, its duration and the tree it ran over are recorded'

Outcome

A refusal names the rules that refused. An outcome is typed — completed, partial, blocked, no_match, failed — so "the thing does not exist" and "I could not do it" stay different facts.

The scenario

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

given

  • an active task with its completion note written

when

  1. 1majordomus question add should tabs be an error or a warning?
  2. 2majordomus finish --outcome completed --verify-command test -d .ai
  3. 3majordomus question resolve 1 --answer an error
  4. 4majordomus finish --outcome completed --verify-command test -d .ai

then

  • finish writes nothing while any line of the contract fails
  • the verification command, its exit code, its duration and the tree it ran over are recorded

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. an unresolved question naming the task

    opened for t-<id>: should tabs be an error or a warning?
    • exit 0
    • stdout_contains /^opened for t-/
  2. an open question is a blocker; completed is refused

    FAIL blockers    t-<id> — 1 unresolved question(s) on this branch; first: t-<id> — should tabs be an error or a warning?  [reproduce: majordomus question list]
    OK   note        t-<id> — <time>--main--<head>--<hash>.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)
    OK   verification t-<id> — test -d .ai — exit 0, <s>s, tree <tree>
    INFO obligation  t-<id> — the task declares no obligations
    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, 1 unmet
    blocking doctrines:
    - majordomus.blocker-resolution
    • exit 10
    • stdout_contains /^FAIL blockers/
    • stdout_contains /refused/
  3. the question is answered as state, not in prose

    resolved for t-<id>: should tabs be an error or a warning?
    • exit 0
    • stdout_contains /resolved/
  4. every line of the finish contract passes and the outcome is recorded

    OK   blockers    t-<id> — none open
    OK   note        t-<id> — <time>--main--<head>--<hash>.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)
    OK   verification t-<id> — test -d .ai — exit 0, <s>s, tree <tree>
    INFO obligation  t-<id> — the task declares no obligations
    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: t-<id> completed
    • exit 0
    • stdout_contains /completed/

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.

The moments this answers

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