Repo Rules — downloadable requirements for coding agentsSkip to content (#main)Repo RulesRequirements that stay in the repo (/)Rule library (/)Authorization (/fastapi/tenant-cancellation/)Transactions (/fastapi/outbox-transaction/)Rust / Axum (/axum/)

Requirements that stay in the repo

Save the rule. Check the next edit.

Download focused Perch rules for authorization, transactions and resource lifetime. Inspect the selector, keep your configuration, and give your agent a repair-and-recheck task.

Keep authorization in the writeA scoped tenant check with an agent repair task. (/fastapi/tenant-cancellation/)Keep the event with the updateAn outbox requirement saved as a YAML rule. (/fastapi/outbox-transaction/)Inspect the Axum packRead the requirements before adding them to your repo. (/axum/)

Download the focused rule for a recurring agent mistake, review its selector, and run the same check after the edit and the repair. Each pack preserves your existing perch.yaml and links to its implementation and captured controls.

FastAPI

Build a FastAPI endpoint that keeps discount limits intact (/fastapi/intro/) · 1 rule

Keep a FastAPI order update and its outbox event in one transaction (/fastapi/outbox-transaction/) · 1 rule

FastAPI (/fastapi/) · 3 rules

Preserve tenant authorization inside an atomic FastAPI update (/fastapi/tenant-cancellation/) · 1 rule

Django

Create a Django outbox event atomically with the order change (/django/durable-outbox/) · 1 rule

Build a Django update that sends notifications after commit (/django/intro/) · 1 rule

Django (/django/) · 3 rules

Keep Django cancellation writes scoped to the authenticated tenant (/django/scoped-cancellation/) · 1 rule

Next.js

Build a Next.js redirect route that stays on your origin (/nextjs/intro/) · 1 rule

Prevent private Next.js order responses from entering shared caches (/nextjs/private-response-cache/) · 1 rule

Next.js (/nextjs/) · 3 rules

Authorize a Next.js Server Action at the database write (/nextjs/server-action-ownership/) · 1 rule

Express

Build an Express API that caps discounts before calculation (/express/intro/) · 1 rule

Express (/express/) · 3 rules

Return the PostgreSQL client after every Express transaction outcome (/express/transaction-cleanup/) · 1 rule

Reserve stock in Express with one conditional database update (/express/transactional-reservation/) · 1 rule

Rails

Build a Rails update that keeps privileged fields out of agent edits (/rails/intro/) · 1 rule

Serialize Rails stock reservations with an Active Record row lock (/rails/locked-stock/) · 1 rule

Reject stale Rails cancellation decisions with optimistic locking (/rails/optimistic-cancellation/) · 1 rule

Rails (/rails/) · 3 rules

Laravel

Dispatch Laravel order jobs only after the transaction commits (/laravel/after-commit-job/) · 1 rule

Use a conditional Laravel update to prevent overselling (/laravel/atomic-reservation/) · 1 rule

Build Laravel authorization that preserves record ownership (/laravel/intro/) · 1 rule

Laravel (/laravel/) · 3 rules

Flask

Keep Flask request connections from leaking on error paths (/flask/request-db-cleanup/) · 1 rule

Flask (/flask/) · 2 rules

Deduplicate a signed Flask webhook inside its state transaction (/flask/webhook-deduplication/) · 1 rule

Fastify

Keep Fastify permission hooks inside the protected plugin (/fastify/plugin-permissions/) · 1 rule

Fastify (/fastify/) · 2 rules

Keep Fastify reservation and order writes on the same transaction client (/fastify/shared-transaction-client/) · 1 rule

Hono

Enforce Hono JWT permissions after verification and before mutation (/hono/jwt-permission-scope/) · 1 rule

Hono (/hono/) · 2 rules

Persist a Hono notification record before post-response dispatch (/hono/waituntil-after-persistence/) · 1 rule

Symfony

Keep Symfony inventory and order writes on one Doctrine transaction (/symfony/dbal-transaction-handle/) · 1 rule

Keep Symfony object authorization before the order write (/symfony/object-voter-before-write/) · 1 rule

Symfony (/symfony/) · 2 rules

Spring Boot

Require Spring method security before a scoped order mutation (/spring-boot/method-write-permission/) · 1 rule

Spring Boot (/spring-boot/) · 2 rules

Keep Spring order confirmation and its outbox write under one proxy transaction (/spring-boot/transactional-outbox/) · 1 rule

Ktor

Apply backpressure to Ktor background work with a bounded coroutine channel (/ktor/bounded-request-worker/) · 1 rule

Preserve Kotlin coroutine cancellation in a Ktor service (/ktor/cancellation-propagation/) · 1 rule

Ktor (/ktor/) · 2 rules

Gin

Keep Gin’s pooled context out of the background queue (/gin/immutable-background-jobs/) · 1 rule

Keep Gin reservation and order creation on database/sql’s transaction handle (/gin/reservation-transaction/) · 1 rule

Gin (/gin/) · 2 rules

Echo

Prevent privileged-field binding in an Echo profile mutation (/echo/explicit-profile-dto/) · 1 rule

Carry Echo cancellation through to the database query (/echo/request-context-database/) · 1 rule

Echo (/echo/) · 2 rules

ASP.NET Core

Return a conflict when EF Core detects a stale order edit (/aspnet-core/optimistic-concurrency/) · 1 rule

Authorize the loaded ASP.NET Core order before saving changes (/aspnet-core/resource-authorization/) · 1 rule

ASP.NET Core (/aspnet-core/) · 2 rules

Phoenix

Keep Phoenix order and audit changes in one Ecto.Multi (/phoenix/multi-transaction/) · 1 rule

Insert an Oban job in the same transaction as the Phoenix order change (/phoenix/oban-atomic-job/) · 1 rule

Phoenix (/phoenix/) · 2 rules

React

Serialize and roll back an optimistic React cancellation (/react/optimistic-mutation-rollback/) · 1 rule

React (/react/) · 2 rules

Keep old React search responses from replacing the current query (/react/stale-request-cleanup/) · 1 rule

Vue

Vue (/vue/) · 2 rules

Dispose Vue realtime subscriptions when the owner disappears (/vue/subscription-lifecycle/) · 1 rule

Cancel and invalidate Vue watcher requests before the next await (/vue/watcher-cancellation/) · 1 rule

Angular

Angular (/angular/) · 2 rules

Cancel obsolete Angular HttpClient searches with switchMap (/angular/switchmap-search/) · 1 rule

Keep Angular form extras out of the profile mutation payload (/angular/typed-profile-projection/) · 1 rule

SvelteKit

Keep SvelteKit private SSR responses out of shared caches (/sveltekit/private-ssr-state/) · 1 rule

SvelteKit (/sveltekit/) · 2 rules

Authorize a SvelteKit form action before its conditional write (/sveltekit/server-action-authorization/) · 1 rule

Nuxt

Use Nuxt request-scoped state instead of a shared SSR ref (/nuxt/request-local-ssr-state/) · 1 rule

Nuxt (/nuxt/) · 2 rules

Keep Nuxt API mutations scoped to the server-verified session (/nuxt/server-session-scope/) · 1 rule

NestJS

Keep NestJS event persistence on the supplied TypeORM transaction manager (/nestjs/outbox-transaction-manager/) · 1 rule

NestJS (/nestjs/) · 2 rules

Reject unlisted NestJS mutation fields at the validation pipe (/nestjs/strict-input-boundary/) · 1 rule

Axum

Stop an Axum worker while it waits for queued input (/axum/owned-worker-shutdown/) · 1 rule

Axum (/axum/) · 2 rules

Keep Axum’s verified tenant inside the SQLx order update (/axum/tenant-conditional-write/) · 1 rule

Actix Web

Bound Actix import input before scheduling blocking work (/actix-web/bounded-import-validation/) · 1 rule

Keep Actix order reads scoped by ReqData identity (/actix-web/request-scoped-identity/) · 1 rule

Actix Web (/actix-web/) · 2 rules

Qt

Dispose Qt network replies after their completion signal (/qt/network-reply-lifetime/) · 1 rule

Qt (/qt/) · 2 rules

Protect Qt’s shared stock decision with one scoped mutex (/qt/shared-stock-lock/) · 1 rule

Vapor

Keep Vapor’s order and audit writes on the Fluent transaction database (/vapor/fluent-transaction-handle/) · 1 rule

Vapor (/vapor/) · 2 rules

Observe Swift task cancellation between bounded order-processing steps (/vapor/swift-cancellation-check/) · 1 rule

Flutter

Reject stale Flutter search results after a newer query or disposal (/flutter/generation-safe-search/) · 1 rule

Cancel Flutter timers and streams when the screen is disposed (/flutter/owned-subscription-disposal/) · 1 rule

Flutter (/flutter/) · 2 rules

Shiny

Shiny (/shiny/) · 2 rules

Check Shiny session authorization inside the write observer (/shiny/session-scoped-mutation/) · 1 rule

Remove Shiny’s session-owned temporary files on session end (/shiny/session-temp-cleanup/) · 1 rule

http4s

Release http4s response resources after success or decoding failure (/http4s/client-response-resource/) · 1 rule

Keep a doobie reservation and order insert in one transaction (/http4s/doobie-conditional-reservation/) · 1 rule

http4s (/http4s/) · 2 rules

Ring

Ring (/ring/) · 2 rules

Keep Ring mutation permissions at the request handler (/ring/session-permission-boundary/) · 1 rule

Release Clojure file resources when parsing an order fails (/ring/stream-close-on-exception/) · 1 rule

OpenResty

OpenResty (/openresty/) · 2 rules

Protect OpenResty stock decisions across workers with a shared lock (/openresty/shared-dictionary-lock/) · 1 rule

Do not acknowledge OpenResty background work before timer admission (/openresty/timer-admission/) · 1 rule

POSIX services

Preserve complete POSIX writes when appending an order record (/posix/complete-write-loop/) · 1 rule

Close a POSIX file descriptor even when synchronization fails (/posix/failure-path-descriptor/) · 1 rule

POSIX services (/posix/) · 2 rules

Repo RulesRequirements that stay in the repo.

Published by Perch · © 2026 Verglas LLC. Repo Rules is a Perch publication.

Perch’s MIT license covers the CLI; hosted model analysis is a paid service. Relevant source is sent to the configured model service.

Perch CLI MIT license (https://github.com/lakeday-org/perch/blob/main/LICENSE) · Article text (https://reporules.fyi/index.md) · Resource index (/llms.txt)
