Imported from PinchaoRamiroA/disability-system (
AGENTS.md). Install upstream withnpx skills add PinchaoRamiroA/disability-system. Copyright stays with the author.
Project AI Instructions
Priority Order
Agents MUST read documentation in this order:
- docs/business/ - Business rules and domain logic
- docs/architecture/ - System architecture
- docs/frontend/ - UI system and components
- docs/backend/ - API endpoints
- docs/database/ - Database schema
Developer Commands
| Command | Description |
|---|---|
npm run dev |
Start development server (port 3000) |
npm run build |
Production build |
npm run lint |
Run ESLint |
npm run test |
Run Jest tests |
npm run cy |
Open Cypress UI |
npm run e2e |
Run E2E tests with dev server |
npm run e2e:headless |
Run E2E tests headless |
Pre-commit hook runs lint-staged on staged files.
Quick Reference
| Need | Read |
|---|---|
| API endpoints | docs/backend/endpoints.md |
| Database schema | docs/database/schema.md |
| Business flow | docs/business/medical-leaves-flow.md |
| UI components | docs/frontend/ui-system.md |
| Frontend architecture | docs/architecture/frontend.md |
| Backend standards | docs/architecture/backend.md |
Contracts (TypeScript/Zod)
All API contracts are in contracts/:
contracts/auth/- Authentication typescontracts/incapacidades/- Medical leaves typescontracts/documentos/- Documents typescontracts/cobros/- Payments typescontracts/cartera/- Portfolio typescontracts/notificaciones/- Notifications typescontracts/catalogos/- Catalog types
Design Reference
For design system and visual guidelines, see: DESING.md
Naming Convention
Use consistent naming:
incapacidad (NOT: leave, medical, health)
incapacidad-form
incapacidad-service
incapacidad-schema
documento (NOT: file, attachment)
pago (NOT: payment, collection)
Code Style
- ESLint rules:
prefer-const, single quotes, no semicolons - Prettier: 4 spaces, no semicolons, single quotes, trailing commas
- TypeScript strict mode enabled
- Path aliases:
@/components/*,@/hooks/*,@/store/*, etc.
Absolute Rules
- Never invent API routes not documented in docs/backend/endpoints.md
- Never create database fields not documented in docs/database/schema.md
- Always use contracts/ for API types and Zod schemas
- Always reuse existing components from src/components/
- Prefer server-first architecture
- Do not fetch directly inside UI components
- Do not use inline business logic
- Do not create duplicated DTOs
- Prefer Redux (via RTK) for global state; only use for truly global state
- Avoid MUI for basic layouts, buttons, typography - use custom components instead; reserve MUI for complex interactive components (datagrids, datepickers, etc.)