@@ -1,7 +1,5 @@
11 # Agent Instructions
22
3-## Important Instructions
4-
53 - **Never make assumptions** - Ask for clarification instead.
64 - **Never ignore errors, warnings, or issues** - Address them immediately.
75 - **Never install, uninstall, or delete anything** without explicit authorization.
@@ -10,65 +8,10 @@
108 - **Always do exactly what was asked** - Don't add anything that wasn't explicitly mentioned.
119 - **Always lint and typecheck** changes using `npm run lint` and `npm run typecheck`.
1210 - **Always write modular, testable code** - Prefer small, focused functions and components, focused on reusability.
11+- **Always** use absolute paths in import using path aliases: `@/` for imports (e.g., `@/src/components/...`).
1312 - **Always review your changes before committing**:
1413 - identify code repetition and consolidate
1514 - identify overly complex code and simplify
1615 - ensure code modularity and separation of concerns
1716 - ensure code respects project guidelines
1817 - ensure the code uses best practices for React and Next.js
19-
20-## Coding Guidelines
21-
22-### TypeScript
23-
24-- Use strict typing - avoid `any`, prefer type inference where appropriate.
25-- Export types/interfaces alongside implementations.
26-- Use the types provided by dependencies when possible, avoid creating types for 3rd party code.
27-- Use Drizzle ORM type inference: `typeof table.$inferSelect` and `typeof table.$inferInsert`.
28-
29-### Code Organization
30-
31-- Always use absolute paths in import using path aliases: `@/` for root imports (e.g., `@/src/components/...`).
32-- Follow modular structure: `src/components/`, `src/hooks/`, `src/lib/`, `app/api/`.
33-- Keep files focused - one main export per file when possible.
34-
35-### Documentation
36-
37-- Add JSDoc comments for exported functions with `@param` and `@returns`.
38-- Keep commenting to a minimum. We should only add comments when the code is not self-explanatory
39-
40-### Naming Conventions
41-
42-- `camelCase` for functions, variables, and hooks (e.g., `useLocalStorage`, `handleSubmit`).
43-- `PascalCase` for components, types, and interfaces (e.g., `MessageInput`, `MessageInputRef`).
44-- `kebab-case` for file names (except React components which use PascalCase).
45-
46-### React Patterns
47-
48-- Use functional components with hooks.
49-- Use `forwardRef` when ref forwarding is needed.
50-- Properly type component props and refs.
51-- Handle loading and error states explicitly.
52-
53-### Error Handling
54-
55-- Use try-catch blocks for async operations.
56-- Return proper HTTP status codes in API routes (400, 404, 500).
57-- Log errors using the `debug` utility from `@/src/lib/debug`.
58-
59-### Database
60-
61-- Use Drizzle ORM query builder patterns.
62-- Use `eq()`, `asc()`, `desc()` from `drizzle-orm` for queries.
63-
64-### Testing
65-
66-- Write tests using Vitest for complex logic.
67-- Keep tests in `src/tests/` mirroring the source structure.
68-
69-### Git Commit Messages
70-
71-- Use conventional commit format: `<type>: <description>`
72-- Types: `feat:` (new features), `fix:` (bug fixes), `refactor:` (code refactoring), `docs:` (documentation), `chore:` (maintenance/tooling)
73-- Example: `feat: add system and tool message display with visibility controls`
74-- Always use lowercase for the type and description