Commands
Mention @anvil in a comment on any pull request to give it a command or ask it something. It reacts with 👀 when it picks the comment up.
The command is the first line after the mention. Quoted lines (starting with >) are ignored, so you can quote a review comment and reply below it. Commands are not case-sensitive, and a trailing . or ! is fine.
| Command | What it does |
|---|---|
@anvil review |
Review the commits since the last review, or the whole PR if it hasn't been reviewed |
@anvil full review |
Review the whole PR again from scratch (review all works too) |
@anvil summary |
Refresh the walkthrough comment without posting inline comments (summarize works too) |
@anvil pause |
Stop automatic reviews on this PR |
@anvil resume |
Turn automatic reviews back on for this PR |
@anvil learn <rule> |
Remember a rule for this repository in all future reviews (remember <rule> works too) |
@anvil configuration |
Show the settings in effect for this PR (config works too) |
@anvil help |
List the commands. A bare @anvil does the same |
@anvil fix / fix <what> |
Change the code to address the review findings, or what you describe |
@anvil fix ci |
Find why CI failed and fix it |
@anvil docstrings |
Add doc comments to the changed code |
@anvil tests |
Add tests for the changed code |
@anvil simplify |
Simplify the changed code without changing behaviour |
@anvil resolve conflicts |
Merge the base branch in and resolve the conflicts |
@anvil run <recipe> |
Run a prompt the repository defines in agents.recipes |
@anvil <anything else> |
Ask a question or make a remark; Anvil answers in the thread |
review and full review #
review runs even when automatic reviews would skip the PR (a draft, a "WIP" title, a paused PR). It's incremental when the PR was reviewed before and the earlier commit is still in the branch's history. full review ignores the previous review and starts over, which is useful after you change .anvil.yaml or want a second look at everything.
The bot answers with a 👍 reaction once the review is queued; the review itself updates the walkthrough and posts inline comments as usual. See Reviews.
summary #
Re-runs the review to refresh the walkthrough (summary, layers, diagram, checks) and leaves the inline comments alone. Findings are listed in the walkthrough instead of being posted on lines.
pause and resume #
pause stops reviews on new pushes to this PR until you resume. Explicit @anvil review commands still work while paused. To stop reviews for a whole repository, set enabled: false or auto_review.enabled: false in .anvil.yaml.
learn #
@anvil learn Don't flag missing JSDoc in test files.
Saves the rule for the repository and confirms in a reply. Every later review gets it. See Learnings.
configuration #
Replies with the settings that apply to this PR as YAML, read from .anvil.yaml on the PR's base branch, with every default filled in. If the file has errors, the reply says what's wrong; a file with errors is ignored and the defaults apply.
Questions #
Anything that isn't a command is a question or a remark:
@anvil what calls retryWithBackoff, and do any of them already retry?
@anvil I disagree with the comment on line 40, the input is validated in the middleware.
Anvil reads the PR description, the last 25 comments in the conversation, the diff and the code in a fresh checkout, then replies in the thread with path:line references. If you push back on one of its comments and you're right, it says so. If you state a lasting rule ("we always…", "don't flag…"), it saves it as a learning and tells you.
A question never changes code. When you ask for a change, it gives you the code to apply; to have Anvil commit it, use @anvil fix <what to change>.
Commands that change code #
fix, fix ci, docstrings, tests, simplify, resolve conflicts and run <recipe> make Anvil edit the pull request in a sandbox and push the result, or open a pull request with it, depending on agents.push. They need write access to the repository. Anvil posts a progress comment and edits it with the outcome. See Agents that change code.
To ask without posting anything to the pull request, use the Ask panel in the pull request workspace.