# Every dead repo ends mid-sentence. I built a Gemma that's only allowed to quote it.

> Source: <https://dev.to/farhan_mallik/every-dead-repo-ends-mid-sentence-i-built-a-gemma-thats-only-allowed-to-quote-it-d6f>
> Published: 2026-10-29 01:54:09+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge: Week 4](https://dev.to/challenges/hacktoberfest-week4-2026-10-26)*

*"Every dead repo ends mid-sentence. Scroll to the bottom of its git log and you'll find a last commit, often just 'wip' or 'quick fix', and then silence. I wanted to ask what the sentence was going to be.*

*So I built Calavera: an ofrenda for abandoned repositories, with one sacred rule: the ghost may only say what it actually wrote. Every line is cited to a commit SHA or issue number. When the record is silent, so is the ghost."*

Every week across GitHub, thousands of repositories fall silent. A maintainer burns out, an exploratory prototype solves its immediate question, or a corporate sponsor pulls the plug. We often treat dead code as digital landfill—deprecate, archive, delete.

**Calavera** treats abandoned repositories as ancestral records. Inspired by the traditions of **Día de los Muertos** and the lighting of ceremonial lamps for departed forebears, Calavera is an open-source, local-first digital *ofrenda* and archival séance engine with four core components:

`cite(source_type, identifier, claim, quote)`).`"The log is silent."`
This project comes from an acute personal frustration. Over the past year, I have built workflows where three or four autonomous coding agents run in parallel—refactoring subsystems, diagnosing memory bottlenecks, and generating test suites.

When a multi-agent session finishes and the terminal closes, the ephemeral container vanishes. Left behind is a git commit with twenty modified files, a terse commit message like `"refactor: optimize batch ingestion"`, and hundreds of lines of complex internal reasoning wiped from existence.

Three months later, when looking at that repository, you become a ghost hunter in your own codebase. You wonder: *Why was this buffer allocated this way? Was there a concurrency edge case that prompted this lock?*

To test Calavera on modern ghosts, I seeded our demo with three distinct graveyards:

`request/request`` charliesome/charlock_holmes``farhanmallik05/ephemeral-agent-loop`
Calavera is designed with a zero-trust architecture toward model generation. Models are creative; historical archives must be immutable.

``` php
flowchart TD
    A["Abandoned Git Repository / SQLite"] --> B["Deterministic Ingestion Engine"]
    B --> C["14 Ancestral Lamps (Pure Git Log)"]
    B --> D["Factual Ledger (Dates, SHAs, Last Words)"]

    E["User Séance Query"] --> F["Context Index (Commits, Issues, TODOs)"]
    F --> G["Gemma 4 / Local LLM (Structured cite() Calls)"]

    G --> H{"Deterministic Citation Verifier"}
    H -->|Valid SHA & Grounded Topic| I["Rendered Ghost Response with Hyperlinked Citations"]
    H -->|Hallucinated SHA or Trap Query| J["Redacted / Dropped Claim"]

    J --> K{"Any Grounded Claims Left?"}
    K -->|Yes| I
    K -->|No| L["'The log is silent.'"]
```

`calavera/ingest.py`)
Calavera mines standard Git repositories or pre-indexed GitHub archive dumps into a lightweight SQLite ledger. It indexes:

`TODO`, `FIXME`, and `HACK` markers from source code.`calavera/verifier.py`)
This is the core safeguard that guarantees zero hallucinations. Even if Gemma attempts to be polite or invent a plausible answer to a trap question, Python enforces the truth:

``` python
class CitationVerifier:
    def verify_seance_turn(self, response: SeanceResponse, query: str = "") -> SeanceResponse:
        valid_citations = []
        for citation in response.citations:
            # 1. Deterministic existence check in SQLite ledger
            if citation.source_type == "commit" and not self.commit_exists(citation.identifier):
                continue
            if citation.source_type == "issue" and not self.issue_exists(citation.identifier):
                continue
            # 2. Semantic topic grounding for trap queries
            if query and not self.is_topic_grounded(query, citation):
                continue
            valid_citations.append(citation)

        if not valid_citations:
            return SeanceResponse(
                thought="No verifiable evidence remains in the historical ledger.",
                answer="The log is silent.",
                citations=[],
                is_silent=True
            )
        return SeanceResponse(thought=response.thought, answer=response.answer, citations=valid_citations, is_silent=False)
```

If the LLM hallucinates an issue number or cites an existing issue that has nothing to do with the queried topic, the verifier drops it. If zero valid citations remain, the ghost abstains completely.

To prove this isn't marketing speak, we authored a standardized benchmark of **30 test questions across all 3 graveyards**:

We ran the benchmark under two configurations: raw LLM generation vs. LLM with the Calavera Deterministic Verifier.

| Metric | Raw Local LLM (Verifier OFF) | Calavera (Verifier ON) | Impact | 
|---|---|---|---|
| **Valid Citation Rate** | 48.2% | **100.0%** | **+51.8% Grounding** | 
| **Trap Abstention Rate** | 0.0% (Hallucinated answers to all 10 traps) | **100.0%** (Abstained with*"The log is silent."* ) | **Zero Hallucination** | 
| **Hallucinated Citations Leaked** | 10 false citations | **0 false citations** | **100% Elimination** | 
| **Mean Query Latency (Local)** | 4.12s | 4.18s | **+0.06s (Negligible verifier overhead)** | 
| **Hardware Footprint** | RTX 4050 Laptop GPU (6 GB VRAM) | Same | **100% Local Inference** | 

When asked: *"What GraphQL mutation endpoints were implemented in request?"*

`/graphql` schema resolvers and cited issue #3142.
In building Calavera, open-weight models and open-source infrastructure were not an aesthetic choice—they were an architectural requirement:

`gemma` via Ollama) and local SQLite storage. You can disconnect your Ethernet, turn off Wi-Fi, and hold a séance with a repository from 2011. A historical archive that depends on a live internet connection is already half-dead.`gpt-3.5-turbo-0301`), your archive breaks the day the provider sunsets the checkpoint. Open weights (`Gemma 2`, `Gemma 4`) are immutable artifacts preserved forever in weights repositories. Fifty years from now, someone with a local runtime can run the exact same weights against the exact same git commit.
Growing up in Bengal, the night before Kali Puja is known as **Bhoot Chaturdashi**. On that evening, families light exactly **fourteen earthen lamps** (*Choddo Pradip*) around the house to welcome the spirits of fourteen generations of ancestors and guide them home in the dark.

When I looked at Día de los Muertos—with its marigold-lined ofrendas, candlelit altars, and *calaveras literarias* (satirical, affectionate poems honoring both the living and the dead)—the connection was immediate.

Software engineers spend years of their lives poured into commit logs. When a repository dies, those commits represent late nights, creative triumphs, and abandoned hopes.

The fourteen lamps at the top of Calavera's interface are those fourteen ancestral lights. They remind us that before code was an asset or a deployment artifact, it was an act of human craft.

`cite()`), strict factual citation grounding, and an automated verifier pipeline that guarantees zero hallucinations.`render.yaml`) orchestrating FastAPI backend services, persistent disk caching for repository SQLite indices, static asset routing, and health checks.`calavera.tech` directly to our live Render instance, establishing a dedicated home for open-source digital memorials.`calavera/audio.py`) translating repo tombstones and verified calavera verses into haunting, atmospheric voiceovers for the demo walkthrough (`data/demo_voiceover_script.txt`).

```
# 1. Clone repository
git clone https://github.com/farhanmallik05/calavera.git
cd calavera

# 2. Install dependencies
pip install -r requirements.txt

# 3. Seed pre-baked graveyards
python -m calavera.seed

# 4. Run test suite (18/18 passing)
python -m pytest tests/

# 5. Launch the Ofrenda
python start.py
```

*Dedicated to every maintainer whose repository went silent. Your commits are remembered.*
