perch check reads the current file on disk, so your agent can check a requirement before committing or opening a pull request. A named rule lets it repeat the same focused check after a fix.

perch check review-evaluation/order_service.py --rules eval-all-stock-lines --json
# Repair can_fulfil, then run the identical check:
perch check review-evaluation/order_service.py --rules eval-all-stock-lines --json

These commands assume the public order-service example and the rule below are present. In the captured October 14 run, the rule failed on the broken implementation at 95% and passed on the repaired one.

Save the requirement beside the code

Add this entry alongside your existing rules in perch.yaml; keep any existing configuration.

- name: eval-all-stock-lines
  where: "review-evaluation/order_service.py"
  ensure: >-
    Read can_fulfil only. It returns true only when every requested item has
    sufficient stock; a shortage on any line returns false, including when an
    earlier line has enough stock.

The broken implementation returns too early:

def can_fulfil(items, stock):
    """True when every line in the cart is in stock."""
    for item in items:
        if stock.get(item.sku, 0) >= item.quantity:
            return True
    return False

The first available item makes this return true even when a later item is unavailable. The fixed public version checks each line before accepting the order. Run the same command after the edit and inspect the reported result.

Configure the agent you use

Install and sign in using the quick start, then choose one setup command:

npm install -g @lakeday/perch
perch login
perch setup claude-code
# Or: perch setup codex
# Or: perch setup cursor
# Or: perch setup pi

Ask the agent to preserve the named rule, run its check after editing, repair the reported finding, and repeat that check. Use a selector that matches your own file instead of copying the example path unchanged. The rule reference explains project, file and method scope.

Review uncommitted code or a branch change

A file check evaluates the selected working file. To scan changes relative to a commit, run perch scan –since with that base commit. The command reference describes scope and output. Source goes to the configured model service; a local CLI is not offline inference.

CodeRabbit also supports uncommitted CLI review. Perch’s useful distinction is a separately selectable plain-English requirement, checked before and after the edit. Compare the two workflows.

Keep the result attached to the requirement

Unchanged requests reuse cached answers; fresh model judgments can vary. A passing check is evidence for the stated requirement, not proof that the application is correct. Keep executable tests for boundary cases, including a cart whose first item is available and whose second item is unavailable.

For broader bug detection, inspect the Greptile and ReviewBench runs, including precision, thresholds and model costs.