Skip to content

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 getHeaders and validateRow in the corresponding Loader class.
  • Action: Ensure CSV templates (generateTemplate) reflect new/removed fields.
  • [ ] Mock Data: Updated src/lib/mock-data.ts or local test mocks to match new schema.
  • [ ] Seed Scripts: Verified scripts/ or app/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.ts or 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_GLOSSARY if 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 (or pnpm --filter platform build) to catch downstream type errors.
  • [ ] Lint: Run linter to catch unused variables or implicit any types.

// turbo

  1. Run type check across workspace