# Backend Fastify / Prisma ## Scope Server work lives under `server/`. Prefer existing route, service, utility and QA script patterns over new abstractions. ## Rules - Validate Prisma changes with `cd server && npm run prisma:validate`. - For route/service edits, run `node --check` on the touched files and the focused regression listed in the current Trellis task. - Prisma migrations require rollback notes in the Trellis task design or PRD. - Do not resolve migration drift, reset databases, or rewrite migration history without explicit approval. - Workflow, approval and permission behavior must be verified at process level, not only syntax level. ## Common Checks - `cd server && node --check src/routes/reimbursements.js` - `cd server && node --check src/routes/workflow.js` - `cd server && ./scripts/regression-workflow-actions.sh` - `cd server && ./scripts/regression-all.sh`