{"slug": "gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and", "title": "GitSéance: An Offline Digital Ofrenda Where Local Gemma Summons Deleted Code (And Refuses to Guess Why It Died)", "summary": "A developer built GitSéance, an offline-first tool that mines deleted code from a repository's git history and generates memorials for excised functions using Google's Gemma 2B model (gemma2:2b) running locally via Ollama. After finding the small model hallucinated reasons for deletions when commit messages were cryptic (e.g. \"wip\" or \"cleanup\"), the developer added a deterministic safety pipeline: a polyglot AST symbol extractor for Python, JavaScript, Go and Rust, a cryptic-commit preflight that falls back to a fixed epitaph, and a grounding fact-checker that verifies the commit SHA and file path appear in the model's reply. The project ships as release v1.0.0 with 41 automated tests and zero AST violations.", "body_md": "\n\n```\n                 .-\"      \"-.\n                /   🌼  🌼   \\\n               |   #000dead   |\n               |,  .-.  .-.  ,|\n               | )(_o/  \\o_)( |\n               |/     /\\     \\|\n               (_     ^^     _)\n                \\__|IIIIII|__/\n                 | \\IIIIII/ |\n                 \\          /\n                  `--------`\n```\n\n*\"The code you delete never truly dies: it becomes the silent foundation of every commit that follows. Viva Open Source!\"*\n\n— **Spirit #000dead (Mictlán Relic)**\n\n`git blame` only speaks for the living.\n\nIt tells you who touched the lines that survived in `HEAD`—but **every mature repository is built on the bones of hundreds of excised functions, retired prototypes, and emergency midnight bugfixes that were quietly erased from history.**\n\nWhen a regression resurfaces two years later, modern teams often commit the exact same architectural mistakes of 2022. Why? Because the reasoning behind deleted code is buried deep inside `git log -p`, where nobody looks.\n\nFor **Hacktoberfest 2026: Week 4 (\"Ghost in the Machine\")**, bridging Halloween with the sacred Mesoamerican tradition of **Día de los Muertos (Day of the Dead)**, I created **GitSéance**:\n\nAn offline-first developer archaeologist and interactive **Digital Ofrenda** that scans your repository's graveyard, builds a marigold-adorned altar for departed code, and lets you conduct grounded séances with excised functions powered by **Google Gemma (`gemma2:2b`)** running 100% locally on your own machine.\n\n[!IMPORTANT]\n\n**Live Web Ofrenda:** [https://gitseance.tech](https://gitseance.tech)\n\n**Source Repository:** [https://github.com/FranciscoGrandon/git-seance](https://github.com/FranciscoGrandon/git-seance) (Release v1.0.0 · 41 Automated Tests · 0 AST Violations)\n\nWhen I first fed deleted git diffs into local 2B language models and asked, *\"Why was this function removed?\"*, Gemma did what small language models do best: **it hallucinated.**\n\nIf a commit message was informative—such as *\"Drop parse_xml_invoice_soap to patch XXE vulnerability (CVE-2026-0412)\"*—Gemma recited a magnificent, respectful memorial. \n\n**But what happened when the commit was a Friday 4:59 PM rush job that literally said `\"wip\"` or `\"cleanup\"`?**\n\nThe model immediately fabricated an elaborate, fictional backstory about microservice migrations, imaginary database locks, or phantom compliance audits!\n\nIn software archaeology, **a fictional story is worse than silence.**\n\nTo make GitSéance an authentic developer tool rather than a toy, I engineered a multi-stage deterministic safety pipeline:\n\n```\n                       ┌────────────────────────────┐\n                       │  git log -p Graveyard Miner │\n                       │    (Single-Pass Pipeline)  │\n                       └─────────────┬──────────────┘\n                                     │\n                 ┌───────────────────┴───────────────────┐\n                 ▼                                       ▼\n    ┌─────────────────────────┐             ┌─────────────────────────┐\n    │ Polyglot AST Symbol     │             │ Cryptic Commit Preflight│\n    │ Extractor (Py/JS/Go/Rs) │             │ (wip/cleanup Interceptor│\n    └────────────┬────────────┘             └────────────┬────────────┘\n                 │                                       │\n                 │ 🛡️ Is commit cryptic?                 │\n                 ├─────────────────── YES ───────────────► 🛡️ Fallback\n                 │                                            Epitaph\n                 │ NO (Informative commit message)\n                 ▼\n    ┌─────────────────────────┐\n    │ Local Google Gemma 2B   │ (Ollama localhost:11434 / temp=0.25)\n    │ Séance Inference Engine │ ($0.00 Cloud Bill / 100% Local Privacy)\n    └────────────┬────────────┘\n                 │\n                 ▼\n    ┌─────────────────────────┐\n    │ Grounding Fact-Checker  │ (Verifies Commit SHA & File Path in reply)\n    └────────────┬────────────┘\n                 │\n                 ▼\n    ┌────────────────────────────────────────────────────────┐\n    │ Sentry Agent Tracing (`ai.seance` OpenTelemetry Spans) │\n    │   • Latency (ms)  • Token Count  • Hallucination Flags │\n    └────────────────────────────┬───────────────────────────┘\n                                 │\n                 ┌───────────────┴───────────────┐\n                 ▼                               ▼\n    ┌─────────────────────────┐     ┌─────────────────────────┐\n    │ Terminal CLI Ofrenda    │     │ Single-Page App Ofrenda │\n    │ + Quine (#000dead)      │     │ (Render / index.html)   │\n    └─────────────────────────┘     └─────────────────────────┘\n```\n\n`mine_git_graveyard`):` git show` subprocesses. GitSéance streams `git log -p -U0` in a single pass with delimited token buffers, reconstructing author, timestamp, commit SHA, and exact unified diff deletions in under `is_cryptic_commit`):` wip`, `temp`, `cleanup`, `fix`, `chore(core): wip`). If flagged, GitSéance `temperature=0.25`):` verify_response_grounding`):`#8f3a91c`) and the file path. If the spirit fails the audit, it is evicted in favor of verified deterministic text.\nSoftware should evoke wonder. The Digital Ofrenda web app is packed with three organic technical easter eggs:\n\n`#000dead`)\nGitSéance contains a living mythological spirit embedded directly into the source code: **Spirit #000dead (The Relic of Mictlán)**.\n\n`python git_seance.py --mictlan` dynamically introspects its own source code on disk using Python's `ast` module. It extracts the hex cipher `MICTLAN_HEX_CIPHER`, decodes it in memory, calculates its own 32-bit FNV-1a checksum (`0x71790691`), and summons itself as a living departed relic.` mictlan` anywhere on the keyboard or clicking the golden calavera skull executes `awakenSourceQuineSpirit()`, reading `<script id=\"gitSeanceCoreScript\">`, verifying identical FNV-1a hash parity, and displaying the live self-reflection panel.\nNo bulky `.mp3` files or external audio assets. The altar bell chimes are synthesized directly in the browser using the **Web Audio API**:\n\n``` js\nconst notes = [293.66, 349.23, 440.0, 587.33]; // D minor harmonic arpeggio (La Bruja motif)\nnotes.forEach((freq, idx) => {\n  setTimeout(() => playAltarChime(freq), idx * 140);\n});\n```\n\nEach note triggers an `OscillatorNode` with an exponential decay `GainNode`, producing an authentic, haunting bronze bell timbre.\n\nActivating the altar triggers an interactive HTML5 canvas particle storm where 38 golden *cempasúchil* and purple petals drift and rotate down the viewport with realistic harmonic sway (`Math.sin(angle) * 0.4`).\n\nWhenever a developer opens a Pull Request that excises dead code, GitSéance runs automatically via `.github/workflows/ofrenda_pr.yml`:\n\n```\npython3 git_seance.py --ci-summary --no-fallback --range \"origin/${{ github.base_ref }}..HEAD\" > ofrenda_comment.md\n```\n\nIt automatically posts an elegant Digital Ofrenda memorial comment to the PR discussion thread with collapsible `<details>` blocks for diff inspection:\n\n| Departed Symbol | File Path | Tombstone SHA | Author & Date | Guardrail Status | \n|---|---|---|---|---|\n| `legacy_payment_retry_loop()` | `src/billing/checkout.py` | `#8f3a91c` | Devon Vance (2026-10-14) | ✅ Grounded Epitaph | \n| `sync_legacy_cart_v1()` | `src/checkout/cart_sync.py` | `#d4e91b2` | Marco Ruiz (2026-10-21) | 🛡️ Cryptic Commit ( `vague_commit` blocked) | \n\nEvery séance transaction is instrumented with custom OpenTelemetry spans under the `ai.seance` namespace using the official Sentry SDK:\n\n`death_sha`, `engine_source` (`gemma_local` vs fallback), `grounded_sha`, `cryptic_commit_blocked`, `ast_quine_verified`.` python git_seance.py --export-traces seance_traces.json` or inspect the live visual telemetry charts powered by Chart.js in the web dashboard!`gemma2:2b` on `localhost:11434` with zero external cloud dependencies or API keys.`index.html`. Zero node_modules, zero bundler configuration, and zero lockfile vulnerabilities.`ai.seance` Spans:`gitseance.tech`:`.tech` domain, establishing a crisp identity for deep developer tooling.`origin/main..HEAD`) and commenting tombstone memorials on PRs.\nGitSéance was tested with the same rigor required of production infrastructure:\n\n```\n# Run the complete test suite\npython -m unittest discover -v\nRan 41 tests in 8.132s\nOK\n```\n\n`test_git_seance.py` (24 tests):`test_html_ofrenda.py` (17 tests):`msedge --headless --dump-dom`).`<30ms` execution via AST linting.\nDon't let your deleted code wander the void forgotten. Summon your repository's ghosts today:\n\n```\n# 1. Clone the repository\ngit clone https://github.com/FranciscoGrandon/git-seance.git\ncd git-seance\n\n# 2. Make sure you have Ollama running with Gemma\nollama pull gemma2:2b\n\n# 3. Hold your first séance (works on ANY git repository!)\npython git_seance.py\n\n# 4. Or awaken the secret source code Quine\npython git_seance.py --mictlan\n```\n\nPrefer a visual experience? Visit the live altar at **[https://gitseance.tech](https://gitseance.tech)**, light a candle for legacy code, and type `mictlan` on your keyboard!\n\n*Built with reverence by **Francisco Grandón Vergara** for Hacktoberfest 2026: Week 4 (\"Ghost in the Machine\"). Viva Open Source! 🌼💀*", "url": "https://wpnews.pro/news/gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and", "canonical_source": "https://dev.to/fgrandon/gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and-refuses-to-guess-4hc0", "published_at": "2026-10-28 10:31:30+00:00", "updated_at": "2026-10-28 10:41:24.311681+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "developer-tools", "ai-agents"], "entities": ["GitSéance", "Google", "Gemma", "Ollama", "FranciscoGrandon", "GitHub", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and", "markdown": "https://wpnews.pro/news/gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and.md", "text": "https://wpnews.pro/news/gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and.txt", "jsonld": "https://wpnews.pro/news/gitseance-an-offline-digital-ofrenda-where-local-gemma-summons-deleted-code-and.jsonld"}}