# Keep Ring mutation permissions at the request handler: Perch rule pack

Published by Perch / Verglas LLC. Source tutorial: https://frameworkrecipes.dev/ring/session-permission-boundary/

Extract from your application repository root with unzip -n. The pack adds .perch/rules/perch-guide-ring-session-permission-boundary.yaml and preserves existing files. Keep your root perch.yaml. Review and adapt each where selector to your application's paths before running a check.

Install: npm install -g @lakeday/perch
Sign in: perch login
Choose your agent: perch setup claude-code, perch setup codex, perch setup cursor, or perch setup pi.

Checks:
perch check src/shop/orders.clj --rules ring-write-permission --json

Run a check after the agent's edit, inspect findings, fix the implementation, and run the identical check again. Exit 3 is a finding; exits 1 and 2 are incomplete checks. Keep the application's regression tests as separate gates. Commit the rule and agent configuration. Fresh judgments can vary; unchanged requests reuse cached answers.
