AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
Schemap AI 코딩 에이전트용 스키마 컨텍스트 컴파일
Schemap compiles deterministic schema context for Cursor (.mdc), Claude Code (CLAUDE.md), and Codex (AGENTS.md). Stop hallucinated JOINs and cut token costs by 89%.
개발 도구Python · TypeScriptGitHub @alansyahmi온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Make your database understandable to AI coding agents. Schemap analyzes schemas, detects issues, maps relationships, and generates compact AI-ready context files for Claude Code, Codex, Cursor, and other AI tools.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Schemap
The local semantic compiler for AI agents working with real databases.
Compile schema semantics, relationships, and database invariants into deterministic agent context. Verify generated SQL before it executes.
⚡ The Architecture: Grounding → Generation → Verification
AI coding assistants (Cursor, Claude Code, Windsurf, Codex) are fluent in SQL syntax, but fail at production relational databases because raw schema DDL omits implicit operational invariants:
🛑 The Problem: The Hidden Traps of Naked Schema PromptsREADME 전문 보기 ↗AI coding assistants (Cursor, Claude Code, Windsurf, Codex) are fluent in SQL syntax, but fail at production relational databases because raw schema DDL omits implicit operational invariants:
SCHEMAP 4.0
┌─────────────────┐
│ Database Schema │
└────────┬────────┘
│ (Introspect tables, FKs, types)
▼
┌─────────────────────┐
│ Semantic Compiler │
│ │
│ • Entity Roles │
│ • Measure Units │
│ • Join Graphs │
│ • Tenant Invariants │
│ • Lifecycle Rules │
│ • Provenance Tags │
└─────────┬───────────┘
│
▼
GroundedPlan
│ (Provided to LLM via MCP or CLI)
▼
┌─────────────────────┐
│ AI Coding Agent │
│ (Claude, Cursor, │
│ Gemini, Codex) │
└─────────┬───────────┘
│
▼
Generated SQL
│
▼
┌─────────────────────┐
│ AST Policy Engine │
│ │
│ • Mutation blocking │
│ • Tenant validation │
│ • Soft-delete check │
│ • Cartesian hazard │
└─────────┬───────────┘
│
ALLOW / REJECT / RE-VALIDATE
│
▼
Database Execution
In production databases, queries fail not from syntax errors, but from missing invariants:
amount_cents), reporting $19,900.00 instead of $199.00 ($100\times$ metric distortion).deleted_at IS NOT NULL or is_deleted = TRUE) are counted as active data.org_id), leaking neighboring customer records.FROM invoices, plans) produce accidental Cartesian products.DELETE or DROP TABLE queries without execution safeguards.Schemap exposes three native MCP tools for Cursor, Claude Code, and Windsurf.
Add Schemap to your claude_desktop_config.json or .cursor/mcp.json:
{
"mcpServers": {
"schemap": {
"command": "uvx",
"args": ["schemap-tool", "mcp"],
"env": {
"DATABASE_URL": "postgresql://user:password@localhost:5432/production_db"
}
}
}
}
Zero YAML required. Schemap inspects the database connection locally and provides three tools:
| Tool | Phase | Function |
|---|---|---|
schemap_ground | Before writing SQL | Resolves target tables, foreign-key join paths, monetary measures, and tenant invariants with explicit provenance ([DECLARED] vs [INFERRED]). |
schemap_verify | Before executing SQL | Deny-by-default AST policy circuit breaker that blocks mutations (DELETE, DROP, UPDATE), Cartesian products, and tenant omissions. |
schemap_patch | Remediating SQL | Injects missing tenant and soft-delete filters, then re-validates the patched AST to ensure no hazards remain. |
For terminal workflows, scripts, and local pair-programming:
# 1. Ground an analytical question before writing SQL
schemap ground "What was Org 42's revenue last month?" --db "$DATABASE_URL" --tenant-id 42
# 2. Verify SQL before executing against production
schemap verify "SELECT * FROM orders" --db "$DATABASE_URL" --tenant-id 42
# 3. Patch missing invariants with safety re-verification
schemap patch "SELECT * FROM orders" --db "$DATABASE_URL" --tenant-id 42
Schemap maintains three canonical evaluation documents separating live model reasoning, controlled policy verification, and domain generalization:
schemap_verify blocked 2/2.DECLARED: Explicit constraints defined in DDL or configuration.INFERRED: Recovered via structural conventions (e.g. _cents, _id, timestamps).UNKNOWN: Flagged ambiguities (e.g., dual foreign keys between the same tables) requiring human declaration.Beyond real-time MCP grounding, Schemap includes tools for local repo maintenance:
schemap context compiles a token-compressed schemap_database_context.md.schemap agents generates synchronized CLAUDE.md, AGENTS.md, and .cursorrules.schemap doctor audits missing foreign keys, orphan tables, and naming consistency.Schemap is licensed under the MIT License.