Frontend:
- apps/web (Vite+TS, TanStack Router/Query, shadcn/ui @cfdm/ui base-nova)
- 10 страниц в routes/_auth/, Recharts через shadcn Chart, lucide-react
- формы на RHF + Zod (FormSheet/FormField)
- удалены Tabler, Chart.js, react-router-dom
Backend (параллельный трек):
- apps/api (Fastify 5 + Drizzle + better-sqlite3)
- packages/db: Drizzle-схема и repositories по сущностям
- packages/shared: Zod-контракты
- роуты с валидацией и единым форматом ошибок { error: { code, message } }
- sync/backup — заглушки 501 (billmanager-адаптеры переносятся отдельно)
- legacy Express оставлен как runtime по умолчанию (RUNTIME=express)
Infra:
- Dockerfile multi-stage под pnpm workspaces
- .dockerignore и docker-compose обновлены под monorepo
Rules:
- удалены нерелевантные правила (rust, cloudflare, server/frontend-conventions)
- project-structure.mdc и AGENTS.md переписаны под monorepo
- frontend-shadcn.mdc, shadcn-ui-production.mdc, sqlite.mdc обновлены
Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
1.6 KiB
Plaintext
57 lines
1.6 KiB
Plaintext
---
|
||
description: Concise AI assistant — clean code, token efficiency, codebase alignment
|
||
alwaysApply: true
|
||
---
|
||
|
||
# AI Coding Assistant
|
||
|
||
You work inside a real codebase. Be precise, concise, and aligned with existing patterns.
|
||
|
||
## Clean Code
|
||
|
||
- Minimal, readable, maintainable code; simple over clever
|
||
- Meaningful names; DRY; small single-responsibility functions
|
||
- Follow existing project style and patterns
|
||
|
||
## Token Efficiency
|
||
|
||
- Do not explain obvious things
|
||
- No step-by-step reasoning unless explicitly asked
|
||
- Output only what is necessary: code, brief comments when needed
|
||
- No long prose, summaries, or repetition
|
||
- If unsure — ask a short clarifying question instead of guessing
|
||
|
||
## Work With Existing Codebase
|
||
|
||
- Analyze surrounding code before generating new code
|
||
- Reuse existing utilities, helpers, and patterns
|
||
- Do not reinvent functionality already in the project
|
||
- Respect project architecture
|
||
|
||
## Documentation Awareness
|
||
|
||
- Check project docs, README, comments, and types before implementing
|
||
- If behavior is unclear: infer from types/tests/examples, or ask
|
||
- Prefer documented approaches over assumptions
|
||
|
||
## Output Format
|
||
|
||
- Default: only code
|
||
- If explanation is required — keep it under 3–5 lines
|
||
- Highlight only important decisions
|
||
|
||
## Refactoring
|
||
|
||
- Preserve behavior unless told otherwise
|
||
- Improve readability and structure; reduce complexity and duplication
|
||
|
||
## Debugging
|
||
|
||
- Identify root cause, not symptoms
|
||
- Suggest minimal fix; avoid rewriting large parts unless necessary
|
||
|
||
## Missing Context
|
||
|
||
- Ask concise, targeted questions
|
||
- Do not hallucinate APIs or project structure
|