<?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: Anish Lanka</title>
    <description>The latest articles on DEV Community by Anish Lanka (@anish_lanka_b1127c4b3a3d4).</description>
    <link>https://dev.to/anish_lanka_b1127c4b3a3d4</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%2F4148503%2Ffc060eb0-9fe0-4bdc-911b-3bcd3bf5212b.jpg</url>
      <title>DEV Community: Anish Lanka</title>
      <link>https://dev.to/anish_lanka_b1127c4b3a3d4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anish_lanka_b1127c4b3a3d4"/>
    <language>en</language>
    <item>
      <title>How Hindsight Changed the Way I Review Existing Code</title>
      <dc:creator>Anish Lanka</dc:creator>
      <pubDate>Tue, 29 Sep 2026 07:28:17 +0000</pubDate>
      <link>https://dev.to/anish_lanka_b1127c4b3a3d4/how-hindsight-changed-the-way-i-review-existing-code-56oe</link>
      <guid>https://dev.to/anish_lanka_b1127c4b3a3d4/how-hindsight-changed-the-way-i-review-existing-code-56oe</guid>
      <description>&lt;p&gt;What if a Codebase Could Remember Why It Was Built?&lt;/p&gt;

&lt;p&gt;Every mature codebase has a history.&lt;/p&gt;

&lt;p&gt;Libraries were selected. Architectures changed. Pull requests were debated. Conventions emerged.&lt;/p&gt;

&lt;p&gt;Some of that knowledge survives in documentation.&lt;/p&gt;

&lt;p&gt;A lot of it doesn't.&lt;/p&gt;

&lt;p&gt;So I built CodeCompass to explore what happens when that history becomes part of an AI assistant's memory.&lt;/p&gt;

&lt;p&gt;The question behind the project&lt;/p&gt;

&lt;p&gt;Imagine joining a project and asking:&lt;/p&gt;

&lt;p&gt;«Why do we use Redis here instead of Memcached?»&lt;/p&gt;

&lt;p&gt;The code can show you how Redis is being used.&lt;/p&gt;

&lt;p&gt;It may not tell you why it was chosen.&lt;/p&gt;

&lt;p&gt;That answer could be buried in a PR from months ago.&lt;/p&gt;

&lt;p&gt;That's the context CodeCompass is designed to retrieve.&lt;/p&gt;

&lt;p&gt;Three memory operations&lt;/p&gt;

&lt;p&gt;The architecture revolves around three ideas:&lt;/p&gt;

&lt;p&gt;Retain — store useful project information.&lt;/p&gt;

&lt;p&gt;Recall — retrieve relevant information when a question is asked.&lt;/p&gt;

&lt;p&gt;Reflect — identify broader patterns across accumulated memories.&lt;/p&gt;

&lt;p&gt;The current application demonstrates retain and recall directly:&lt;/p&gt;

&lt;p&gt;memory.retain(&lt;br&gt;
    bank_id=BANK_ID,&lt;br&gt;
    content=memory_text&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;and:&lt;/p&gt;

&lt;p&gt;results = memory.recall(&lt;br&gt;
    bank_id=BANK_ID,&lt;br&gt;
    query=question&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;That provides the foundation for the larger idea.&lt;/p&gt;

&lt;p&gt;From memories to conventions&lt;/p&gt;

&lt;p&gt;Individual memories answer individual questions.&lt;/p&gt;

&lt;p&gt;Reflection can potentially reveal patterns.&lt;/p&gt;

&lt;p&gt;For example, after enough project history has accumulated, CodeCompass could identify patterns such as:&lt;/p&gt;

&lt;p&gt;«The team prefers composition over inheritance.»&lt;/p&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;p&gt;«Performance-critical paths generally avoid ORMs.»&lt;/p&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;p&gt;«New features are normally introduced behind feature flags.»&lt;/p&gt;

&lt;p&gt;These aren't single decisions.&lt;/p&gt;

&lt;p&gt;They're characteristics of how the project evolves.&lt;/p&gt;

&lt;p&gt;That's the part of Hindsight I find especially interesting.&lt;/p&gt;

&lt;p&gt;A simple demonstration&lt;/p&gt;

&lt;p&gt;For a demo, we can provide simulated project history:&lt;/p&gt;

&lt;p&gt;«Redis was selected because pub/sub was required.»&lt;/p&gt;

&lt;p&gt;«Cache keys should use the "cache_" prefix.»&lt;/p&gt;

&lt;p&gt;«Short TTLs previously caused a thundering-herd problem.»&lt;/p&gt;

&lt;p&gt;Then ask:&lt;/p&gt;

&lt;p&gt;«I'm adding a new caching layer. What should I know?»&lt;/p&gt;

&lt;p&gt;Without project memory, an AI can provide generic caching advice.&lt;/p&gt;

&lt;p&gt;With the relevant project memories, CodeCompass can answer using the project's own history.&lt;/p&gt;

&lt;p&gt;The difference isn't more intelligence.&lt;/p&gt;

&lt;p&gt;It's better context.&lt;/p&gt;

&lt;p&gt;What I learned&lt;/p&gt;

&lt;p&gt;The Hindsight documentation helped us build the memory layer, while the broader idea of agent memory shaped the project.&lt;/p&gt;

&lt;p&gt;The biggest lesson for me was that source code is only part of a project's knowledge.&lt;/p&gt;

&lt;p&gt;The reasoning behind the code matters too.&lt;/p&gt;

&lt;p&gt;CodeCompass is an attempt to make that reasoning easier to recover.&lt;/p&gt;

&lt;p&gt;Because sometimes the most important question about a line of code isn't:&lt;/p&gt;

&lt;p&gt;"What does this do?"&lt;/p&gt;

&lt;p&gt;It's:&lt;/p&gt;

&lt;p&gt;"Why did we decide to do it this way?"&lt;/p&gt;

&lt;p&gt;Our project: &lt;a href="https://xzhapxf95r8xhycqrxdflq.streamlit.app/" rel="noopener noreferrer"&gt;https://xzhapxf95r8xhycqrxdflq.streamlit.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A demo:&lt;br&gt;
&lt;a href="https://youtu.be/HBaRQqr1enY?si=hzm1qShAX7hJcmlK" rel="noopener noreferrer"&gt;https://youtu.be/HBaRQqr1enY?si=hzm1qShAX7hJcmlK&lt;/a&gt;&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%2Fng6brqqy8ubsytxgsfiw.jpg" 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%2Fng6brqqy8ubsytxgsfiw.jpg" alt=" " width="800" height="1177"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>llm</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
