<?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: Ewansalan Dkhar</title>
    <description>The latest articles on DEV Community by Ewansalan Dkhar (@ewansalandkhar).</description>
    <link>https://dev.to/ewansalandkhar</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%2F4160490%2Ff71f82d3-e04d-4c36-b85d-437f172090c1.jpeg</url>
      <title>DEV Community: Ewansalan Dkhar</title>
      <link>https://dev.to/ewansalandkhar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ewansalandkhar"/>
    <language>en</language>
    <item>
      <title>Ghost in the Machine: I Built Tales, a CLI That Narrates Crashes as Ghost Stories</title>
      <dc:creator>Ewansalan Dkhar</dc:creator>
      <pubDate>Thu, 29 Oct 2026 10:00:50 +0000</pubDate>
      <link>https://dev.to/ewansalandkhar/ghost-in-the-machine-i-built-tales-a-cli-that-narrates-crashes-as-ghost-stories-52mg</link>
      <guid>https://dev.to/ewansalandkhar/ghost-in-the-machine-i-built-tales-a-cli-that-narrates-crashes-as-ghost-stories-52mg</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;blockquote&gt;
&lt;p&gt;The scene was a dusty attic of code, cobwebs of forgotten files, and the air thick with the metallic tang of a failed attempt.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A local model wrote that. For the record: there was no attic. There were no cobwebs. There was a four-line function called &lt;code&gt;summon_ghost&lt;/code&gt; (I wrote it for testing purposes 🙂) that divided 1 by a candle count of 0, and then the process was gone in 0.022 seconds.&lt;/p&gt;

&lt;p&gt;The model did the atmosphere. Python did the &lt;code&gt;ZeroDivisionError&lt;/code&gt;. Both landed in the same file, which is the whole trick.&lt;/p&gt;

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

&lt;p&gt;Tales is the project. &lt;code&gt;haunt&lt;/code&gt; is the command, and it does exactly what the name says. It wraps another process, waits for the thing to die, and then writes up the death as a ghost story.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;haunt run &lt;span class="nt"&gt;--&lt;/span&gt; python app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your program exits 0, nothing gets narrated and nothing gets written. No death, no story. If it raises, segfaults, gets OOM error, or takes a signal, &lt;code&gt;haunt&lt;/code&gt; collects whatever is lying around: the exit code, the signal, how long it lasted, the tail of stdout and stderr, the traceback, your git branch, the files you edited and never committed, and the Python and platform versions. That pile goes to Gemma through Ollama, and Gemma reports back in five panels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Crash Site&lt;/strong&gt;: where and how it died&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Last Words&lt;/strong&gt;: the final stderr, translated into something a normal human can read&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prime Suspects&lt;/strong&gt;: the traceback, the commits, the files you touched and didn't commit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Epitaph&lt;/strong&gt;: one line for the tombstone&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to Prevent the Haunting&lt;/strong&gt;: what to fix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The panels show up in your terminal. A &lt;code&gt;GHOST_REPORT.md&lt;/code&gt; shows up on disk (pls bare with the name 🥲). Story first, then the raw evidence as JSON, appended and unabridged, so you can check the ghost's work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;One real run, one take, &lt;code&gt;gemma2:2b&lt;/code&gt;, roughly 3.6 seconds from launch to finished report:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;╭───────────────────────────── 👻 The Crash Site ──────────────────────────────╮
│ The scene was a dusty attic of code, cobwebs of forgotten files, and the air │
│ thick with the metallic tang of a failed attempt.  A single terminal,        │
│ blinking with the last echo of a dying process, held the remnants of a       │
│ tragic downfall.                                                             │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────── 👻 Last Words ────────────────────────────────╮
│ "Lighting the candles...," a single line from a file named                   │
│ haunt/demo_crash.py whispered from the void. A ghostly echo of an aborted    │
│ invocation of a spectral function called summon_ghost. The code, a tapestry  │
│ of haunting lines, was broken. The execution was halted, a victim of a       │
│ simple, yet devastating error. A fatal "ZeroDivisionError" had silenced the  │
│ process, like a stifled whisper in the digital graveyard.                    │
╰──────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────── 👻 Prime Suspects ──────────────────────────────╮
│ The culprit was a line of code, a single function called summon_ghost, where │
│ a candle's value was being divided by one.  The script’s last line. A simple │
│ error, a missing value, an attempt to summon a spectral entity.  A specter   │
│ of a program.                                                                │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────── 👻 The Epitaph ───────────────────────────────╮
│ "Lighting the candles" became a haunting refrain, a final flicker of an      │
│ ambitious soul. The code, once a promise of the supernatural, was now a      │
│ ghost story of an unfinished project.                                        │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────── 👻 How to Prevent the Haunting ───────────────────────╮
│ To prevent such haunting crashes, a rigorous code review is needed. A        │
│ comprehensive test suite should be used to catch errors early, and proper    │
│ logging should ensure that debugging is faster and more efficient.  This     │
│ process is the key to preventing spectral apparitions from haunting the      │
│ lives of developers, and the digital realm of their creations.               │
╰──────────────────────────────────────────────────────────────────────────────╯
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go back and read the Prime Suspects panel.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a candle's value was being divided by one&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is wrong. The code divides 1 &lt;strong&gt;by&lt;/strong&gt; the candle count, which happens to be 0. The model misread a single operator. It is a 2B model doing its best, and its best is mostly vibes.&lt;/p&gt;

&lt;p&gt;Nothing breaks, because the evidence sits in the same file, directly underneath the prose:&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="nl"&gt;"exit_code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"signal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"duration_s"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.022&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"stderr_tail"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Lighting the candles...&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;The room grows cold.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Traceback (most recent call last):&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;  File &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;demo_crash.py&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;, line 12, in summon_ghost&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;    return 1 / candles&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;ZeroDivisionError: division by zero"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"git"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"branch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"uncommitted"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"M haunt/cli.py"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"python"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"3.12.5"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ghost is allowed to be wrong. The appendix is not. Switch to &lt;code&gt;gemma2:9b&lt;/code&gt; and the prose gets better, but the appendix comes out byte for byte the same, because the model never touches it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run It
&lt;/h2&gt;

&lt;p&gt;All local, no account, no key:&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/Ewan-Dkhar/Tales
&lt;span class="nb"&gt;cd &lt;/span&gt;Tales
uv venv &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; uv pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
ollama pull gemma2:2b
.venv/bin/haunt demo &lt;span class="nt"&gt;--model&lt;/span&gt; gemma2:2b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then aim it at your own disaster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.venv/bin/haunt run &lt;span class="nt"&gt;--&lt;/span&gt; python app.py       &lt;span class="c"&gt;# wrap a process, narrate the failure&lt;/span&gt;
.venv/bin/haunt run &lt;span class="nt"&gt;--no-narrate&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; ./bin  &lt;span class="c"&gt;# collect evidence, skip the story&lt;/span&gt;
.venv/bin/haunt analyze crash.log          &lt;span class="c"&gt;# narrate a log you already kept&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put your command after &lt;code&gt;--&lt;/code&gt;. This is not optional. Without it, &lt;code&gt;haunt&lt;/code&gt; parses your program's flags as its own and gets confused, which is fair, because so do I.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;MIT licensed, at &lt;strong&gt;&lt;a href="https://github.com/Ewan-Dkhar/Tales" rel="noopener noreferrer"&gt;github.com/Ewan-Dkhar/Tales&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The landing page argues the same thing without words: recorded evidence in monospace next to narrated prose in serif, so you can tell which half you are reading from across the room. It is at &lt;strong&gt;&lt;a href="https://ewan-dkhar.github.io/Tales/" rel="noopener noreferrer"&gt;ewan-dkhar.github.io/Tales&lt;/a&gt;&lt;/strong&gt;, plain HTML and CSS, no build step, served straight from the repo.&lt;/p&gt;

&lt;p&gt;The manual is at &lt;strong&gt;&lt;a href="https://ewan-dkhar.github.io/Tales/guide.html" rel="noopener noreferrer"&gt;ewan-dkhar.github.io/Tales/guide.html&lt;/a&gt;&lt;/strong&gt;. Every flag, every field the tool records, the exit codes it passes through, config, model choice, and the parts it does not pretend to handle.&lt;/p&gt;

&lt;p&gt;Inside, five small modules share one object:&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="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Evidence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;exit_code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;duration_s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;
    &lt;span class="n"&gt;stderr_tail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;stdout_tail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;traceback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;GitContext&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;field&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;default_factory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;recent_files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;field&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;default_factory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;run&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;capture.py&lt;/code&gt; runs the process and records how it ended. &lt;code&gt;gather.py&lt;/code&gt; fills in the traceback, git, and environment. &lt;code&gt;prompt.py&lt;/code&gt; turns that into a prompt. &lt;code&gt;narrator.py&lt;/code&gt; streams Gemma. &lt;code&gt;render.py&lt;/code&gt; draws the panels and writes the report. Every stage takes &lt;code&gt;Evidence&lt;/code&gt; and returns either &lt;code&gt;Evidence&lt;/code&gt; or a string, so each one is testable by itself. 21 tests, no network, no model.&lt;/p&gt;

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

&lt;p&gt;Language used is Python btw. Typer for the CLI, Rich for the panels, Pydantic for config, the Ollama client for inference, Sentry for tracing.&lt;/p&gt;

&lt;p&gt;The interesting part was keeping the model honest without sanding off what makes it fun. The system prompt locks the five headings, forbids invented facts, and explicitly allows the word "unknown". A narrator that can admit it didn't see something is worth more than one that invents a motive. The prose is free. The nouns are not.&lt;/p&gt;

&lt;p&gt;Gemma runs on &lt;code&gt;localhost:11434&lt;/code&gt;. &lt;code&gt;--model&lt;/code&gt; or &lt;code&gt;HAUNT_MODEL&lt;/code&gt; takes any Ollama tag, so when something better ships I change one string and it's good to go.&lt;/p&gt;

&lt;p&gt;Three things bit me, in case they bite you too:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sentry showed nothing at first.&lt;/strong&gt; I initialized it after the transaction had already started, so the first traces were invisible. Order matters, and I found that out by staring at an empty dashboard for longer than I would like to admit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A clean exit used to get narrated.&lt;/strong&gt; The process would survive and I would still get a story about its death. Now exit 0 prints &lt;code&gt;The process survived. Nothing to bury.&lt;/code&gt; and writes nothing at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Segfaults have no traceback.&lt;/strong&gt; On a native crash the report gets thinner and runs on the exit code, the signal, and whatever last reached stderr. That is a real limitation, not a feature.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Crash data is the most personal thing a working programmer produces. A stack trace carries file paths, internal hostnames, user IDs, the names of services that aren't public, and every so often a string that looks suspiciously like a key. Uploading that to a hosted API means shipping a slice of your machine to someone else's datacenter every time you mistype a variable.&lt;/p&gt;

&lt;p&gt;Running the narrator locally changes the deal. No account, no per-crash bill, no network. A crash should not come with a meter attached.&lt;/p&gt;

&lt;p&gt;The model is swappable because the boundary is a serialized &lt;code&gt;Evidence&lt;/code&gt; object and not an SDK. The prompt is a plain string in the repo. You can read exactly what the model is told, run it yourself, and compare the output. With a closed API, the post-mortem tool is a black box that has read your worst debugging data, which is the one part you would want to verify.&lt;/p&gt;

&lt;p&gt;That is the argument, and it fits in a sentence: the tool that reads your worst debugging data should be one you can run yourself, and audit while it runs.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;: Gemma is the narrator, running entirely on your machine through Ollama, with the prompt and the evidence both open for inspection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Sentry Agent Tracing&lt;/strong&gt;: every stage of the pipeline is a traced Sentry span inside one transaction, verified in the Sentry UI, including the HTTP call to Ollama.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with Gemma, Ollama, Typer, Rich, and Sentry. Source: &lt;a href="https://github.com/Ewan-Dkhar/Tales" rel="noopener noreferrer"&gt;github.com/Ewan-Dkhar/Tales&lt;/a&gt;. Landing page: &lt;a href="https://ewan-dkhar.github.io/Tales/" rel="noopener noreferrer"&gt;ewan-dkhar.github.io/Tales&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The ghost is local. It has seen enough of your stack traces already.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>python</category>
    </item>
    <item>
      <title>Sloth-Mode for Your Inbox: Building a Private, Local Email Agent with Gemma 2</title>
      <dc:creator>Ewansalan Dkhar</dc:creator>
      <pubDate>Sat, 24 Oct 2026 07:36:33 +0000</pubDate>
      <link>https://dev.to/ewansalandkhar/sloth-mode-for-your-inbox-building-a-private-local-email-agent-with-gemma-2-2eie</link>
      <guid>https://dev.to/ewansalandkhar/sloth-mode-for-your-inbox-building-a-private-local-email-agent-with-gemma-2-2eie</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a 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;h2&gt;
  
  
  What I Built (And Why I Needed It)
&lt;/h2&gt;

&lt;p&gt;I have a confession: &lt;strong&gt;I genuinely, passionately hate reading emails.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s not just a minor annoyance—it's an executive function black hole. Every morning greets you with an overwhelming wall of administrative noise: marketing blasts disguised as product updates, vendor follow-ups, circular discussion threads, and calendar invites.&lt;/p&gt;

&lt;p&gt;Because of this email avoidance, I’ve paid a real price. I've missed deadlines, forgotten critical follow-ups, and caused unnecessary chaos in my life. The wake-up call came when I &lt;strong&gt;nearly missed the mandatory document verification deadline for my scholarship&lt;/strong&gt;. The notification wasn’t flagged or marked urgent; it was quietly buried inside paragraph four of an innocuous administrative newsletter. Missing that single deadline would have cost me thousands of dollars and months of bureaucratic grief.&lt;/p&gt;

&lt;p&gt;And even on the days I forced myself to open my inbox, the second hurdle was waiting: &lt;strong&gt;I despise drafting email replies&lt;/strong&gt;. Staring at a blank compose box, agonizing over how to sound polite, professional, and crisp just to say &lt;em&gt;"Yes, received, let's meet Thursday"&lt;/em&gt; drains more cognitive bandwidth than writing 200 lines of complex backend code.&lt;/p&gt;

&lt;p&gt;In honor of International Sloth Day and the "Slow and Steady" challenge, I decided to channel my inner sloth productively: &lt;strong&gt;if I'm too lazy to wade through email clutter and draft polite replies, I should build an AI agent to do it for me—without compromising my privacy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;Local Email Agent&lt;/strong&gt;: a local-first, privacy-preserving inbox assistant and ReAct co-pilot powered entirely by Google's open-weight &lt;strong&gt;Gemma 2 9B&lt;/strong&gt; running locally via Ollama.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Solves My Three Core Problems
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;"I hate reading emails" → Zero-Effort Triage&lt;/strong&gt;: The agent connects to IMAP in the background, strips away HTML/tracking clutter, and runs every incoming message through &lt;code&gt;gemma2:9b&lt;/code&gt;. It categorizes emails (&lt;code&gt;action_needed&lt;/code&gt;, &lt;code&gt;review&lt;/code&gt;, &lt;code&gt;informational&lt;/code&gt;, &lt;code&gt;low_priority&lt;/code&gt;) and generates a punchy, one-sentence digest so I never have to read wall-of-text threads again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"I almost missed my scholarship verification" → Automated Deadline &amp;amp; Action Extraction&lt;/strong&gt;: The prompt pipeline explicitly commands Gemma to detect time-sensitive requirements, submission dates, and pending action items. Imminent deadlines are flagged in high-visibility alert badges on the dashboard so nothing falls through the cracks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"I hate drafting replies" → ReAct Co-Pilot with Human-in-the-Loop Send&lt;/strong&gt;: An interactive drawer assistant inspects thread context, formulates an appropriate response in seconds, and queues it for approval. I don't type a single word—I just review the proposed draft, tweak if necessary, and click &lt;strong&gt;Approve &amp;amp; Send&lt;/strong&gt; over authenticated SMTP.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most importantly: &lt;strong&gt;zero email data ever leaves my machine.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart LR
    subgraph Local Workstation
        IMAP[Mailbox via IMAP SSL] --&amp;gt;|Sync UIDs| Core[FastAPI Sync Engine]
        Core --&amp;gt;|Sanitize &amp;amp; Store| DB[(SQLite WAL Vault)]
        Core --&amp;gt;|Structured Prompts| Ollama[Ollama: Gemma 2 9B]
        Ollama --&amp;gt;|Classification &amp;amp; Drafts| Core
        UI[React 18 SPA] &amp;lt;--&amp;gt;|REST API| Core
        User((User)) --&amp;gt;|Approve Draft| UI
        Core --&amp;gt;|Authenticated SMTP| Outbound[Outbound Mail Server]
    end&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Here is a step-by-step walkthrough of how Local Email Agent operates, from initial ingestion to verified email dispatch:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: The Zero-Effort Triage Dashboard
&lt;/h3&gt;

&lt;p&gt;When you open the application, incoming emails synced from IMAP are pre-classified into intuitive categories (&lt;code&gt;Action Needed&lt;/code&gt;, &lt;code&gt;Review&lt;/code&gt;, &lt;code&gt;Informational&lt;/code&gt;, &lt;code&gt;Low Priority&lt;/code&gt;). Extracted action items and imminent deadlines are prominently highlighted so you know exactly what requires your attention without opening dense threads.&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%2Fv0ti4bbysbx779nizp07.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%2Fv0ti4bbysbx779nizp07.png" alt="Inbox Triage Dashboard showing categorized emails, urgency badges, and extracted action items" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1: The main inbox triage view showing unread messages ranked by urgency with extracted deadlines.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: The ReAct Co-Pilot Drawer
&lt;/h3&gt;

&lt;p&gt;Selecting any email opens the interactive side drawer. The agent operates using a ReAct (Reasoning + Acting) loop: it can call local tools to read thread context, summarize conversation history, or draft a targeted response tailored to the sender's tone.&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%2F359fkyz38u22i1uoam8f.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%2F359fkyz38u22i1uoam8f.png" alt="Agent Drawer in action drafting a contextual reply to a selected email thread" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 2: The ReAct co-pilot analyzing email context and composing a reply draft.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Human-in-the-Loop Review &amp;amp; Approval
&lt;/h3&gt;

&lt;p&gt;Autonomy without safety is a liability. When the agent finishes drafting, clicking &lt;strong&gt;Send Reply&lt;/strong&gt; opens an explicit approval modal displaying the recipient, subject line, and generated message body. You can inspect the text, make direct line edits if necessary, and approve the dispatch.&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%2F4ne4nsbk6ec2yzotvmma.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%2F4ne4nsbk6ec2yzotvmma.png" alt="Human-in-the-loop email dispatch confirmation modal" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 3: Human-in-the-loop confirmation modal ensuring no email leaves without explicit verification.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Authenticated SMTP Dispatch &amp;amp; Audit Logging
&lt;/h3&gt;

&lt;p&gt;Once approved, the backend securely dispatches the message over authenticated SMTP (supporting both port 465 SSL and port 587 STARTTLS) and creates a persistent audit entry in the local &lt;code&gt;sent_emails&lt;/code&gt; SQLite table.&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%2Flvtk9smt7i517fhl7vv3.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%2Flvtk9smt7i517fhl7vv3.png" alt="Success confirmation toast and sent email audit record" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 4: Instant visual confirmation after successful outbound SMTP transmission.&lt;/em&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Quickstart Guide: Running Locally
&lt;/h3&gt;

&lt;p&gt;The entire application is containerized with Docker Compose using host networking to communicate directly with your local Ollama instance:&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;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/Ewan-Dkhar/email-agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;email-agent

&lt;span class="c"&gt;# 2. Configure mailbox and SMTP credentials&lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;config.example.yaml config.yaml
&lt;span class="c"&gt;# Edit config.yaml with your IMAP and SMTP server settings&lt;/span&gt;

&lt;span class="c"&gt;# 3. Pull Google's Gemma 2 9B model in Ollama&lt;/span&gt;
ollama pull gemma2:9b

&lt;span class="c"&gt;# 4. Start the stack&lt;/span&gt;
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigate to &lt;code&gt;http://localhost:5173&lt;/code&gt; to start using your local email triage assistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;Local Email Agent is fully open source under the MIT License:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/Ewan-Dkhar/email-agent" rel="noopener noreferrer"&gt;https://github.com/Ewan-Dkhar/email-agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Test Suite:&lt;/strong&gt; 37 passing unit and integration tests covering IMAP ingestion, Ollama structured generation, SQLite migrations, prompt injection sanitation, and authenticated SMTP dispatch (&lt;code&gt;backend/.venv/bin/pytest backend/tests&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The stack is designed for speed, isolation, and predictability:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inference Engine&lt;/strong&gt;: &lt;a href="https://ollama.ai" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; serving Google's &lt;code&gt;gemma2:9b&lt;/code&gt;. We enforce structured outputs via Pydantic schemas and deterministic JSON prompting, tuning temperature to &lt;code&gt;0.2&lt;/code&gt; for classification stability and &lt;code&gt;0.6&lt;/code&gt; for natural conversational drafting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defensive Prompt Sanitization&lt;/strong&gt;: Incoming emails from untrusted third parties are potential prompt injection vectors. The backend strips zero-width unicode characters, neutralizes pseudo-system markers (&lt;code&gt;&amp;lt;system&amp;gt;&lt;/code&gt;, &lt;code&gt;[INST]&lt;/code&gt;), and isolates email contents in delimited context blocks before presenting them to Gemma.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sync Engine&lt;/strong&gt;: Python 3.12 with &lt;code&gt;imaplib&lt;/code&gt;, normalizing multipart MIME structures, HTML formatting, and tracking message UIDs to avoid duplicate re-processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: SQLite operating in Write-Ahead Logging (&lt;code&gt;PRAGMA journal_mode=WAL&lt;/code&gt;) mode with explicit connection pooling and foreign key constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbound SMTP Client&lt;/strong&gt;: Python's &lt;code&gt;smtplib&lt;/code&gt; offloaded asynchronously using &lt;code&gt;asyncio.to_thread&lt;/code&gt; with automatic switching between SSL (port 465) and STARTTLS (port 587).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React 18, Vite, TypeScript, and TailwindCSS, served behind an optimized Nginx reverse-proxy container.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;Email is arguably the most sensitive personal data stream we possess. It contains scholarship notices, bank records, tax forms, employment contracts, security verification codes, and private conversations. &lt;/p&gt;

&lt;p&gt;Routing your entire mailbox history through proprietary third-party cloud APIs poses significant privacy risks, vendor lock-in, and ongoing API subscription costs.&lt;/p&gt;

&lt;p&gt;Open-weight models like &lt;strong&gt;Gemma 2&lt;/strong&gt; change the equation. At 9 billion parameters, &lt;code&gt;gemma2:9b&lt;/code&gt; delivers the instruction-following fidelity and reasoning capacity required for nuance, deadline extraction, and reply drafting, all while running comfortably on consumer workstation hardware. Open innovation means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Absolute Privacy&lt;/strong&gt;: Your emails never leave your machine or train third-party models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Recurring Fees&lt;/strong&gt;: Zero token billing or API rate limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Total Transparency&lt;/strong&gt;: The entire pipeline—from prompt construction to email dispatch—is auditable and modifiable in code.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;What does channeling your inner sloth actually save?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Triage Paralysis&lt;/strong&gt;: Instead of wading through 40+ unread threads every morning, Gemma categorizes, extracts action items, and flags upcoming deadlines into a clean digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No More Missed Scholarship/Grant Deadlines&lt;/strong&gt;: High-stakes dates buried in dense administrative text are extracted immediately and highlighted on your dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Effortless Responses&lt;/strong&gt;: For routine administrative requests ("Can you confirm receipt?", "When can we meet?"), the ReAct co-pilot pre-drafts the response. You review it, make any minor adjustments, and click "Approve &amp;amp; Send".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily Time Savings&lt;/strong&gt;: Reduces typical email overhead from &lt;strong&gt;35–45 minutes of daily dread down to under 5 minutes&lt;/strong&gt; of glancing, approving, and moving on with your day.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;I am submitting Local Email Agent for the following challenge category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of Gemma ($200)&lt;/strong&gt;: Local inference powered by Google's open-weight &lt;code&gt;gemma2:9b&lt;/code&gt; model running on Ollama. Gemma acts as both the structured extraction engine for inbox triage and the reasoning backbone of the ReAct co-pilot.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;AI Disclosure: Development was assisted by Claude/Antigravity for pair-programming, test authoring, and drafting this submission narrative. All code, architecture, and tests were verified locally.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>ai</category>
    </item>
    <item>
      <title>A Sub-Millisecond In-Game HUD Powered by Local SLMs</title>
      <dc:creator>Ewansalan Dkhar</dc:creator>
      <pubDate>Sun, 18 Oct 2026 06:39:51 +0000</pubDate>
      <link>https://dev.to/ewansalandkhar/a-sub-millisecond-in-game-hud-powered-by-local-slms-3317</link>
      <guid>https://dev.to/ewansalandkhar/a-sub-millisecond-in-game-hud-powered-by-local-slms-3317</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  🧭 Wayfinder: Building a Zero-Lag, Local-First In-Game Companion HUD with Tauri v2, SQLite BM25, and Local SLMs
&lt;/h1&gt;

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

&lt;p&gt;&lt;strong&gt;Wayfinder&lt;/strong&gt; is a sub-millisecond, local-first in-game companion HUD built for action RPGs and Soulslike titles (&lt;em&gt;Sekiro: Shadows Die Twice&lt;/em&gt;, &lt;em&gt;Elden Ring&lt;/em&gt;, &lt;em&gt;Lies of P&lt;/em&gt;, &lt;em&gt;Black Myth: Wukong&lt;/em&gt;). &lt;/p&gt;

&lt;p&gt;With a single hotkey press (&lt;code&gt;Alt + G&lt;/code&gt;), Wayfinder summons a frameless, transparent glassmorphic overlay directly above your game. Using a local SQLite FTS5 BM25 retrieval engine and local open-weight Small Language Models (SLMs) running on your own GPU via Ollama, it synthesizes an authoritative &lt;strong&gt;3-bullet tactical cheat sheet&lt;/strong&gt; in under a second:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Telegraph &amp;amp; Counter:&lt;/strong&gt; Critical perilous attacks and how to deflect/dodge them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Vulnerability:&lt;/strong&gt; Effective elemental weaknesses, items, or prosthetic tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phase Shifts:&lt;/strong&gt; Exact cues and positioning adjustments across battle phases.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────┐
│                      Wayfinder HUD                          │
│        (Tauri v2 + Vanilla TypeScript + Glassmorphism)      │
│  - Summon: Alt + G Hotkey     - Focus Hand-off: Escape      │
│  - Multi-Game Switcher        - Dynamic SLM Model Picker    │
│  - Drag-and-Drop Ingestion    - 0.08ms DOM Mutation Budget  │
└──────────────────────────────┬──────────────────────────────┘
                               │ HTTP / JSON (127.0.0.1:8765)
┌──────────────────────────────▼──────────────────────────────┐
│                  Wayfinder Micro-Daemon                     │
│               (FastAPI + SQLite WAL Engine)                 │
│  ┌───────────────────────────┐ ┌──────────────────────────┐ │
│  │   SQLite FTS5 + BM25      │ │     Distillation Engine  │ │
│  │  - Sub-ms exact retrieval │ │  - Local Ollama SLM API  │ │
│  │  - Zero B-tree lock (WAL) │ │  - Dynamic Hot-Swapping  │ │
│  └───────────────────────────┘ └──────────────────────────┘ │
└──────────────────────────────┬──────────────────────────────┘
                               │ Local IPC (127.0.0.1:11434)
┌──────────────────────────────▼──────────────────────────────┐
│                    Ollama Runtime                           │
│                 (qwen2.5:1.5b-instruct)                     │
│  - Local GPU/NPU inference with 0 cloud latency             │
└─────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Problem It Solves
&lt;/h3&gt;

&lt;p&gt;When facing brutal boss encounters, gamers currently face three painful tradeoffs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Alt-Tabbing to YouTube / Wikis:&lt;/strong&gt; Breaks combat flow, causes window focus lag, and forces you to scrub through 20-minute video intros while tabbed out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second-Monitor Wikis:&lt;/strong&gt; Diverts eye tracking away from fast enemy attack telegraphs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heavy Overlays (Overwolf / Electron):&lt;/strong&gt; Introduce frame pacing stutter (frame time spikes &amp;gt;16.6ms), inject bloated Chromium runtimes, and hog gigabytes of memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wayfinder is engineered for absolute performance: &lt;strong&gt;~3.2ms summon time&lt;/strong&gt;, &lt;strong&gt;0.42ms SQLite search&lt;/strong&gt;, &lt;strong&gt;0.08ms DOM mutation pacing&lt;/strong&gt;, and a tiny &lt;strong&gt;~42MB idle RAM footprint&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Side Hustle Angle: Who Would Pay For It?
&lt;/h3&gt;

&lt;p&gt;Gamers hate bloatware, but they gladly pay for competitive convenience, speed, and privacy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Target Audience:&lt;/strong&gt; Soulslike &amp;amp; ARPG players, speedrunners, content creators, and handheld gamers (e.g., Steam Deck users who cannot easily alt-tab).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Business / Monetization Model:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free &amp;amp; Open-Source Core:&lt;/strong&gt; Full local HUD, local Ollama integration, manual markdown/URL ingestion, and zero tracking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pro / Subscription Tier ($4.99/mo or $39/year):&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-Synced Community Guide Packs:&lt;/strong&gt; One-click downloads of verified, high-tier boss strategies across newly released AAA titles without manual ingestion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Device Sync:&lt;/strong&gt; Cloud sync of game progress and boss notes between your desktop gaming rig and Steam Deck/ROG Ally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Video Guide Pipeline:&lt;/strong&gt; Cloud-accelerated transcript &amp;amp; timestamp indexing for long-form video walkthroughs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/XESjX_sOSq8" rel="noopener noreferrer"&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%2F61tivvi2drr4las8dids.jpeg" alt=" " width="678" height="474"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Ewan-Dkhar/wayfinder" rel="noopener noreferrer"&gt;Github: Wayfinder&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository is organized into a clean, decoupled architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;desktop/&lt;/code&gt;: Tauri v2 desktop shell with a lightweight Vanilla TypeScript frontend (zero bulky frameworks, hand-tuned glassmorphic CSS).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;core/&lt;/code&gt;: Python micro-daemon powering the SQLite FTS5 database, chunking engine, and Ollama integration.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scripts/build_sidecar.py&lt;/code&gt;: Automated zero-terminal PyInstaller pipeline embedding the Python daemon as a native sidecar binary inside the Tauri bundle.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;h3&gt;
  
  
  1. Open-Source AI Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Weight SLMs (Small Language Models):&lt;/strong&gt; Defaulted to &lt;code&gt;qwen2.5:1.5b&lt;/code&gt; and &lt;code&gt;llama3.2:3b&lt;/code&gt;. These compact models deliver remarkable reasoning density while consuming as little as 1.2 GB of VRAM, leaving your GPU free to render demanding games.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Inference via Ollama:&lt;/strong&gt; All inference runs over local HTTP IPC (&lt;code&gt;127.0.0.1:11434&lt;/code&gt;) with zero telemetry, zero token bills, and zero cloud round-trip latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Model Hot-Swapping:&lt;/strong&gt; Wayfinder queries &lt;code&gt;GET /api/tags&lt;/code&gt; from Ollama on boot to automatically populate the HUD header with every model installed on the host. Players can hot-swap models mid-game without touching a terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. High-Performance Retrieval Engine
&lt;/h3&gt;

&lt;p&gt;Instead of high-overhead vector databases that demand hundreds of megabytes of RAM and heavy embeddings calculation on every boot, Wayfinder uses &lt;strong&gt;SQLite FTS5 with BM25 ranking&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sub-millisecond exact keyword and token matching (&lt;strong&gt;0.42ms average query time&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;WAL (Write-Ahead Logging) mode to prevent database locks during game sessions.&lt;/li&gt;
&lt;li&gt;Multi-source ingestion that extracts and normalizes Markdown guides, Steam Community articles, and YouTube transcripts with automated chunking.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Tauri v2 Desktop &amp;amp; The PyInstaller Sidecar Pattern
&lt;/h3&gt;

&lt;p&gt;To deliver a true consumer app that doesn't require users to know Python, Node, or terminal commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Python micro-daemon is compiled into a self-contained binary via &lt;strong&gt;PyInstaller&lt;/strong&gt; (&lt;code&gt;wayfinder-daemon.spec&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tauri manages the sidecar lifecycle: launching the daemon on app startup, communicating over a local loopback port, and cleanly killing background processes on exit.&lt;/li&gt;
&lt;li&gt;A strict &lt;strong&gt;0.08ms DOM mutation budget&lt;/strong&gt; using pure Vanilla TypeScript ensures that rendering the HUD never interferes with GPU frame pacing in 144Hz gaming setups.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;In competitive gaming, &lt;strong&gt;timing is measured in frames (16.6ms at 60 FPS)&lt;/strong&gt;. Closed AI APIs (like proprietary cloud LLMs) are fundamentally unsuited for real-time in-game tools:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Network Latency &amp;amp; Jitter:&lt;/strong&gt; Cloud APIs introduce variable round-trips (400ms to 2000ms+). If your internet hiccups during a boss fight, a cloud HUD fails completely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-Token Metering &amp;amp; Unpredictable Costs:&lt;/strong&gt; A gamer querying boss strategies fifty times an evening would rack up API subscription costs or hit rate limits. Local open-weight models have &lt;strong&gt;zero recurring token costs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy &amp;amp; Offline Sovereignty:&lt;/strong&gt; Your gaming habits, machine status, and custom guide documents stay 100% on your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware Flexibility:&lt;/strong&gt; Open innovation means players on a Steam Deck can run a 0.5B model, while players with an RTX 4090 can spin up an 8B DeepSeek reasoning model—without waiting for a cloud provider's permission.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open-source AI made it possible to build a genuinely fast, offline utility that prioritizes player experience over cloud lock-in.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ for gamers and performance purists. Stars and feedback are welcome on &lt;a href="https://github.com/Ewan-Dkhar/wayfinder" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>A Brand New Day</title>
      <dc:creator>Ewansalan Dkhar</dc:creator>
      <pubDate>Sat, 03 Oct 2026 20:47:51 +0000</pubDate>
      <link>https://dev.to/ewansalandkhar/a-brand-new-day-3bl8</link>
      <guid>https://dev.to/ewansalandkhar/a-brand-new-day-3bl8</guid>
      <description>&lt;p&gt;Starting a new journey as I aim to become a more skill developer.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
