1. brindle
  2. Guides
  3. Milestone checks

Done means the tests pass: milestone checks for autonomous coding agents

An autonomous agent needs a finish line it can verify. Split the request into milestones, give each a check that exercises the promised behavior, and let brindle audit the result against your goal.

Type
Guide
Updated
Related
Parallel agents
Rule packs
Codex reviews Claude Code

Write a goal that can be checked

"Improve the settings page" leaves the agent to decide what improvement means. Name the outcome. Users can update their display name, invalid emails show an inline message, changes survive a reload. Each statement is observable, so you can tell when it's true.

Keep the goal at the level of the result, then split independent parts into milestones. A settings API and its form can be separate milestones if each is verifiable alone. If the form depends on the API, say so, and the work runs in order. Don't split one behavior across milestones when no part can be checked alone.

For each milestone, pick a command that exits successfully only when the behavior exists. A focused test usually beats a broad command that happens to return zero. Submit valid data and confirm the saved value, or enter a bad email and confirm the error shows. Check the result. A file existing proves nothing.

# Settings page

Users can change their name and email.

## Settings API
check: uv run pytest tests/test_settings_api.py -q

## Settings UI
check: npm test -- settings
The form saves and shows errors inline.

This is the shape of a goal in .brindle/goals.md: a heading, milestone sections and a check: command for each. Text under a milestone clarifies the expected behavior. Each session keeps its own copy under .brindle/goals/, and brindle goal shows the current one. In autopilot, the supervisor can also set goals and milestones itself.

Make every check prove its milestone

A zero exit only matters if the test asserts the right thing. A test that imports a module but never calls the new code passes with the feature missing. A source-text search passes with a broken code path. A skipped test turns a suite green and proves nothing. Assert what a user or caller would care about.

Pick the narrowest reliable command: fast, and failing when the behavior regresses. When a behavior crosses layers, one integration check on the real path beats several unrelated ones. Keep your repo-level merge checks too. They protect integration; milestone checks measure progress.

brindle treats checks as evidence and ignores a model's status message. A milestone is verified only when its check exits 0. After later merges, the supervisor calls check_milestone and brindle re-runs earlier passing checks too, so a change in one part can expose a regression in another. A failed check leaves the milestone unverified, and its output tells the supervisor what to fix.

Each worker has its own branch and git worktree. Under autopilot, a reviewer approves each worker's exact commit and brindle runs your configured checks before merging. Milestone checks then cover the combined result.

Why passing milestones may not finish the goal

Even good checks can miss a requirement, assert too little or run a path the user never takes. All green is good evidence, not proof. Someone still has to ask whether every part of the request exists and whether the checks support that.

That's the completion audit at the end of autopilot. The completion auditor follows your organization's model policy. Once all milestone checks pass, a read-only reviewer compares the finished work with your original goal and milestones. It looks for missing behavior, stubs and incomplete pieces, across everything since the goal began, not one worker's branch. It trusts passing checks and doesn't second-guess how deep their assertions go, so the checks themselves have to prove the behavior.

If the reviewer approves the audited commit, the goal is reached. If it finds gaps, the supervisor gets the findings and keeps working, commits, and calls check_milestone again. brindle re-runs the checks and starts a fresh audit. Uncommitted changes can't be audited, because there's no fixed commit to review. If a second audit still finds gaps, autopilot pauses and asks you whether to close them or accept them as scope decisions.

Turn the audit off with "goal_audit": false in .brindle/config.json. With the audit off, the goal counts as reached as soon as every milestone check passes, so the checks carry all the weight. Either way, re-running them keeps regressions visible.

Keep it moving while you're away

Autopilot suits a goal with several parts that benefit from milestones and parallel workers. It keeps assigning work, reviewing, merging and re-running checks, and pauses when it needs a decision only you can make. If you quit, brindle continue resumes the session.

Make each milestone a meaningful outcome. One huge milestone hides what's incomplete; dozens of tiny ones add bookkeeping without evidence. Group the goal around behaviors you can verify independently.

Before you hand off a goal, read it as the reviewer would. Does every sentence map to a milestone? Does each check fail when its behavior is missing? Could the expected results tell a real implementation from a placeholder?

See Autopilot for milestones, checks and pauses, Recommended use for shaping tasks, and Configuration for repo settings.