Inspiration
As AI code assistants like GitHub Copilot, Cursor, and Devin become powerful, they also introduce new risks like hallucinated code, broken dependencies, and unsafe autonomous actions. We have all faced this: asking AI to “rename a function across files,” only to have tests fail, or even worse, the AI accidentally delete real data in production.
We realized that enterprises need something more than a smart AI. They need a safety and governance system that ensures AI-generated changes are context-aware, compliant, and verifiable before they ever touch production. That realization became Reasoning System, a safety and reliability layer for autonomous AI code agents.
What it does
Reasoning System is a multi-layered platform that ensures AI-driven code changes are safe, governed, and fully auditable. It integrates 5 powerful layers that work together to make autonomous code evolution possible:
- Semantic Code Graph: Builds a full map of the codebase showing dependencies and usage relationships.
- Hallucination Detector: Checks AI-generated code for made-up or invalid references before applying changes.
- Policy Engine: Enforces organizational rules and approval workflows for risky operations.
- Sandbox Executor: Runs the AI’s proposed code in isolated environments to validate correctness.
- Audit Logger: Records every decision, test result, and approval for traceability and compliance. Together, these layers enable a simple but powerful goal: AI that can modify enterprise codebases autonomously, but safely.
How we built it
We built Reasoning System as a modular system, where each layer operates as an independent microservice communicating through FastAPI for scalability and clear separation of responsibilities.
The Semantic Code Graph layer forms the foundation. It uses Tree-sitter to parse source files, extract relationships between functions and modules, and store them in Neo4j for fast dependency lookups. Its API allows quick queries to find impacted files for any change request.
The Hallucination Detector ensures code safety by integrating the Anthropic Claude API as an “LLM-as-Judge.” It combines semantic validation with syntax parsing (AST) to detect hallucinated or invalid code before any change is applied.
The Policy Engine governs AI-driven actions using Open Policy Agent (OPA) and YAML-based rules. It enforces safety policies, blocks high-risk operations, and uses Slack integration for real-time human approvals.
The Sandbox Executor runs AI-generated code in isolated Docker containers, executes automated tests, and rolls back failed changes automatically to ensure reliability before deployment.
Finally, the Audit Logger records every event, approval, and test result into PostgreSQL with structured logs, while Grafana dashboards provide real-time visibility and compliance tracking.
All layers come together through a React + Tailwind CSS interface, giving users a clear view of dependencies, policy status, test results, and the overall refactoring workflow.
Challenges we ran into
- Context Limits: Managing large multi-file codebases exceeded typical LLM context windows. Solved by building a semantic graph and querying only relevant nodes.
- Hallucination Detection: Detecting subtle LLM hallucinations required combining syntax, semantic, and AI-judgment checks.
- Policy Definition Complexity: Designing flexible yet clear YAML rules for enterprise policies was tricky.
- Sandbox Speed: Running containerized tests for each change slowed early prototypes. We optimized with cached images and parallel execution.
- Audit Integrity: Ensuring logs are tamper-proof led us to experiment with Merkle-tree hashing and event versioning.
Accomplishments that we're proud of
- Built a fully working pipeline that goes from AI suggestion → validation → approval → sandbox testing → audit logging.
- Achieved zero hallucination failures on test projects using our three-layer validation.
- Integrated human-in-the-loop approval via Slack bridging AI autonomy with enterprise governance.
- Created a semantic visualization of function dependencies that wowed testers.
- Established a reusable framework for safe autonomous code agents something the industry urgently needs.
What we learned
- LLMs are powerful but must be paired with structure, rules, and validation to be reliable.
- Governance is not a blocker, it’s an enabler for enterprise AI adoption.
- Building autonomous systems is not about giving AI control; it’s about creating safe boundaries for it to operate in.
- Combining semantic understanding with policy enforcement unlocks true AI reliability.
What's next for Reasoning System
Next, we plan to expand Reasoning System with several powerful enhancements that make it more integrated, intelligent, and enterprise-ready. The Real-Time IDE Plugin will bring Reasoning System directly into VSCode and Cursor, giving developers instant feedback on policy violations and hallucination risks as they code.
A GraphQL API for Semantic Queries will enable dynamic exploration of code dependencies and relationships, making the semantic graph easily searchable and interactive.
We’ll develop a Fine-Tuned Internal Model, a smaller specialized LLM trained specifically for code structure verification and hallucination detection, improving both accuracy and speed.
Enterprise Connectors will integrate Reasoning System with key tools like GitHub Enterprise, Jira, and CI/CD pipelines, ensuring seamless adoption in real-world enterprise workflows.
Finally, a Production Rollout Mode will allow Reasoning System to automatically create and validate safe pull requests, enabling continuous, autonomous, and auditable code evolution within enterprise systems.
Built With
- anthropic
- azure
- claude
- docker
- fastapi
- google-gemini
- javascript
- kubernetes
- neo4j
- opa
- postgresql
- python
- rag
- react
- tree-sitter
- typescript



Log in or sign up for Devpost to join the conversation.