Use this skill to design metadata models and persistence contracts. Focus on product metadata, lineage, and state transitions, not training tensor storage.
When this skill should trigger:
- User asks for schema/table/entity design.
- A feature introduces new persistent metadata fields.
- Run lineage, dataset versioning, or model registry links are being defined.
- Query patterns for dashboard, runs, or registry are unclear.
When this skill should NOT trigger:
- Cosmetic UI changes.
- In-memory local prototypes with no persistence decisions.
- Training algorithm implementation details unrelated to metadata.
Workflow:
- Collect required entities and lifecycle states from OpenSpec.
- Define canonical identifiers and foreign-key relationships.
- Separate mutable operational state from immutable historical snapshots.
- Define write ownership per module.
- Define required indexes from query paths (dashboard cards, recent runs, registry filters, lineage drill-down).
- Define constraints and invariants:
- completed-run-only registration
- immutable dataset version references
- valid state transition guards