Development Checklist: Data Structure & Schema Changes
Use this checklist whenever you modify a Zod schema, database model, or core type definition. These changes often ripple into secondary utilities like data loaders, seed scripts, and AI prompts.
1. Core Implementation
- [ ] Schema Update: Checked primary Zod schema definition.
- [ ] Type Export: Verified TypeScript interfaces are exported and match standard naming conventions.
- [ ] Database Migration: (If applicable) Created migration script or defined strategy for existing data.
2. Data Loading & Seeding (The "Secondary Deliverables")
- [ ] Data Loaders: Checked
src/lib/data-loader/for loaders consuming this entity. - Action: Update
getHeadersandvalidateRowin the corresponding Loader class. - Action: Ensure CSV templates (
generateTemplate) reflect new/removed fields. - [ ] Mock Data: Updated
src/lib/mock-data.tsor local test mocks to match new schema. - [ ] Seed Scripts: Verified
scripts/orapp/api/cron/seed-*handle the new structure. - Critical: Run the seed script locally to verify it doesn't crash on new validation rules.
3. AI & Intelligence
- [ ] AI Prompts: Checked
src/lib/ai-service.tsor prompt templates. - Check: Does the AI need to extract this new field?
- Check: If a field was removed, is the AI still hallucinating it?
- [ ] Glossaries: Updated
TRANSLATION_GLOSSARYif new domain terms were added.
4. UI & Forms
- [ ] Forms: Updated Input fields in Create/Edit forms.
- [ ] Display: Added new fields to Detail views and List columns (Tables).
- [ ] Validation messages: Ensure user-friendly errors for new constraints.
5. Build & Verify
- [ ] Monorepo Build: Run
pnpm build(orpnpm --filter platform build) to catch downstream type errors. - [ ] Lint: Run linter to catch unused variables or implicit any types.
// turbo
- Run type check across workspace