An agent loop repeats a bad early choice every round. The fix was to catch scope as early as possible, and to make steering it a writing task.
Part 4 of 6 in a series on copilot-pr-squad, a small team of AI agents, built on bradygaster/squad, that drives my GitHub Copilot coding-agent pull requests. New here? Start with Part 1.
One PR, one bad early choice
One PR was meant to fix one bug: typed comment text must never be silently lost. The issue left the mechanism open, and Copilot picked the most complex option, continuous autosave, in its first commit. Each review round then patched problems inside that design instead of questioning it. By the time a reviewer found about nine interacting flags behind the symptoms, the PR had grown to 1,254 lines across 6 files. I closed it unmerged and redid the issue with a simpler, pinned design.
Four checks, each earlier than the last
An agent loop repeats a bad early choice every round, so the fix was to catch scope as early as possible. There are now four checks, each earlier than the last:
Where each scope check sits in a PR’s life. The brief, in blue, is the one I write.
The review brief
The review brief is the one I use most. It is a short markdown file I write for an issue, saying what the PR may touch: frozen files, a line limit, things it must not add. The Reviewer has to check every point, and editing a brief makes it review again. Adding a check is a writing task, not a release of the squad. Six briefs are in use today.
Part of the brief for one PR, a small instruction-only change
The issue allows
The Reviewer checks
Only the specify skill, its template and one preset change
No other skill and no other plugin’s file is touched