heydeer
Sign in
Best practices

Teams without code review

Use this setup when changes reach main without anyone reading them, for example when agents commit to main or pull requests merge once CI passes. HeyDeer reviews every push, and GitHub merges the pull request once HeyDeer approves it.

Recommended setup

An agent opens a pull request
HeyDeer reviews every push
The check passes and HeyDeer approves
GitHub merges the pull request
If HeyDeer reports findings, the check fails and nothing merges. The agent pushes a fix, and HeyDeer reviews the new commits.
  1. Have agents push to a branch and open a pull request for every change, instead of committing to main.
  2. In Workspace settings → Review rules → When to review, select On every push. See Automatic reviews.
  3. Under Publish results, turn on Fail the check when issues are found. See The HeyDeer Review check.
  4. Under Publish results, turn on Automatic approval. HeyDeer then approves a pull request once a complete review leaves no findings. See Automatic approval.
  5. Decide who approves high-risk changes. By default, high-risk pull requests wait for a person. To let HeyDeer approve them too, set PRs HeyDeer may approve to PRs at any risk level.
  6. In GitHub’s branch rules for main, turn on Require a pull request before merging with 1 required approval. Also turn on Dismiss stale pull request approvals when new commits are pushed.
  7. In the same rules, require the HeyDeer Review check next to your CI checks.
  8. Turn on Allow auto-merge in the repository’s GitHub settings. Then enable auto-merge on each pull request, or have the agent run gh pr merge --auto --squash after opening one.
HeyDeer approved these changes
All checks have passed
HeyDeer Review — Review completed — no issues found
CI / test — Successful
Auto-merge is on: GitHub merges this pull request once every requirement is met.
Once HeyDeer approves and every required check passes, GitHub merges the pull request.

Let the agent act on findings

HeyDeer posts its findings as a review on the pull request, and the HeyDeer Review check holds the complete report. Have the agent read the review after each push, fix the findings, and push again. HeyDeer then reviews the new commits.

To decline a finding, someone with write access explains the decision in its conversation or resolves the conversation, then comments @heydeer review. See Declining a finding.

To have HeyDeer fix the findings you choose in a separate PR instead, select Fix with HeyDeer in the review; see Fix with HeyDeer.

Write your standards as checks

Agents meet a requirement more reliably when the review enforces it. Add a Markdown file to .agents/checks/ for each requirement, and HeyDeer applies it to every pull request that changes matching files. See Repository checks.

.agents/checks/tenant-scope.md

---
files:
  - "src/db/**/*.ts"
  - "!**/*.test.ts"
---
Every query that reads or writes customer data must be
scoped to one tenant, taken from the request context and
never from request parameters.

Why a separate review helps

CI catches only what your tests cover. Without a review, two problems slip through:

  • The model that wrote the code tends to accept its own reasoning and miss its own mistakes, even when you ask it to check its work.
  • When an agent revises the same code again and again, each change can quietly break something an earlier one got right.

HeyDeer reviews each pull request separately from the agent that wrote it, and checks each finding against the code before posting it. On later pushes, follow-up reviews recheck earlier concerns.