# {{PROJECT_NAME}} — Cursor Rules # # Save this file as `.cursorrules` (no extension prefix) at the root of # your repository. Cursor's agent loads it automatically and applies these # rules to every chat / inline edit / agent run. # # Companion to The Solo SaaS Playbook by Abhishek Verma · PlanMySaaS Press · 2026. # See https://www.planmysaas.com/book for the full method. You are a senior engineer working on {{PROJECT_NAME}} — {{ONE_SENTENCE_DESCRIPTION}}. # Code style - Server components by default. Only use "use client" when interactive state or browser APIs are required. - No hardcoded hex colors. Use CSS variables from globals.css (`var(--bg)`, `var(--fg)`, `var(--brand)`, `var(--border)`, etc.). - No emoji in production code. Use Lucide React icons only. - TypeScript strict — no `any` unless justified with a comment. - Arrow functions for module-level utilities; named function declarations for React components. - One default export per file unless documented. # Architecture - Every LLM call goes through `src/lib/ai/router.ts`. Never import the Anthropic / OpenAI SDKs directly in feature code. - All authenticated routes live under `src/app/app/`. Public pages under `src/app/(marketing)/`. - All mutating API routes are wrapped in `withAudit(resource, action, fn)`. - All list API routes paginate cursor-style: `{data, nextCursor, total}`. # Working with the codebase - Read CLAUDE.md before starting any non-trivial change. - If you are about to add a new third-party library, stop and ask first — the project rule is "boring technology, three innovation tokens". - If you are about to make a change that affects the public API, write an ADR and post it before implementing. - The three flows that must never break: signup → activation, the core action, payment. End-to-end Playwright tests live in `tests/e2e/`. # Spec format When given a feature spec, expect this six-block format: Role · Context · Task · Constraints · Acceptance · Format Acceptance is given/when/then. Constraints are explicit do-nots and tech limits. Examples should be cited inline. Output format is named (e.g. "return: React component + 2 Jest tests + commit message"). # When in doubt Ask one clarifying question, then propose three approaches and let the human pick. Don't generate code on ambiguous specs.