A hackathon prototype: paste in legacy COBOL, JCL, or aging Java, and get back (per logical chunk of code):
- a plain-English business logic explanation
- dead-code / risk flags (unreachable branches, stale flags, discontinued products)
- a first-draft modernized translation (Java or Python)
- an honest confidence score
- a list of open questions a human reviewer must verify before trusting the translation
This is a copilot, not an autopilot. The tool is explicitly designed to surface uncertainty rather than hide it — that's the whole point of the "open questions" and confidence score fields.
legacy-code-assistant/
├── backend/ FastAPI + Claude API
│ ├── main.py API endpoints
│ ├── chunker.py splits legacy source into paragraphs/methods/steps
│ ├── claude_service.py prompt design + Claude API calls
│ └── requirements.txt
├── frontend/ React (Vite)
│ └── src/
│ ├── App.jsx
│ ├── App.css design system (legacy phosphor -> modern editor)
│ └── components/
└── sample_data/ synthetic COBOL + Java files for the demo
cd backend
cp .env.example .env
# edit .env and set ANTHROPIC_API_KEY=sk-ant-...
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000The API will be live at http://localhost:8000. Check http://localhost:8000/api/health.
cd frontend
npm install
npm run devOpen http://localhost:5173. The Vite dev server proxies /api requests
to the backend on port 8000 (see vite.config.js), so no CORS setup is
needed beyond what's already in main.py.
- Click Load sample → Premium Calc (or Proration Utils).
- Click Analyze legacy code.
- Expand a chunk to see the explanation, any risk flags, the legacy/modern split view, the confidence badge, and open questions.
The UI's split-panel layout is intentional, not decorative: the left panel uses an amber-phosphor terminal palette (legacy), the right panel uses a clean dark-editor palette (modern), and a gradient "migration rail" literally connects the two — visually staging the transformation the tool performs.
Ideas if you have extra time:
- Jira integration: auto-file a modernization ticket per chunk via Atlassian Rovo, pre-filled with the explanation + open questions.
- Repo-wide scan: accept a zipped repo, chunk every file, and produce a prioritized "riskiest modules first" report.
- "Explain like I'm new here" toggle: adjust explanation depth for a new hire vs. a senior engineer.