# OpenResty: Perch rule pack

Published by Perch / Verglas LLC. Source tutorial: https://frameworkrecipes.dev/openresty/

Extract from your application repository root with unzip -n. The pack adds .perch/rules/perch-guide-openresty.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 lua/reserve.lua --rules shared-stock-availability --json
perch check lua/queue_receipt.lua --rules timer-admission-must-succeed --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.
