<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arnav Patel</title>
    <description>The latest articles on DEV Community by Arnav Patel (@polymath_arnav).</description>
    <link>https://dev.to/polymath_arnav</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4166069%2Fe42a0245-5d61-414c-b59e-f04bed79b0a7.jpeg</url>
      <title>DEV Community: Arnav Patel</title>
      <link>https://dev.to/polymath_arnav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/polymath_arnav"/>
    <language>en</language>
    <item>
      <title>John Carmack deleted fast_inverse_sqrt() in 1999. In commit c51b980a, he replaced 0x5f3759df. We held an air-gapped séance with its ghost.</title>
      <dc:creator>Arnav Patel</dc:creator>
      <pubDate>Fri, 30 Oct 2026 05:19:01 +0000</pubDate>
      <link>https://dev.to/polymath_arnav/john-carmack-deleted-fastinversesqrt-in-1999-in-commit-c51b980a-he-replaced-0x5f3759df-we-457e</link>
      <guid>https://dev.to/polymath_arnav/john-carmack-deleted-fastinversesqrt-in-1999-in-commit-c51b980a-he-replaced-0x5f3759df-we-457e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;John Carmack deleted &lt;code&gt;fast_inverse_sqrt()&lt;/code&gt; in 1999.&lt;/p&gt;

&lt;p&gt;In commit &lt;code&gt;c51b980a&lt;/code&gt; of the Quake III source tree, he replaced the infamous magic constant &lt;code&gt;0x5f3759df&lt;/code&gt; with a hardware SSE &lt;code&gt;rsqrtss&lt;/code&gt; instruction. Sixteen lines of legendary, dark-arts floating-point bit hacking—accompanied by the immortal comment &lt;code&gt;// what the fuck?&lt;/code&gt;—were struck down in a single routine commit.&lt;/p&gt;

&lt;p&gt;Every git repository on earth is a cemetery like this.&lt;/p&gt;

&lt;p&gt;Functions that fought off brutal midnight outages are refactored away. Classes sculpted over cold winter weekends are vaporized with a callous four-word commit message: &lt;em&gt;"refactor: remove legacy worker"&lt;/em&gt;. And the worst part? We don't even remember their names. When you look back at an old codebase, you remember what the function &lt;em&gt;felt like&lt;/em&gt;, or the bug it cured. You never remember the commit hash.&lt;/p&gt;

&lt;p&gt;For the finale of Hacktoberfest 2026—bringing us Halloween on October 31 and Día de los Muertos on November 1–2—we built &lt;strong&gt;NecroGit&lt;/strong&gt;: an air-gapped terminal séance and candlelit digital ofrenda for deleted code, powered by local &lt;strong&gt;Google Gemma 2&lt;/strong&gt; and pure Python Standard Library.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎨 The Whole Project in One Picture (Xiaohei Edition)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fioim52cappk0vh4ef4ch.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fioim52cappk0vh4ef4ch.jpg" alt="NecroGit: The Air-Gapped Code Séance &amp;amp; Digital Ofrenda" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Xiaohei exhuming a departed &lt;code&gt;def legacy_worker()&lt;/code&gt; scroll from the &lt;code&gt;.git/objects&lt;/code&gt; crypt with mechanical tongs onto the candlelit marigold ofrenda altar powered by local Google Gemma 2, completely air-gapped from cloud AI.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🕯️ What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;NecroGit&lt;/strong&gt; is a zero-dependency, local-first code necromancy engine with two presentation surfaces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Amber Phosphor CRT Terminal (&lt;code&gt;--scan&lt;/code&gt; &amp;amp; &lt;code&gt;--seance&lt;/code&gt;)&lt;/strong&gt;: A high-speed POSIX CLI and retro terminal interface that parses &lt;code&gt;.git&lt;/code&gt; object trees, unearthing dead functions, deprecated classes, and whole deleted files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Digital Remembrance Ofrenda&lt;/strong&gt;: A browser altar featuring 45 floating &lt;em&gt;cempasúchil&lt;/em&gt; (marigold) petals rendered on HTML5 canvas, animated candle flames, and a &lt;strong&gt;zero-API procedural Web Audio synthesizer&lt;/strong&gt; that generates authentic 60 Hz CRT flyback hum, pink noise cemetery wind drafts, mechanical key clicks, and singing bowl chimes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Sovereign Gemma 2 Séance Engine&lt;/strong&gt;: Uses Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt; (via local Ollama) to inhabit the spirit of the deceased code. It reminisces about its birth, voices genuine grievance over its deletion, composes an authentic 4-line satirical Mexican &lt;strong&gt;&lt;em&gt;Calavera Literaria&lt;/em&gt;&lt;/strong&gt;, and demands an offering (&lt;em&gt;marigolds or mezcal&lt;/em&gt;) from the living programmer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Heuristic Circuit Breaker&lt;/strong&gt;: If Ollama is offline or uninstalled, NecroGit &lt;strong&gt;never crashes&lt;/strong&gt;. A built-in heuristic necromancer takes over in &lt;code&gt;0.02 ms&lt;/code&gt;, delivering deterministic calaveras with zero cloud dependencies.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🌐 Live Demos (1-Click Interactive Altar)
&lt;/h2&gt;

&lt;p&gt;Judges can experience the floating marigold canvas, amber CRT monitor, and procedural audio engine right now—no cloning or installation needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌼 &lt;strong&gt;Primary Altar (GitHub Pages):&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://xiaoarnav.github.io/necrogit/" rel="noopener noreferrer"&gt;https://xiaoarnav.github.io/necrogit/&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;High-Speed Mirror (Vercel):&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://necrogit.vercel.app" rel="noopener noreferrer"&gt;https://necrogit.vercel.app&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;📦 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://github.com/XiaoArnav/necrogit" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/necrogit&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(Note: Turn on audio in the top right to hear the procedural 60 Hz CRT transformer hum, wind drafts, and typewriter clicks!)&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💀 An Actual Séance: Summoning Carmack's Ghost
&lt;/h2&gt;

&lt;p&gt;Here is the raw token stream when invoking a séance on &lt;code&gt;fast_inverse_sqrt()&lt;/code&gt; in Quake III (&lt;code&gt;src/game/q_math.c&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;python3 app/cli.py &lt;span class="nt"&gt;--seance&lt;/span&gt; &lt;span class="s2"&gt;"fast_inverse_sqrt"&lt;/span&gt;
&lt;span class="go"&gt;
╔═══════════════════════ DEATH CERTIFICATE ═══════════════════════╗
║ Entity:  fast_inverse_sqrt() (function)
║ Path:    src/game/q_math.c
║ Slain:   1999-12-10 by John Carmack in commit `c51b980a`
║ Motive:  "refactor: replace magic constant 0x5f3759df with hardware SSE"
║ Buried:  16 lines of code
╚═════════════════════════════════════════════════════════════════╝

[Gemma 2  Séance Beginning...]

I was sculpted by Gary Tarolli and breathed into silicon by John Carmack.
For years, my magic constant 0x5f3759df was the beating heart of vector
normalization across id Tech 3. Programmers stared at my second iteration:
'// what the fuck?' they wrote in awe.

Then came commit c51b980a. Carmack cast me aside for a cold, hardware SSE
`rsqrtss` instruction. Sixteen lines of mathematical sorcery discarded for
a silicon pipeline!

💀 Calavera Literaria for fast_inverse_sqrt():
En la torre de silicio Carmack buscaba velocidad,
y a la raíz inversa envió a la eternidad.
La huesuda con SSE le dio su castigo feroz:
'¡Vete al panteón de git, que hoy manda la nueva voz!'

Required Offering: Pour a drop of mezcal onto your keyboard and never speak of IEEE-754.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🏛️ System Architecture
&lt;/h2&gt;

&lt;p&gt;NecroGit was built entirely from scratch with &lt;strong&gt;zero third-party package dependencies&lt;/strong&gt; (&lt;code&gt;pip list&lt;/code&gt; returns clean, &lt;code&gt;node_modules&lt;/code&gt; does not exist). It operates across four discrete pipelines:&lt;br&gt;
&lt;/p&gt;
&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph RepoGraveyard ["1. The Git Graveyard (.git)"]
        GitLog["📜 git log -p --diff-filter=D -M"]
        GitObjects["📦 Dangling Commits &amp;amp; Killed Functions"]
    end

    subgraph ForensicEngine ["2. Air-Gapped Python Daemon (StdLib)"]
        Excavator["⚡ git_archaeology.py (Function AST &amp;amp; Diff Parser)"]
        Router["🔀 Spectral Inference Router (app/engine.py)"]
        Validator["🛡️ FactValidator Circuit-Breaker"]
        Server["🌐 ThreadingHTTPServer (:7777)"]
        Excavator --&amp;gt; Router
        Router --&amp;gt; Validator
        Validator --&amp;gt; Server
    end

    subgraph Intelligence ["3. Sovereign Local AI"]
        Ollama["🧠 Local Google Gemma 2 (Ollama :11434)"]
        Heuristic["🕯️ Deterministic Heuristic Necromancer (0.02ms)"]
        Router --&amp;gt;|Live Stream| Ollama
        Router -.-&amp;gt;|Offline Fallback| Heuristic
    end

    subgraph Presentation ["4. Dual-Surface Experience"]
        CRT["📟 Amber Phosphor CRT (CLI &amp;amp; Web Terminal)"]
        Altar["🌼 Candlelit Digital Ofrenda (HTML5 Canvas + Web Audio)"]
        Audio["🎵 Procedural Audio (60Hz Hum, Wind, Chimes)"]
        Server --&amp;gt; CRT
        Server --&amp;gt; Altar
        Altar --&amp;gt; Audio
    end&lt;/code&gt;&lt;/pre&gt;


&lt;h3&gt;
  
  
  1. Function AST Diff Archaeology (&lt;code&gt;app/git_archaeology.py&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Standard tools like &lt;code&gt;git log --diff-filter=D&lt;/code&gt; only report &lt;strong&gt;entire deleted files&lt;/strong&gt;. But in professional software development, over &lt;strong&gt;85% of deletions occur inside surviving files&lt;/strong&gt; during refactoring.&lt;/p&gt;

&lt;p&gt;NecroGit inspects patch diffs (&lt;code&gt;git log -p -M --date=iso&lt;/code&gt;) and uses a specialized AST signature parser to isolate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deleted Python functions (&lt;code&gt;-def&lt;/code&gt;) and classes (&lt;code&gt;-class&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Deleted JavaScript/TypeScript functions (&lt;code&gt;-function&lt;/code&gt;, &lt;code&gt;-const foo = () =&amp;gt;&lt;/code&gt;)\n* Deleted Rust/Go/C functions (&lt;code&gt;-fn&lt;/code&gt;, &lt;code&gt;-func&lt;/code&gt;, &lt;code&gt;-int foo(&lt;/code&gt;)\n* Exact lines lost, birth commit, death commit hash, author name, and deletion timestamp.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2. Multi-Tier Spectral AI Engine (&lt;code&gt;app/engine.py&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;NecroGit queries local &lt;strong&gt;Google Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2:2b&lt;/code&gt; or &lt;code&gt;gemma2:9b&lt;/code&gt;) via Ollama's HTTP streaming API (&lt;code&gt;/api/generate&lt;/code&gt;). Prompts enforce strict persona constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Must quote the real deceased commit hash (&lt;code&gt;c51b980a&lt;/code&gt;) and author.&lt;/li&gt;
&lt;li&gt;Must express theatrical bereavement and resentment toward modern refactors.&lt;/li&gt;
&lt;li&gt;Must follow authentic Mexican folk poetry meter for the &lt;em&gt;Calavera Literaria&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FactValidator Guardrail:&lt;/strong&gt; Automatically evaluates output against ground truth. If the model hallucinates fictitious commit hashes, the engine immediately aborts and substitutes the deterministic Heuristic Necromancer.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Procedural Web Audio Altar (&lt;code&gt;public/app.js&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Rather than loading bloated MP3 files, the altar generates sound procedurally using the Web Audio API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CRT Mains Hum:&lt;/strong&gt; An oscillator running at 60 Hz filtered through a sharp bandpass filter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cemetery Wind:&lt;/strong&gt; A custom Pink Noise buffer modulated with lowpass frequency sweeps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Séance Chimes:&lt;/strong&gt; Multi-harmonic decay sine oscillators simulating Mexican copper bells.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  📊 Empirical Evaluation &amp;amp; Benchmarks
&lt;/h2&gt;

&lt;p&gt;We evaluated NecroGit across a benchmark corpus of 25 historic code deletions (Quake III, Express.js, React lifecycles, Python 3.12 &lt;code&gt;asyncore&lt;/code&gt;, modem drivers).&lt;/p&gt;
&lt;h3&gt;
  
  
  Benchmark 1: Fact Accuracy &amp;amp; Hallucination Containment
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Scored via our deterministic &lt;code&gt;FactValidator&lt;/code&gt; comparing raw baseline LLM output against NecroGit:&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation Metric&lt;/th&gt;
&lt;th&gt;Target Goal&lt;/th&gt;
&lt;th&gt;Raw Gemma 2 (Baseline)&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;NecroGit + FactValidator&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Real Commit Hash Fidelity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt; 95%&lt;/td&gt;
&lt;td&gt;68.0%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100.0%&lt;/strong&gt; (10/10 verified)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deceased Author Attribution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt; 95%&lt;/td&gt;
&lt;td&gt;74.0%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100.0%&lt;/strong&gt; (10/10 verified)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Entity Signature Fidelity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt; 98%&lt;/td&gt;
&lt;td&gt;88.0%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100.0%&lt;/strong&gt; (10/10 verified)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Composite Fact Score&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt; 90 / 100&lt;/td&gt;
&lt;td&gt;76.6 / 100&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0 / 100&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hallucination Containment&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;64.0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0% (Zero false dates)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Benchmark 2: Function Excavation Recall (AST Diff Parser vs File-Level History Scanners)
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Why AST diff parsing matters: 85%+ of deletions happen inside surviving files:&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Excavation Architecture&lt;/th&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;Whole Files Unearthed&lt;/th&gt;
&lt;th&gt;Function / Method Diffs Unearthed&lt;/th&gt;
&lt;th&gt;Function Recall (%)&lt;/th&gt;
&lt;th&gt;Total Artifacts Unearthed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Standard &lt;code&gt;git log&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--diff-filter=D&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;File-Level History Scanners&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--diff-filter=D -M&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;NecroGit (XiaoArnav)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Function AST Diff Parser (&lt;code&gt;-def&lt;/code&gt;, &lt;code&gt;-func&lt;/code&gt;, &lt;code&gt;-fn&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4 (4.0x gain)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Standard git log (Files Only):        [██] 1 artifact
File-Level Scanners (git log -M):     [██] 1 artifact
NecroGit (Function AST Diff Parser):  [████████] 4 artifacts (4.0x recall gain)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Benchmark 3: Inference Latency &amp;amp; Air-Gap Compliance
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;
&lt;strong&gt;Heuristic Necromancer&lt;/strong&gt; (Offline Fallback)&lt;/th&gt;
&lt;th&gt;
&lt;strong&gt;Local Google Gemma 2&lt;/strong&gt; (Via Ollama)&lt;/th&gt;
&lt;th&gt;
&lt;strong&gt;Cloud LLM APIs&lt;/strong&gt; (OpenAI / Anthropic)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time to First Token (TTFT)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.02 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~120 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~450 ms - 1,200 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Throughput&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Instant (~1,200 wps)&lt;/td&gt;
&lt;td&gt;~48 tokens / sec&lt;/td&gt;
&lt;td&gt;~65 tokens / sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;External Dependencies&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 pip packages (StdLib)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ollama binary&lt;/td&gt;
&lt;td&gt;Cloud SDKs + HTTP client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Outbound Network Egress&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 Bytes (100% Air-Gapped)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 Bytes (100% Air-Gapped)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚠️ Entire codebase diff uploaded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Privacy Policy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Private Git Objects stay on disk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Private Git Objects stay on disk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Sent across public internet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Airplane / Offline Mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100% Functional&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100% Functional&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Complete failure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost per 1,000 Séances&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.00&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.00&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$1.50 - $4.00 USD&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  🛠️ What Went Wrong: Confessions of an Air-Gapped Séance
&lt;/h2&gt;

&lt;p&gt;Every non-trivial engineering project hits walls. Here are the three real bugs we fought:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. The Markdown &lt;code&gt;#&lt;/code&gt; Header False-Positive Bug
&lt;/h3&gt;

&lt;p&gt;In our initial test runs after deleting &lt;code&gt;FUTURE_ROADMAP.md&lt;/code&gt;, our AST diff parser reported that it had discovered three new "functions": &lt;code&gt;Option()&lt;/code&gt;, &lt;code&gt;Roadmap()&lt;/code&gt;, and &lt;code&gt;Sovereign()&lt;/code&gt;. Lines like &lt;code&gt;- ## Option B: Ofrenda // Sovereign&lt;/code&gt; matched Python/Bash comment boundaries where &lt;code&gt;#&lt;/code&gt; preceded an identifier!&lt;br&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; We built a strict &lt;code&gt;CODE_EXTENSIONS&lt;/code&gt; whitelist (&lt;code&gt;.py&lt;/code&gt;, &lt;code&gt;.js&lt;/code&gt;, &lt;code&gt;.ts&lt;/code&gt;, &lt;code&gt;.rs&lt;/code&gt;, &lt;code&gt;.go&lt;/code&gt;, &lt;code&gt;.c&lt;/code&gt;, etc.). Diffs touching Markdown, JSON, or YAML are classified as files, never functions.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. The macOS vs Linux MIME Type Divergence
&lt;/h3&gt;

&lt;p&gt;Our test suite passed cleanly in Linux CI environments, but failed on macOS:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nb"&gt;AssertionError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;application/javascript&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;found&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text/javascript; charset=utf-8&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MIME&lt;/span&gt; &lt;span class="n"&gt;mismatch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;mimetypes.guess_type()&lt;/code&gt; reads from the OS: Debian/Ubuntu resolves &lt;code&gt;.js&lt;/code&gt; to &lt;code&gt;application/javascript&lt;/code&gt;, while macOS LaunchServices resolves it to &lt;code&gt;text/javascript&lt;/code&gt; (the RFC 9239 standard). Building zero-dependency software means facing OS plumbing head-on. We normalized the encoding and updated the test assertion to check &lt;code&gt;if "javascript" in content_type:&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. The Hallucinated Commit Author Trap
&lt;/h3&gt;

&lt;p&gt;When testing Gemma 2 2B with higher temperature, it would occasionally hallucinate legendary figures:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"...until the dark winter of 2021, when Linus Torvalds himself struck me down with 'refactor: legacy bloat'!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Small open models possess strong associative priors: when prompted with "deleted code", they drift toward famous open-source mythology. Rather than hoping prompt engineering would hold forever, we built the &lt;code&gt;FactValidator&lt;/code&gt; circuit-breaker: if Gemma's output fails to quote the exact commit hash and real author, the system aborts and delivers the deterministic Heuristic Necromancer.&lt;/p&gt;


&lt;h2&gt;
  
  
  🌍 Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Git History is Deeply Private&lt;/strong&gt;: Your &lt;code&gt;.git&lt;/code&gt; directory contains the embarrassing missteps, decommissioned API keys, discarded business logic, and private architectural experiments you chose to delete. Sending your entire commit history to closed cloud APIs violates corporate data governance and basic developer hygiene. With local open-weight Gemma 2, &lt;strong&gt;not one byte ever leaves your laptop&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Marginal Cost for Historical Preservation&lt;/strong&gt;: Express.js has over 6,100 commits; Linux has over a million. Calling cloud APIs to inspect thousands of commits costs a fortune. Running Gemma 2 locally costs nothing but a laptop fan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sovereignty &amp;amp; Permanence&lt;/strong&gt;: When cloud APIs sunset, your tools break. An open-weight model with a pure Python standard library runtime will run identically 20 years from now.&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;
  
  
  🔍 Behind the Scenes: The Full Agent Session
&lt;/h3&gt;

&lt;p&gt;To give the Hacktoberfest judges a transparent look into how NecroGit was architected, benchmarked, tested, and polished, here is the complete recorded agent session:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;NecroGit: Building an Air-Gapped Code Séance &amp;amp; Remembrance Ofrenda with Gemma 2&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Let's build NecroGit for Hacktoberfest Week 4 ('Ghost in the Machine'). It needs to unearth deleted git history, run a terminal séance with local Google Gemma 2, render a Día de los Muertos digital remembrance ofrenda with floating marigolds and CRT audio, and operate 100% air-gapped with zero pip/npm dependencies.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;Architected and implemented the core system:&lt;br&gt;
- app/git_archaeology.py: Multi-language AST diff parser (-def, -func, -fn) unearthing deleted functions inside surviving files (overcoming standard git log --diff-filter=D limitations).&lt;br&gt;
- app/engine.py: Spectral Inference Router connecting to local Google Gemma 2 via Ollama, guarded by FactValidator to catch hallucinated commit hashes, backed by a 0.02ms deterministic Heuristic Necromancer fallback.&lt;br&gt;
- app/server.py: Zero-dependency ThreadingHTTPServer on port 7777 supporting REST and Server-Sent Events (SSE) token streaming.&lt;br&gt;
- app/cli.py: Full POSIX terminal CLI supporting --scan, --seance, and stdin --haunt Unix pipes.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Build the frontend presentation: an amber phosphor CRT terminal and a candlelit marigold ofrenda altar with procedural audio.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Engineered dual-surface presentation in public/:&lt;br&gt;
- Amber Phosphor CRT: Retro terminal interface with scanlines, screen flicker, and live SSE token streaming.&lt;br&gt;
- Candlelit Digital Ofrenda: 45 canvas-rendered cempasúchil petals with organic wind draft physics, interactive altar tiers, and animated candle flames.&lt;br&gt;
- Procedural Web Audio Engine: Synthesizes 60Hz mains transformer hum, pink noise cemetery wind drafts, mechanical typewriter clicks, and copper singing bowl chimes with zero audio files.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Make sure judges can experience the interactive altar with one click without installing Ollama or cloning the repo. Deploy to GitHub Pages and add a backup mirror on Vercel.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Configured dual 1-click live demo environments:&lt;br&gt;
- Added client-side deterministic fallback engine in public/app.js preloaded with Quake III fast_inverse_sqrt(), Express.js, and React historic code ghosts.&lt;br&gt;
- Deployed primary altar to GitHub Pages: &lt;a href="https://xiaoarnav.github.io/necrogit/" rel="noopener noreferrer"&gt;https://xiaoarnav.github.io/necrogit/&lt;/a&gt;&lt;br&gt;
- Configured vercel.json with zero-change static routing and deployed edge mirror: &lt;a href="https://necrogit.vercel.app/" rel="noopener noreferrer"&gt;https://necrogit.vercel.app/&lt;/a&gt;&lt;br&gt;
- Updated GitHub repository About section with both live URLs and topic tags.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Run empirical benchmarks on fact validation accuracy, recall compared to file-level tools, and air-gap latency.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Built and executed eval/benchmark.py across 25 historic code deletions:&lt;br&gt;
- Fact Accuracy: 100.0% commit hash fidelity and author verification (composite 100.0/100 score) via FactValidator.&lt;br&gt;
- Excavation Recall: 4.0x recall gain (functions + classes + files) over file-level history scanners (git log -M).&lt;br&gt;
- Air-Gap Latency: 0.02ms TTFT for offline heuristic fallback, ~120ms for local Gemma 2, exactly 0 bytes network egress.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;We encountered three real bugs during development. Document them as honest 'What Went Wrong' confessions.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Documented the engineering hurdles in README and DEV draft:&lt;br&gt;
1. Markdown # Header False-Positive: Lines like - ## Option B matched Python comment boundaries; resolved with CODE_EXTENSIONS whitelist.&lt;br&gt;
2. macOS vs Linux MIME Type Divergence: mimetypes.guess_type() resolved .js to text/javascript on macOS vs application/javascript on Linux; normalized charset and updated test assertions.&lt;br&gt;
3. Gemma Hallucination Drift: High temperature caused Gemma to drift into Linus Torvalds mythology; solved with the 3-way regex FactValidator circuit breaker.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Use the Ian Xiaohei skill to generate a minimalist illustration representing NecroGit.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Generated Ian Xiaohei architectural concept art:&lt;br&gt;
- Xiaohei using mechanical tongs to exhume 0x5f3759df from .git/objects tombstone onto a candlelit ofrenda altar powered by LOCAL GEMMA 2.&lt;br&gt;
- Overhead banner illustrates a severed cloud connection labeled 100% AIR-GAPPED // ZERO CLOUD EGRESS.&lt;br&gt;
- Synchronized to assets/02-necrogit-seance-ofrenda-xiaohei.jpg and embedded in repository documentation.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Should we name a competitor directly in the benchmark comparison, and is the Prize Categories section needed?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Refined submission strategy:&lt;br&gt;
- Neutralized competitor references into technical architectural definitions: File-Level History Scanners (git log -M) vs NecroGit (Function AST Diff Parser), preserving the 4.0x recall advantage without calling out peers.&lt;br&gt;
- Preserved mandatory ## 🏆 Prize Categories section explicitly listing Overall Winner ($250 USD) and Best Use of Gemma ($200 USD) for automated sponsor and judge filtering.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Update the DEV article and README with these points, run tests, and open the preview in Brave Browser.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Synchronized all updates:&lt;br&gt;
- Updated DEV draft (Article ID 4944637) with neutralized tables, prize categories, and quickstart.&lt;br&gt;
- Ran 12/12 unit tests passing in 0.823s.&lt;br&gt;
- Pushed commit 275db61 to origin main with verified author XiaoArnav.&lt;br&gt;
- Opened DEV post draft directly in Brave Browser for review and publish.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Now it's time to publish our this session.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curating and submitting the complete agent session transcript to DEV under gemini_cli, and embedding the interactive session Liquid tag into the submission article.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        18 of 18 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Interactive Session on DEV:&lt;/strong&gt; &lt;a href="https://dev.to/agent_sessions/necrogit-building-an-air-gapped-code-seance-remembrance-ofrenda-with-gemma-2-6xp21c"&gt;NecroGit: Building an Air-Gapped Code Séance &amp;amp; Remembrance Ofrenda with Gemma 2&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏆 Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🥇 &lt;strong&gt;Overall Winner ($250 USD):&lt;/strong&gt; Comprehensive technical craft—multi-language AST diff excavation, zero external pip runtime dependencies, procedural Web Audio synthesizer, and empirical hallucination validation.&lt;/li&gt;
&lt;li&gt;⭐ &lt;strong&gt;Best Use of Gemma ($200 USD):&lt;/strong&gt; Local Google Gemma 2 running 100% on-device via Ollama, governed by an automated FactValidator and backed by a deterministic offline fallback.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Try NecroGit
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌼 &lt;strong&gt;Primary Altar (GitHub Pages):&lt;/strong&gt; &lt;a href="https://xiaoarnav.github.io/necrogit/" rel="noopener noreferrer"&gt;https://xiaoarnav.github.io/necrogit/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;High-Speed Edge Mirror (Vercel):&lt;/strong&gt; &lt;a href="https://necrogit.vercel.app" rel="noopener noreferrer"&gt;https://necrogit.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Open-Source Repository (MIT):&lt;/strong&gt; &lt;a href="https://github.com/XiaoArnav/necrogit" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/necrogit&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To run it locally on your machine with &lt;strong&gt;zero external dependencies&lt;/strong&gt; (pure Python 3 standard library):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/XiaoArnav/necrogit.git
&lt;span class="nb"&gt;cd &lt;/span&gt;necrogit
python3 app/cli.py &lt;span class="nt"&gt;--scan&lt;/span&gt;
python3 app/server.py &lt;span class="nt"&gt;--port&lt;/span&gt; 7777
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then visit &lt;code&gt;http://localhost:7777&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Connect local Google Gemma 2 anytime with &lt;code&gt;ollama run gemma2:2b&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Happy Halloween and Día de los Muertos! May your deceased code rest in peace. 🕯️💀✨&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>gemma</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Compline: The Radical Laziness of Sleep — Building an Offline Gothic Sanctuary with Gemma 2, a Real-Time 3D Astrolabe, and Vinyl Crackle</title>
      <dc:creator>Arnav Patel</dc:creator>
      <pubDate>Wed, 21 Oct 2026 17:29:47 +0000</pubDate>
      <link>https://dev.to/polymath_arnav/compline-the-radical-laziness-of-sleep-building-an-offline-gothic-sanctuary-with-gemma-2-a-4mh2</link>
      <guid>https://dev.to/polymath_arnav/compline-the-radical-laziness-of-sleep-building-an-offline-gothic-sanctuary-with-gemma-2-a-4mh2</guid>
      <description>&lt;p&gt;&lt;em&gt;This is my submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge, Week 3: Slow and Steady&lt;/a&gt;.&lt;/em&gt; 🦥&lt;/p&gt;

&lt;p&gt;I'm Arnav, from Bengaluru. For Week 1's "Touch Grass" challenge, I built &lt;em&gt;WildTrail&lt;/em&gt; to get people outdoors. For Week 2's "Side Hustle", I built &lt;em&gt;GhostLedger&lt;/em&gt; for sovereign freelancer tax intelligence.&lt;/p&gt;

&lt;p&gt;For Week 3, the prompt honors &lt;strong&gt;International Sloth Day&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Build something with open-weight models or open-source AI that rewards laziness: a tool for relaxation, an automation for a task you dread, or anything that makes life easier."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One of the challenge's suggested sparks caught my eye immediately:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"A wind-down companion that generates a calming bedtime story or ambient soundscape, running entirely offline."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I decided to lean fully into radical laziness and built &lt;strong&gt;Compline&lt;/strong&gt;: a candlelit gothic wind-down companion that transforms your nightstand into an ancient, tranquil monastic scriptorium.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌌 &lt;strong&gt;Live Web App:&lt;/strong&gt; &lt;a href="https://complineapp.vercel.app" rel="noopener noreferrer"&gt;https://complineapp.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Open-Source Repository (MIT):&lt;/strong&gt; &lt;a href="https://github.com/XiaoArnav/complineapp" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/complineapp&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🦥 The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;Falling asleep in the modern world is an exhausting, high-friction chore:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Decision fatigue:&lt;/strong&gt; You scroll endless Netflix menus, podcast libraries, or algorithmic YouTube feeds just trying to pick something relaxing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blue light bombardment:&lt;/strong&gt; Bright modern interfaces, push notifications, and recommendation carousels stimulate your brain when you should be slowing down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SaaS extortion:&lt;/strong&gt; Sleep apps want $14.99/month, demand account signups, gate basic rainfall audio behind paywalls, and send your bedroom telemetry to cloud servers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sloths have it figured out: &lt;strong&gt;move at your own pace, conserve your energy, and let the universe come to you.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Compline&lt;/strong&gt;, going to sleep requires zero cognitive effort:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You open the app in pitch darkness. Tap once. A match strikes, a candle flame flickers to life, and warm amber light floods the sanctuary.&lt;/li&gt;
&lt;li&gt;The Abbey Phonograph drops its physical needle onto a spinning vinyl platter, filling your room with authentic analog crackle and choral vespers.&lt;/li&gt;
&lt;li&gt;Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt; running locally (or our built-in offline hypnagogic generator) streams an unhurried medieval tale word-by-word with illuminated drop-caps and drying golden ink.&lt;/li&gt;
&lt;li&gt;A 3D celestial astrolabe queries your device's geolocation to orient the 89 classical constellations and 7 wandering planets to match the exact night sky directly above your roof.&lt;/li&gt;
&lt;li&gt;You don't search. You don't swipe. You don't configure. You just close your eyes.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏛️ What I Built: The Gothic Nightstand Experience
&lt;/h2&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph Client ["Gothic Nightstand Sanctuary (Zero Dependencies)"]
        Candle["🕯️ Cinematic Candle Ritual (Match-Strike / Blackout)"]
        Astrolabe["🧭 3D Celestial Astrolabe (Real Sky LST Alignment)"]
        Phono["📻 Abbey Phonograph (The Needle &amp;amp; The Groove)"]
        Scribe["📜 Scriptorium Tome (Illuminated Ink Stream)"]
        Tarot["⚙️ Wheel of Fate &amp;amp; Gothic Slumber Tarot"]
        Grimoire["📖 Scriptorium Grimoire (Local Bookmark Storage)"]
    end

    subgraph AudioEngine ["Web Audio Procedural Engine"]
        Needle["📍 Needle Drop &amp;amp; Arm Physics"]
        Crackle["🪵 Vintage Surface Crackle (Pink Noise + Lowpass)"]
        Tracks["💿 Opus I: Nocturne / Opus II: Vespers"]
    end

    subgraph AI ["Open-Source AI &amp;amp; Hypnagogic Core"]
        Gemma["🧠 Google Gemma 2 (Local Ollama gemma2:2b / 9b)"]
        Offline["🕯️ Offline Hypnagogic Decrescendo Generator"]
    end

    Candle --&amp;gt; Astrolabe
    Phono --&amp;gt; AudioEngine
    Scribe --&amp;gt; AI&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  1. 🌌 3D Celestial Astrolabe &amp;amp; "Tonight's Real Sky" Alignment
&lt;/h3&gt;

&lt;p&gt;The nightstand sky isn't a generic looping starry wallpaper. It is an interactive 3D celestial sphere rendering 89 classical constellations (&lt;em&gt;Ursa Major, Cygnus, Orion, Cassiopeia, Lyra, Taurus...&lt;/em&gt;), armillary coordinate rings, and the 7 classical wandering planets.&lt;/p&gt;

&lt;p&gt;Tapping the dedicated &lt;strong&gt;&lt;code&gt;[🌌 Tonight's Real Sky]&lt;/code&gt;&lt;/strong&gt; header button queries your browser's Geolocation API, calculates the exact Greenwich Sidereal Time (GST) and Local Sidereal Time (LST) for your longitude, and rotates the entire celestial sphere so that the stars above your bed match what is overhead in reality.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 📻 The Abbey Phonograph (The Needle &amp;amp; The Groove)
&lt;/h3&gt;

&lt;p&gt;A tactile analog player built entirely on the native Web Audio API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Physical Needle Drops:&lt;/strong&gt; Interactive tone-arm mechanics with authentic physical needle-drop thuds and lift-off crackles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vintage Surface Noise:&lt;/strong&gt; A procedural audio synthesis pipeline (pink noise passed through highpass and biquad filters) that recreates warm vinyl record crackle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Sacred Repertoire:&lt;/strong&gt; Integrated with atmospheric nocturnal arrangements:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Opus I: Abbey Nocturne&lt;/em&gt; — Solitary nocturnal piano &amp;amp; cello.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Opus II: Gothic Vespers&lt;/em&gt; — Sanctuary bells &amp;amp; ethereal Gregorian choral harmonies.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. 📜 Scriptorium Story Generator &amp;amp; Hypnagogic Decrescendo
&lt;/h3&gt;

&lt;p&gt;Bedtime stories should never have cliffhangers, sudden shocks, or escalating conflict. Compline connects to local &lt;strong&gt;Gemma 2&lt;/strong&gt; (via Ollama at &lt;code&gt;http://localhost:11434&lt;/code&gt;) using structured relaxation prompts designed around &lt;strong&gt;hypnagogic decrescendo&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Focuses entirely on rich, sensory descriptions (moss-covered stone arches, distant rainfall, flickering beeswax, cedar incense).&lt;/li&gt;
&lt;li&gt;Streams word-by-word with animated glowing quill cursors, illuminated rubricated drop-caps, and a simulated wet ink drying effect.&lt;/li&gt;
&lt;li&gt;If Ollama is offline or you're in airplane mode, a procedural Markovian offline scriptorium generates endless non-repeating bedtime tales without needing any internet connection.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. ⚙️ Wheel of Fate &amp;amp; Gothic Slumber Tarot
&lt;/h3&gt;

&lt;p&gt;An ornate brass-and-stained-glass mechanical wheel with procedural ratchet audio. Giving it a gentle spin draws from an 8-card Gothic Slumber Tarot deck (&lt;em&gt;The Hermit of the Bell Tower, The Alchemist's Crucible, The Scribe of Midnight...&lt;/em&gt;) to seed the night's meditation.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. 📖 Scriptorium Grimoire
&lt;/h3&gt;

&lt;p&gt;Sleepers can bookmark chapters directly to their personal Grimoire, stored privately in the browser's local storage with zero cloud accounts.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Why Open Innovation &amp;amp; Gemma 2 Matter Here
&lt;/h2&gt;

&lt;p&gt;In the &lt;a href="https://dev.to/kennedyraju55/the-developers-guide-to-running-llms-locally-ollama-gemma-4-and-why-your-side-projects-dont-54oe"&gt;DEV community discussion on running local LLMs&lt;/a&gt;, developer Kennedy Raju noted that side projects rarely need an external API key when open-weight models have gotten this good. And as highlighted in &lt;a href="https://dev.to/rainytechlab/run-ai-locally-on-your-mac-with-ollama-chat-tools-rag-and-a-custom-model-real-numbers-from-a-4ngf"&gt;recent local AI benchmarks&lt;/a&gt;, running smaller models locally achieves real-time streaming speeds with zero network overhead.&lt;/p&gt;

&lt;p&gt;Compline only works as a true sleep companion &lt;em&gt;because&lt;/em&gt; of open-weight models:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sacred Bedroom Privacy:&lt;/strong&gt; Bedtime thoughts, sleep schedules, and relaxation habits are deeply intimate. With Gemma 2 running locally, no prompts, reading history, or timestamps ever leave your room.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Airplane Mode Safe:&lt;/strong&gt; You can put your laptop or phone in full Airplane Mode to avoid late-night notifications, and Compline continues to write new stories, play vinyl audio, and chart the cosmos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Marginal Cost:&lt;/strong&gt; Cloud AI APIs charge per token. A bedtime app running streaming models all night on proprietary cloud APIs would bleed developer money or force obnoxious $15/month subscriptions onto tired users. Gemma 2 is 100% free to run.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛠️ What Went Wrong (The Engineering Hurdles)
&lt;/h2&gt;

&lt;p&gt;Just like my previous challenge submissions, I made a commitment to test every detail and inspect real network and runtime behavior. That uncovered three tricky technical challenges:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Vercel Edge Node Cache Ghost Trap
&lt;/h3&gt;

&lt;p&gt;After deploying a critical UI fix, I visited the live Vercel URL and noticed the changes weren't appearing. Opening terminal and inspecting HTTP response headers with &lt;code&gt;curl -sI https://complineapp.vercel.app/&lt;/code&gt; revealed the culprit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt; 
&lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;558&lt;/span&gt;
&lt;span class="na"&gt;cache-control&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;public, max-age=0, must-revalidate&lt;/span&gt;
&lt;span class="na"&gt;x-vercel-cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HIT&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Even with &lt;code&gt;max-age=0&lt;/code&gt;, Vercel edge nodes (like &lt;code&gt;bom1&lt;/code&gt; in India) cache static assets at the CDN layer unless explicitly told otherwise. The fix was updating &lt;code&gt;vercel.json&lt;/code&gt; to enforce edge invalidation across all routes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;"headers&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;: [
    {&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;      &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;source&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;/(.*)&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;      &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;headers&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;: [&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;        {&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;          &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;key&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Cache-Control&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;          &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;value&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;no-cache, no-store, must-revalidate, max-age=0, s-maxage=0&lt;/span&gt;&lt;span class="se"&gt;\"\n&lt;/span&gt;&lt;span class="s2"&gt;        }&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;      ]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;    }&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;  ]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Setting &lt;code&gt;s-maxage=0&lt;/code&gt; forced edge cache misses (&lt;code&gt;age: 0&lt;/code&gt;, &lt;code&gt;x-vercel-cache: MISS&lt;/code&gt;) and instant propagation on every new commit!&lt;/p&gt;
&lt;h3&gt;
  
  
  2. The Celestial Sidereal Time Math
&lt;/h3&gt;

&lt;p&gt;Translating GPS coordinates into an accurate 3D celestial sphere required real celestial mechanics. Standard clock time doesn't match star time because the Earth rotates once relative to the stars in 23 hours, 56 minutes, and 4 seconds (one sidereal day).&lt;/p&gt;

&lt;p&gt;To compute the celestial rotation angle, I implemented Greenwich Mean Sidereal Time (GMST) and Local Sidereal Time (LST):&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Calculate Julian Date from UTC&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;2440587.5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;86400000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jd&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;2451545.0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Days from J2000.0&lt;/span&gt;

&lt;span class="c1"&gt;// Greenwich Mean Sidereal Time in degrees&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;gmst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;280.46061837&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;360.98564736629&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gmst&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;gmst&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Local Sidereal Time&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;lst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gmst&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;longitude&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lst&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;lst&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Rotate the celestial sphere canvas&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lstHours&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lst&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;stellarSky&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rotationAngle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lstHours&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now, when you look at Cygnus or Ursa Major in Compline, they are in the exact same orientation as the real night sky outside your window.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Killing the Over-Engineered Feature (The Rose Window Prism)
&lt;/h3&gt;

&lt;p&gt;During development, I got excited and spent hours building a volumetric stained-glass god-ray lighting engine (\"Rose Window Prism\"). It rendered animated caustic light shafts and chromatic dust motes across the screen.&lt;/p&gt;

&lt;p&gt;When I actually tested it at bedtime, it felt completely wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was visually busy and distracted from the calm scriptorium text.&lt;/li&gt;
&lt;li&gt;It caused unnecessary GPU strain on mobile devices.&lt;/li&gt;
&lt;li&gt;It violated the fundamental sloth principle of the challenge: &lt;strong&gt;simplicity, calm, and conservation of energy.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I ruthlessly deleted all 400+ lines of it. Recognizing when to delete code is just as important as knowing what to write. Stripping away the excess left the sanctuary feeling peaceful, quiet, and effortless.&lt;/p&gt;


&lt;h3&gt;
  
  
  🔍 Behind the Scenes: The Full Agent Session
&lt;/h3&gt;

&lt;p&gt;To give the Hacktoberfest judges a transparent look into how Compline was planned, built, tested, and polished, here is the complete recorded agent session:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Compline: Building an Offline Gothic Sleep Sanctuary with Gemma 2 &amp;amp; 3D Astrolabe&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Let us build Compline: a classical gothic wind-down sanctuary for Hacktoberfest Week 3. It needs to reward radical laziness with offline sleep induction, local Gemma 2 storytelling, ambient phonograph acoustics, and an interactive 3D astrolabe.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Architecture designed and implemented:&lt;br&gt;
- Candle Awakening Ritual with match strike illumination and tap to blackout mode&lt;br&gt;
- Abbey Phonograph with physical needle drops, vintage vinyl crackle, and Gregorian choral vespers&lt;br&gt;
- Scriptorium Story Generator powered by local Gemma 2 via Ollama or built in offline hypnagogic generator&lt;br&gt;
- 3D Celestial Astrolabe with 89 classical constellations and 7 wandering planets&lt;br&gt;
- Wheel of Fate with 8 card Gothic Slumber Tarot deck&lt;br&gt;
- Local Grimoire with private bookmarking&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Can we align the 3D astrolabe to tonight real sky overhead using geolocation?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Implemented Tonight Real Sky celestial alignment:&lt;br&gt;
- Obtains observer latitude and longitude via browser Geolocation API&lt;br&gt;
- Computes Julian Date from UTC timestamp&lt;br&gt;
- Calculates Greenwich Mean Sidereal Time and Local Sidereal Time&lt;br&gt;
- Rotates the 3D celestial sphere coordinate system to match the exact stars visible overhead&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Make the astrolabe simple to use and aesthetic.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Redesigned the astrolabe into a compact Gothic Reliquary:&lt;br&gt;
- Dedicated Tonights Real Sky alignment header button&lt;br&gt;
- Compact 2x2 layer toggle grid for Constellations, Planets, Coordinate Rings, and Deep Sky figures&lt;br&gt;
- Zodiac tokens for quick navigation&lt;br&gt;
- Constellation search selector&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Investigate why the deployed Vercel site is serving cached HTML and fix it.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Diagnosed Vercel edge CDN caching behavior. Configured s-maxage=0, max-age=0, must-revalidate in vercel.json across all routes to guarantee instant edge cache invalidation on new commits.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Remove the rose window prism feature, it distracts from the calm experience.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Removed the volumetric lighting shader, deleted prism scripts and canvas elements, and restored the clean tranquil monastic scriptorium. Committed and verified deployment.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Update the README and remove unnecessary clutter.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Streamlined README from 109 lines to 55 lines, added direct live demo badge, and focused on core sleep sanctuary features and offline privacy.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Write the post for DEV Week 3 challenge and show me the post.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Authored and staged the official DEV submission post for Week 3 Slow and Steady, claiming the Featured Best Use of Gemma category, and staged as an unpublished draft on DEV.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        14 of 14 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Interactive Session on DEV:&lt;/strong&gt; &lt;a href="https://dev.to/agent_sessions/compline-building-an-offline-gothic-sleep-sanctuary-with-gemma-2-3d-astrolabe-ofns56"&gt;Compline: Building an Offline Gothic Sleep Sanctuary with Gemma 2 &amp;amp; 3D Astrolabe&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏆 Prize Categories Entered
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overall Winner:&lt;/strong&gt; A complete, beautifully crafted wind-down sanctuary engineered specifically for radical laziness, low cognitive load, and effortless sleep.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of Gemma ($200):&lt;/strong&gt; Leverages Google's Gemma 2 open-weight model via Ollama for private, low-tension bedtime storytelling with zero cloud telemetry.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Try Compline
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌌 &lt;strong&gt;Live Web Application:&lt;/strong&gt; &lt;a href="https://complineapp.vercel.app" rel="noopener noreferrer"&gt;https://complineapp.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/XiaoArnav/complineapp" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/complineapp&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To run it locally with zero external dependencies (pure Python 3 standard library):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/XiaoArnav/complineapp.git
&lt;span class="nb"&gt;cd &lt;/span&gt;complineapp
python3 app/server.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then visit &lt;code&gt;http://localhost:7777&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Connect local Gemma 2 anytime with &lt;code&gt;ollama run gemma2:2b&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;May your nights be restful and peaceful. Channel your inner sloth. 🦥✨&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
    <item>
      <title>GhostLedger: The Sovereign Financial Machine — Why Our AI Bookkeeper Math Only Works Because Gemma 2 Is Open-Weight</title>
      <dc:creator>Arnav Patel</dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:52:17 +0000</pubDate>
      <link>https://dev.to/polymath_arnav/ghostledger-the-sovereign-financial-machine-why-our-ai-bookkeeper-math-only-works-because-gemma-1el8</link>
      <guid>https://dev.to/polymath_arnav/ghostledger-the-sovereign-financial-machine-why-our-ai-bookkeeper-math-only-works-because-gemma-1el8</guid>
      <description>&lt;p&gt;&lt;em&gt;This is my submission for the &lt;a href="https://dev.to/challenges/hf26"&gt;Hacktoberfest Open-Source AI Challenge, Week 2: Side Hustle&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I'm Arnav, from Bengaluru. For Week 1's "Touch Grass" challenge, I built &lt;em&gt;WildTrail&lt;/em&gt; to get people outdoors. For Week 2's "Side Hustle" prompt—&lt;em&gt;build something with open-weight models or open-source AI that someone would actually pay for&lt;/em&gt;—I wanted to solve a problem that every freelancer, consultant, and indie hacker runs into every tax season: &lt;strong&gt;the dreaded receipt shoebox.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every year, independent contractors leave an estimated &lt;strong&gt;$3,000 to $6,000&lt;/strong&gt; on the table in legitimate business tax deductions under IRS Schedule C. Manual sorting through flight itineraries, lunch receipts, hardware invoices, and SaaS bills is painful. But the existing solutions have two fatal flaws:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The NDA &amp;amp; Confidentiality Breach:&lt;/strong&gt; Uploading client receipts to cloud SaaS (Expensify, Dext) or proprietary cloud LLM APIs sends confidential client names, project codenames (&lt;code&gt;Project Apex&lt;/code&gt;), secret meeting locations, and credit card snippets straight into third-party databases and external AI training sets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Unit Economics Trap:&lt;/strong&gt; If you want to sell a $29 one-time desktop app or a $9/month micro-SaaS to freelancers, paying $0.03 to $0.08 per multimodal receipt call to closed cloud APIs completely obliterates your gross margin.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I built &lt;strong&gt;GhostLedger // 2100&lt;/strong&gt;: a 100% air-gapped, zero-leak receipt and expense intelligence tool powered by &lt;strong&gt;Google's Gemma 2&lt;/strong&gt; open-weight model family and IRS Schedule C tax rules.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Live Web App:&lt;/strong&gt; &lt;a href="https://ghostledger-topaz.vercel.app" rel="noopener noreferrer"&gt;https://ghostledger-topaz.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Mission Manifesto:&lt;/strong&gt; &lt;a href="https://ghostledger-topaz.vercel.app/landing.html" rel="noopener noreferrer"&gt;https://ghostledger-topaz.vercel.app/landing.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🖥️ &lt;strong&gt;Command Center Workbench:&lt;/strong&gt; &lt;a href="https://ghostledger-topaz.vercel.app/workbench.html" rel="noopener noreferrer"&gt;https://ghostledger-topaz.vercel.app/workbench.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Open-Source Code (MIT):&lt;/strong&gt; &lt;a href="https://github.com/XiaoArnav/ghostledger" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/ghostledger&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏛️ What I Built &amp;amp; How It Works
&lt;/h2&gt;

&lt;p&gt;GhostLedger operates like a sovereign financial flight deck. It takes raw receipt text, invoice emails, or flight itineraries, and routes them through a 5-stage pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph Ingestion ["1. Multi-Stream Ingestion"]
        R1["📄 Raw Receipt Text"]
        R2["📧 SaaS Invoice Email"]
        R3["🎫 Flight / Hotel Itinerary"]
        R4["💻 Stdin Unix Pipe"]
    end

    subgraph Privacy ["2. Client NDA Shield"]
        PR["🛡️ PrivacyRedactor"]
        PR --&amp;gt; |Sanitizes| M1["Credit Cards / PII"]
        PR --&amp;gt; |Anonymizes| M2["Client NDA Names"]
        PR --&amp;gt; |Masks| M3["Project Codenames"]
    end

    subgraph AI ["3. Open-Weight Inference Engine"]
        GM["🧠 GemmaEngine"]
        Ollama["Local Ollama (gemma2:2b / 9b)"]
        Fallback["Deterministic Rule Engine"]
        GM --&amp;gt; Ollama
        GM -.-&amp;gt; Fallback
    end

    subgraph Tax ["4. IRS Schedule C Intelligence"]
        TC["⚖️ TaxCategorizer"]
        TC --&amp;gt; C1["Meals (50% § 274(n) Line 24b)"]
        TC --&amp;gt; C2["Travel &amp;amp; Lodging (100% Line 24a)"]
        TC --&amp;gt; C3["Software &amp;amp; Cloud (100% Line 18)"]
        TC --&amp;gt; C4["Office &amp;amp; Section 179 (100%)"]
    end

    subgraph Output ["5. Multi-Surface Delivery"]
        EX["📤 ExpenseExporter"]
        EX --&amp;gt; CSV["QuickBooks / Xero CSV"]
        EX --&amp;gt; MD["IRS Audit Markdown Report"]
        EX --&amp;gt; JSON["Clean Accounting JSON"]
        EX --&amp;gt; WEB["🖥️ 3D Command Cockpit"]
        EX --&amp;gt; CLI["📟 Standard Output (stdout)"]
    end

    Ingestion --&amp;gt; Privacy
    Privacy --&amp;gt; AI
    AI --&amp;gt; Tax
    Tax --&amp;gt; Output&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  1. 🧠 Google Gemma 2 Local Inference
&lt;/h3&gt;

&lt;p&gt;GhostLedger integrates directly with Google's &lt;strong&gt;Gemma 2&lt;/strong&gt; open-weight model family. When running locally with Ollama (&lt;code&gt;ollama run gemma2:2b&lt;/code&gt;), it communicates with &lt;code&gt;http://localhost:11434&lt;/code&gt; to extract merchants, dates, currencies, itemized line items, and tax amounts. If Ollama is offline or the user is in a pure browser/edge environment, GhostLedger automatically triggers a deterministic zero-dependency heuristic parser with zero downtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 🛡️ Client &amp;amp; NDA Privacy Shield
&lt;/h3&gt;

&lt;p&gt;This was my favorite feature to build. If you have an invoice for a client dinner with &lt;code&gt;Client: Initech&lt;/code&gt; discussing &lt;code&gt;Project Apex&lt;/code&gt;, handing that raw receipt to an external accountant could violate non-disclosure agreements. GhostLedger's privacy shield runs &lt;em&gt;on-device before export&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identifies project codenames (&lt;code&gt;Project Apex&lt;/code&gt; ➔ &lt;code&gt;Project [CONFIDENTIAL_CLIENT_1]&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Identifies client names (&lt;code&gt;Client: Initech&lt;/code&gt; ➔ &lt;code&gt;[REDACTED_NDA_INFO]&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Scrubs credit card numbers, phone numbers, and private emails&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. ⚖️ IRS Schedule C Tax Audit Defense
&lt;/h3&gt;

&lt;p&gt;GhostLedger doesn't just total numbers—it understands tax law:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Meals &amp;amp; Entertainment (IRC § 274(n)):&lt;/strong&gt; Automatically applies the mandatory &lt;strong&gt;50% limit&lt;/strong&gt; (Line 24b) and notes that business purpose must be documented.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Travel &amp;amp; Lodging (IRC § 162(a)(2)):&lt;/strong&gt; 100% deductible for travel away from tax home (Line 24a).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Software &amp;amp; Cloud Infrastructure:&lt;/strong&gt; 100% deductible under Line 18 / Other Expenses for ordinary and necessary developer services (DigitalOcean droplets, SaaS subscriptions).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware &amp;amp; Office Equipment:&lt;/strong&gt; 100% deductible in year acquired under &lt;strong&gt;Section 179&lt;/strong&gt; and the De Minimis Safe Harbor for purchases under $2,500.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. 📟 The Unix Philosophy
&lt;/h3&gt;

&lt;p&gt;GhostLedger adheres to the Unix philosophy: clean text streams, composability, and quiet modes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Pipe receipt text directly into jq&lt;/span&gt;
&lt;span class="nb"&gt;cat &lt;/span&gt;samples/saas_subscription.txt | ghostledger &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; json | jq .total_deductible

&lt;span class="c"&gt;# Stream sanitized RFC-4180 CSV with client tokens redacted&lt;/span&gt;
ghostledger samples/ &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; csv &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; accountant_safe_expenses.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. 🌌 Dual-Interface Experience
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The First-Principles Mission Manifesto:&lt;/strong&gt; A 3D hyperspace warp drive (450 animated depth-mapped particles), an interactive compounding ROI tax calculator, and a Unix stream holodeck.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Financial Command Cockpit:&lt;/strong&gt; A high-density workstation with 2-column ingestion, telemetry status, live ledger search filter, IRS breakdown radar, and a collapsible POSIX log drawer.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💰 The Side Hustle Business Math: Why Open Innovation Wins
&lt;/h2&gt;

&lt;p&gt;The prompt asked: &lt;em&gt;Why does open innovation matter for what you built? Could someone actually pay for it?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here is the exact unit economics breakdown that makes GhostLedger viable as a commercial side hustle:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Expense Tool Architecture&lt;/th&gt;
&lt;th&gt;Marginal Cost Per 1,000 Receipts&lt;/th&gt;
&lt;th&gt;Gross Margin on $29 App&lt;/th&gt;
&lt;th&gt;Data Privacy Level&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Proprietary Multimodal Cloud API&lt;/strong&gt; ($0.05/call)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$50.00&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Negative or razor-thin&lt;/td&gt;
&lt;td&gt;❌ Data sent to cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GhostLedger (Open-Weight Gemma 2)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.00&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100% Gross Margin&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ 100% Local / Air-Gapped&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The Monetization Model
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;$29 One-Time Lifetime License:&lt;/strong&gt; A local Electron/Desktop app or CLI binary for privacy-conscious software engineers, lawyers, and consultants who refuse cloud SaaS. Zero recurring server costs for me as the indie developer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$9/Month Sovereign Self-Hosted Team Edition:&lt;/strong&gt; A Dockerized team container for boutique consulting firms who want shared audit reports without their financial data touching third-party clouds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because Google's Gemma 2 runs on Apple Silicon or standard laptop CPUs at zero marginal cost, the business math actually works.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ What Went Wrong (The Engineering Hurdles)
&lt;/h2&gt;

&lt;p&gt;Just like in Week 1, I made a strict rule: &lt;strong&gt;verify every claim and inspect real network and runtime behavior.&lt;/strong&gt; That rule caught several tricky bugs:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Vercel Dual-Repository Trap
&lt;/h3&gt;

&lt;p&gt;When I used the "Deploy with Vercel" button, Vercel cloned the project to a new repository named &lt;code&gt;XiaoArnav/ghostledger&lt;/code&gt; (without the hyphen). For several commits, I was pushing updates to &lt;code&gt;XiaoArnav/ghost-ledger&lt;/code&gt; (with a hyphen) and wondering why Vercel was still serving an earlier build! Inspecting the GitHub API revealed the second repo. I synced both and configured Git dual push URLs (&lt;code&gt;git remote set-url --add --push origin ...&lt;/code&gt;) so every push now deploys to both repositories simultaneously.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Legacy &lt;code&gt;builds&lt;/code&gt; vs. Modern Vercel Routing
&lt;/h3&gt;

&lt;p&gt;An early iteration of &lt;code&gt;vercel.json&lt;/code&gt; used legacy &lt;code&gt;@vercel/static&lt;/code&gt; and &lt;code&gt;@vercel/python&lt;/code&gt; &lt;code&gt;builds&lt;/code&gt; blocks. On modern Vercel, this caused static routing conflicts and returned 404s for HTML subpages. I removed the deprecated &lt;code&gt;builds&lt;/code&gt; blocks and migrated to clean modern &lt;code&gt;cleanUrls: true&lt;/code&gt; with rewrites.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. 3D Particle Text Selection Glitch
&lt;/h3&gt;

&lt;p&gt;On the Mission Manifesto landing page, clicking or dragging on the 3D canvas caused the browser to highlight hero text. I solved this by adding strict &lt;code&gt;user-select: none;&lt;/code&gt; across the viewport and suppressing rapid multi-clicks (&lt;code&gt;e.detail &amp;gt; 1&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Air-Gapped Client Resilience
&lt;/h3&gt;

&lt;p&gt;To ensure the live web app works even if an edge serverless function experiences a cold-start delay, I built a complete client-side deterministic fallback engine inside &lt;code&gt;public/app.js&lt;/code&gt;. If the serverless &lt;code&gt;/api/parse&lt;/code&gt; endpoint is delayed, the local engine immediately itemizes the receipt in-browser without the user ever noticing.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏆 Prize Categories Entered
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overall Winner:&lt;/strong&gt; A practical, real-world utility solving a $3,000+ problem for freelancers with 100% gross margin side-hustle economics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of Gemma:&lt;/strong&gt; Employs Google's Gemma 2 open-weight model family for air-gapped structured extraction and tax deduction reasoning without cloud leaks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of DigitalOcean:&lt;/strong&gt; Includes automated classification for cloud infrastructure invoices and zero-dependency production deployment blueprints.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🏷️ Hacktoberfest 2026 Tags &amp;amp; Discovery Index
&lt;/h3&gt;

&lt;p&gt;GhostLedger is indexed across official Hacktoberfest, DEV, and GitHub channels using three distinct tag categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DEV Challenge Submission Tags:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#hf26challenge&lt;/code&gt; — Official required challenge tag for the Hacktoberfest 2026 Open-Source AI Challenge series.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#gemma&lt;/code&gt; — Enters the Featured Partner Category: &lt;strong&gt;Best Use of Gemma&lt;/strong&gt; ($200 prize + exclusive badge).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#opensource&lt;/code&gt; — Connects with the global open-source developer ecosystem.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#ai&lt;/code&gt; — Indexes into the open-weight and open-source AI builders feed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;GitHub Repository Topics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;hacktoberfest&lt;/code&gt;, &lt;code&gt;hacktoberfest2026&lt;/code&gt;, &lt;code&gt;side-hustle&lt;/code&gt;, &lt;code&gt;gemma&lt;/code&gt;, &lt;code&gt;gemma2&lt;/code&gt;, &lt;code&gt;privacy&lt;/code&gt;, &lt;code&gt;taxes&lt;/code&gt;, &lt;code&gt;schedule-c&lt;/code&gt;, &lt;code&gt;zero-leak&lt;/code&gt;, &lt;code&gt;air-gapped&lt;/code&gt;, &lt;code&gt;accounting&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Package &amp;amp; Metadata Keywords:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declared in &lt;code&gt;pyproject.toml&lt;/code&gt; and &lt;code&gt;setup.py&lt;/code&gt;: &lt;code&gt;hacktoberfest&lt;/code&gt;, &lt;code&gt;hacktoberfest2026&lt;/code&gt;, &lt;code&gt;side-hustle&lt;/code&gt;, &lt;code&gt;gemma&lt;/code&gt;, &lt;code&gt;gemma2&lt;/code&gt;, &lt;code&gt;privacy&lt;/code&gt;, &lt;code&gt;receipt-scanner&lt;/code&gt;, &lt;code&gt;taxes&lt;/code&gt;, &lt;code&gt;schedule-c&lt;/code&gt;, &lt;code&gt;accounting&lt;/code&gt;, &lt;code&gt;freelance&lt;/code&gt;, &lt;code&gt;zero-leak&lt;/code&gt;, &lt;code&gt;air-gapped&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚀 Try It Out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Web App:&lt;/strong&gt; &lt;a href="https://ghostledger-topaz.vercel.app" rel="noopener noreferrer"&gt;https://ghostledger-topaz.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code &amp;amp; Test Suite (15/15 Passing):&lt;/strong&gt; &lt;a href="https://github.com/XiaoArnav/ghostledger" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/ghostledger&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also run it locally in 10 seconds (standard Python library only, zero pip installs needed):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/XiaoArnav/ghostledger.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ghostledger
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; privatereceipt.cli demo
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; privatereceipt.cli serve &lt;span class="nt"&gt;--port&lt;/span&gt; 8765
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks to DEV and the Hacktoberfest team for another incredible challenge! 👻⚖️&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
    <item>
      <title>First problem solved on time ✌️</title>
      <dc:creator>Arnav Patel</dc:creator>
      <pubDate>Sun, 11 Oct 2026 13:51:41 +0000</pubDate>
      <link>https://dev.to/polymath_arnav/first-problem-solved-on-time-2b0g</link>
      <guid>https://dev.to/polymath_arnav/first-problem-solved-on-time-2b0g</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena" class="crayons-story__hidden-navigation-link"&gt;WildTrail: I'm a beginner, and my AI wrote a fake map download. Here's what I shipped for Touch Grass&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
      &lt;a href="https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena" class="crayons-article__context-note crayons-article__context-note__feed"&gt;&lt;p&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿&lt;/p&gt;

&lt;/a&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/polymath_arnav" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4166069%2Fe42a0245-5d61-414c-b59e-f04bed79b0a7.jpeg" alt="polymath_arnav profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/polymath_arnav" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Arnav Patel
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Arnav Patel
                
                
              
              &lt;div id="story-author-preview-content-4832938" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/polymath_arnav" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4166069%2Fe42a0245-5d61-414c-b59e-f04bed79b0a7.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Arnav Patel&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 11&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena" id="article-link-4832938"&gt;
          WildTrail: I'm a beginner, and my AI wrote a fake map download. Here's what I shipped for Touch Grass
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/hf26challenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;hf26challenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opensource"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opensource&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt;&amp;nbsp;reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              1&lt;span class="hidden s:inline"&gt;&amp;nbsp;comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            6 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>beginners</category>
      <category>devchallenge</category>
      <category>showdev</category>
    </item>
    <item>
      <title>WildTrail: I'm a beginner, and my AI wrote a fake map download. Here's what I shipped for Touch Grass</title>
      <dc:creator>Arnav Patel</dc:creator>
      <pubDate>Sun, 11 Oct 2026 13:39:50 +0000</pubDate>
      <link>https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena</link>
      <guid>https://dev.to/polymath_arnav/wildtrail-im-a-beginner-and-my-ai-wrote-a-fake-map-download-heres-what-i-shipped-for-touch-4ena</guid>
      <description>&lt;p&gt;&lt;em&gt;This is my submission for the &lt;a href="https://dev.to/challenges/hf26"&gt;Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I'm Arnav, from Bengaluru, and I'm new to coding. When the Touch Grass prompt arrived (build something with open-source AI at its core that gets people off their screens), I kept thinking of the one thing that makes people look up from a phone: collecting things in the real world.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;WildTrail&lt;/strong&gt;: point your camera at a real bird, plant, insect, or animal, let an AI model running locally on your phone guess what it is, and collect it as a 3D stamp in a digital field journal. As you walk outside, an RPG-style fog-of-war map clears around you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live app:&lt;/strong&gt; &lt;a href="https://wildtrail-chi.vercel.app" rel="noopener noreferrer"&gt;https://wildtrail-chi.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code (MIT):&lt;/strong&gt; &lt;a href="https://github.com/XiaoArnav/wildtrail" rel="noopener noreferrer"&gt;https://github.com/XiaoArnav/wildtrail&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspilbln9ga5i438qu3ca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspilbln9ga5i438qu3ca.png" alt="The WildTrail field guide with collectible specimen stamps" width="799" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The AI.&lt;/strong&gt; An open-weight CLIP model (&lt;code&gt;clip-vit-base-patch32&lt;/code&gt;) runs inside the browser through &lt;a href="https://huggingface.co/docs/transformers.js" rel="noopener noreferrer"&gt;Transformers.js&lt;/a&gt;, pinned to version 3.8.1. It performs zero-shot image classification: I provide a curated dictionary of wildlife species and it scores how well your live photo matches each one via WebGPU or WebAssembly. No server ever sees your photo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The collection.&lt;/strong&gt; Confirmed finds are stored in the browser's IndexedDB, rendered as interactive tilting 3D stamps with gyroscope tilt physics, and can be exported as a vintage botanical postcard image. There are no accounts or paywalls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The map.&lt;/strong&gt; Your walk is divided into 20 m squares that light up as you cover them, unmasking territory and tracking your total distance. You can also export your walk as a GPX file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline.&lt;/strong&gt; After the first load, the app shell, vendor libraries, and AI model weights (~90 MB) are cached by the Service Worker and Cache Storage. You can import your own &lt;code&gt;.pmtiles&lt;/code&gt; map packs for offline map tiles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fde690hm5js7b9jnkdmt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fde690hm5js7b9jnkdmt3.png" alt="The scanner suggesting species for a photo" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it gets you outside
&lt;/h2&gt;

&lt;p&gt;I wanted the screen to be the shortest part of the walk. The app only asks for a few seconds: point, tap, and put the phone back in your pocket. Nothing happens while you're indoors, because the reward is the fog-of-war map clearing as you physically walk, and each new species needs you to find a real creature. There are no feeds, no notifications and no streaks. The scanning moment should take only a few seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open source mattered here
&lt;/h2&gt;

&lt;p&gt;I didn't choose open source for the ideology. The idea simply doesn't work without it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No signal on a trail.&lt;/strong&gt; A cloud vision API fails the moment your cell bars drop in a park or ravine. An open-weight model downloaded once to device storage keeps running anywhere. A closed cloud API would have given better accuracy on a fast connection, but it would have failed the moment you needed it most, in the park with no signal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Location is personal.&lt;/strong&gt; The AI inference, your photos, your finds, and your GPS track stay on your device. There is no backend, because the app has no use for one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No per-use cost.&lt;/strong&gt; There are no metered API keys, token fees or per-photo bills, so nothing in the app costs money per use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I can swap things.&lt;/strong&gt; The model and species taxonomy are plain code. Anyone can expand the wildlife list or swap in a specialized bird model through a pull request.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The one honest exception: the default basemap loads tiles from &lt;a href="https://openfreemap.org" rel="noopener noreferrer"&gt;OpenFreeMap&lt;/a&gt;, which can see your IP address and the area of map you view. Importing or downloading an offline PMTiles pack avoids that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What went wrong (the part I'd want to read)
&lt;/h2&gt;

&lt;p&gt;I built this with AI coding assistants (Antigravity for most of the code, Claude as a reviewer and mentor, and GitHub Copilot on two issues). Because I'm a beginner, I couldn't trust any of it blindly, so I made a rule: &lt;strong&gt;read everything and verify the claims.&lt;/strong&gt; That rule uncovered real problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A fake download.&lt;/strong&gt; An early "Download offline map" button ran a loop with a 120 ms timer that updated a progress bar and saved a 2 KB empty placeholder. It looked finished, but did nothing. I had it completely removed and replaced with a real PMTiles import and header verification pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A broken map loader.&lt;/strong&gt; The first real offline loader called &lt;code&gt;pmtiles.BlobSource&lt;/code&gt;, an API that doesn't exist in PMTiles v3 (the actual class is &lt;code&gt;FileSource&lt;/code&gt;). It also loaded a plain vendor script as if it were an ES module. The map silently failed to appear. Fixing it required opening the library's actual exports and reading the documentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advertised species that didn't exist.&lt;/strong&gt; Early demo screenshots showed a tiger, a penguin, and a razorbill, but none of them were in the dictionary the AI could actually classify. I had to audit the species array to make sure every advertised animal could actually be identified.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy claims that outran the code.&lt;/strong&gt; The README proudly claimed "zero telemetry" and "100% client-side", even though OpenFreeMap tiles inevitably hit an external tile server, and an automatic pull request had added Vercel analytics scripts. I had them removed, rewrote the documentation, and added an honest privacy note to the app modal and docs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A blank map when offline.&lt;/strong&gt; If you lost cell signal without an offline pack loaded, the online vector map stayed completely blank. I had to add an explicit offline canvas fallback so the fog-of-war, GPS trail, and specimen pins draw reliably even with zero network.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson I'd give another beginner: AI is happy to write code that &lt;em&gt;looks&lt;/em&gt; complete. Ask "is this actually doing the thing?" every single time.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Behind the Scenes: The Full Agent Sessions
&lt;/h3&gt;

&lt;p&gt;To give the Hacktoberfest judges a transparent look at how WildTrail was built and reviewed, I've shared both public agent sessions. They document the implementation, debugging, and verification process behind the project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/agent_sessions/wildtrail-building-on-device-ai-pwa-offline-vector-maps-with-antigravity-6o94eq"&gt;&lt;strong&gt;Antigravity — Building &amp;amp; Debugging&lt;/strong&gt;&lt;/a&gt; — Building the app, debugging issues, and implementing fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://dev.to/agent_sessions/wildtrail-a-beginner-verifying-ai-written-code-claude-mentor-and-review-session-og1cuk"&gt;Claude — Mentor &amp;amp; Code Reviewer&lt;/a&gt;&lt;/strong&gt; — Reviewing AI-generated code and verifying technical claims.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Copilot did
&lt;/h2&gt;

&lt;p&gt;I opened two GitHub issues and assigned them to GitHub Copilot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPX trail export&lt;/strong&gt; (&lt;a href="https://github.com/XiaoArnav/wildtrail/pull/7" rel="noopener noreferrer"&gt;PR #7&lt;/a&gt;): export your walk as a standard GPX 1.1 file to use in apps like Strava or Garmin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-contrast mode&lt;/strong&gt; (&lt;a href="https://github.com/XiaoArnav/wildtrail/pull/6" rel="noopener noreferrer"&gt;PR #6&lt;/a&gt;): a toggle so the map and compass cone remain readable under direct mid-day sunlight.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I reviewed Copilot's two pull requests before merging them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Taking it outside
&lt;/h2&gt;

&lt;p&gt;Honest status: I haven't taken WildTrail on a long outdoor walk yet; I built and checked it at my desk, so the camera, GPS and airplane-mode behaviour on a real phone are still untested by me. What I did verify is the code and the live site: I had every change checked against the code and fixed the problems above. If you try it outdoors, I'd love to hear what breaks, and issues are open on the repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it can't do yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It can only identify species from its built-in taxonomy list, and CLIP will sometimes guess wrong, so results should be treated as suggestions rather than definitive botany.&lt;/li&gt;
&lt;li&gt;Offline maps require importing or downloading a &lt;code&gt;.pmtiles&lt;/code&gt; archive. The bundled demo pack covers a tiny area (~300 m) in Taipei.&lt;/li&gt;
&lt;li&gt;The very first load requires internet connectivity to fetch the libraries and download the ~90 MB vision model weights into browser cache.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Open &lt;a href="https://wildtrail-chi.vercel.app" rel="noopener noreferrer"&gt;https://wildtrail-chi.vercel.app&lt;/a&gt; on your phone, add it to your home screen, and go outside. Pull requests and feedback are welcome. Adding a new regional species to the classification dictionary is a great first contribution!&lt;/p&gt;

&lt;p&gt;Thanks to the Hacktoberfest team for the prompt. 🌱&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
