<?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: Rohith Matam</title>
    <description>The latest articles on DEV Community by Rohith Matam (@rohith_matam_be6aea5caf13).</description>
    <link>https://dev.to/rohith_matam_be6aea5caf13</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%2F4010141%2F8149fa5c-b027-4ecf-a100-5b1432dc0aa1.png</url>
      <title>DEV Community: Rohith Matam</title>
      <link>https://dev.to/rohith_matam_be6aea5caf13</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohith_matam_be6aea5caf13"/>
    <language>en</language>
    <item>
      <title>I built a "context OS" that stops AI agents from drowning in your codebase</title>
      <dc:creator>Rohith Matam</dc:creator>
      <pubDate>Wed, 01 Jul 2026 03:44:37 +0000</pubDate>
      <link>https://dev.to/rohith_matam_be6aea5caf13/i-built-a-context-os-that-stops-ai-agents-from-drowning-in-your-codebase-636</link>
      <guid>https://dev.to/rohith_matam_be6aea5caf13/i-built-a-context-os-that-stops-ai-agents-from-drowning-in-your-codebase-636</guid>
      <description>&lt;h2&gt;
  
  
  The problem every AI coding session hits
&lt;/h2&gt;

&lt;p&gt;You open Claude or Copilot, paste in your task, and immediately hit the wall: the codebase is too big. You either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dump everything and burn 80% of your context window on irrelevant files&lt;/li&gt;
&lt;li&gt;Hand-pick files and miss the one import that breaks everything&lt;/li&gt;
&lt;li&gt;Pay for a bigger context window and repeat the problem at scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I got tired of this and built &lt;strong&gt;ContextOS&lt;/strong&gt; — a local CLI that acts as an intelligent context layer between your repo and your AI agent.&lt;/p&gt;




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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;rm-contextos
&lt;span class="nb"&gt;cd &lt;/span&gt;your-project
contextos scan
contextos pack &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"add rate limiting to the auth endpoint"&lt;/span&gt; &lt;span class="nt"&gt;--budget&lt;/span&gt; 8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: a Markdown (or JSON) context pack with only the files that matter for that task — ranked by keyword match, import graph centrality, AST symbol overlap, and git churn. Secrets redacted automatically.&lt;/p&gt;

&lt;p&gt;Token savings report on every pack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Packed 12 files · ~6,840 tokens · saved ~47,200 tokens (87%) vs full repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;Five signals combine into a score per file:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;What it catches&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Keyword match&lt;/td&gt;
&lt;td&gt;Files whose content/name overlap with your task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Import graph centrality&lt;/td&gt;
&lt;td&gt;Files that everything else imports (critical shared modules)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AST symbol overlap&lt;/td&gt;
&lt;td&gt;Function/class names, not just grep strings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git churn score&lt;/td&gt;
&lt;td&gt;Recently modified files are probably active code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret penalty&lt;/td&gt;
&lt;td&gt;Credential files silently excluded&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No LLM calls. No cloud. Fully offline.&lt;/p&gt;




&lt;h2&gt;
  
  
  MCP server (for Claude Desktop / Claude Code)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"rm-contextos[mcp]"&lt;/span&gt;
contextos serve &lt;span class="nt"&gt;--stdio&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register in &lt;code&gt;claude_desktop_config.json&lt;/code&gt; and your AI agent can call &lt;code&gt;pack_context&lt;/code&gt;, &lt;code&gt;scan_repo&lt;/code&gt;, &lt;code&gt;list_files&lt;/code&gt;, &lt;code&gt;get_file&lt;/code&gt;, &lt;code&gt;churn_report&lt;/code&gt; directly as tools — no CLI needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's shipped
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;980 tests, 96% coverage&lt;/li&gt;
&lt;li&gt;Apache-2.0, no telemetry, no accounts&lt;/li&gt;
&lt;li&gt;Python 3.11–3.13, Linux + macOS&lt;/li&gt;
&lt;li&gt;Export formats: Claude, Codex, Cursor, Aider, JSON&lt;/li&gt;
&lt;li&gt;Incremental scan cache — re-scans only changed files
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;rm-contextos
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"rm-contextos[mcp]"&lt;/span&gt;   &lt;span class="c"&gt;# + MCP server&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"rm-contextos[all]"&lt;/span&gt;   &lt;span class="c"&gt;# everything&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub: &lt;a href="https://github.com/Rohithmatham12/ContextOS" rel="noopener noreferrer"&gt;https://github.com/Rohithmatham12/ContextOS&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://Rohithmatham12.github.io/ContextOS/" rel="noopener noreferrer"&gt;https://Rohithmatham12.github.io/ContextOS/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Would love feedback&lt;/strong&gt; — especially on the ranking signals and MCP integration. What signals are you missing?&lt;/p&gt;

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