Convex Schema Builder
Use this skill for convex/schema.ts work.
Core rules
- Prefer flat, relational documents over deep nesting.
- Index foreign keys and common filter paths early.
- Use arrays only for small, naturally bounded sets.
- Keep schema changes compatible with current data unless the task explicitly includes a migration.
AgentForge-specific guidance
- Schema should support the data layer only. Do not model Mastra runtime execution inside Convex unless the repo already does so intentionally.
- If a schema change is for daemon memory or runtime coordination, cross-check docs/TECH-REFERENCE.md before changing table shapes.
References
- Read schema-checklist.md for indexing, pagination, and anti-patterns.