Skip to content

Writing checks that prove something

2 min readAgentsFlower team

Abstract cover art: a grid of ruled lines with a single verified row circled in violet

A Task File can have beautiful acceptance criteria and still be worthless — if its checks do not actually measure them. The ## Checks section is where a task contract becomes enforceable, and writing it well is a skill worth practicing deliberately.

A check is a claim with a command

Every required criterion in a Task File gets a stable ID, and every criterion should map to something runnable. “The blog paginates” is a wish; node -e '...existsSync("dist/blog/2/index.html")...' is a claim a machine can falsify. The gate runs the commands verbatim, so the author of the Task File — the Orchestrator — is really the one writing the acceptance test.

Three habits keep checks honest:

  • Check the artifact, not the source. Assertions against dist/ output catch build-level problems — missing routes, empty feeds — that source greps wave through.
  • Prefer exits over eyes. A check should end with a nonzero exit code on failure. Anything that needs a human to read output is a report, not a check.
  • Stay inside the task’s scope. A check that reaches outside the allowed files — or needs a service the task cannot provide — belongs in a different task, flagged in the contract.

Verbatim means verbatim

Because gate.py executes the check strings exactly as written, the commands themselves are part of the contract. Quoting rules, path assumptions and shell portability all matter: a check that only parses on one shell will fail for reasons unrelated to the work — a real failure mode the project has already hit and recorded in its known-issues file.

The same verbatim rule makes checks reviewable. When a verify run fails, the Orchestrator does not re-litigate the result — the output is the finding, and it travels into the successor Task File unchanged.

The trial merge

The subtlest part of the design: checks do not only run against the worker’s branch. The gate also applies them to a detached trial merge of that branch onto the current main. A task that “passed” against a stale base is caught before it lands, and a check that fails on the base itself is reported as a pre-existing failure — separated from anything the change introduced.

That distinction — mine versus already broken — is what keeps the gate fair. Workers are not asked to fix the world; they are asked to prove their own diff.

Checks are the culture

Write enough Task Files and the habit generalizes: phrase every claim so a command can disprove it. It makes criteria sharper at authoring time, results shorter at reporting time, and disagreements at review time brief. The check is the smallest possible unit of trust — which is exactly why a system built on it scales across sessions, tools and weeks.