AI coding rules by stack
The AI-First Coding & Rules Template Pack has a rules folder for each of 17 stacks, every one shipped as a Cursor .mdc rule, a CLAUDE.md and an AGENTS.md, all sitting on a shared base layer. Each page below shows what that stack's rules actually tell an agent, the mistakes they are written to prevent, the checks the agent runs before it says done, and one worked example from the pack's 40 before/after prompt cards.
Pick the stack you work in. If you want to read a full prompt card before buying, the free anti-slop sample PDF includes the FastAPI card in full.
Choose a stack
- Next.js, React and TypeScriptApp Router boundaries, caching, Server Actions as public endpoints, and strict TypeScript without
any. - Node.js backend (TypeScript or JavaScript)Floating promises, event-loop blocking, startup config validation and route/service/data layering.
- Python (general)Version-aware syntax, typed public APIs, narrow exception handling and the classic Python traps.
- FastAPIBlocking calls in async routes, Pydantic v2 only, Annotated dependencies and owner-scoped queries.
- Django and Django REST FrameworkN+1 queries, deliberate on_delete, ownership in get_queryset() and migrations that never get edited.
- GoError handling you can't skip, goroutines with an owner, context first and real HTTP timeouts.
- RustBorrowed parameters, Result instead of unwrap, enum-based types and the Tokio traps.
- Java and Spring BootBoot 3 and jakarta imports, proxy-based @Transactional, lazy JPA fetching and Security 6.
- C# and .NETAsync all the way, DbContext lifetimes, TypedResults endpoints and EF Core projections.
- Swift and SwiftUIObservation-based state ownership, side-effect-free views, MainActor and Sendable for Swift 6.
- Kotlin (Android with Compose, and server)Lifecycle-bound coroutines, StateFlow UI state, Compose recomposition and Java interop nulls.
- Ruby on RailsREST-shaped controllers, constraints behind validations, strict_loading and after-commit jobs.
- Laravel and PHPForm Requests, policies, eager loading with lazy-load guards and the env() caching trap.
- TerraformPlan-only agent policy, pinned providers, for_each over count and least-privilege IAM.
- SQL and PostgreSQLIndexed foreign keys, NULL traps, keyset pagination and migrations that don't lock live tables.
- Vue 3 and NuxtLost reactivity, SSR-safe per-request state, useFetch over raw $fetch and Nitro server routes.
- Svelte 5 and SvelteKitRunes instead of legacy syntax, server versus universal load, form actions and SSR guards.
How the rules are layered
Every stack sits on the same base layer, which covers git hygiene, verifying before saying done, small diffs and not inventing APIs. Use the order base, stack, project: the base and stack files come from the pack, and your project layer adds the exact commands, versions and conventions of your repository. The pack's monorepo example shows a repo with a Next.js app, a FastAPI service and Terraform, and where each file goes for each tool.