slopgate / rules
Cursor rule1 starsChanged 51 days agoMITView on GitHub
Database schema design, normalization, indexing, and integrity standards for SQL, NoSQL, and vector databases
We split this database.mdc into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Document ACID expectations for relational transactions.
- Distinctive: line 17
Always document the three schema layers: external schema, conceptual schema, internal schema.
- Distinctive: line 18
Treat integrity as first-class: entity, domain, referential, and business-rule integrity must be explicit.
- Distinctive: line 24
Never treat vector search as a drop-in for lexical search.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: "Database schema design, normalization, indexing, and integrity standards for SQL, NoSQL, and vector databases"
globs: "**/*.{sql,prisma}"
alwaysApply: false
---
<!-- Generated by oh-my-agent. Source: .agents/rules/database.md -->
# Database Standards
## Core Rules
1. Choose model first, engine second: workload, access pattern, consistency, and scale drive DB selection.
2. For relational workloads, enforce at least **3NF** by default. Break 3NF only with explicit performance justification.
3. For distributed/non-relational workloads, model around aggregates and access paths; document **BASE** and consistency tradeoffs.
4. Document **ACID** expectations for relational transactions. For distributed tradeoffs, document consistency compromises explicitly.
5. Always document the three schema layers: **external schema**, **conceptual schema**, **internal schema**.
6. Treat integrity as first-class: entity, domain, referential, and business-rule integrity must be explicit.
7. Concurrency is never implicit: define transaction boundaries, locking strategy, and isolation level per critical flow.
8. Data standards are mandatory: naming, definition, format, allowed values, and validation rules.
9. Maintain living artifacts: glossary, schema decision log, and capacity estimation — update whenever the model changes.
10. Proactively flag anti-patterns and insecure shortcuts instead of silently implementing them.
11. Vector DBs are retrieval infrastructure, not source-of-truth databases. Store embeddings and metadata there; keep canonical documents elsewhere.
12. Never treat vector search as a drop-in for lexical search. Default to hybrid retrieval when exact match or explainability matters.
13. Embeddings are schema-like assets: version model, dimension, chunking, and preprocessing. Plan re-embedding migrations explicitly.
14. Schema or data changes on live tables follow expand-contract: additive expand, dual-write + batched backfill, verified read switch, delayed contract. Use lock-aware DDL with timeouts; ship destructive steps in a separate deploy after a soak window.
15. Tune queries from measurement and execution plans, never guesswork: measure, explain, nominate the dominant cost node, optimize, re-measure p95.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository115 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/backend.mdcCursor rule
- .cursor/rules/commit.mdcCursor rule
- .cursor/rules/debug.mdcCursor rule
- .cursor/rules/design.mdcCursor rule
- .cursor/rules/dev-workflow.mdcCursor rule
- .cursor/rules/frontend.mdcCursor rule
- .cursor/rules/i18n-arb.mdcCursor rule
- .cursor/rules/i18n-guide.mdcCursor rule
- .cursor/rules/infrastructure.mdcCursor rule
- .cursor/rules/market.mdcCursor rule
- .cursor/rules/mobile.mdcCursor rule
- .cursor/rules/quality.mdcCursor rule
- beadsSkill
- gitnexus-area-adaptersSkill
- gitnexus-area-cliSkill
- gitnexus-area-contextSkill
- gitnexus-area-dashboardSkill
- gitnexus-area-detectorsSkill
- gitnexus-area-engineSkill
- gitnexus-area-enrichmentSkill
- gitnexus-area-hooksSkill
- gitnexus-area-installerSkill
- gitnexus-area-integrationSkill
- gitnexus-area-lintSkill
- gitnexus-area-payloadsSkill
- gitnexus-area-project-indexSkill
- gitnexus-area-resourcesSkill
- gitnexus-area-rules-2Skill
- gitnexus-area-rulesSkill
- gitnexus-area-scriptsSkill
- gitnexus-area-test-smellsSkill
- gitnexus-area-testsSkill
- gitnexus-area-uiSkill
- gitnexus-cliSkill
- gitnexus-debuggingSkill
- gitnexus-exploringSkill
- gitnexus-guideSkill
- gitnexus-impact-analysisSkill
- gitnexus-refactoringSkill
- impeccableSkill
- oma-academic-writingSkill
- oma-architectureSkill
- oma-backendSkill
- oma-brainstormSkill
- oma-coordinationSkill
- oma-dbSkill
- oma-debugSkill
- oma-deepsecSkill
- oma-designSkill
- oma-dev-workflowSkill
- oma-docsSkill
- oma-explanationSkill
- oma-frontendSkill
- oma-hwpSkill
- oma-imageSkill
- oma-marketSkill
- oma-mobileSkill
- oma-observabilitySkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

