<?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>Forem: John sellin</title>
    <description>The latest articles on Forem by John sellin (@john_sellin_cddf7f8783894).</description>
    <link>https://forem.com/john_sellin_cddf7f8783894</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3951001%2F54dd81c6-fb67-4107-ad7c-bec5d3521605.png</url>
      <title>Forem: John sellin</title>
      <link>https://forem.com/john_sellin_cddf7f8783894</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/john_sellin_cddf7f8783894"/>
    <language>en</language>
    <item>
      <title>Why LLM debugging fails on fragmented repository context</title>
      <dc:creator>John sellin</dc:creator>
      <pubDate>Mon, 25 May 2026 15:54:21 +0000</pubDate>
      <link>https://forem.com/john_sellin_cddf7f8783894/why-llm-debugging-fails-on-fragmented-repository-context-3nme</link>
      <guid>https://forem.com/john_sellin_cddf7f8783894/why-llm-debugging-fails-on-fragmented-repository-context-3nme</guid>
      <description>&lt;p&gt;After spending a lot of time debugging large repositories with ChatGPT/Claude, I kept noticing the same failure pattern:&lt;/p&gt;

&lt;p&gt;the model was not necessarily "bad at coding" — it was operating on a broken map of the repository.&lt;/p&gt;

&lt;p&gt;Typical workflow looks something like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;search manually across many files&lt;/li&gt;
&lt;li&gt;paste fragmented snippets&lt;/li&gt;
&lt;li&gt;omit surrounding implementation paths&lt;/li&gt;
&lt;li&gt;lose imports/dependencies/state flow&lt;/li&gt;
&lt;li&gt;ask the model to reason across missing context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At that point the model starts interpolating architecture that may not actually exist.&lt;/p&gt;

&lt;p&gt;A lot of “hallucinated code” is really just missing repository state.&lt;/p&gt;

&lt;p&gt;That was the motivation behind building &lt;code&gt;grab&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;grab&lt;/code&gt; is a small terminal-native workflow tool for iterative repository context extraction.&lt;/p&gt;

&lt;p&gt;The workflow becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;search → extract → accumulate → recurse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of repeatedly starting over with disconnected snippets, repository context is accumulated incrementally across extraction passes.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grab &lt;span class="nt"&gt;--tree&lt;/span&gt;
grab auth
grab &lt;span class="nt"&gt;--functions&lt;/span&gt; server.py
grab 500 635 auth.cs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Function indexing ended up being especially useful because it exposes exact extraction coordinates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file:start-end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That allows the model to recursively request additional implementation context explicitly instead of guessing hidden code paths.&lt;/p&gt;

&lt;p&gt;The accumulated context is continuously copied into the active clipboard/tmux buffer, which makes iterative debugging surprisingly fast in practice.&lt;/p&gt;

&lt;p&gt;The tool is intentionally simple right now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ripgrep&lt;/li&gt;
&lt;li&gt;sed&lt;/li&gt;
&lt;li&gt;terminal workflows&lt;/li&gt;
&lt;li&gt;clipboard/tmux accumulation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I think the underlying problem is larger than simple snippet retrieval.&lt;/p&gt;

&lt;p&gt;Once repository context becomes fragmented, the model loses architectural continuity and starts constructing plausible-but-invented relationships between components.&lt;/p&gt;

&lt;p&gt;I’ve started thinking about this more as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repository-state acquisition&lt;/li&gt;
&lt;li&gt;incremental context accumulation&lt;/li&gt;
&lt;li&gt;deterministic extraction&lt;/li&gt;
&lt;li&gt;semantic repository cognition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;rather than “prompt engineering.”&lt;/p&gt;

&lt;p&gt;There’s a short demo in the README showing the workflow in practice.&lt;/p&gt;

&lt;p&gt;Repo:&lt;br&gt;
&lt;a href="https://github.com/johnsellin93/grab" rel="noopener noreferrer"&gt;https://github.com/johnsellin93/grab&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>tooling</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
