# AI Coding Rules for Radionica3D

## Mandatory Deployment Workflow
Before any `git push` or claiming a task is "ready", the AI MUST:
1. **Sync Locales**: Run `python scripts/manage_locales.py split`.
2. **Type Check**: Run `cmd /c "node_modules\.bin\vue-tsc --noEmit"` (on Windows) or `./node_modules/.bin/vue-tsc --noEmit` (on Linux) to ensure no TypeScript errors were introduced.
3. **Production Build**: Run `npm run build` or `vite build` to ensure the project compiles correctly and there are no circular dependencies or missing imports in the production bundle.
4. **Local Verification**: If possible, verify the UI changes via screenshots or browser tools.

5. Use cmd /c for Windows commands

## Search and Investigation
- **ALWAYS** use `python tools/search.py "query"` instead of `grep` or `ripgrep` for searching code.
- Example: `python tools/search.py "t(\"admin.tabs\"" --include .vue .ts`
- This ensures consistent results across different operating systems and avoids shell escaping issues.

## Backend and Database
- **ALWAYS** provide database migrations as `.sql` files in `backend/migrations/` (naming: `00X_name.sql`).
- Avoid using one-off `.py` scripts for production migrations as they are not tracked by the automatic deployment script.

## Localization Rules
- **NEVER** edit `translations.admin.json` or `translations.user.json` directly.
- **ALWAYS** edit fragments in `src/locales/master_admin/` or `src/locales/master_user/`.
- After editing fragments, run the `split` command to propagate changes.

## UI/UX Standards
- Maintain premium aesthetics (glassmorphism, smooth transitions).
- Use `lucide-vue-next` for icons.
- Use `vue-sonner` for notifications.
