<?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: Som Satwik Deo</title>
    <description>The latest articles on DEV Community by Som Satwik Deo (@somsatwik).</description>
    <link>https://dev.to/somsatwik</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%2F4167869%2F36739d31-a652-4daf-9a4a-0f33ff7b830d.jpg</url>
      <title>DEV Community: Som Satwik Deo</title>
      <link>https://dev.to/somsatwik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/somsatwik"/>
    <language>en</language>
    <item>
      <title>GhostTrace: a terminal ghost that cites your commit history before you rm -rf it</title>
      <dc:creator>Som Satwik Deo</dc:creator>
      <pubDate>Sun, 01 Nov 2026 00:49:58 +0000</pubDate>
      <link>https://dev.to/somsatwik/ghosttrace-a-terminal-ghost-that-cites-your-commit-history-before-you-rm-rf-it-pi9</link>
      <guid>https://dev.to/somsatwik/ghosttrace-a-terminal-ghost-that-cites-your-commit-history-before-you-rm-rf-it-pi9</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What I Built&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Repo Séance&lt;/em&gt;&lt;/strong&gt; treats a codebase's Git history as evidence, not metadata. Most tools show you a repo as it is today. This one answers why it looks that way — what a developer was building, where they stopped, which parts are risky to touch — by citing actual commit hashes and file paths, not plausible-sounding guesses.&lt;/p&gt;

&lt;p&gt;It's two connected pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Repo Séance&lt;/em&gt;&lt;/strong&gt; ingests a repository, parses its structure (GitPython + Tree-sitter), analyzes its full commit history, and answers grounded questions like "what was the original developer trying to build?" — every answer cites real evidence from the repo it actually read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;GhostTrace&lt;/em&gt;&lt;/strong&gt; is a terminal companion that uses that same evidence to explain unfamiliar or risky shell commands in context — not "this is dangerous," but "this is dangerous, and here's what I found in this specific repo's history that makes it matter."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I read "Ghost in the Machine" literally: a repository's commit history is the actual ghost here — the trace of a developer who isn't there to answer questions anymore. GhostTrace is what that trace sounds like when you give it a voice.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Demo&lt;/strong&gt;
&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%2Fc9r53tps7bhy1dy7er45.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%2Fc9r53tps7bhy1dy7er45.png" alt=" " width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Live demo:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://counters-config-solo-kansas.trycloudflare.com/" rel="noopener noreferrer"&gt;counters-config-solo-kansas.trycloudflare.com&lt;/a&gt; — this tunnels straight to my own machine, so Gemma inference is genuinely running locally on my GPU as you use it, not a hosted API pretending to be local. It’ll be live for the judging window; if it’s ever down, the install steps above get you the same thing in about a minute. (a Cloudflare Tunnel to my own machine — it's live while I'm running it for judging, not a permanent deployment)&lt;/p&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%2Fb1vhtxm919ie9k091ds2.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%2Fb1vhtxm919ie9k091ds2.png" alt=" " width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GhostTrace classifying rm -rf ./build as DESTRUCTIVE, with an explanation grounded in the repo's actual commit history — not a generic warning.&lt;/p&gt;

&lt;p&gt;GhostTrace isn't just a web demo — it installs as a real command in your actual terminal:&lt;/p&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/SomSatwik/repo-seance" rel="noopener noreferrer"&gt;https://github.com/SomSatwik/repo-seance&lt;/a&gt;&lt;br&gt;
cd repo-seance&lt;br&gt;
pip install -e packages/ghosttrace-cli&lt;br&gt;
ghosttrace --repo &lt;/p&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%2Ff27hsp9qb57p5gijh07j.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%2Ff27hsp9qb57p5gijh07j.png" alt=" " width="799" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The real ghosttrace command running in PowerShell after install — same safety engine and grounded explanations as the web version, in your actual shell.&lt;/p&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%2Fmqmf1myvhjq84qplh2h9.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%2Fmqmf1myvhjq84qplh2h9.png" alt=" " width="800" height="339"&gt;&lt;/a&gt;&lt;br&gt;
Eh me testing it on another repository&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Code&lt;/strong&gt;
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/SomSatwik" rel="noopener noreferrer"&gt;
        SomSatwik
      &lt;/a&gt; / &lt;a href="https://github.com/SomSatwik/repo-seance" rel="noopener noreferrer"&gt;
        repo-seance
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Repo Séance&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;  .-
 ( o o )
  | O |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/SomSatwik/repo-seance" rel="noopener noreferrer"&gt;https://github.com/SomSatwik/repo-seance&lt;/a&gt;
&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://counters-config-solo-kansas.trycloudflare.com/" rel="nofollow noopener noreferrer"&gt;https://counters-config-solo-kansas.trycloudflare.com/&lt;/a&gt;
&lt;em&gt;(tunnels to my own machine — Gemma inference is genuinely running locally
on a GPU as you use it, not a hosted API. Live during Hacktoberfest judging;
if it's down, the setup steps below get you the same thing in a few minutes.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/d405f037c9c95d51bddac7b5bbc92f0374b2258a4c28191d82668c5d2bad63f0/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6a72307468786b35696b717861343236766332622e706e67"&gt;&lt;img src="https://camo.githubusercontent.com/d405f037c9c95d51bddac7b5bbc92f0374b2258a4c28191d82668c5d2bad63f0/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6a72307468786b35696b717861343236766332622e706e67" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3ff71627b0256b53058f540218252bdc9154531d6563d25723c434335a50addc/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6674306d3472346c6276386464676a6b303978362e706e67"&gt;&lt;img src="https://camo.githubusercontent.com/3ff71627b0256b53058f540218252bdc9154531d6563d25723c434335a50addc/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6674306d3472346c6276386464676a6b303978362e706e67" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/939f293132e28e1c892a0f2c8d0c34db1f07ad074dafa8a4442ab0ff966c8bc8/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f78686f65706f626c6f6e613234313162797073702e706e67"&gt;&lt;img src="https://camo.githubusercontent.com/939f293132e28e1c892a0f2c8d0c34db1f07ad074dafa8a4442ab0ff966c8bc8/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f78686f65706f626c6f6e613234313162797073702e706e67" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Repo Séance&lt;/strong&gt; — summon the spirit of any git repository. A local,
AI-powered forensic analyzer that ingests a codebase's full git history
and lets you interrogate its ghosts in natural language — then carries
that same evidence into your terminal.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Repo Séance reconstructs the "soul" of a repository — its commits
contributors, and the stories embedded in its source — and makes it
searchable through a semantic, vector-backed memory. Point it at any git
repo and it will index the history, embed it locally, and answer questions
like &lt;em&gt;"who created this project&lt;/em&gt;…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/SomSatwik/repo-seance" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&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%2Fui2d7nm7hcsvrhrj8boi.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%2Fui2d7nm7hcsvrhrj8boi.png" alt=" " width="800" height="453"&gt;&lt;/a&gt;&lt;br&gt;
Asking Repo Séance who built this and why — the answer cites the actual README and commit hashes, not a plausible guess. The &lt;code&gt;roadmap&lt;/code&gt; command does the same: it flags the real activity gap it detected (1.0 days, Oct 30→31) and names the actual top contributor by commit count, not generic advice.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How I Built It&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Stack: FastAPI + Python backend, Next.js/TypeScript/Tailwind frontend, Postgres with pgvector for evidence retrieval, GitPython + Tree-sitter for structure/symbol analysis, Gemma 2 2B running locally through Ollama for all AI reasoning, Sentry for agent-step tracing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Local-first by design&lt;/em&gt;&lt;/strong&gt;, not by accident. Private repository source never has to leave the machine. The model in use, its inference mode (GPU/CPU), and live Ollama connectivity are surfaced directly in the product, not hidden. I initially assumed enough VRAM for a 9B model; actually checking (&lt;code&gt;nvidia-smi&lt;/code&gt;) showed a 6GB card, so Gemma 2B is the real default, with 9B available as an explicit "slower, higher quality" opt-in rather than a default I'd have to walk back later.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;The safety engine is deliberately not the LLM's job&lt;/strong&gt;&lt;/em&gt;. GhostTrace classifies shell commands (SAFE / CAUTION / DESTRUCTIVE) with a deterministic, rule-based classifier — verified to work correctly with Ollama stopped entirely. Gemma only explains consequences using retrieved evidence; it never decides whether something is safe. Letting a model make that call directly would be the wrong engineering decision, not just a missing feature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploy Your Own&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wanted anyone — judges included — to be able to run the full stack&lt;br&gt;
without touching a terminal. The repo includes a ready &lt;code&gt;render.yaml&lt;/code&gt;&lt;br&gt;
Blueprint: Next.js web service, FastAPI backend, managed Postgres with&lt;br&gt;
pgvector, and a private Ollama service running Gemma 2B, all wired&lt;br&gt;
together with persistent disks so cloned repos and model weights survive&lt;br&gt;
restarts.&lt;/p&gt;

&lt;p&gt;Deploying it is three clicks: fork the repo, create a Blueprint in the&lt;br&gt;
&lt;a href="https://dashboard.render.com/" rel="noopener noreferrer"&gt;Render Dashboard&lt;/a&gt; pointed at it, and wait&lt;br&gt;
for the Ollama service to pull its models on first boot. No manual env var&lt;br&gt;
wiring, no separate database setup — the Blueprint handles the whole&lt;br&gt;
dependency chain. It won't be as fast as local GPU inference (Ollama runs&lt;br&gt;
on CPU on Render), but it means this isn't a "clone and pray" project —&lt;br&gt;
it's genuinely one click away from a working instance.&lt;/p&gt;

&lt;p&gt;A few real bugs I found and fixed, because I think the honest version of this section is more useful than a clean one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. A classification gap in the safety engine. &lt;code&gt;git --reset&lt;/code&gt;(flag before subcommand) wasn't caught by a regex written for &lt;code&gt;git reset --hard&lt;/code&gt; (subcommand form) — it fell through to SAFE while Gemma's own explanation text described it as removing uncommitted changes, contradicting the verdict. Fixed by tokenizing commands instead of matching literal substrings, with regression tests added for reordered/flag-prefixed variants across every existing rule.&lt;/li&gt;
&lt;li&gt;2. A Windows file-permission bug. Rejected or oversized repo clones weren't actually being deleted — Git marks packed objects read-only, so Python's &lt;code&gt;shutil.rmtree(ignore_errors=True)&lt;/code&gt; was silently failing and leaving oversized clones on disk, defeating the size guard entirely. Fixed with a proper read-only-aware cleanup helper plus a regression test asserting nothing is left behind.&lt;/li&gt;
&lt;li&gt;3. A &lt;code&gt;tree-sitter&lt;/code&gt; version incompatibility between &lt;code&gt;tree-sitter&lt;/code&gt; 0.25+ and &lt;code&gt;tree-sitter-languages&lt;/code&gt; 1.10.2's older &lt;code&gt;Language(path, name) API&lt;/code&gt;. Root-caused by reading the actual AST node output rather than guessing, and pinned to the last compatible version (0.21.3).
GhostTrace exists in two forms on purpose, not as a fallback: a browser terminal for quick demoing, and the real installable &lt;code&gt;ghosttrace&lt;/code&gt; CLI above, because the actual product is meant to live in a real terminal, not a browser tab.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Repo Séance's whole premise is analyzing code someone might not want leaving their machine — abandoned internal tools, legacy systems with unclear IP status, half-finished proprietary features. A closed API model means sending that source to a third party just to ask what it was trying to do, which defeats the purpose for exactly the repositories this tool targets.&lt;/p&gt;

&lt;p&gt;Running Gemma locally through Ollama means the core intelligence works fully offline once a repo is cloned — structure analysis, history analysis, grounded Q&amp;amp;A, and GhostTrace's explanations all run without internet access. Only the initial &lt;code&gt;git clone&lt;/code&gt; of a remote repo needs connectivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;My Agent Session&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This project was built across several different coding agents and harnesses, with real handoffs between them rather than one continuous session — including debugging that didn't go smoothly on the first pass (the three bugs above were all found through live testing, not caught in advance). GitHub Copilot specifically handled the terminal rendering and ambient-message work in the CLI.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;** Best Use of Gemma — strong case**. This is the most defensible one. You didn’t just call the API — you made a hardware-driven model choice (checked actual VRAM instead of assuming), you surface the model name and inference mode live in the product, and critically, you architected around Gemma’s limitations rather than trusting it blindly: the safety verdict is deterministic and independent of the model, Gemma only explains. That’s a more thoughtful Gemma integration than “we called generate() and it worked.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;** Best Use of Tiger Data — real, if modest**. pgvector storage and cosine-similarity retrieval genuinely back your /ask and /roadmap citations — that’s a legitimate use of the category, even though it’s basic similarity search rather than hybrid keyword+vector. Honest and defensible, just don’t oversell it as more sophisticated than it is.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Best Use of GitHub Copilot — true but small&lt;/strong&gt;. Copilot did real work (the word-wrap fix, the ambient-messages feature) — that’s honest to claim. Just know it was a smaller slice of the build compared to your other harnesses, so don’t frame it as Copilot being central to the project; frame it as what it actually was.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Best Use of Sentry Agent Tracing — I actually don’t know if this is true yet&lt;/strong&gt;. Sprint 3 was the plan for this, but we got pulled into the GhostTrace visual fixes right after, and you never sent me a Sprint 3 completion report. Before you list this category, go verify Sentry instrumentation is actually live — open your Sentry project and confirm real spans exist for /ask, /roadmap, and GhostTrace calls. If it’s not there, pull this category rather than claim it; an unverifiable claim in a judged submission is worse than one fewer category.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For Render — add this as its own short section (after “How I Built It” or near the Demo section):&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>pretenditsgood</category>
    </item>
  </channel>
</rss>
