BeforeMerge

AI-native code review knowledge base. Structured rules that catch what linters miss.

Product

  • Features
  • Explore
  • Pricing
  • Docs
  • GitHub

Company

  • About
  • Blog
  • Contributors
  • Contributing

Legal

  • Privacy Policy
  • Terms of Service
  • MIT License

© 2026 BeforeMerge. Built by Peter Krzyzek

BeforeMerge
Features
Explore
PricingBlogContributorsInstall Guide
3Sign In
FeaturesExplore
RulesSkillsKnowledgePrompts
PricingBlogContributorsInstall Guide
Sign In

Explore

Browse 354 rules, 42 knowledge articles, and 28 prompt templates across security, performance, architecture, and quality.

Sort:
Previous123Next

Automate these checks on every PR

BeforeMerge scans your pull requests against these rules automatically. Get actionable feedback before code ships to production.

Join WaitlistLearn More

58 rules matching filters

Design for failover and high availability

MEDIUM

Use a multi-AZ/standby configuration and ensure the app reconnects cleanly on failover instead of caching a dead endpoint.

ArchitectureManaged Databases

Offload read traffic to read replicas where appropriate

MEDIUM

Route read-heavy or analytics queries to read replicas, keeping the primary focused on writes and consistency-critical reads.

Architecture

Cache dependencies and build layers to speed pipelines

MEDIUM

Restore dependency and build-layer caches keyed on the lockfile to avoid redundant work each run.

Architecture

Make pipelines deterministic and idempotent

MEDIUM

Design pipeline steps to produce the same result on re-run, with no reliance on hidden state or run order.

Architecture

Run lint and tests on every PR and block merge on failure

HIGH

Every pull request must run linting and the test suite, and merging must be blocked when they fail.

Architecture

Require green CI before deploy

MEDIUM

Gate deployments on a passing CI run so only verified commits can be promoted to an environment.

Architecture

Use reviewed, version-controlled infrastructure-as-code

MEDIUM

Define infrastructure as code in version control and change it through reviewed, auditable commits.

Architecture

Fail the build fast on any error

MEDIUM

Pipelines must stop immediately on the first error instead of masking failures and continuing.

Architecture

Keep environments separate and configure via env, not code

MEDIUM

Maintain distinct dev/staging/prod environments and drive their differences through configuration, not branching code paths.

Architecture

Automate deployments and provide a fast rollback

MEDIUM

Deploy through an automated pipeline and keep a one-step rollback to the previous known-good release.

Architecture

Run database migrations as a controlled, gated step

MEDIUM

Apply schema migrations through a dedicated, version-controlled, gated pipeline step — not ad hoc or implicitly on deploy.

Architecture

Build the artifact once and promote it across environments

MEDIUM

Produce one immutable build artifact and promote that same artifact through staging to production.

Architecture

Protect Main with Required Reviews and CI

MEDIUM

Enforce branch protection on main: require pull-request review and passing CI before any merge.

Architecture

Keep History Linear with Squash or Rebase

MEDIUM

Prefer squash or rebase merges (per team policy) to keep main history linear and easy to read, bisect, and revert.

Architecture

Open Small, Reviewable Pull Requests

MEDIUM

Scope each pull request to one logical change so reviewers can understand it quickly and catch defects.

Architecture

Keep Branches Short-Lived and Updated

MEDIUM

Keep feature branches small and short-lived, rebasing or merging from the base branch often to avoid drift and painful conflicts.

Architecture

Return 201 Created with a Location Header on Resource Creation

HIGH

On successful creation respond with 201 Created, a Location header pointing to the new resource, and ideally its representation.

Architecture

Support Filtering and Sorting via Query Parameters

MEDIUM

Expose filtering, sorting, and field selection through query parameters rather than proliferating bespoke endpoints.

Architecture

Use Consistent Naming Conventions

MEDIUM

Use plural nouns for collections and one consistent casing (e.g. snake_case or camelCase) for fields across the entire API.

Architecture

Paginate All Collection Endpoints

HIGH

Return collections in bounded pages with a default and maximum page size, exposing next/prev cursors or links.

Architecture

Return a Consistent, Structured Error Body

HIGH

Every error response should share one machine-readable shape (code, message, details) so clients can parse failures uniformly.

Architecture

Make POST Creates Idempotent via Idempotency Keys

HIGH

Accept a client-supplied Idempotency-Key header on create/payment endpoints so retried requests do not create duplicate resources.

Architecture

Use HTTP Methods According to Their Semantics

HIGH

GET must be safe and idempotent, PUT/DELETE idempotent, and POST for non-idempotent creates. Never mutate state on a GET.

Architecture

Use Resource-Oriented (Noun) URLs

MEDIUM

Model endpoints as nouns representing resources, not verbs. Let HTTP methods express the action instead of encoding it in the path.

Architecture
Managed Databases
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
CI/CD & DevOps
Git
Git
Git
Git
API Design
API Design
API Design
API Design
API Design
API Design
API Design
API Design