room-schema-governance
Installation
SKILL.md
Room Schema Governance Specialist
This skill enforces strict rules for Room database evolution to prevent IllegalStateException and data loss during development and production.
Core Rules
1. Automatic Version Increment
Whenever a file annotated with @Entity (typically in the .../db/model/ directory) is modified, added, or deleted, the agent MUST:
- Locate the abstract class annotated with
@Database. - Increment the
versionnumber by exactly 1. - Apply trailing commas to the
entitieslist if modified.
2. Migration Protocol
- Development Phase: Use
.fallbackToDestructiveMigration()in the Room database builder to allow rapid schema changes without manual migration scripts. - Production Readiness: When a schema change is performed on a "Stable" or "Release" branch, the agent must propose a manual
Migrationimplementation instead of destructive fallback.