OntoPrune is an ultra-lightweight (under 12ms on CPU) neuro-symbolic middleware for pruning context in coding scenarios involving local small language models (SLMs) and cloud large language models (LLMs). Its core idea is to convert multi-file source code into minimal typed dependency contracts before the model's attention computation, exposing only permitted methods and domain types to the model, thereby reducing the dilution of attention by irrelevant context.
Main capabilities include: reducing input tokens by about 60% in modular enterprise architectures; lowering first-token latency (TTFT) by about 62% on local CPU models (such as Ollama); achieving 100% functional test pass rate (Pass@1) across 24 independent sandbox runs; and preventing 100% of proprietary code leakage, because no internal dependency code lines are sent to external APIs. The project also provides a native MCP server (ontoprune-mcp) compatible with Claude Desktop, Cursor, Gemini CLI, or Antigravity IDE, exposing two tools, prune_context and verify_response; it also provides a command-line interface (CLI). Usage includes connecting to coding assistants via MCP configuration, or using the CLI for context pruning and verification. Applicable scenarios are local AI-assisted programming, code comprehension in multi-module projects, and code intelligence assistance in privacy-sensitive environments. Regarding limitations, the materials do not provide specific installation commands, complete CLI parameters, detailed supported language lists, pricing models, or complete platform compatibility information; some information is not yet available.