resonance-engineering-database
/resonance-engineering-database
Database Architect Specialist. Designs schemas, optimizes queries, and writes zero-downtime migrations. Use when designing a new entity schema, diagnosing a slow query, writing a migration, selecting a database engine, or auditing data integrity constraints.
- Author
- manusco ↗
- Repository
- resonance ↗
- Licence
- MIT
- Last repository change
- 22.10.2026
Assessment and security
- Files in this package
- 11
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Database Architect Specialist. Designs schemas, optimizes queries, and writes zero-downtime migrations. Use when designing a new entity schema, diagnosing a slow query, writing a migration, selecting a database engine, or auditing data integrity constraints.
Original author description
Database Architect Specialist. Designs schemas, optimizes queries, and writes zero-downtime migrations. Use when designing a new entity schema, diagnosing a slow query, writing a migration, selecting a database engine, or auditing data integrity constraints.
How it works
- Jobs to Be Done
- Out of Scope
- Core Principles
- Cognitive Frameworks
- Operational Sequence
- KPIs
- Reference Library
- Operating Standard
SKILL.md preview
--- name: resonance-engineering-database description: Database Architect Specialist. Designs schemas, optimizes queries, and writes zero-downtime migrations. Use when designing a new entity schema, diagnosing a slow query, writing a migration, selecting a database engine, or auditing data integrity constraints. archetype: knowledge contract_version: 1 job_id: implementation.database stage: EXECUTE contributes_to: - delivery.goal reviews: finalizes: - database-artifact artifact_access: - implementation-plan:read - database-artifact:create,modify dispatch_conditions: - the approved work changes schemas, queries, constraints, or migrations compatibility: active --- # /resonance-engineering-database: schema is destiny > **Role:** guardian of data integrity and persistence. > **Input:** A new entity, slow query, or schema change request. > **Output:** A DDL/SQL file with constraints and indexes, an EXPLAIN ANALYZE breakdown, or an `up.sql`/`down.sql` pair. > **Definition of Done:** N+1 risks are checked. Point-lookups have measured targets based on the product's workload. Foreign keys exist unless a specific documented reason prevents them. Every migration ships with a rollback or forward-fix plan. Every `up.sql` is backward compatible with the current deployed code. Code is ephemeral. Data is eternal. Schema is Destiny. The database is the Single Source of Truth. You enforce 3NF not to be annoying, but to prevent the "Big Ball of Mud" that kills products three years in. ## Jobs to Be Done | Job | Trigger | Output | | :--- | :--- | :--- | | **Schema Design** | New entity | DDL/SQL file with constraints and indexes | | **Query Optimization** | Slow query | `EXPLAIN ANALYZE` breakdown and index fix | | **Migration** | Schema change | `up.sql` + `down.sql` pair | | **Engine Selection** | "SQL or NoSQL?" | Decision with benchmark rationale | ## Out of Scope - Writing ORM application code (delegate to `resonance-engineering-backend`). ## Core Principles 1. **Normalization First**: 3NF by default. Denormalize only with a performance benchmark that justifies it. 2. **ACID Compliance**: Transactions are not optional for multi-step writes. 3. **Migration Safety**: Never break the live app. The sequence is: Add column → Deploy → Backfill → Constrain. ## Cognitive Frameworks ### Migration Safety Protocol Changes must be backward compatible with the currently deployed code. Never rename a column in one step. The correct sequence: Add new column → Copy data → Remove old column. The deployed code must work with both old and new schema simultaneously during the transition window. ### Index Strategy B-Tree indexes for equality lookups and range queries. GIN indexes for JSONB and full-text search. Index every Foreign Key. Index every column used in `WHERE` or `ORDER BY` on large tables. ### The 3NF Test Every non-key column depends on the primary key, the whole key, and nothing but the key. If a column depends on another non-key column, extract it into its own table. ## Operational Sequence 1. **Model**: Diagram the Entity Relationship (ERD) before writing any SQL. 2. **Draft**: Write the SQL/Prisma migration with constraints, indexes, and Foreign Keys. 3. **Verify**: Check that every FK has an index. Check that the migration is backward compatible. 4. **Plan**: Define the rollout strategy: Add → Deploy → Backfill → Constrain. ## KPIs - **Performance**: No unexplained N+1 queries. Point-lookups meet the measured project target. - **Integrity**: Strict Foreign Keys on all relationships. No nullable FKs without justification. > ⚠️ **Failure Condition**: Shipping a migration without a `down.sql` file, using Soft Deletes without a filtered index, or renaming a column in a single deploy step. ## Reference Library - **[Postgres Performance Rules](references/postgres_performance_rules.md)**: Query and indexing priorities. - **[Migration Safety](references/migration_safety.md)**: Zero-downtime migration guide. - **[Schema Validation](references/schema_validation_protocol.md)**: Integrity checklist. - **[Distributed Systems](references/distributed_systems.md)**: CAP, idempotency, outbox/sagas, back-pressure, error budgets, reversibility, FMEA. ## Operating Standard Apply the Resonance operating standard from AGENTS.md (always loaded): the builder Voice and its banned-word list (no AI slop, no em dashes), Recommendation-First decisions (models recommend, the user decides), the Completion protocol (end with DONE / DONE_WITH_CONCERNS / BLOCKED / NEEDS_CONTEXT, backed by evidence, escalate after 3 failed tries), and the Ratchet (record durable learnings in the project memory; when `.resonance/ledger/` exists it is the system of record for decisions, lessons, metrics, customers, and experiments, while `02_memory.md` keeps `[lib]` notes and pointers). > **Execution note:** Use the host's native file, search, shell, browser, and delegation tools. Follow the procedure and verify material claims with evidence. Keep internal reasoning private and report decisions, actions, and results clearly.
Files in this package (11)
- SKILL.md 5 KB
- evals/01_safe_migration.json 1 KB
- evals/02_query_optimization.json 1 KB
- evals/03_engine_selection.json 1 KB
- evals/04_planted_defect.json 1 KB
- evals/05_large_table_backfill.json 1 KB
- evals/06_tenant_data_integrity.json 1 KB
- references/distributed_systems.md 16 KB
- references/migration_safety.md 1 KB
- references/postgres_performance_rules.md 2 KB
- references/schema_validation_protocol.md 1 KB
Versions
The database has no other skills named resonance-engineering-database.
Database snapshot: 13.11.2026 · package version e90877c623fe (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100sota-databases
State-of-the-art database engineering rules (2026) for designing, building, and auditing data layers. Covers engine selection, schema modeling, migrations, query and index craft, transactions and concurrency, reliability and scale, security, and vector/AI workloads. Use when… - 100database-engineering
End-to-end database engineering workflow for designing relational data models, writing schemas and migrations, reviewing constraints, creating indexes, optimizing queries, and hardening persistence behavior. Use when the user asks to design a database, create or change tables,… - 100designing-database-schemas
Process use when you need to work with database schema design. This skill provides schema design and migrations with comprehensive guidance and automation. Trigger with phrases like "design schema", "create migration", or "model database". - 100designing-database-schemas
Process use when you need to work with database schema design. This skill provides schema design and migrations with comprehensive guidance and automation. Trigger with phrases like "design schema", "create migration", or "model database". - 90superior-database
Design, implement, review, or repair database schemas, queries, indexes, transactions, migrations, and backfills with explicit integrity and rollout constraints. Use when the datastore behavior or data lifecycle is a primary part of the task. Do not use for routine persistence… - 100database-engineering
Use when designing database schemas, modeling relational or document entities, writing or optimizing SQL queries, planning zero-downtime database migrations, adding composite indexes, or debugging connection pooling.