NeuroCode – a structural IR engine for code (Infra for AI) (github.com)

🤖 AI Summary
NeuroCode is an open-source structural IR engine for Python code that combines a persistent, compiler-like Intermediate Representation (AST, modules, classes, functions, call graph, tests, entrypoints) with a “Neural IR” (embeddings attached to IR nodes). Unlike tools that operate on sliding text windows or heuristic patches, NeuroCode gives AI agents and editors a repository-wide, machine-readable model so LLMs can reason about cross-file refactors, call graphs, and non-local bugs rather than guessing from local context. Technically, NeuroCode persists structural IR and node-level embeddings, produces LLM-ready explanation and patch-planning bundles, and enforces a strict PatchPlan JSON protocol for deterministic patch application and machine-readable patch history. It exposes a CLI (neurocode ir/status/check/explain-llm/plan-patch-llm/patch-history) and a Python API (open_project().build_ir(), ensure_embeddings(), explain_llm(), plan_patch_llm(), apply_patch_plan()) and supports embedding providers (example: OpenAI text-embedding-3-small). The result is reproducible, auditable code changes driven by hybrid compiler+LLM workflows, improved semantic search, and more reliable automated repairs. Licensed Apache-2.0 and installable via pip, NeuroCode targets infrastructure-level tooling for scalable, verifiable AI-assisted development.
Loading comments...
loading comments...