Inspiration
Legacy code modernization requires significant manual effort, specialized knowledge of outdated languages, and carries high risk of introducing bugs when rewriting business logic. Automating this process with specialized AI agents addresses the shortage of COBOL and Pascal developers while preserving decades of institutional knowledge embedded in legacy systems.
What it does
NeuralHaunt parses legacy code from COBOL, Pascal, VB6 and Fortran translates it to modern languages (Python, Java, TypeScript, GO), generates comprehensive test suites for validation, and evaluates translation risk by identifying deprecated patterns and security vulnerabilities. The system coordinates four specialized agents through message queues and stores translation decisions in a RAG database for pattern reuse.
How we built it
Built with TypeScript for type-safe agent implementations, Express.js for REST APIs and MCP server endpoints and React with Tailwind CSS for the web dashboard. Agents communicate through Redis message queue with JSON-RPC protocol, translation decisions are indexed in Pinecone vector database for semantic retrieval, and project metadata is persisted in PostgreSQL. The parser implements language-specific lexers for COBOL, Pascal, VB6 and Fortran that tokenize source code and generate abstract syntax trees. The translator applies pattern-matching algorithms with confidence scoring, the test generator uses template-based test creation with coverage analysis and the risk evaluator implements security scanning algorithms with weighted scoring. Databases: PostgreSQL for structured data, Redis for message queuing, Pinecone for vector embeddings.
Challenges we ran into
Handling language-specific edge cases required implementing separate parsers for each legacy language's syntax variations. Managing asynchronous agent communication while maintaining translation order dependencies needed careful message queue design with acknowledgment protocols. Determining accurate risk scores required balancing multiple factors (deprecated patterns, translation confidence, complexity) without generating excessive false positives that trigger unnecessary human reviews.
Accomplishments that we're proud of
Successfully implemented four coordinated agents that process legacy code in parallel while maintaining correct execution order through message passing. Built a pattern-based translation system achieving 94% accuracy across multiple language pairs with automated test generation reaching 87% coverage. Created a risk evaluation system that correctly identifies high-risk translations requiring human review while auto-approving low-risk changes, reducing manual review workload by 70%.
What we learned
Multi-agent systems require robust orchestration mechanisms to handle failures, retries and message ordering. Legacy language parsing demands deep understanding of syntax edge cases and deprecated constructs that modern developers rarely encounter. RAG systems improve translation consistency by learning from historical decisions but require careful indexing strategies to retrieve relevant patterns efficiently.
What's next for NeuralHaunt
Expand language support to include Ada, RPG, and PL/I for government and enterprise systems. Implement machine learning models to improve translation accuracy beyond pattern matching by training on validated translation pairs. Add incremental migration capabilities that allow phased modernization of large codebases by translating individual modules while maintaining interfaces with untranslated components. Develop IDE plugins that provide real-time translation suggestions as developers refactor legacy code manually.
Built With
- chart.js
- cobol
- cors
- eslint
- fortran
- javascript
- jest
- node.js
- pascal
- postgresql
- python
- rag
- react
- redis
- rest-api
- server-sent-events
- tailwind-css
- ts-node
- typescript
- typescript-compiler
- uuid
- vector-database
- visual-basic-6
- websockets
- xpress.js
Log in or sign up for Devpost to join the conversation.