ArgusLabs

Tagline: Rewrites legacy COBOL one piece at a time while the old system keeps running. When old and new disagree, it asks the one person who knows, and their answer becomes a test.

Inspiration

Medicare lost $28.8B to improper payments last year through claims systems built on decades-old code. Everyone wants these systems replaced, and the rewrites keep failing: the FBI wrote off ~$170M on one. An LLM can translate COBOL in seconds, so translation isn't the problem. Knowledge is. The biggest question is if that odd truncation is a bug, or a rule a regulator depends on. The people who knew have left, and nobody wrote it down. ArgusLabs (after Argus, the hundred-eyed watchman) finds out what old software is supposed to do before replacing it.

What it does

ArgusLabs migrates a codebase one pocket at a time (a pocket is a cluster of programs that move together), on a real system: AWS CardDemo, a COBOL/CICS/VSAM/DB2 credit-card app with 46 programs in 15 pockets.

  • Map. Static analysis plus git history, never LLM guesses (LLMs recover dependencies at <18% accuracy). Then a sandboxed COBOL run proves which links actually fire.
  • Rank. Live traffic × isolation picks what moves first.
  • Agree. Nemotron reads each program, and its findings become versioned requirements that the right people approve. No requirements, no rewrite.
  • Rewrite + shadow. A Nemotron agent writes Java and tests it. Then every request runs through old and new side by side, and only the old one answers.
  • Ask. Each mismatch is triaged as noise (filtered), a defect (fixed silently) or an unmade decision. Only the last one pings a human: a one-click Slack card with the input, both outputs and the COBOL lines. Every answer becomes a test.
  • Cut over at 1% → 10% → 100% once the match rate clears 99% (100% on money paths), with automatic rollback.

All of it plays out on a live isometric map of the codebase. You watch pockets turn green as they reach Java, trace the blast radius of any change, and answer the question that's blocking a migration.

How we built it

TypeScript services, GnuCOBOL in Docker for the legacy side, Java 21 BigDecimal for exact COBOL money math, and a React UI with a hand-built SVG renderer (no graph library). Everything is deterministic: one validated config, a sim clock, and recorded/replayable LLM calls.

NVIDIA Nemotron: an agent, not a chatbot

No one ever prompts ArgusLabs. Nemotron workers claim jobs from the database and run multi-step workflows on their own:

  • Reader (Nemotron 3.5 Super). Gets a context pack for each program: source, copybooks, runtime-confirmed dependencies, neighbors sharing its data, and past decisions. It returns rules, suspected defects and questions. Any finding without a valid file:line citation is thrown out.
  • Rewrite harness (OpenHands on Brev). Nemotron plans, writes Java, compiles with javac, runs the golden-master and requirement tests, and fixes itself up to 3 times. Our MCP tool server lets it query the dependency graph, pull requirements, record traceability, and ask a human when a requirement contradicts the legacy code.
  • Triage (Nemotron 3.5 Lightning). Groups mismatches by root cause and writes every question twice, once for business readers and once for engineers.

The model that writes the code never grades it, and a small decision model (Jev) handles yes/no gates. On CardDemo, Nemotron caught interest being truncated instead of rounded and an empty fee stub, and asked about both instead of quietly "fixing" them.

SpacetimeDB: the whole backend is one database

No REST API, no queue, no server. Every process (parser, COBOL runtime, Nemotron workers, Slack bot, UI) is a SpacetimeDB client that subscribes and writes back through reducers. That gave us things that would otherwise take a week each:

  • Rules no service can bypass. The migration state machine and the cutover gate (match rate and approved, passing requirements) live in reducers.
  • Parallel agents for free. Lease reducers mean two Nemotron workers can never grab the same pocket.
  • Time in the database. A sim clock drives traffic and escalation, so a three-day escalation ladder replays in seconds.
  • Realtime by default. A Slack click is a reducer call, and the map's match rate jumps in the same instant.
  • Access control at the source. Sensitive pockets are served through views filtered by ctx.sender. If you can't see the code, you're never shown or asked about it.

8090: understand, then improve, then replace

8090 asked for tools that make old software easier to understand, improve, or replace. Doing them in that order is the point:

  • Understand. A proven dependency map and a visible blast radius: change CBTRN02C and programs that never call it light up through shared files.
  • Improve. A requirements engine grounded in requirements engineering. It flags vague words ("normally", "quickly"), keeps version history with diffs, shows conflicts side by side without auto-picking a winner, and previews a change's impact before approval. The result is the business-rules document these systems never had.
  • Replace. The Strangler Fig pattern, automated end to end.

The key insight is that the legacy system isn't ground truth. Old behavior wins by default, approved requirements override it, and money always goes to a person. Human time is treated as the scarcest resource: we ask for a decision, never an explanation; one answer settles a whole root cause; nothing is asked twice; we route by CODEOWNERS and git blame rather than LLM guesses (31% accurate); and unanswered questions escalate on a ladder.

Challenges we ran into

  • Noise inflates "99% match". Timestamps and IDs looked like real differences. We run two copies of the old code and filter out whatever differs between them.
  • Hidden coupling. CICS builds file names at runtime. Without resolving them, CardDemo's central account hub disappears from the graph.
  • A mainframe on a laptop. VSAM became indexed files, DB2 ran on PostgreSQL, and IBM runtime routines were stubbed.
  • Trusting an LLM. Citations or it didn't happen.

Accomplishments that we're proud of

Shadow testing, clustering and human-in-the-loop all exist separately. We built the first loop that closes on human answers, on real legacy code, with a map you actually want to explore.

What we learned

The hard part of modernization is knowledge, not code. People answer a button in seconds and ignore an essay for days. And putting the database at the center deleted half our architecture.

What's next

CICS online programs, PL/I and RPG, answers that open pull requests, Teams and Jira routing, and requirements enforced as CI checks so a recovered rule never regresses. Then a real claims system.

Built With

Share this project:

Updates

Submission history