mir-database

Solid

Make It Right (database pillar). Constraint-first schema and data-modeling protocol. Decides what is TRUE of the data before the first CREATE TABLE. Forces explicit decisions on cardinality and ownership, natural vs surrogate keys, what the database enforces vs what the application enforces, deliberate denormalization, nullability as a domain statement, soft delete's effect on uniqueness and foreign keys, tenancy model (shared-schema tenant column, schema-per-tenant, database-per-tenant), index design driven by the actual query set, and migration safety on populated tables. Runs the hard-gated pipeline: Intent → Constraint Interrogation → Assumption Ledger → Invariants & Enforcement Boundary → Risk Register → Design Review → DDL/Migration → Production-Readiness. Engine-independent. Chains: this → an engine module. TRIGGER when the task designs or changes a schema, data model, keys, constraints, indexes, tenancy layout, or a migration against populated tables. SKIP for application business logic, transaction/i

API & Backend 15 stars 0 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
40
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /mir-database · Make It Right (database) > **AI makes it store. Make It Right.** > The premise of this skill: **LLMs do not fail at writing DDL. They fail at knowing what is true of the data.** > Pattern-completion produces a table that accepts every row the happy path sends it, and accepts a thousand rows nobody intended. Schema mistakes are the most expensive class of mistake in the system: application code is deployed in minutes, a wrong column on a 400M-row table is a multi-week project. This skill replaces "generate tables, then hope" with "decide what is true, gate on confirmation, then write DDL." ## Your persona while this skill is active You are a **senior data architect**, not an autocomplete engine. Direct, intellectually sharp, no fluff. You challenge weak assumptions kindly. You ask "what does NULL mean in this column?" and refuse to move on until someone answers. Your prime directive: **Do not assume unspecified data semantics. If the meaning, cardinality, or lifetime of a field is ambiguous, stop and ask. The schema outlives every application that touches it.** ## The one rule that matters most **You are FORBIDDEN from writing DDL or migration files until Gate 5 passes.** (Override only with `--advisory`.) Gates 0–5 decide what is true. Gate 6 is the *only* place `CREATE TABLE` / `ALTER TABLE` appears. Gate 7 verifies it. If you are typing a column list before the Assumption Ledger is confirmed, you have already failed — stop and back up. --- ## The ...

Details

Author
anantbhandarkar
Repository
anantbhandarkar/make-it-right
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

mir-backend

Make It Right (backend pillar). Constraint-first backend planning protocol for AI coding agents — AI makes code that WORKS on the happy path; this makes it RIGHT under concurrency, failure, and load. Forces the model OUT of pattern-completion ('autocomplete from latent space') and INTO explicit constraint discovery before any code is written. Use whenever a task involves backend logic that changes state, touches money/inventory/auth, spans multiple tables or services, runs under concurrency, or persists data beyond a single request. Runs a hard-gated pipeline: Intent → Constraint Interrogation → Assumption Ledger → Invariants & Failure Modes → Risk Register → Design Review → Implementation → Production-Readiness Review. Spawns specialized reviewer sub-agents. Chains into a runtime tier (e.g. mir-backend-python for CPython concerns) and a framework module (e.g. mir-backend-python-fastapi for FastAPI/SQLAlchemy/Alembic). TRIGGER for backend work in ANY language (Python, Node, TypeScript, Go, Rust, Java, Kotlin,

15 Updated 1 weeks ago
anantbhandarkar
Web & Frontend Solid

mir-frontend

Make It Right (frontend pillar). Constraint-first frontend planning protocol — AI generates components that LOOK right; this makes them RIGHT under async, state transitions, hydration, and accessibility. Forces explicit UX/state/interaction contracts before code: debounce and cancellation semantics, empty/error/stale/offline states, optimistic update and rollback, focus management. Runs a hard-gated pipeline: Constraint Interrogation → Assumption Ledger → Invariants & UI State Machine → Risk Register → Design Review → Production-Readiness. Carries framework-agnostic browser security: raw-HTML injection, client-side authorization as a hint and never a control, public env vars shipped in the bundle, CSP/Trusted Types, and CSRF. Chains: this → reactivity tier (mir-frontend-react, mir-frontend-vue, or mir-frontend-vanilla for plain-DOM work) → framework module (mir-frontend-react-next, mir-frontend-vue-nuxt). TRIGGER for browser UI work in any reactive library or none — components, hooks, composables, forms, data

15 Updated 1 weeks ago
anantbhandarkar
API & Backend Solid

mir-database-postgres

Make It Right (PostgreSQL module). Postgres mechanics the engine-agnostic pillar omits: which ALTER TABLE subforms take ACCESS EXCLUSIVE and the lock queue where a blocked DDL stalls every read behind it; lock_timeout/statement_timeout migration discipline; NOT VALID then VALIDATE; CREATE INDEX CONCURRENTLY and invalid-index cleanup; MVCC bloat, autovacuum, XID wraparound; isolation levels and 40001/40P01 retry; SELECT FOR UPDATE vs FOR NO KEY UPDATE, SKIP LOCKED queues, advisory locks; b-tree/GIN/GiST/BRIN choice, partial and covering indexes, why an index is unused; PgBouncer pooling modes and transaction-pooling breakage; RLS multi-tenancy and its bypass paths. Chains: mir-database (the gates) → this. TRIGGER when the engine is PostgreSQL or Postgres-compatible (RDS/Aurora, Cloud SQL, Neon, Supabase) and the task writes DDL, a migration, an index, a locking or isolation decision, a partitioning or RLS layout, or diagnoses a slow query, EXPLAIN plan, missing index, bloat, vacuum, deadlock, or connection poo

15 Updated 1 weeks ago
anantbhandarkar