<?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: Aaditya Singh</title>
    <description>The latest articles on DEV Community by Aaditya Singh (@waifu_puller).</description>
    <link>https://dev.to/waifu_puller</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%2F4150066%2F593a6d08-ffa6-4bd5-8dd4-78da85dfc904.png</url>
      <title>DEV Community: Aaditya Singh</title>
      <link>https://dev.to/waifu_puller</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/waifu_puller"/>
    <language>en</language>
    <item>
      <title>I built a zero-API-key, &lt;50ms CLI to catch what coding agents quietly break</title>
      <dc:creator>Aaditya Singh</dc:creator>
      <pubDate>Tue, 24 Nov 2026 13:53:07 +0000</pubDate>
      <link>https://dev.to/waifu_puller/i-built-a-zero-api-key-50ms-cli-to-catch-what-coding-agents-quietly-break-29jg</link>
      <guid>https://dev.to/waifu_puller/i-built-a-zero-api-key-50ms-cli-to-catch-what-coding-agents-quietly-break-29jg</guid>
      <description>&lt;p&gt;Coding agents can generate a 500-line diff in 60 seconds, which has shifted the bottleneck from &lt;em&gt;writing&lt;/em&gt; code to &lt;em&gt;reviewing&lt;/em&gt; it. Most of the bugs that slip through aren't dramatic syntax errors — they're quiet shortcuts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Skipping a failing test (&lt;code&gt;it.skip&lt;/code&gt;, &lt;code&gt;pytest.mark.skip&lt;/code&gt;) or deleting assertions&lt;/li&gt;
&lt;li&gt;Adding an empty &lt;code&gt;catch {}&lt;/code&gt; block or bare &lt;code&gt;except: pass&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Loosening security (&lt;code&gt;cors({ origin: '*' })&lt;/code&gt;, &lt;code&gt;rejectUnauthorized: false&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Leaving hardcoded test keys or &lt;code&gt;debugger&lt;/code&gt; statements behind&lt;/li&gt;
&lt;li&gt;Quietly bumping dependencies in &lt;code&gt;package.json&lt;/code&gt; or &lt;code&gt;requirements.txt&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most AI review tools either just render the raw diff or require an API key and cloud round-trip. So I built &lt;strong&gt;&lt;a href="https://github.com/WaifuPuller/diffvet" rel="noopener noreferrer"&gt;diffvet&lt;/a&gt;&lt;/strong&gt; — a zero-API-key, sub-50ms local CLI that triages your &lt;code&gt;git diff&lt;/code&gt; deterministically by risk and intent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsf0dmozp8gixvsmk9dnm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsf0dmozp8gixvsmk9dnm.gif" alt=" " width="800" height="608"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it in 1 command (zero install)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Preview on a built-in sample AI PR&lt;/span&gt;
npx diffvet --demo

&lt;span class="c"&gt;# Vet your current working tree (or last commit)&lt;/span&gt;
npx diffvet

&lt;span class="c"&gt;# Interactive walkthrough (press 'c' to copy a fix prompt back to your agent)&lt;/span&gt;
npx diffvet -i
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Risk Engine (Zero LLM required):&lt;/strong&gt; Scans added/removed diff hunks across 7 high-signal rules (&lt;code&gt;test-deletion-or-skip&lt;/code&gt;, &lt;code&gt;silent-error-swallow&lt;/code&gt;, &lt;code&gt;dangerous-exec-sink&lt;/code&gt;, &lt;code&gt;auth-security-loosened&lt;/code&gt;, &lt;code&gt;hardcoded-secrets&lt;/code&gt;, &lt;code&gt;supply-chain-drift&lt;/code&gt;, &lt;code&gt;debug-leftover&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intent Bucketing:&lt;/strong&gt; Separates files into &lt;strong&gt;High Risk&lt;/strong&gt;, &lt;strong&gt;Logic&lt;/strong&gt;, &lt;strong&gt;Tests &amp;amp; Docs&lt;/strong&gt;, and &lt;strong&gt;Noise&lt;/strong&gt; (lockfiles, formatting-only diffs, pure renames).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional &lt;code&gt;--ai&lt;/code&gt; mode:&lt;/strong&gt; Off by default — if you want a 3-bullet summary of the high-risk hunks, it uses native Node &lt;code&gt;fetch&lt;/code&gt; with &lt;code&gt;GEMINI_API_KEY&lt;/code&gt;, &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;, &lt;code&gt;OPENAI_API_KEY&lt;/code&gt;, or local &lt;code&gt;OLLAMA_HOST&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI / Pre-commit Ready:&lt;/strong&gt; Run &lt;code&gt;npx diffvet --fail-on high&lt;/code&gt; to block risky agent commits automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Repo (MIT): &lt;a href="https://github.com/WaifuPuller/diffvet" rel="noopener noreferrer"&gt;https://github.com/WaifuPuller/diffvet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you try &lt;code&gt;npx diffvet --demo&lt;/code&gt; or run it on one of your recent agent PRs, let me know what rules or languages you'd want added next!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>opensource</category>
      <category>devtool</category>
    </item>
    <item>
      <title>Hindsight made my code reviewer stop repeating rejected advice</title>
      <dc:creator>Aaditya Singh</dc:creator>
      <pubDate>Tue, 29 Sep 2026 15:20:43 +0000</pubDate>
      <link>https://dev.to/waifu_puller/hindsight-made-my-code-reviewer-stop-repeating-rejected-advice-5hmh</link>
      <guid>https://dev.to/waifu_puller/hindsight-made-my-code-reviewer-stop-repeating-rejected-advice-5hmh</guid>
      <description>&lt;h1&gt;
  
  
  Hindsight made my code reviewer stop repeating rejected advice
&lt;/h1&gt;

&lt;p&gt;What finally made our automated reviewer useful wasn't a better model. It was storing the suggestions we turned down.&lt;/p&gt;

&lt;p&gt;Every AI code reviewer I've used has the same defect. It reads a diff, produces a competent list of observations, and forgets the exchange. Next week it reads another diff from the same repository and tells you the thing you already declined, in the same confident tone. The model isn't wrong exactly. It has no way to know this team decided, months ago and for good reasons, that private helpers don't get type hints.&lt;/p&gt;

&lt;p&gt;I built Memolint to fix precisely that, and the interesting part turned out to be the taxonomy of what to remember rather than the reviewing itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the system actually is
&lt;/h2&gt;

&lt;p&gt;Memolint is a command-line reviewer. It takes a diff, a git range, or a pull request, and produces findings. That part is unremarkable; any competent prompt does it.&lt;/p&gt;

&lt;p&gt;The part that matters sits either side of the model call. Before reviewing, it queries a memory bank for what the team has said that bears on this change. Afterwards, once a human responds, it writes back what happened. The memory layer is &lt;a href="https://github.com/vectorize-io/hindsight" rel="noopener noreferrer"&gt;Hindsight, Vectorize's open source memory system for AI agents&lt;/a&gt;, which gives me three primitives: &lt;code&gt;retain&lt;/code&gt; to store, &lt;code&gt;recall&lt;/code&gt; to retrieve against a query, and &lt;code&gt;reflect&lt;/code&gt; to reason over the whole bank.&lt;/p&gt;

&lt;p&gt;The model stays stateless. The bank does not. One bank per repository, so the reviewer's opinions are scoped to the team that formed them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four kinds of memory, and one of them does most of the work
&lt;/h2&gt;

&lt;p&gt;My first version retained everything as undifferentiated text. Recall then surfaced the agent's own previous reviews far more often than anything a human had said. It was mostly remembering itself talking.&lt;/p&gt;

&lt;p&gt;The fix was to classify what goes in, and tag it so recall results can be grouped when they're rendered into the prompt:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;kind&lt;/th&gt;
&lt;th&gt;what it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;convention&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;An explicit team rule, also stored as a Hindsight directive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;feedback&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How a human responded to a specific finding, and why&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;incident&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A bug or outage tied to a code pattern&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A summary of each review posted&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;feedback&lt;/code&gt; is the one that earns its keep, and specifically the rejections. An accepted suggestion tells you the reviewer was already right. A rejected one tells you something you could not have derived from the code:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;record_feedback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;note&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pr_ref&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;where&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;file&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;line&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Reviewer &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;verdict&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; the suggestion &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; on &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;where&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pr_ref&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. Suggestion was: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;body&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;note&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; Reviewer said: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;note&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rejected&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; Do not raise this kind of suggestion again for this team unless the rule changes.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_retain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;feedback&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;extra_tags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;feedback&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pr:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pr_ref&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That trailing sentence on rejections is doing real work. Without it, the model treats the rejection as trivia about the past. With it, the rejection reads as an instruction about the future.&lt;/p&gt;

&lt;p&gt;Conventions get stored twice: once as an ordinary memory, and once as a Hindsight directive, which is a standing instruction attached to the bank rather than a fact to be retrieved by similarity. That distinction matters. "Use guard clauses instead of nested conditionals" should apply to every review whether or not the diff happens to be similar to the one that produced the rule. Similarity search is the wrong retrieval mechanism for a rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recall is a budget problem, not a search problem
&lt;/h2&gt;

&lt;p&gt;The naive approach is to recall everything. That's wrong twice over: the prompt has a ceiling, and irrelevant memories dilute the ones that matter.&lt;/p&gt;

&lt;p&gt;I build a query from what the diff is actually about, and cap what comes back:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build_recall_query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;added&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;patch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;+&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;+ &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
                &lt;span class="n"&gt;added&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:].&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="n"&gt;snippet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;added&lt;/span&gt;&lt;span class="p"&gt;)[:&lt;/span&gt;&lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Code review of &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; touching &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;paths&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Team conventions, past review feedback, rejected suggestions, and incidents &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;relevant to: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;snippet&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Added lines matter more than removed ones, since a review is about what's arriving. Recall gets a 1,000 token ceiling and the diff gets 2,500, which keeps a review between 1,000 and 2,300 input tokens, memories included.&lt;/p&gt;

&lt;p&gt;Results come back tagged, get grouped by kind, and render under headings the system prompt treats as binding rather than advisory. There's a real difference between telling a model "here is some context" and telling it "these are rules this team has already settled".&lt;/p&gt;

&lt;h2&gt;
  
  
  Teach it to match on shape, not on wording
&lt;/h2&gt;

&lt;p&gt;The best behaviour I got out of the system came from one paragraph in the prompt, and it took me embarrassingly long to write.&lt;/p&gt;

&lt;p&gt;A recorded incident said that per-row database queries inside a loop had exhausted a connection pool. A later change made one external API call per item inside a loop. Those are the same bug. The reviewer flagged the performance issue, correctly, and completely failed to connect it to the incident, because the words didn't overlap: one said "database query", the other said "API request".&lt;/p&gt;

&lt;p&gt;So I stopped describing what to recall and started describing how to match:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Incidents are the highest-value memory you have. Match them on the SHAPE of the bug,
  not on exact wording: "one database query per item inside a loop" and "one network
  call per item inside a loop" are the same shape. If a change repeats the shape of a
  past incident, the finding is "high" severity and its "precedent" must name that
  incident and what it cost.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that change, the same diff produced this, unprompted:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;F1 HIGH — N+1 external API calls in loop&lt;/strong&gt;&lt;br&gt;
The loop calls &lt;code&gt;_provider_status(refund)&lt;/code&gt; for every refund, which makes one external API request per item. This is the exact shape of the bug that caused the 41-minute checkout outage. You must batch these requests or parallelize them to avoid exhausting the connection pool.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The generic reviewer says this will be slow. The one with memory says this is the thing that took us down, and names the cost. Only one of those gets a change prioritised.&lt;/p&gt;

&lt;h2&gt;
  
  
  The before and after, concretely
&lt;/h2&gt;

&lt;p&gt;Same model, same diff, memory disabled then enabled.&lt;/p&gt;

&lt;p&gt;Without memory, a single medium-severity finding about sequential network calls in a loop. Accurate, forgettable, and indistinguishable from what any static analysis vendor would emit.&lt;/p&gt;

&lt;p&gt;With memory, three things change. The finding is high severity and cites the incident. Every finding carries a &lt;code&gt;precedent&lt;/code&gt; field naming the stored rule behind it. And a separate section lists what the reviewer deliberately chose not to raise:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Deliberately not raised (learned from you)&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Would have said:&lt;/em&gt; Add type hints to private helper functions &lt;code&gt;_refunds_for&lt;/code&gt; and &lt;code&gt;_provider_status&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Why not:&lt;/em&gt; Team convention states that private helpers do not require type hints; only public functions need them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That table is the feature I did not plan and now consider essential. Silence is invisible: if the agent stops mentioning something, you cannot tell whether it learned or just got distracted. Making suppression explicit turns an absence into evidence, and gives reviewers somewhere to correct the agent when it over-generalises from one rejection.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone building this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Classify memories on the way in.&lt;/strong&gt; Retrieval quality is decided at write time. Once everything is undifferentiated text, no clever querying separates "a human told us this" from "we said this last Tuesday".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Store the negative cases.&lt;/strong&gt; Most memory systems get pointed at successes. Rejections carry more information per byte than anything else my agent stores, because they encode a judgment you cannot recover from the codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules and facts need different retrieval.&lt;/strong&gt; Similarity search is right for "what do we know about this file" and wrong for "what does this team always do". Hindsight's directives handle the second case, and separating the two removed a whole class of inconsistency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt for the matching rule, not just the content.&lt;/strong&gt; Giving a model relevant memories is not the same as telling it how to decide that a memory is relevant. The shape-matching paragraph changed behaviour more than any amount of additional context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Budget recall like you budget tokens, because you are.&lt;/strong&gt; More retrieved memories is not better. The ceiling forces a ranking, and the ranking is what makes the good ones visible.&lt;/p&gt;

&lt;p&gt;None of this is specific to code review. Any agent that serves the same people repeatedly accumulates the same class of knowledge: what they accepted, what they refused, and what hurt them before. &lt;a href="https://hindsight.vectorize.io/" rel="noopener noreferrer"&gt;The Hindsight documentation&lt;/a&gt; covers the retain and recall mechanics, and Vectorize's write-up on &lt;a href="https://vectorize.io/what-is-agent-memory" rel="noopener noreferrer"&gt;what agent memory actually means&lt;/a&gt; explains why this is a different problem from retrieval-augmented generation over documents.&lt;/p&gt;

&lt;p&gt;The model I'm running is not the smartest one available. It doesn't need to be. It just needs to remember what we told it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Code: &lt;a href="https://github.com/WaifuPuller/MemoLint" rel="noopener noreferrer"&gt;https://github.com/WaifuPuller/MemoLint&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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