Implementation rules and conventions for the entire project. The AI agent must follow these in every session without exception. These rules prevent pattern drift across sessions.
- [e.g. Think before implementing — understand what is being built and why before writing a single line]
- [e.g. Scope is sacred — only build what the current feature requires]
- [e.g. Clean over clever — simple readable code is always preferred]
- [e.g. One thing at a time — complete one feature fully before touching the next]
- [e.g. Strict mode enabled — no exceptions]
- [e.g. Never use
any— useunknownand narrow the type] - [e.g. All function parameters and return types must be explicitly typed]
- [e.g. Use
constby default — only useletwhen reassignment is necessary]
- [e.g. Folders: kebab-case]
- [e.g. Component files: PascalCase]
- [e.g. Utility files: camelCase]
- [e.g. One component per file]
[Paste your preferred component or module structure here as a code snippet]
[e.g. imports → types → component/function → exports]
- [e.g. No inline styles — all styling via design tokens]
- [e.g. No business logic inside UI components]
[Paste your preferred route or controller structure here as a code snippet]
- [e.g. Every route validates the request before processing]
- [e.g. Always return
{ success: boolean, data?, error? }] - [e.g. Never expose raw error messages to the client]
- [e.g. Never query the DB directly from a component — always through a service layer]
- [e.g. Always scope queries to the current user — never fetch without a user filter]
- [e.g. Use transactions for operations that touch more than one table]
- [e.g. Never use empty catch blocks — always log or handle]
- [e.g. User-facing errors must be human readable]
- [e.g. Log errors with a context prefix:
[module/function]]
| Event | When | Properties |
|---|---|---|
[event_name] |
[When it fires] | [params] |
[event_name] |
[When it fires] | [params] |
| Variable | Used In |
|---|---|
[VAR_NAME] |
[file or module] |
[VAR_NAME] |
[file or module] |
- [e.g. No comments explaining what the code does — code must be self-explanatory]
- [e.g. Comments only for why — explaining a non-obvious decision]
Approved dependencies for this project:
- [package] — [purpose]
- [package] — [purpose]
Do not install any other packages without updating this list first.