<?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: Yamin</title>
    <description>The latest articles on DEV Community by Yamin (@yaminbakoh4).</description>
    <link>https://dev.to/yaminbakoh4</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%2F4077921%2F17f0c465-dc1a-4f95-ab5e-6d54f9c06d41.png</url>
      <title>DEV Community: Yamin</title>
      <link>https://dev.to/yaminbakoh4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yaminbakoh4"/>
    <language>en</language>
    <item>
      <title>Your coding agent can read git log. It can't read the four things you tried that didn't work.</title>
      <dc:creator>Yamin</dc:creator>
      <pubDate>Fri, 14 Aug 2026 16:12:29 +0000</pubDate>
      <link>https://dev.to/yaminbakoh4/your-coding-agent-can-read-git-log-it-cant-read-the-four-things-you-tried-that-didnt-work-1bkm</link>
      <guid>https://dev.to/yaminbakoh4/your-coding-agent-can-read-git-log-it-cant-read-the-four-things-you-tried-that-didnt-work-1bkm</guid>
      <description>&lt;p&gt;I've been building &lt;a href="https://github.com/yaminbakoh4-dot/NexusMem" rel="noopener noreferrer"&gt;NexusMem&lt;/a&gt; mostly alone, in long&lt;br&gt;
stretches, for a few weeks. It's a local-first memory engine for AI coding agents: it indexes your&lt;br&gt;
git history, shell commands (with exit codes), project docs, and optionally your assistant&lt;br&gt;
transcripts into a SQLite database on disk, then serves back a ranked, token-budgeted slice of it&lt;br&gt;
over MCP or a CLI. No account, no cloud, no telemetry.&lt;/p&gt;

&lt;p&gt;The pitch, in one line: your agent can already read &lt;code&gt;git log&lt;/code&gt;. It cannot read the four things you&lt;br&gt;
tried last Tuesday that didn't work — and that's the part actually worth remembering.&lt;/p&gt;

&lt;p&gt;This week two strangers showed up and started fixing things I didn't ask them to fix. That felt&lt;br&gt;
like a good excuse to write about what it does and why.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem it's solving
&lt;/h2&gt;

&lt;p&gt;Coding agents get context from two places: what you paste in, and what they can grep. Neither one&lt;br&gt;
remembers &lt;em&gt;process&lt;/em&gt;. Git tells an agent what shipped. It has nothing to say about the three&lt;br&gt;
approaches you tried before the one that worked, or which shell commands exited non-zero while you&lt;br&gt;
were debugging it. That information exists for maybe a day, in your terminal scrollback, and then&lt;br&gt;
it's gone.&lt;/p&gt;

&lt;p&gt;NexusMem's answer is boring on purpose: read what already exists on disk (git log, shell history,&lt;br&gt;
markdown docs), normalize it into one node shape, index it, and rank it well enough that a query&lt;br&gt;
returns the right five things instead of the right fifty.&lt;/p&gt;

&lt;h2&gt;
  
  
  The interesting part: ranking priors against each other
&lt;/h2&gt;

&lt;p&gt;The retrieval side is BM25 over SQLite FTS5, plus a vector pass over &lt;code&gt;sqlite-vec&lt;/code&gt; if an embedding&lt;br&gt;
model is reachable, fused with Reciprocal Rank Fusion. RRF fuses on rank position only, never raw&lt;br&gt;
scores — that's the whole point of using it, since a BM25 cost and a vector distance live on&lt;br&gt;
unrelated scales and position is the only thing they agree on.&lt;/p&gt;

&lt;p&gt;On top of the fused rank, two priors adjust the score: &lt;code&gt;signal&lt;/code&gt; (a &lt;code&gt;fix:&lt;/code&gt; commit outranks a&lt;br&gt;
&lt;code&gt;chore:&lt;/code&gt;; a shell command that exited non-zero outranks one that succeeded) and &lt;code&gt;recency&lt;/code&gt;. Both are&lt;br&gt;
real signal. Both also almost broke the whole thing.&lt;/p&gt;

&lt;p&gt;Dogfooding the tool on its own repo, a query about a PowerShell hook returned two unrelated&lt;br&gt;
same-day &lt;code&gt;fix:&lt;/code&gt; commits at ranks 3 and 4, while the commit that actually answered the query sat at&lt;br&gt;
rank 6. The priors were capped individually — each could overturn at most a 2× relevance gap — but&lt;br&gt;
the score &lt;em&gt;multiplies&lt;/em&gt; them together, so a fresh, high-signal commit (which describes most of an&lt;br&gt;
active working day) could overturn 4×. The fix wasn't a bigger cap, it was a shared one: priors now&lt;br&gt;
split one budget across both of them, derived so each is worth exactly &lt;code&gt;√2&lt;/code&gt;, not asserted by feel.&lt;/p&gt;

&lt;p&gt;I only found this because I kept running real queries against the tool's own commit history and&lt;br&gt;
reading the output critically instead of trusting the ranking math on paper. That's most of what&lt;br&gt;
building this has actually been: dogfood, find the case where it's confidently wrong, write a test&lt;br&gt;
that fails before the fix and passes after.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it's honest about not working
&lt;/h2&gt;

&lt;p&gt;The README has a "Where it breaks" section and I've tried to keep it truthful rather than&lt;br&gt;
reassuring. A few examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shell history without an installed hook has no directory context, so it gets attributed to
whichever repo you happened to run &lt;code&gt;sync&lt;/code&gt; from.&lt;/li&gt;
&lt;li&gt;Languages without whitespace word boundaries (Japanese, Chinese) get no useful BM25 recall — they
depend entirely on the vector pass.&lt;/li&gt;
&lt;li&gt;Rebasing strands nodes for commits that no longer exist in the rewritten history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's also a number I was tempted to lead with and didn't: the original target was cutting API&lt;br&gt;
token spend by more than 70% versus sending full context. Measured end-to-end on this repo, it's&lt;br&gt;
closer to 40%. The &amp;gt;70% figure describes what the packing math shows against its own candidate set,&lt;br&gt;
which is a real number but a different, rosier question than "how much less did the agent actually&lt;br&gt;
read." The README says this outright instead of quietly reporting the friendlier number.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that made this week different
&lt;/h2&gt;

&lt;p&gt;I built this solo, iterating in long sessions, for weeks. This week, for the first time, someone I&lt;br&gt;
don't know opened an issue asking to add end-to-end stdio transport coverage for the MCP server —&lt;br&gt;
the existing tests only exercised an in-memory transport, which can't prove protocol framing&lt;br&gt;
survives a real process boundary. They described their approach in a comment first, then shipped a&lt;br&gt;
&lt;a href="https://github.com/yaminbakoh4-dot/NexusMem/pull/9" rel="noopener noreferrer"&gt;PR&lt;/a&gt; that spawns the actual built CLI as a&lt;br&gt;
child process and asserts every line written to stdout parses as JSON-RPC. CI caught a real&lt;br&gt;
Windows-only bug in their first pass (a &lt;code&gt;.cmd&lt;/code&gt; shim needs &lt;code&gt;shell: true&lt;/code&gt; to spawn on Windows) — they&lt;br&gt;
fixed it within the hour and it merged clean.&lt;/p&gt;

&lt;p&gt;A second person forked the repo the same day and, without opening an issue first, found something I&lt;br&gt;
hadn't: the PowerShell hook always inserted its block with &lt;code&gt;\n&lt;/code&gt; line endings, but a profile written&lt;br&gt;
by a Windows editor is CRLF by convention, so installing the hook silently turned a CRLF file into a&lt;br&gt;
mixed-ending one — and removing it later left a stray bare newline behind. That's a subtle enough&lt;br&gt;
bug that finding it means actually reading the code, not skimming it.&lt;/p&gt;

&lt;p&gt;Neither of those things needed me. That's the part worth sitting with — the project became legible&lt;br&gt;
enough, on its own, for someone else to extend it correctly on the first try.&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nexusmem init
npx nexusmem &lt;span class="nb"&gt;sync
&lt;/span&gt;nexusmem query &lt;span class="s2"&gt;"windows spawn failure"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requirements are just Node 22+ and git. Ollama is optional and only affects semantic search — BM25&lt;br&gt;
works fully without it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yaminbakoh4-dot/NexusMem" rel="noopener noreferrer"&gt;Repo's here&lt;/a&gt; if you want to poke at it, and there's&lt;br&gt;
now a &lt;a href="https://github.com/yaminbakoh4-dot/NexusMem/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt;&lt;br&gt;
if you find something worth fixing.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>typescript</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
