Perch turns a saved requirement into a check that can fail the development command and CI job. Run it on a single edited method before asking for a wider review.

Check a saved rule on the current method

This is the same requirement and command used in the captured refund example:

- name: refund-once
  where: checkout.py
  each: method
  ensure: Refunded orders cannot be refunded again.

The deliberately broken method calls the payment provider without checking the order status:

def refund(order, payment):
    payment.refund(order.total)
    order.status = "refunded"
    return order

Run the focused check from the repository root:

perch check checkout.py::refund --rules refund-once --json

In the September 20, 2026 capture, the unguarded refund was flagged at 80% confidence and exited 3. Adding if order.status == "refunded": return order before the payment call made the check pass and exit 0. The capture uses refund.py; use checkout.py when adapting the public order-service source at commit 4af67af.

Save the rule with the code, then use the same command to check the next agent edit. Add regression tests for concurrency and payment-provider idempotency in the application.

Compare the review workflow

Workflow Perch Claude Code Review
Requirement Scoped, named perch.yaml rule CLAUDE.md and REVIEW.md guidance
Gate Gated findings exit 3 Managed review concludes neutral; custom gating can parse output
Price model 10¢ per 1,000 rule checks; cached checks free Managed review is token-billed; quoted average $15–25

Make requirement failures fail CI

Perch gives each saved requirement a direct command and gate. A gated finding exits 3, so perch scan can fail the CI job immediately. During editing, run the named rule on one method and repair the finding before committing. Install the Perch skill in Claude Code to put this check into its editing workflow.

How Claude Code Review handles review

Anthropic’s Code Review documentation describes managed pull request review with specialized agents, customization through CLAUDE.md and REVIEW.md, and a local /code-review command. The managed review check concludes neutral by default; teams can parse its output to build a gate. Anthropic quotes an average managed review cost of $15–25, varying with PR size.

Add Perch to your agent workflow

Follow the Perch quick start, then save the requirement with the code. Install the skill for the coding agent you use:

perch setup claude-code
# Or: perch setup codex
# Or: perch setup cursor

The Perch skill instructs the agent to check the named rule after each relevant edit, inspect the finding, repair the code, and recheck. Keep the rule and regression test beside the application so the next session can use the same requirement.

With your base reference fetched, add perch scan --since origin/main --filter type=lint beside your tests in CI. CI setup explains the changed-code scan. Gated findings exit 3; exits 1 and 2 mean the check did not complete.

Compare cost and result limits

Perch charges 10¢ per 1,000 rule checks, with cached checks free. The pricing comparison estimates about 50¢ for a mid-sized pull request with about 150 methods read, including surrounding code. Usage follows the selected questions and their code context.

Unchanged requests reuse cached answers for free; fresh model judgments can vary. Perch’s CLI is MIT licensed. Model analysis sends relevant source to the configured service.

Competitor documentation reviewed October 14, 2026. All comparisons · Perch rule syntax