Skip to content

Done is a contract, evaluated line by line and refused when unmet

A worker does not get to define its own successful completion: every line of the finish contract is printed pass or fail, the task is not accepted until all of them pass, and every time it was claimed done and was not is on the record.

status
feature status: stable
on the homepage
featured

What it does

The outcome of a task is a typed field with a closed vocabulary, never a sentence. majordomus finish --outcome completed runs the verification command the profile requires, walks every line the policy selects, prints each as pass or fail with the command that reproduces a failure, and accepts nothing when any line fails; the task stays open. An open question that names the task blocks acceptance until it is resolved, and a blocker survives a handover rather than being lost with the conversation.

no_match and failed are different facts: the thing sought does not exist, or the work could not be done. A supervisor that cannot tell them apart cannot decide whether to retry, escalate or accept, so the field decides and prose never does.

Every refusal is recorded. Each refused finish appends a task.refused line to the ledger with the outcome that was claimed, how many contract lines were unmet and which doctrines refused, and majordomus history --event task.refused lists them. A task accepted after four refusals and one accepted first time used to leave the same record; now the four false claims of done are there, in order, before the one that held. That is what makes the contract's value countable rather than asserted: each refusal later satisfied is a false done the tool caught. finish --check asks without claiming, and records nothing.

What it does not do

It does not prevent a worker from touching a file outside its scope while it works; it detects the file at check and at finish and refuses to accept the work. The regression-test line checks only whether a test-shaped path was touched, not what the test proves. Nothing here measures tokens or cost.

Why it exists

Operational moments from the Why catalogue that name one of this feature's mechanisms. Nothing here was assigned: a moment appears because it names a rule, a command, a capability or a claim this feature also names.

Every moment it answers (20)

How it works

The capability modules of the executable this feature names, each with the capabilities it composes. The interfaces each one reaches are listed under Interfaces below: they are projections of one declaration, not separate registrations.

Completion gates gates behaviorally verified

Completion as a state the repository decides rather than a claim a worker makes: the validation gates this repository declares in its CI model, which of them a task's own change set selects, what each one last reported, whether that verdict still describes the tree it was taken over, and therefore whether the task may be called finished. A gate that has never reported is `queued` and not `pass`, a run whose files have changed since is `stale` and refuses exactly as a failure does, and a gate the change cannot affect is `exempt` rather than unknown.

Obligations obligations behaviorally verified

What a task owes before it may be called completed, and whether the evidence that discharged each obligation still describes this tree. The vocabulary is data the distribution ships and answers in any clone; the closure is read from the local half of the layer, which this process serves to the worker in front of it and never publishes. Read, never written: `majordomus evidence` records, and a second writer for one ledger would be a second account of the same events.

Where it sits

domain
Completion — Done is a contract the repository evaluates line by line. Work is not accepted while any line fails, and a refusal stays on the record.
areas of work
verification
named by
DoctrinePlanning

Interfaces

Each capability behind it, on every interface it is projected onto. A link goes to this site's reference for that interface; an HTTP route and an MCP tool are answered by a running majordomus serve, not by this site.

The capabilities behind this feature, by interface
capabilitycommand lineHTTPMCP tool
gates.completion —none GET /api/v1/gates/completion majordomus_completion
gates.model —none GET /api/v1/gates majordomus_gates
gates.policy —none GET /api/v1/gates/policy majordomus_completion_policy
gates.state —none GET /api/v1/gates/state majordomus_gate_state
obligations.closure —none GET /api/v1/obligations/closure majordomus_obligation_closure
obligations.vocabulary —none GET /api/v1/obligations majordomus_obligations

Evidence

What is guaranteed

Each claim this feature names, with the status its row declares, the verdict the recorded runs support, and the test that settles it.

Executable use cases

The rules that hold it

  • blocking Verification integritymajordomus.verification-integrity
  • advisory Define done before executingmajordomus.define-done-first
  • advisory Verify outcomes, not activitymajordomus.verify-outcomes
  • blocking Blocker resolutionmajordomus.blocker-resolution
  • blocking Note integritymajordomus.note-integrity
  • blocking State consistencymajordomus.state-consistency
  • blocking Every finding carries a reproduce commandproject.finding-carries-reproduce

Using it

The commands that run it

  • majordomus start begin

    Begin one scoped task under a profile, and refuse while another is active.

  • majordomus check verify · read-only

    Is the current task still consistent with its policy, its scope and this checkout?

  • majordomus finish conclude

    Evaluate the finish contract and refuse the outcome if any line of it is unmet.

  • majordomus question work

    Open a question that blocks acceptance, resolve it, and list what is still open.

Where this page comes from

the file
.ai/repo/features/finish-contract.md
the same answer
majordomus product show finish-contract

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