一键导入
data-layer-contracts
Defines the schema-to-factory-to-seeder contract chain — NOT NULL alignment, factory/seeder ownership boundaries, and schema drift rules
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Defines the schema-to-factory-to-seeder contract chain — NOT NULL alignment, factory/seeder ownership boundaries, and schema drift rules
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Defines structural rules for Laravel architecture, layering, and code organization
Defines DTO structure, lifecycle, and transformation rules across the application
Defines application service structure and business orchestration boundaries
Governs safe, incremental, repository-wide development workflow with continuous validation gates
Ensures correct execution order of migrations, seeders, and tests in CI
Defines GitHub Actions configuration for running PHP/Laravel CI pipeline
基于 SOC 职业分类
| name | data-layer-contracts |
| description | Defines the schema-to-factory-to-seeder contract chain — NOT NULL alignment, factory/seeder ownership boundaries, and schema drift rules |
Defines the contract chain from migration schema to factory to seeder, and prevents drift between them.
Every NOT NULL column defined in a migration must be supported by:
This is a schema-only rule, not a validation rule. MySQL/MariaDB is the canonical database — SQLite differences are invalid for schema validation assumptions.
Factories MUST:
Factories MUST NOT:
If a migration introduces a NOT NULL column, the factory MUST be updated immediately — omission is invalid state.
Factories SHOULD align with service-layer expectations but do NOT depend on it: service layer = behavior, factory = valid structure.
Seeders MUST:
Seeders MUST NOT:
Seeders assemble data. They do not define data correctness.
The following indicate schema drift: migration changes, factory mismatch, seeder mismatch, SQLSTATE constraint violations, CI vs local DB mismatch.
Schema validation requires migrate:fresh + seed before running test suites.
Primary keys are non-deterministic. Tests MUST NOT rely on hardcoded IDs.