🚀 Inspiration

Legacy Python 2 code still runs critical infrastructure in finance, research, manufacturing, and internal tooling—but upgrading it is risky. Most migrations fail not because code doesn’t run, but because behavior subtly changes: integer division, iteration semantics, recursion limits, and implicit assumptions silently break systems.

Existing tools translate syntax. They do not verify intent.

VeriCode was inspired by a simple question:

“Can an AI prove that migrated code still behaves the same?”

That gap—trustworthy migration with evidence—is what we set out to solve.

🧠 What it does

VeriCode is an autonomous semantic migration & verification agent that:

Migrates Python 2 → Python 3 code

Detects syntax, semantic, and behavioral risks

Generates a Migration Contract (assumptions + invariants)

Autonomously creates verification test suites

Produces human-readable proof artifacts:

Risk Register

Change-by-change justification

Validation traces with pass/fail evidence

This is not a prompt wrapper. It is an orchestrated reasoning system that analyzes → migrates → verifies → reports.

🛠️ How we built it

Gemini 3 Pro (Google AI Studio) for deep reasoning over full code contexts

Agent pipeline architecture:

Static analysis (Py2 constructs & risks)

Controlled migration (no unnecessary modernization)

Autonomous test generation (PyTest / unittest)

Semantic verification & confidence scoring

Verification-first design: migration is rejected if behavior cannot be justified

Frontend: Vite + React + TypeScript for real-time visualization of agent decisions

Service layer: Gemini API orchestration with deterministic output structure

Every output is auditable. Nothing is “trust me bro.”

⚠️ Challenges we ran into

False confidence is dangerous → We forced the agent to flag uncertainty instead of hiding it

Python 2 edge cases (division, range, recursion) → Required explicit semantic contracts

Avoiding “LLM optimism” → Verification must be based on tests and invariants, not explanations

Hackathon constraint: → We scoped deeply instead of broadly (Python 2→3 only)

🏆 Accomplishments that we're proud of

Achieved 95–100% semantic fidelity across multiple migration tests

Generated autonomous verification suites without human input

Produced judge-readable proof reports, not just code

Built a real agent, not a chatbot

Aligned with Gemini 3 Pro’s strengths (long-context reasoning + orchestration)

📚 What we learned

Migration is a systems problem, not a syntax problem

Verification beats optimization

Judges care about trust, evidence, and impact

Gemini 3 Pro excels when used as a reasoning orchestrator, not a code generator

🔮 What's next for VeriCode

Expand beyond Python:

Python 3.6 → 3.12

Java 8 → 17

C++ legacy refactors

Add Marathon Agent mode for large codebases (10k+ LOC)

CI/CD integration for enterprise migration pipelines

Formal semantic diffing using symbolic execution

Dataset-backed confidence calibration

Built With

  • and
  • ast-analysis
  • control
  • for
  • github
  • google-ai-studio-(gemini-api)
  • pytest-based-semantic-verification
  • python
  • react-(vite)
  • typescript
  • version
Share this project:

Updates