Inspiration
Billions of daily financial, payroll, and warehouse transactions still execute inside decades-old COBOL batch programs while the engineers who wrote those rules have retired. Most teams lack an easy way to inspect fixed-format COBOL sequence numbers, observe silent PIC 99 Y2K overflows or decimal truncations step by step, visualize GO TO spaghetti paths alongside unreachable "ghost" paragraphs, and verify byte-for-byte behavioral parity when porting logic to TypeScript or Python.
For the Resurrection category of Kiroween 2026, NecroBOL brings both COBOL-85 and the classic IBM 3270 phosphor green-screen back to life in a modern browser debugger and a live Kiro MCP server.
What it does
- Browser-Native COBOL-85 Lexer, Parser & Time-Travel Interpreter: Parses
IDENTIFICATION DIVISION,DATA DIVISION(WORKING-STORAGE SECTIONPIC 9/S9/X+VALUE), andPROCEDURE DIVISION(DISPLAY,MOVE,ADD,SUBTRACT,MULTIPLY,DIVIDE,COMPUTE,ON SIZE ERROR,IF/ELSE/END-IF,PERFORM N TIMES,PERFORM UNTIL,GO TO,ALTER,STOP RUN). Every execution step snapshots stdout and memory registers so users can scrub forward and backward (Step k / N) across mutatedWORKING-STORAGEfields. - Authentic IBM 3270 Experience: Supports selectable CRT phosphor palettes (3270 Green, 3278 Amber, Spectral Violet), CRT scanlines, and IBM 3270 PF shortcuts (
PF3Reset,PF5Execute Batch,PF8Step,PF9Exorcise & Transpile). - Exorcist Static Analyzer & Ghost Call Graph: Scans AST and control-flow reachability for 6 concrete legacy hazards:
CURSE-Y2K(2-digit year fields wrapping99 + 2 = 01),CURSE-ALTER,CURSE-GOTO,CURSE-GHOST-PARA(unreachable paragraphs),CURSE-OVERFLOW, andCURSE-PRECISION. Computes a0to100Haunting Score, lists click-to-jump line diagnostics, and renders an SVG Paragraph Control-Flow Graph highlighting ghost nodes andGO TOarcs. - Deterministic TypeScript/Python Modernizer with Byte-for-Byte Parity Proof: Emits structured TypeScript, Python 3, and a runnable Vitest parity test while comparing COBOL stdout against an independent pure TypeScript evaluation (
100% MATCH) without callingeval()ornew Function(). - Kiro MCP Mainframe Bridge (
necrobol-mainframe): Exposeslist_legacy_samples,analyze_cobol,execute_cobol, andtranspile_cobolover stdio JSON-RPC 2.0 using the exact compiledsrc/engine/bundle.
How we built it (with Kiro .kiro/ Workflows)
Every subsystem was built spec-first inside the tracked .kiro/ workspace directory:
- Steering (
.kiro/steering/):product.md,tech.md, andstructure.mdlocked in fixed-pointPICsemantics, zero-mock outputs, and zeroeval()execution safety. - Specs (
.kiro/specs/): Authored separaterequirements.md,design.md, andtasks.mdspecs forcobol-interpreter,exorcist-analyzer,modernizer-transpiler, andmcp-mainframe-bridge. - Agent Hooks (
.kiro/hooks/): Three automatedPostFileSavehooks automatically testsrc/engine/, rebuild and integration-testmcp-server/server.mjs, and enforcetsc --noEmit && npm run lint. - MCP (
.kiro/settings/mcp.json): Registersnecrobol-mainframe(node mcp-server/server.mjs) so coding agents can lint, execute, and transpile legacy.CBLprograms directly inside Kiro.
Challenges we ran into
- Handling
ADD WS-OPEN-YEAR WS-TERM-YEARS GIVING WS-MATURE-YEARaccurately when the preposition wasGIVINGdirectly after operands rather thanTO <field> GIVING <dest>, caught immediately by our Vitest Y2K rollover assertions (99 + 2->"01"). - Ensuring decimal precision analysis distinguished exact
PIC 9(6)V99multiplications (e.g.,0.08) from precision-losing 3-decimal factors (0.085), ensuring clean baseline archives genuinely score0/100(EXORCISED). - Keeping the browser compiler and Node MCP server synchronized via a single TypeScript engine (
npm run build:mcpvia Vite library mode).
Accomplishments that we're proud of
- Zero simulation: every runtime trace, truncation warning, call graph edge, generated file, and parity check executes a real deterministic COBOL-85 engine tested end-to-end across 4 Vitest suites (including live child-process JSON-RPC 2.0 stdio MCP calls).
- Instant judge verification directly on https://necrobol-kiroween-2026.web.app with 4 contrasting COBOL archives (
BANK-Y2K-1994,PAYROLL-CRYPT-1987,INVENTORY-1989, andLEDGER-EXORCISED-2026).
What's next for NecroBOL
- Expand support for indexed
OCCURStables, sequentialFDfile records, andCOPYcopybook resolution across multi-file legacy COBOL repositories via the MCP server.
Built With
- cobol
- firebase-hosting
- kiro
- mcp
- python
- react
- tailwindcss
- typescript
- vite
- vitest