stages:
- name: build
# An agent action takes its prompt from the ticket, never from here.
action: agent
# `commits` passes only when the process exits 0 *and* Sloop observes a
# new commit on the run branch: an agent is never trusted to grade its
# own work by exiting cleanly.
result_check:
- name: review
# `reported` keeps SLOOP_SOCKET/SLOOP_TOKEN in the reviewer's environment so
# it can call `sloop verdict`; without it the stage would pass whenever the
# command exits 0, which `claude --print` always does.
result_check: reported
# `--allowedTools Bash` lets the reviewer run tests and `sloop verdict`;
# without it `claude --print` cannot run any command. It deliberately omits
# Write/Edit, so the reviewer can read and run but not rewrite the work.
# `--` ends the variadic tool list so the prompt stays a positional.
action:
exec:
- claude
- --print
- --allowedTools
- Bash
- --
- "Read .agents/sloop/prompts/review.md and follow its instructions."
- name: merge
# The merge builtin's own outcome is its verdict, so it takes no check.
action:
result_check: none