Code synthesis through belief revision, mutation testing, and verification
A graph-spectral MCP server for verified code synthesis through belief revision
Curate-Ipsum bridges the gap between LLM-generated code (fast, plausible, unverified) and formally verified patches (slow, correct, trustworthy). It treats mutation testing as one component of a larger system for maintaining robust, self-healing codebase metadata that supports reachability analysis, symbolic execution, and automated test generation.
# PyPI
pip install curate-ipsum
# or with uv
uv pip install curate-ipsum
# Docker (includes baked-in embedding model)
docker pull ghcr.io/egoughnour/curate-ipsum:latest
Add to your claude_desktop_config.json:
{
"mcpServers": {
"curate-ipsum": {
"command": "uvx",
"args": ["curate-ipsum"]
}
}
}
Or with Docker (embedding model pre-loaded, no Python needed):
{
"mcpServers": {
"curate-ipsum": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/egoughnour/curate-ipsum:latest"]
}
}
}
Curate-Ipsum exposes 30 tools over the MCP stdio transport, organised into six groups:
Testing — run_unit_tests, run_integration_tests, run_mutation_tests, get_run_history, get_region_metrics, detect_frameworks, parse_region, check_region_relationship, create_region
Belief Revision — add_assertion, contract_assertion, revise_theory, get_entrenchment, list_assertions, get_theory_snapshot, store_evidence, get_provenance, why_believe, belief_stability
Rollback & Failure — rollback_to, undo_last_operations, analyze_failure, list_world_history
Graph-Spectral — extract_call_graph, compute_partitioning, query_reachability, get_hierarchy, find_function_partition, incremental_update, persistent_graph_stats, graph_query
Verification — verify_property (Z3/angr), verify_with_orchestrator (CEGAR budget escalation), list_verification_backends
Synthesis & RAG — synthesize_patch (CEGIS + genetic + LLM), synthesis_status, cancel_synthesis, list_synthesis_runs, rag_index_nodes, rag_search, rag_stats
Last Updated: 2026-02-08
| Component | Status |
|---|---|
| Multi-framework parsing (5 frameworks) | Complete |
| Graph Infrastructure (Spectral/Kameda) | Complete |
| Belief Revision Engine (AGM/Provenance) | Complete |
| Synthesis Loop (CEGIS/Genetic) | Complete |
| Verification Backends (Z3/angr) | Complete |
| Graph Persistence (SQLite/Kuzu) | Complete |
| RAG / Semantic Search (Chroma) | Complete |
LLMs produce code that is:
Current approaches either trust LLM output blindly or reject it entirely. Neither is optimal.
Use LLMs for cheap candidate generation, then invest computational resources to achieve formal guarantees:
LLM Candidates (k samples)
↓
Seed Population
↓
┌───────────────────────────┐
│ CEGIS + CEGAR + Genetic │ ← Verification loop
│ + Belief Revision │
└───────────────────────────┘
↓
Strongly Typed Patch
(with proof certificate)
| Traditional | Curate-Ipsum |
|---|---|
| Single tool, single language | Multi-framework orchestration |
| Flat file-level analysis | Hierarchical graph-spectral decomposition |
| Mutation score as output | Mutation testing as input to synthesis |
| No formal verification | CEGIS/CEGAR verification loop |
| Manual test writing | Automated patch generation |
| LLM-only | Curate-Ipsum |
|---|---|
| Trust model output | Verify model output |
| Single sample or best-of-k | Population-based refinement |
| No formal guarantees | Proof certificates |
| Stateless generation | Belief revision with provenance |
| Plausible code | Provably correct code |
| Traditional Synthesis | Curate-Ipsum |
|---|---|
| Hand-written sketches | LLM-generated candidates |
| Cold-start search | Warm-start from LLM population |
| No learning across runs | Totalizing theory accumulates knowledge |
| Single specification | Multi-framework implicit regions |
| Symbolic Execution | Curate-Ipsum |
|---|---|
| Path exploration only | Integrated with synthesis |
| Boolean constraint solving | Mathematical reformulation (SymPy) |
| Single-tool analysis | Graph DB + SMT + mutation orchestration |
| No code generation | Generates verified patches |
Graph-Spectral Code Decomposition
Belief Revision for Synthesis
Implicit Region Detection
Mathematical Constraint Reformulation
flowchart TB
subgraph MCP["MCP Interface"]
direction TB
subgraph Sources["Analysis Sources"]
direction LR
MUT["🧬 Mutation<br/>Orchestrator<br/><small>Stryker<br/>mutmut<br/>cosmic-ray</small>"]
SYM["🔬 Symbolic<br/>Execution<br/><small>KLEE · Z3<br/>SymPy</small>"]
GRAPH["📊 Graph<br/>Analysis<br/><small>Joern<br/>Neo4j<br/>Fiedler</small>"]
end
MUT --> BRE
SYM --> BRE
GRAPH --> BRE
BRE["🧠 Belief Revision Engine<br/><small>AGM Theory · Entrenchment · Provenance DAG</small>"]
BRE --> SYNTH
SYNTH["⚙️ Synthesis Loop<br/><small>CEGIS · CEGAR · Genetic Algorithm</small>"]
SYNTH --> |"counterexample"| BRE
SYNTH --> OUTPUT
OUTPUT["✅ Strongly Typed Patch<br/><small>Proof Certificate ·Type Signature<br/>Pre/Post Conditions</small>"]
end
LLM["🤖 LLM Candidates<br/><small>top-k samples</small>"] --> SYNTH
style MCP fill:#1a1a2e,stroke:#16213e,color:#eee
style Sources fill:#16213e,stroke:#0f3460,color:#eee
style MUT fill:#0f3460,stroke:#e94560,color:#eee
style SYM fill:#0f3460,stroke:#e94560,color:#eee
style GRAPH fill:#0f3460,stroke:#e94560,color:#eee
style BRE fill:#533483,stroke:#e94560,color:#eee
style SYNTH fill:#e94560,stroke:#ff6b6b,color:#fff
style OUTPUT fill:#06d6a0,stroke:#118ab2,color:#000
style LLM fill:#ffd166,stroke:#ef476f,color:#000
# Clone and install (dev)
git clone https://github.com/egoughnour/curate-ipsum.git
cd curate-ipsum
uv sync --extra dev --extra verify --extra rag --extra graph --extra synthesis
# Run the MCP server
uv run curate-ipsum
# Or run tests
make test # fast suite (no Docker/model needed)
make test-all # including integration tests
All configuration is via environment variables (see .env.example):
CURATE_IPSUM_GRAPH_BACKEND=sqlite # or kuzu
MUTATION_TOOL_DATA_DIR=.mutation_tool_data
MUTATION_TOOL_LOG_LEVEL=INFO
CHROMA_HOST= # empty = in-process, or localhost:8000
EMBEDDING_MODEL=all-MiniLM-L6-v2
For the full service stack (ChromaDB + angr runner):
make docker-up-verify # starts Chroma + angr via Docker Compose
MIT License - see LICENSE
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx curate-ipsumMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-egoughnour-curate-ipsum": {
"command": "uvx",
"args": [
"curate-ipsum"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencecurate-ipsumpypiCurate-Ipsum works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.