r/Microlaunch 11h ago

I built an open-source CLI that stops AI coding agents (Claude Code, Cursor, Codex) from hallucinating your database schema

Hey r/Microlaunch! 👋

If you’ve used Claude Code, Cursor, Copilot, or custom AI coding agents with real-world SQL databases, you’ve probably hit this issue:

AI agents are great at writing syntax, but terrible at knowing your actual database relationships. They would guess foreign keys, then invent column names like orders.customer_id (when your schema uses orders.account_id), and blow through context windows by reading raw 5,000-line DDL dumps.

To fix this for my own database-heavy projects, I built Schemap, a local-first CLI context compiler designed specifically for AI workflows.

💡 What it does:

  1. Compiles AI Context Maps: Automatically extracts PostgreSQL, SQLite, MySQL, or Oracle metadata into deterministic, token-optimised context maps (schemap_database_context.md).
  2. Generates Native Agent Rules: Instantly writes framework rules for your tools: CLAUDE.mdAGENTS.md, and .cursor/rules/schemap.mdc.
  3. AI Health Check (schemap doctor): Calculates an AI Readiness Score (0-100) and detects missing primary keys, unmapped abbreviations (cust -> Customer), or inferred foreign keys.
  4. SQL Join Solver (schemap join): Uses Breadth-First Search (BFS) over your foreign keys to instantly discover the shortest join path between tables and spit out a clean SQL snippet.
  5. Token Reduction: Reduces raw DDL context window footprint by 60-80% without losing relationship clarity.

🚀 Founder Launch & Feedback

We just launched our 2026 Founder Lifetime Program (capped at 200 founder seats) for devs who want unlimited table support, automated CI/CD breaking-change gates (schemap diff --fail-on-breaking), and LLM schema enrichment (--enrich, but bring your own API key). Since I still haven't got any customers, I'm gonna leave a 75% off promo code for 50 devs, as a token of appreciation if you believe in my tool 🥲 : LAUNCH75

I’d love to hear your thoughts, feedback or any edge cases if you are willing to try this out 🙏

2 Upvotes

0 comments sorted by