<?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: lorismascio17</title>
    <description>The latest articles on DEV Community by lorismascio17 (@lorismascio17).</description>
    <link>https://dev.to/lorismascio17</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%2F4010692%2Fdcd40723-65cf-482d-9586-fbbc9d7fd975.png</url>
      <title>DEV Community: lorismascio17</title>
      <link>https://dev.to/lorismascio17</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lorismascio17"/>
    <language>en</language>
    <item>
      <title>Why vector-only RAG is weak for coding agents</title>
      <dc:creator>lorismascio17</dc:creator>
      <pubDate>Wed, 01 Jul 2026 09:53:01 +0000</pubDate>
      <link>https://dev.to/lorismascio17/why-vector-only-rag-is-weak-for-coding-agents-1ip9</link>
      <guid>https://dev.to/lorismascio17/why-vector-only-rag-is-weak-for-coding-agents-1ip9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Building Droste: a local structural + semantic code-memory engine for MCP agents&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI coding agents are getting better, but their memory layer is still often too shallow.&lt;/p&gt;

&lt;p&gt;Most agent workflows still depend on one of two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;blind file reads;&lt;/li&gt;
&lt;li&gt;vector search over chunks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both are useful, but both miss something important in codebases: causal structure.&lt;/p&gt;

&lt;p&gt;A function may be relevant to a bug even if it shares no words with the user’s query. A SQL function may be called through an RPC string from TypeScript or Dart. A file may&lt;br&gt;
  matter because it is a caller, callee, handler, migration, or dependency, not because its text looks similar.&lt;/p&gt;

&lt;p&gt;That is the reason I started building Droste.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;br&gt;
  &lt;a href="https://github.com/lorismascio17/droste-memory" rel="noopener noreferrer"&gt;https://github.com/lorismascio17/droste-memory&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PyPI:&lt;br&gt;
  &lt;a href="https://pypi.org/project/droste-memory/" rel="noopener noreferrer"&gt;https://pypi.org/project/droste-memory/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;## What Droste is&lt;/p&gt;

&lt;p&gt;Droste is a local code-memory engine for AI coding agents.&lt;/p&gt;

&lt;p&gt;It indexes a repository into a hybrid structural + semantic graph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;folders;&lt;/li&gt;
&lt;li&gt;files;&lt;/li&gt;
&lt;li&gt;symbols;&lt;/li&gt;
&lt;li&gt;functions;&lt;/li&gt;
&lt;li&gt;classes;&lt;/li&gt;
&lt;li&gt;methods;&lt;/li&gt;
&lt;li&gt;caller/callee links;&lt;/li&gt;
&lt;li&gt;import/dependency edges;&lt;/li&gt;
&lt;li&gt;cross-language links;&lt;/li&gt;
&lt;li&gt;local embeddings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then it exposes that memory through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a CLI;&lt;/li&gt;
&lt;li&gt;an MCP server;&lt;/li&gt;
&lt;li&gt;a visual graph viewer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is simple: give an agent the causal slice of code it needs, instead of forcing it to repeatedly scan files or rely only on semantic similarity.&lt;/p&gt;

&lt;p&gt;## Why vector search alone is not enough&lt;/p&gt;

&lt;p&gt;Vector search is good at finding code that sounds similar to a query.&lt;/p&gt;

&lt;p&gt;But code often matters because of relationships, not wording.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a controller calls a service;&lt;/li&gt;
&lt;li&gt;a service calls a repository;&lt;/li&gt;
&lt;li&gt;a frontend invokes an RPC function;&lt;/li&gt;
&lt;li&gt;an edge function touches a database table;&lt;/li&gt;
&lt;li&gt;a migration defines something used indirectly from app code;&lt;/li&gt;
&lt;li&gt;a test reveals behavior not obvious in the implementation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A vector index may miss those links if the words are different.&lt;/p&gt;

&lt;p&gt;A graph can preserve them.&lt;/p&gt;

&lt;p&gt;That is the main design idea behind Droste: combine semantic retrieval with structural retrieval.&lt;/p&gt;

&lt;p&gt;## Local-first by design&lt;/p&gt;

&lt;p&gt;Droste is local-first.&lt;/p&gt;

&lt;p&gt;No cloud database is required. No account is required. No API key is required.&lt;/p&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--upgrade&lt;/span&gt; droste-memory

  Index a repository:

  droste index &lt;span class="nb"&gt;.&lt;/span&gt;

  Ask &lt;span class="k"&gt;for &lt;/span&gt;context:

  droste context &lt;span class="s2"&gt;"checkout flow"&lt;/span&gt; &lt;span class="nt"&gt;--budget&lt;/span&gt; 1500

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it as an MCP server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;droste mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An AI agent can then call Droste as a local code-memory backend instead of doing blind file reads.&lt;/p&gt;

&lt;p&gt;## MCP usage&lt;/p&gt;

&lt;p&gt;For MCP clients, the basic configuration is:&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&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;"droste"&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;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"droste"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&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;"mcp"&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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For serious multi-repo work, Droste also supports using one database per project:&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&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;"droste"&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;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"droste"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"args"&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="s2"&gt;"--db"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"/absolute/path/to/droste_memory_db.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"mcp"&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="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="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;That avoids mixing context from different repositories.&lt;/p&gt;

&lt;p&gt;## What happens internally&lt;/p&gt;

&lt;p&gt;Droste builds a local graph of the project.&lt;/p&gt;

&lt;p&gt;At a high level:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It extracts symbols from source files.&lt;/li&gt;
&lt;li&gt;It maps functions, classes, methods, files, and folders.&lt;/li&gt;
&lt;li&gt;It builds dependency edges where possible.&lt;/li&gt;
&lt;li&gt;It computes local embeddings.&lt;/li&gt;
&lt;li&gt;It stores the graph in local sharded JSON files.&lt;/li&gt;
&lt;li&gt;It retrieves context using both semantic similarity and graph relationships.&lt;/li&gt;
&lt;li&gt;It packs the result into a token budget for an LLM.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The important part is that retrieval is not only “which chunks are similar?”&lt;/p&gt;

&lt;p&gt;It also asks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what calls this?&lt;/li&gt;
&lt;li&gt;what does this call?&lt;/li&gt;
&lt;li&gt;what file owns this symbol?&lt;/li&gt;
&lt;li&gt;what related nodes are connected by the graph?&lt;/li&gt;
&lt;li&gt;what cross-language links exist?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## Sharded local storage&lt;/p&gt;

&lt;p&gt;Droste does not store the whole graph as one giant JSON file.&lt;/p&gt;

&lt;p&gt;It uses sharded local storage, with one shard per source path. This keeps incremental saves faster and avoids rewriting the entire database after every change.&lt;/p&gt;

&lt;p&gt;It also uses a lightweight seqlock-style consistency model so a reader does not assemble a torn snapshot while another process is writing shards.&lt;/p&gt;

&lt;p&gt;This matters because the intended workflow is live:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the engine indexes;&lt;/li&gt;
&lt;li&gt;the visualizer reads;&lt;/li&gt;
&lt;li&gt;the MCP server answers agent requests;&lt;/li&gt;
&lt;li&gt;the developer keeps coding.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## Visual graph&lt;/p&gt;

&lt;p&gt;Droste also includes a visualizer.&lt;/p&gt;

&lt;p&gt;The idea is to represent the codebase as a zoomable graph: project, folders, files, symbols, and causal edges.&lt;/p&gt;

&lt;p&gt;It is not meant to replace the CLI or MCP server. It is meant to make coupling and blast radius visible.&lt;/p&gt;

&lt;p&gt;In practice, I wanted something closer to a “code universe” than a flat file tree.&lt;/p&gt;

&lt;p&gt;## Current status&lt;/p&gt;

&lt;p&gt;Droste is still early, but usable.&lt;/p&gt;

&lt;p&gt;Current features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python CLI;&lt;/li&gt;
&lt;li&gt;MCP server;&lt;/li&gt;
&lt;li&gt;local indexing;&lt;/li&gt;
&lt;li&gt;Tree-sitter based symbol extraction;&lt;/li&gt;
&lt;li&gt;semantic embeddings through local models;&lt;/li&gt;
&lt;li&gt;sharded storage;&lt;/li&gt;
&lt;li&gt;project-root isolation;&lt;/li&gt;
&lt;li&gt;query-aware ranking;&lt;/li&gt;
&lt;li&gt;token-budgeted context packing;&lt;/li&gt;
&lt;li&gt;visual graph viewer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Latest version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--upgrade&lt;/span&gt; droste-memory

  &lt;span class="c"&gt;## Example commands&lt;/span&gt;

  droste index &lt;span class="nb"&gt;.&lt;/span&gt;
  droste status
  droste context &lt;span class="s2"&gt;"authentication flow"&lt;/span&gt; &lt;span class="nt"&gt;--budget&lt;/span&gt; 2000
  droste zoom &lt;span class="s2"&gt;"SomeFunction"&lt;/span&gt;
  droste view
  droste mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;## What I am looking for feedback on&lt;/p&gt;

&lt;p&gt;I would especially appreciate feedback from people building or using AI coding agents.&lt;/p&gt;

&lt;p&gt;Useful feedback would be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the MCP interface make sense?&lt;/li&gt;
&lt;li&gt;Is the install flow clean?&lt;/li&gt;
&lt;li&gt;Does retrieval feel better than normal file search in real projects?&lt;/li&gt;
&lt;li&gt;Are the returned context slices useful to an LLM?&lt;/li&gt;
&lt;li&gt;What graph relationships would matter most in your stack?&lt;/li&gt;
&lt;li&gt;What would make this more useful in day-to-day coding?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## Links&lt;/p&gt;

&lt;p&gt;GitHub:&lt;br&gt;
  &lt;a href="https://github.com/lorismascio17/droste-memory" rel="noopener noreferrer"&gt;https://github.com/lorismascio17/droste-memory&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PyPI:&lt;br&gt;
  &lt;a href="https://pypi.org/project/droste-memory/" rel="noopener noreferrer"&gt;https://pypi.org/project/droste-memory/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install:&lt;/p&gt;

&lt;p&gt;python -m pip install --upgrade droste-memory&lt;/p&gt;

&lt;p&gt;Droste is open source and MIT licensed.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
