<?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: Ivan</title>
    <description>The latest articles on DEV Community by Ivan (@pro2pilot).</description>
    <link>https://dev.to/pro2pilot</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%2F3956321%2F3b29d7cb-e637-46f2-8aad-eb6cdcbb5881.jpeg</url>
      <title>DEV Community: Ivan</title>
      <link>https://dev.to/pro2pilot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pro2pilot"/>
    <language>en</language>
    <item>
      <title>I built an open-source repo-local context layer for AI coding agents</title>
      <dc:creator>Ivan</dc:creator>
      <pubDate>Thu, 28 May 2026 19:08:52 +0000</pubDate>
      <link>https://dev.to/pro2pilot/i-built-an-open-source-repo-local-context-layer-for-ai-coding-agents-469m</link>
      <guid>https://dev.to/pro2pilot/i-built-an-open-source-repo-local-context-layer-for-ai-coding-agents-469m</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fveuzfx2iulk2dtre09m2.png" 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.amazonaws.com%2Fuploads%2Farticles%2Fveuzfx2iulk2dtre09m2.png" alt="![Technical diagram of .knowledge showing the first-read path, routing bundle, trust and freshness signals, repair queue, source/tests verification, and Inspector workflow.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/veuzfx2iulk2dtre09m2.png)" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI coding agents are getting better at editing code, but they still often start every session like they have never seen the repository before.&lt;/p&gt;

&lt;p&gt;They read the README.&lt;/p&gt;

&lt;p&gt;Then package files.&lt;/p&gt;

&lt;p&gt;Then random source folders.&lt;/p&gt;

&lt;p&gt;Then tests.&lt;/p&gt;

&lt;p&gt;Then old notes.&lt;/p&gt;

&lt;p&gt;Then maybe the same files again in the next session.&lt;/p&gt;

&lt;p&gt;That repeated orientation is not only a token problem. It is a trust problem.&lt;/p&gt;

&lt;p&gt;The agent does not know which summary is current, which module is stale, which files are risky, or which part of the repo should be checked before editing behavior.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;.knowledge&lt;/strong&gt; — an open-source, repo-local context layer for AI coding agents.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/pro2pilot/knowledge" rel="noopener noreferrer"&gt;https://github.com/pro2pilot/knowledge&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;.knowledge&lt;/code&gt; gives agents a local first-read path inside the repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.knowledge/Quick-Start.md
        ↓
.knowledge/maintenance/routing_bundle.json
        ↓
module cards / evidence / trust state / repair queue
        ↓
current source and tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point is not to make agents read less source code.&lt;/p&gt;

&lt;p&gt;The point is to stop making them spend the first part of every session rediscovering the same project shape.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core idea
&lt;/h2&gt;

&lt;p&gt;A coding agent should not treat repo memory as magic.&lt;/p&gt;

&lt;p&gt;It should have a clear source-of-truth order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;current source code
current tests
evidence
module cards
decisions
wiki
session notes
external memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the task touches auth, billing, runtime execution, queues, storage, secrets, migrations, security, concurrency, or anything stale/suspect/low-confidence, the agent must re-read source and tests.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.knowledge&lt;/code&gt; is a routing layer, not a replacement for code review.&lt;/p&gt;

&lt;h2&gt;
  
  
  What ships in the open core
&lt;/h2&gt;

&lt;p&gt;The repository includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent-integrations/        # Codex, Claude Code, OpenCode
docs/cookbook/             # operational recipes
github-action-templates/   # health, PR summary, evaluation
inspector/                 # local static visual inspector
tools/                     # scan, import, release, metrics
Quick-Start.md             # first-read contract for agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some runtime artifacts are generated after setup, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.knowledge/maintenance/routing_bundle.json
.knowledge/maintenance/trust_report.json
.knowledge/maintenance/repair_queue.json
.knowledge/search/index.json
.knowledge/inspector/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is intentional. A fresh public archive ships the framework, tools, templates, docs, and seed files. Your repo generates its own local state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example setup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node .knowledge/tools/install-agent-integrations.js
node .knowledge/tools/flow.js import
node .knowledge/tools/flow.js release &lt;span class="nt"&gt;--no-color&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, the agent has a maintained first-read path instead of inventing a new onboarding route every session.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I made it
&lt;/h2&gt;

&lt;p&gt;I do not think the problem is “agents need one more long prompt”.&lt;/p&gt;

&lt;p&gt;The problem is that repo context is usually scattered across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;chat history&lt;/li&gt;
&lt;li&gt;README sections&lt;/li&gt;
&lt;li&gt;stale architecture notes&lt;/li&gt;
&lt;li&gt;local scratch files&lt;/li&gt;
&lt;li&gt;hidden agent memory&lt;/li&gt;
&lt;li&gt;repeated repo crawls&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That makes the workflow hard to review.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.knowledge&lt;/code&gt; keeps the context beside the code, where it can be versioned, inspected, refreshed, and challenged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who this is for
&lt;/h2&gt;

&lt;p&gt;This is mainly for teams or solo builders already using coding agents such as Codex, Claude Code, OpenCode, or custom local agents.&lt;/p&gt;

&lt;p&gt;It is probably overkill for very small repos.&lt;/p&gt;

&lt;p&gt;It is more useful when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;agents repeatedly re-read the same repo structure&lt;/li&gt;
&lt;li&gt;multiple agents touch the same codebase&lt;/li&gt;
&lt;li&gt;session handoff matters&lt;/li&gt;
&lt;li&gt;stale summaries cause wrong-file edits&lt;/li&gt;
&lt;li&gt;AI-assisted PRs need clearer impact boundaries&lt;/li&gt;
&lt;li&gt;you want local-first context without required cloud memory&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I would like feedback on
&lt;/h2&gt;

&lt;p&gt;I am looking for feedback from people who already use coding agents in real repositories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Would you use a repo-local routing bundle as the agent’s first read?&lt;/li&gt;
&lt;li&gt;What would you want in a trust/freshness report?&lt;/li&gt;
&lt;li&gt;Would a local visual Inspector help your review workflow?&lt;/li&gt;
&lt;li&gt;Which agent workflows should be supported first: Codex, Claude Code, OpenCode, or something else?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GitHub repo: &lt;a href="https://github.com/pro2pilot/knowledge" rel="noopener noreferrer"&gt;https://github.com/pro2pilot/knowledge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Technical notes: &lt;a href="https://pro2pilot.com/knowledge/repo-local-knowledge-routing/" rel="noopener noreferrer"&gt;https://pro2pilot.com/knowledge/repo-local-knowledge-routing/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Product hub: &lt;a href="https://pro2pilot.com/knowledge/" rel="noopener noreferrer"&gt;https://pro2pilot.com/knowledge/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>devops</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
