| name | autofix |
| description | Automatically find and fix code issues in the current branch. Iteratively verifies, plans fixes, and implements them with separate commits. Defers all review to the end. |
| allowed-tools | Bash(git status *), Bash(git rev-parse *), Bash(git log *), Bash(git diff *), Bash(git revert *), Bash(git -C * status *), Bash(git -C * rev-parse *), Bash(git -C * log *), Bash(git -C * diff *), Bash(git -C * revert *), Bash(date -u +%Y-%m-%dT%H:%M:%SZ), Bash(echo "${GIT_BASE_BRANCH:-main}"), Bash(echo "${CODE_GUARDIAN_STOP_HOOK__BASE_BRANCH:-}"), Read, Write, Agent, AskUserQuestion |
Autofix
Iteratively verify the current branch for code issues, plan and implement fixes (each in a separate commit), and repeat until clean. At the end, present each fix for user review and revert any the user does not want.
This command runs once per stop cycle and covers every reviewed directory -- the root repo plus any stop_hook.additional_git_directories. Do not run it separately per directory. Each reviewed repo is self-contained (its own git repo, base branch, and .reviewer/ markers), but the fix agent reviews them together, in a single pass, so it holds the whole cross-repo picture and can catch issues where one repo's change interacts with another's.
Phase 0: Determine the target directories
-
Read .reviewer/settings.json (and .reviewer/settings.local.json if present). Collect the list stop_hook.additional_git_directories (may be empty), dropping any entry that does not exist on disk -- the list is shared config, and a nested repo is only present in the checkouts working on it. The target directories are (the root repo) followed by each remaining additional dir.