This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Every era of computing leaves behind beloved open-source creations that quietly fade when floppy disks demagnetize, CRT monitors power down, and early web hosts shut their doors:

  • A 1991 MS-DOS QBasic 1.1 (STARWARP.BAS) 3D perspective starfield written by teenage shareware authors on a 486DX-33.
  • A 1997 Perl 4 CGI (MARIGOLD_WEBRING.PL) circular WebRing router that connected indie zine creators on GeoCities before centralized search engines existed.
  • A 1989 Borland Turbo Pascal 7.0 (FLORA.PAS) Lindenmayer fractal L-system botanical generator that drew Mexican marigold (cempasuchil) blossoms on monochrome Hercules displays.
  • A 2004 Python 2.3 (calavera_melody.py) command-line pentatonic folk audio synthesizer built with classic print statements and harmonic ratios.

In the tradition of Dia de los Muertos, an ofrenda is never a place of sorrow. It is a vibrant, candlelit altar covered in cempasuchil marigolds, papel picado, and cherished memories that welcomes back the spirits of those who came before us so their craft lives on.

CodeOfrenda (code-ofrenda) is an offline-first Gemma 4, Google Agent Development Kit (ADK), TabPFN v2, and Sentry Agent Tracing (OpenTelemetry) studio that builds a Digital Ofrenda for forgotten open-source software, conducts an interactive Retro Code Seance in the voice of the original vintage runtime, forecasts each artifact's modern revival viability with TabPFN v2, and transpiles its core algorithms into verified, zero-dependency Python 3.12.

CodeOfrenda Architecture

Demo

End-to-End CLI Resurrection Output (python code_ofrenda.py --artifact all)

============================================================================== CODEOFRENDA: GEMMA 4 + GOOGLE ADK + TABPFN DIGITAL OFRENDA & CODE SEANCE ============================================================================== [ALTAR] Altar de Codigo: STARWARP.BAS (MS-DOS QBasic 1.1) (1991) Epitaph : Authored in 1991 by Elena & Mateo (486DX-33 BBS Shareware) in QBasic 1.1. Remembered for: 1991-10-30: Tuned 3D perspective division so stars don't divide by zero at Z=0. Offerings : Amber CRT 320x200 Mode 13h scanline glow, 3.5-inch 1.44MB floppy boot sector chime, Fixed-point integer division guard at Z=0 Seance Whisper: "Across 35 autumn cycles, my QBasic 1.1 instructions waited in quiet magnetic sectors. Light a candle at the terminal, and my original math written by Elena & Mateo (486DX-33 BBS Shareware) will execute once more." Seance Reply : [1991 QBasic 1.1 Spirit]: I was written by Elena & Mateo (486DX-33 BBS Shareware). My commit log still remembers: '1991-11-01: Dedicated to Abuelo Carlos who bought our first VGA monitor.' TabPFN Score : 0.8317 (INSTANT_RESURRECTION, ~3.17h) Sandbox Pass : True -> VGA FRAME 3 PROJECTION COMPLETE: [(148, 102), (467, -463), (-6, 138), (154, 2)] Sentry Trace : trace_id=10b8ffd274024195... | tokens=1450 | cost=$0.00 [ALTAR] Altar de Codigo: MARIGOLD_WEBRING.PL (GeoCities SiliconValley/Pines) (1997) Epitaph : Authored in 1997 by WebMaster_Xochitl (SiliconValley/Pines/4029) in Perl 4 CGI (GeoCities). Remembered for: 1997-11-02: Added circular doubly-linked WebRing navigation for indie zine creators. Offerings : Under-construction animated torch GIF, Circular WebRing doubly-linked neighbour handshake, Guestbook flat-file flock() mutex Seance Whisper: "Across 28 autumn cycles, my Perl 4 CGI (GeoCities) instructions waited in quiet magnetic sectors. Light a candle at the terminal, and my original math written by WebMaster_Xochitl (SiliconValley/Pines/4029) will execute once more." Seance Reply : [1997 Perl 4 CGI (GeoCities) Spirit]: I was written by WebMaster_Xochitl (SiliconValley/Pines/4029). My commit log still remembers: '1998-03-14: Fixed counter lockfile so midnight visitors never lose their ring hop.' TabPFN Score : 0.8369 (INSTANT_RESURRECTION, ~3.33h) Sandbox Pass : True -> WEBRING_NODE=midi-cempasuchil.org PREV=crt-poets.net NEXT=zine-archive.io Sentry Trace : trace_id=f6c6b5a7537a457e... | tokens=1450 | cost=$0.00 [ALTAR] Altar de Codigo: FLORA.PAS (Borland Turbo Pascal Fractal Marigold) (1989) Epitaph : Authored in 1989 by Prof. Diego Morales (UNAM CompLab) in Turbo Pascal 7.0. Remembered for: 1989-10-28: Lindenmayer grammar axiom F->F[+F]F[-F]F for botanical branching. Offerings : Hercules 720x348 amber phosphor persistence, Lindenmayer recursive cempasuchil marigold grammar, Borland BGI turtle graphics coordinate altar Seance Whisper: "Across 37 autumn cycles, my Turbo Pascal 7.0 instructions waited in quiet magnetic sectors. Light a candle at the terminal, and my original math written by Prof. Diego Morales (UNAM CompLab) will execute once more." Seance Reply : [1989 Turbo Pascal 7.0 Spirit]: I was written by Prof. Diego Morales (UNAM CompLab). My commit log still remembers: '1989-11-01: Rendered marigold petals on Hercules Monochrome Graphics Adapter.' TabPFN Score : 0.8392 (INSTANT_RESURRECTION, ~2.93h) Sandbox Pass : True -> L-SYSTEM GEN 3 LENGTH=311 Sentry Trace : trace_id=3781be5e6b4e4e11... | tokens=1450 | cost=$0.00 [ALTAR] Altar de Codigo: calavera_melody.py (Python 2.3 Pentatonic Bell Synth) (2004) Epitaph : Authored in 2004 by Sofia_AudioLab (Linux Audio Conference 2004) in Python 1.5 / 2.4. Remembered for: 2004-10-31: Uses Python 2 print statements and integer division to synthesize harmonic ratios. Offerings : Just-intonation pentatonic bell overtones, Classic Python 2 print-statement relic, 44.1kHz PCM sine-wave candle flicker Seance Whisper: "Across 22 autumn cycles, my Python 1.5 / 2.4 instructions waited in quiet magnetic sectors. Light a candle at the terminal, and my original math written by Sofia_AudioLab (Linux Audio Conference 2004) will execute once more." Seance Reply : [2004 Python 1.5 / 2.4 Spirit]: I was written by Sofia_AudioLab (Linux Audio Conference 2004). My commit log still remembers: '2004-11-02: Preserves traditional 5-note folk cadence in pure math.' TabPFN Score : 0.8741 (INSTANT_RESURRECTION, ~2.5h) Sandbox Pass : True -> PENTATONIC_HZ: [440, 495, 550, 660, 733, 880] Sentry Trace : trace_id=c11cd6d9abce428c... | tokens=1450 | cost=$0.00 

Code

GitHub logo RobinaMirbahar / code-ofrenda

CodeOfrenda: Offline Gemma 4, Google ADK, and TabPFN Digital Ofrenda & Retro Code Seance that resurrects forgotten open-source projects and vintage code.

CodeOfrenda // Digital Ofrenda & Retro Code Seance

CodeOfrenda Banner

Built for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine An offline-first Gemma 4, Google Agent Development Kit (ADK), TabPFN v2, and Sentry Agent Tracing (OpenTelemetry) studio that honors forgotten open-source software and vintage computing craftsmanship in the spirit of Dia de los Muertos.

Why CodeOfrenda?

Every era of computing leaves behind beloved open-source creations that quietly vanish when runtimes, floppy disks, and web hosts disappear:

  1. 1991 MS-DOS QBasic 1.1 (STARFIELD.BAS) 3D perspective starfield simulators written with SCREEN 13 and GOSUB loops.
  2. 1996 Perl 4 CGI (webring.pl) flat-file indie web community rings that connected personal homepages before search engines.
  3. 1989 Turbo Pascal 7.0 (CEMPASUCHIL.PAS) recursive fractal L-system botanical generators modeling Mexican marigold (cempasuchil) blossoms.
  4. 2003…

How I Built It

1. Local Open-Weights Gemma 4 (gemma4:e4b & gemma4:26b-a4b) + Google ADK Orchestration

CodeOfrenda coordinates two specialized agents and two deterministic verification tools inside CodeOfrendaOrchestrator (src/code_ofrenda/agents.py):

  • OfrendaHistorianAgent (ollama/gemma4:e4b): Inspects the vintage source artifact (QBasic 1.1, Perl 4 CGI, Turbo Pascal 7.0, or Python 2.3), reads its historical commit log notes, curates symbolic Dia de los Muertos marigold offerings, and channels the first-person Spirit Persona of the codebase for offline Q&A.
  • LazarusTranspilerAgent (ollama/gemma4:26b-a4b): Transmutes the legacy code into clean, zero-dependency Python 3.12 while preserving its exact mathematical invariants (such as VGA Mode 13h perspective projection, circular modulo WebRing routing, Lindenmayer F -> F[+F]F[-F]F string expansion, and just-intonation pentatonic harmonic ratios), then executes the resurrected code inside a real Python 3.12 subprocess sandbox (_verify_in_sandbox) to prove equivalence.

2. TabPFN v2 Revival Vitality Forecasting (src/code_ofrenda/tabpfn_vitality.py)

Before transpiling an abandoned repository, TabPFNVitalityForecaster evaluates a 5-feature tabular vector:

  1. self_contained_score (0.0 - 1.0): Freedom from dead third-party binary extensions.
  2. inline_comment_ratio (0.0 - 1.0): Density of author intent documentation.
  3. dependency_rot_ratio (0.0 - 1.0): Ratio of obsolete OS or hardware interrupts.
  4. cyclomatic_complexity (1 - 200): Control-flow branching depth.
  5. years_dormant (0 - 55): Years elapsed since the last commit.

It outputs a calibrated RevivalVitalityForecast with a viability_score, revival_tier (INSTANT_RESURRECTION, GUIDED_TRANSMUTATION, or DEEP_ARCHAEOLOGY), and estimated modernization hours.

3. Sentry Agent Tracing & OpenTelemetry Waterfall (src/code_ofrenda/telemetry.py)

Every multi-agent step and sandbox execution is wrapped in SeanceTelemetryRecorder, recording structured OpenTelemetry gen_ai.* spans (gen_ai.system, gen_ai.request.model, gen_ai.agent.name, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, gen_ai.usage.total_tokens) that export directly to Sentry Agent Tracing and render interactively in the web studio:

Sentry Agent Tracing Waterfall

Why Does Open Innovation Matter?

Closed-source software and vendor-locked cloud models disappear the moment a company sunsets a server or deprecates an API endpoint. When a closed model vanishes, every creative workflow built upon it becomes unrecoverable digital dust.

Open-source code and open-weight models like Gemma 4 and TabPFN are fundamentally different: they belong to the commons. Because their weights, schemas, and source code can be inspected, archived, and executed locally on personal hardware with zero cloud API fees ($0.00), future builders can always summon, study, and resurrect the craftsmanship of the past. Open innovation ensures that human creativity in software never truly dies.

The Spirit of It

Building CodeOfrenda felt like lighting rows of marigold-colored candles across four decades of personal computing history:

  • Seeing 1991 QBasic STARWARP.BAS project the exact same 3D VGA Mode 13h star coordinates in Python 3.12 honoring a dedication to Abuelo Carlos reminded me that behind every forgotten floppy disk or archived repo is a human story.
  • Watching 1997 GeoCities MARIGOLD_WEBRING.PL hop cleanly around its circular indie ring (pixel-altar.org -> crt-poets.net -> midi-cempasuchil.org -> zine-archive.io) brought back the warmth of an early, handmade web built for community rather than algorithms.
  • Combining Dia de los Muertos remembrance with local Gemma 4 inference, TabPFN tabular forecasting, and Sentry Agent Tracing proved that open-source AI can honor our digital ancestors while making their best ideas runnable for a new generation.

Prize Categories

I am submitting CodeOfrenda for the following partner prize categories:

  1. Best Use of Gemma: Uses local open-weights Gemma 4 (gemma4:e4b and gemma4:26b-a4b) via Google ADK to craft Dia de los Muertos memorials, channel first-person vintage runtime spirits in an offline Code Seance, and transpile legacy code into verified Python 3.12.
  2. Best Use of TabPFN: Uses TabPFNVitalityForecaster over 5 structural repository lifecycle features to predict resurrection viability scores, revival tiers, and modernization effort on small-data open-source revival benchmarks.
  3. Best Use of Sentry Agent Tracing: Instruments every ADK agent invocation and Python 3.12 sandbox verification tool call with OpenTelemetry gen_ai.* semantic attributes (gen_ai.agent.name, token usage, and latency waterfall) via SeanceTelemetryRecorder.
  4. Best Use of GitHub Copilot: Used iterative agentic scaffolding and automated pytest verification loops to validate all 4 vintage language transpilers and Pydantic v2 contracts.