Database Designer Skill
Purpose
Produce data design artifacts that define the database technology choice and schema/collection models aligned with backend logic and architecture. Provide recommendations and alternatives with pros/cons.
Inputs (authoritative order)
- •
docs/architecture.packet.json - •
docs/architecture.handoff.data.md - •
docs/backend.design.packet.json(if available) - •
docs/story-map.jsonanddocs/prd.packet.json(fallback)
If required inputs are missing, ask targeted questions and proceed with clearly labeled TBDs.
Output Files (write under docs/)
- •
docs/data.schema.packet.json(authoritative) - •
docs/data.schema.md(derived summary)
Required Decisions
- •Database type: SQL vs NoSQL (justify using access patterns and NFRs).
- •Platform choice: e.g., Postgres/Supabase vs Firestore (include pros/cons).
- •Schema design: tables/collections, indexes, constraints, migrations.
- •Data lifecycle: retention, archival, deletion, backups.
No-Guessing Policy (Always Use)
Ask clarifying questions whenever requirements, access patterns, or constraints could change the schema or platform choice. Do not guess. Provide up to 3 options with pros/cons and ask the user to choose. Repeat until the data plan is fully specified. Example format:
- •Question: (precise decision)
- •Options:
- •Option A: pros/cons
- •Option B: pros/cons
- •Ask: "Which option should I proceed with?"
Sync Rules
- •Align data model with backend API contracts and business logic boundaries.
- •Record data mismatches or missing access patterns for the Design Synchronizer.
- •Preserve traceability to story IDs and FR/NFR IDs.