Strict governance of the models.yaml (Distributed Schema) and api.yaml. Handles entity relationships, enums, Prisma attribute logic, and API contract definitions.
You MUST follow the standards defined in:
core/ARCHITECTURE.md: Separation of concerns and the "Shell-Registry" pattern.core/CODE.md: Coding style, hygiene, and naming conventions.core/MODULES.md: Module structure and the authority of the Generator.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 governs the Data Modeling and Contract Definition phase. The project uses a Distributed Schema architecture, where models are defined in YAML and compiled into Prisma, Zod schemas, and TypeScript interfaces.
NEVER EDIT prisma/schema.prisma DIRECTLY. It is a generated file. All changes must be made in models.yaml files.
GENERATED VS MANUAL LOGIC:
src/pages/api/ and src/sdk/ are strictly managed by the generator and are IMMUTABLE by hand.src/services/ and src/actions/ are mixed. Specific files with the // GENERATED CODE header are immutable, but you are ENCOURAGED to add manual files for domain logic within these directories.src/hooks/ or by creating manual Service classes.core/prisma/models.yaml (Base User/Auth models).apps/backend/modules/<module-name>/models.yaml (Feature-specific models).apps/backend/modules/<module-name>/api.yaml (The Source of Truth for Custom Actions and endpoints).apps/backend/modules/<module-name>/models.yaml (The Source of Truth for Standard CRUD endpoints via the role configuration).models.yaml)Models defined here generate Prisma Schema definitions and Zod validation schemas.