Skip to content
How it learnsFrom coding sessions, reviews, Slack and docs.Only what fitsEach session gets the few rules its task needs.Pull request reviewEvery PR checked against your team’s rules.Keep it trueA gate, conflicts, disputes and stale rules, handled.HandoffsCarry the work to another session or a teammate.SecurityWhat it sends, what it changes and how to leave.
Engineering teamsOne agent or several: what one person learns, every session uses.PR review onlyInstall the GitHub App. Nothing on anyone’s machine.Teams that mix agentsClaude Code, Cursor, Codex and Copilot, the same rules.On your ownYour corrections follow you across repos, machines and agents.Book a call30 minutes with Roei, if you want a hand. Never required.
DocsPricingSign in
Connect your agents →
For teamsOn your ownPR review onlyHow it learnsOnly what fitsPull request reviewKeep it trueSecurityDocsPricingSign inConnect your agents →
Home/Blog

Blog

AGENTS.md, Cursor rules and Copilot instructions

  • AGENTS.md vs CLAUDE.md
  • Keep rule files in sync
  • Sync rules across repos
  • Why Codex ignores it
  • 3,905 files checked
  • Why Copilot ignores it
  • Cursor Team Rules
  • Cursor rules
  • copilot-instructions.md
  • Claude Code and AGENTS.md
  • AGENTS.md research

CLAUDE.md and context engineering

  • Why Claude ignores it
  • Test a CLAUDE.md rule
  • One CLAUDE.md for all projects
  • Context engineering, Claude 5
  • CLAUDE.md length
  • Which rules got used
  • Context rot, stale rules
  • Growing CLAUDE.md
  • Claude Code best practices
  • Karpathy CLAUDE.md
  • Committing CLAUDE.md

Built-in agent memory

  • Agent memory compared
  • Make Claude Code remember
  • Claude Code auto memory
  • GitHub Copilot Memory
  • Claude Tag vs Claude Code
  • Codex memories
  • Cursor memories
  • Memory or documentation?

Team knowledge and shared conventions

  • Claude Code team memory
  • Stop correcting agents
  • Stop repeated mistakes
  • Who owns CLAUDE.md
  • Claude Code second brain
  • Shared memory across agents
  • Hand off between agents
  • Company brain
  • Slack decisions
  • Memory poisoning
  • Karpathy's LLM wiki
  • ADRs for agents

Skills, hooks and permissions

  • Rules vs skills
  • Block banned commands
  • Claude Code hooks
  • Codex skills
  • Auto mode
  • CLAUDE.md vs skills vs hooks
  • Claude Code skills

AI code review and PR guardrails

  • PR review against AGENTS.md
  • Review PRs against team rules
  • PR review for team conventions
  • Review comments to rules

Memory tools and alternatives

  • Best company brain tools
  • Unblocked alternatives
  • claude-mem alternatives
  • Supermemory alternatives
  • Mem0 alternatives
  • claude-mem
  • Best MCP memory servers
  • Supermemory Company Brain alternatives

Blog

How to review pull requests against your own team's rules

Published November 22, 2026

Generic review tools flag generic problems. Your team has rules they don't know. Never reset the database, write a migration. Money is integer cents, never floats. Images go through the upload service, never straight to S3.

There are three ways to check a pull request against rules like these. Each fits a different kind of rule.

1. Write the rule as code: Semgrep, ESLint, ArchUnit

Use this for rules that are a code pattern. Semgrep rules are YAML that match your internal APIs or forbidden calls. ESLint takes custom rules and no-restricted-imports. ArchUnit and dependency-cruiser enforce module boundaries.

  • Strength: deterministic. The same code gets the same result, and it runs in CI.
  • Limit: someone has to write and maintain every rule in the tool's syntax.
  • Limit: it cannot check a rule that is a judgment, like “queue the billing call, never inline” or “this change needs a migration.”

If a rule is a pattern, write it as a lint rule. Harbor does not replace that.

2. Write review instructions: CodeRabbit, Copilot code review, Qodo

Use this when you want an AI reviewer to follow your standards. You write path-specific instructions or a guidelines file, and the reviewer applies them.

  • Strength: handles rules written in plain language.
  • Limit: you write and update the instructions by hand, per tool. They go stale as the code moves.

Which rule files each of these reviewers reads, and from which branch, is in which AI code reviewers read AGENTS.md and CLAUDE.md.

3. Let the rules come from how your team already works: Harbor

Harbor reviews every pull request against your team's rules, and it learns those rules instead of waiting for you to write them.

  • It reads CLAUDE.md, AGENTS.md, .claude/rules, Cursor and Copilot rules, and CONTRIBUTING.md, from the base branch. A pull request cannot rewrite the rules it is checked against.
  • It also learns rules from coding sessions, review threads, Slack and docs. Dana tells Claude Code not to reset the database, and she says it a single time. That becomes a rule, and the next pull request on a private repo that breaks it gets a comment on the line.
  • It comments on the line that breaks a rule or has a bug. It never fails your build. Turn on Block merging until the review finishes if you want a merge to wait until the review has run.
  • Anyone who can push can reply @harbor-brain wrong to Harbor's comment on a pull request to dispute a rule. Rules that go stale are flagged or retired.
  • Every rule shows how often it was served and cited, so you can retire one with evidence.

Example comment on a pull request that adds user avatars:

Team rule · prisma/schema.prisma
Never reset the database. Write a migration.

The same rules also go to your coding agents before they write the code, so fewer pull requests break a rule in the first place.

Which should you pick?

Your rule isUse
A code pattern or import boundarySemgrep, ESLint, ArchUnit
Plain language, and you will maintain itReview instructions in your reviewer
Something the team already says in sessions, reviews and SlackHarbor

Most teams combine approaches. Keep the lint rules in CI. Add Harbor for the rules that live in people's heads and review threads.

Try it on a repo

Connect GitHub in Harbor and turn on Code review. Nothing is installed on anyone's machine. From the first pull request it checks the rule files your repo already has. The Free plan lets you try it with no card, and includes 10 reviews. Setup is in the GitHub App tutorial, and what the review reads and keeps is in the code review docs. To connect your coding agents as well, use the install command on the Harbor home page.

Limits, stated plainly: Harbor's review is a model, not a deterministic checker, so it can miss a rule or flag one wrongly. Use the dispute reply to correct it. For hard pattern rules, keep a linter.

Questions

How do I review pull requests against my own team's rules?

There are three ways. Write rules that are a code pattern as code, with Semgrep, ESLint or ArchUnit, and run them in CI. Write plain-language rules as review instructions in an AI reviewer such as CodeRabbit, Copilot code review or Qodo. Or use Harbor, which reads the rule files your repo already has and learns more rules from coding sessions, review threads, Slack and docs, then comments on the line that breaks one.

When is a linter like Semgrep or ESLint the right tool?

When the rule is a code pattern or an import boundary. A linter is deterministic, so the same code gets the same result in CI. It cannot check a rule that needs judgment, like "this change needs a migration", and someone has to write and maintain each rule in its syntax.

Can a pull request change the rules it is reviewed against?

With Harbor, no. It reads CLAUDE.md, AGENTS.md, .claude/rules, Cursor and Copilot rules and CONTRIBUTING.md from the base branch, so a pull request cannot rewrite the rules it is checked against.

Does Harbor fail the build when a pull request breaks a team rule?

No. It comments on the line and never fails the check. Turn on Block merging until the review finishes, and require the Harbor review check in GitHub, if you want a merge to wait until the review has run.

What if Harbor flags a rule that is wrong?

Anyone who can push to the repo can reply @harbor-brain wrong to the comment and say why, which marks the rule disputed for its owner. Harbor's review is a model, not a deterministic checker, so keep a linter for hard pattern rules.

More on AI code review and PR guardrails

  • Which AI code reviewers read AGENTS.md and CLAUDE.md?
  • Best tool to review pull requests against your team's coding conventions
  • How to turn PR review comments into agent rules

Review pull requests against your team’s rules →

Your team’s rules, in every agent, checked on every PR.

Harbor is shared memory for your team’s Claude Code, Cursor, Codex and Copilot. Free for you and one teammate. No card. No end date.

Start free →

Product

  • How it learns
  • Only what fits
  • Pull request review
  • Keep it true
  • Handoffs
  • The result
  • Security
  • For coding agents
  • Pricing

Developers

  • Docs
  • Quickstart
  • Install
  • CLI
  • MCP server
  • Served and cited
  • Rule-file checker
  • Blog

Guides

  • Why Claude ignores CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Share Claude Code memory with a team
  • Why Codex ignores AGENTS.md
  • Why Cursor ignores rules
  • Copilot instructions vs AGENTS.md
  • Shared memory across agents
  • Copilot Memory and Dreaming

Compare

  • All comparisons
  • vs Mem0
  • vs Zep
  • vs Unblocked
  • vs ByteRover
  • vs Cognee
  • vs Hindsight
  • vs OpenViking
  • vs Supermemory
  • vs Glen
  • vs MemPalace
  • vs Sentra
  • vs Trail-code

Company

  • Questions
  • Contact
  • X
  • LinkedIn
  • Privacy Policy
  • Terms of Service
  • Data Processing Agreement
  • Refund Policy
© 2026 HarborConnect your agents