database-engineering
Database Engineering
Repository planning gate
When this repository's CLAUDE.md classifies the request as complex or high-impact, the primary agent must invoke plan-tasks before entering this workflow's Inspect, Model, or Contract phase. A subagent must return control to the primary agent rather than create a competing plan or edit target files. Resume this workflow only after an approved docs/plans/PLAN_<descriptive-name>.md maps the relevant A-* to database-engineering, its assigned role, worktree isolation, and verification. This skill's model and migration planning refine an approved action; they never replace user approval.
Use this skill for database design, schema implementation, migration planning, query optimization, and data integrity review.
Follow seven phases:
- Inspect
- Model
- Contract
- Implement
- Optimize
- Verify
- Report
Database changes define durable business facts. Ground decisions in product requirements, existing schema, migrations, ORM models, query code, data volume, access patterns, and explicit user confirmation. Do not invent tables, fields, relationships, enum values, retention rules, or performance requirements.