Ensures that changes to models.yaml are valid Prisma syntax, DTO compliant, and don't break architectural contracts.
You MUST follow the standards defined in:
core/ARCHITECTURE.md: Separation of concerns and "Shell-Registry" pattern.core/CODE.md: Strict typing and naming conventions.core/MODULES.md: Modular API and Model extension rules.any: The use of any is strictly prohibited. You MUST use specific types, unknown with validation, or proper interfaces. There are NO exceptions to this rule.This skill acts as the Gatekeeper. Its purpose is to ensure that any schema change is valid for both the Database (Prisma) and the API (SDK/DTOs).
Run the full validation pipeline (Prisma, SDK, and Type Integrity).
npx tsx scripts/generate-prisma.ts && npx tsx scripts/generate-sdk.ts && npm run db:validate && npx tsc --noEmit
models.yaml syntax and ensures module schemas merge cleanly with the Core schema.db: false) follow naming conventions (e.g., *DTO) and set api: false as per project standards.role: attributes in models.yaml (either string or granular object) with the existence of corresponding policies in src/roles/.isList: true for arrays) and ensures the generated SDK is type-safe.extended: true flag.Service, Action, Store, or Provider to avoid collisions with generated classes.design-data or manual updates to a models.yaml file.scaffold-module or implement-logic.isList: true instead of [] notation in models.yaml.extended: true flag for extensions. @relation fields are correctly mapped in both directions.UserService, it will collide with the generated UserService class. Rename the model.api: false in models.yaml as they are consumed via custom actions or specialized handlers.role: workspace-admin or a granular role like create: admin, verify that the corresponding policy files (e.g., apps/backend/modules/{name}/src/roles/admin.ts) exist.extended: true and define the model name identically to Core. The generator will perform a deep-merge. NEVER remove or change types of existing core fields.