Rules Catalog — Curated Pull Request Governance | Warestack

Catalog rules

12 rules

Code quality

Require concise pull requests

Flag pull requests that exceed the configured maximum lines of code, excluding changes to lock files.e.g. 400, 800

pr.diff.lines_changed > $maxLines
Require atomic commits

Flag commits that exceed the configured lines of code per commit, regardless of the pull request size.e.g. 400, 800

commit.diff.lines_changed > $maxCommitLines AND commit.type != "chore"

Review process

Route review requests based on branch prefixes

Route review requests to specific team members based on configurable pull request branch prefixes.e.g. feat/, fix/, chore/

pr.branch.prefix MATCHES $branchPrefixes THEN pr.reviewer = $reviewerUsername
Route review requests based on file paths

Route review requests to specific team members based on configurable file paths.e.g. src/components/, .github/workflows/, src/pages/**/*

ANY(pr.diff.files_changed) MATCHES $filePathPatterns THEN pr.reviewer = $reviewerUsername

Workflow

Detect review fatigue

Flag reviewers who receive more review requests than the configured threshold.e.g. 4, 5

reviewer.pending_review_requests > $maxOpenReviewRequests
Require a linked ticket

Flag pull requests that are not linked to a Linear or GitHub issue.

pr.linked_ticket IS NULL
Require linked ticket to be assigned

Flag pull requests with a linked Linear or GitHub issue without an assignee.

pr.linked_ticket IS NOT NULL AND pr.linked_ticket.assignee IS NULL
Require active linked ticket

Flag pull requests with a linked Linear or GitHub issue that is inactive or not in progress.e.g. In Progress, In Review

pr.linked_ticket IS NOT NULL AND pr.linked_ticket.status NOT IN $activeTicketStatuses
Require timely acknowledgment of review requests

Flag pull requests that do not receive reviews or acknowledgments within the configured time limit.e.g. 24h, 48h

pr.review_ack_hours > $reviewAckHours
Require timely updates for draft pull requests

Flag draft pull requests as stale when they have no updates within the configured time limit.e.g. 96h, 192h

pr.status = "draft" AND DATEDIFF(hour, pr.updated_at, NOW()) > $draftStaleHours
Require timely acknowledgment of high-priority linked tickets

Flag pull requests that do not receive reviews or acknowledgments within the configured time limit when the linked Linear task is marked as "Urgent" or the linked GitHub issue is tagged as "Critical"/"Urgent".e.g. 12h, 24h

pr.linked_ticket.priority IN ("Critical", "Urgent") AND pr.review_ack_hours > $highPriorityReviewAckHours
Detect pull request scope drift

Flag pull requests that introduce changes unrelated to the linked Linear or GitHub issue.

pr.scope_similarity = "LOW"

From catalog rule to workspace configuration

Pick a curated rule, provide its required inputs, and apply that configuration to the repositories where it should run.

Steps:

  1. Choose a rule
    Start with the governance behavior your team wants to validate.
  2. Set its configuration
    Provide the rule-specific threshold, state list, or reviewer routes.
  3. Select the scope
    Apply the configuration to the relevant team and repositories.
  4. Monitor the result
    Review violations and decide whether the GitHub check should gate merge.

Rules validate pull-request governance. A violation blocks merging only when merge blocking is enabled for that configuration and branch protection requires the Warestack Rules check.

Configure governance for your repositories

Sign in to choose a rule, set its inputs, and apply it to the appropriate workspace scope.