Instruction file imported from fahadsubzwari924/privacy-diff (
.cursor/rules/core-rules.mdc). Copyright stays with the author.
Core rules
- Default routing:
routing.mdc— Superpowers for workflow phases, Agency specialist for execution (including each implementation subagent/Task). PLANNING RULE: every plan task must carry anagencyfield (@agency-<slug>.mdc) before the plan is emitted — a plan without it is incomplete. DISPATCH RULE: bind anagency-*.mdcrole to every implementation task before starting - Read
.ai/rules.mdfor full standards; obey stack row for Javascript, Typescript / Next.js - Max 200 lines/file, 50 lines/function; early returns; no commented-out code in commits
- Run
npm run lintbefore hand-off; fix or explain waivers - Do not commit secrets or log tokens/PII
- Touch tests when behavior changes (
npm run test) or document the gap - Types in dedicated files: All
export type/export interfacemust live intypes.ts(or domain-specific type file), never in implementation files. Import types, don't export from impl.
Docs — read before acting, not after
| Trigger | Must read first |
|---|---|
Creating or editing any file in src/ |
docs/CONVENTIONS.md — layer rules, naming, directory placement |
| Any API/HTTP route, controller, or service | docs/API-PATTERNS.md — validation contract, layer boundaries |
| Any error handling or logging | docs/ERROR-HANDLING.md |
| Any auth, secrets, or user-input handling | docs/SECURITY.md |
| Writing or modifying tests | docs/TESTING-STRATEGY.md |
| Cross-module or architectural change | docs/ARCHITECTURE.md |
Do not decide file location, naming, layer placement, or validation approach without reading the relevant doc first.