Gate 05 · Database Schema
This gate settles what your app stores and how it all connects, the tables, columns, and relationships your features stand on. It’s the backbone your agent writes data access against, so vagueness here shows up as bugs later.
It reads the brief, your functionalities and stories, the tech stack, and the UX (every screen implies the data it shows). Bring the entities you know you need and how they relate, plus the constraints that matter: what’s unique, what’s required, who owns what. Your database choice from the tech stack shapes the types and the idioms, a relational schema and a document model are not the same shape.
A good schema gives every functionality’s data a home, makes relationships explicit, and matches the database you picked. Generated SQL should be executable, not pseudocode.
Both Key Risks and Dependencies read the schema, so changes here flag them. Migrations are a build-time concern, this gate defines the target shape, not the path to it.
Output: database-schema.md.