<?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: Ruslan Griban</title>
    <description>The latest articles on DEV Community by Ruslan Griban (@sattva2020).</description>
    <link>https://dev.to/sattva2020</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%2F4075202%2F7a5288c7-819a-447a-9733-1782fbf096c7.png</url>
      <title>DEV Community: Ruslan Griban</title>
      <link>https://dev.to/sattva2020</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sattva2020"/>
    <language>en</language>
    <item>
      <title>I pulled 480 real AGENTS.md/CLAUDE.md files from 272 repos — and a regex bug taught me not to trust my own heuristics</title>
      <dc:creator>Ruslan Griban</dc:creator>
      <pubDate>Wed, 12 Aug 2026 19:14:23 +0000</pubDate>
      <link>https://dev.to/sattva2020/i-pulled-480-real-agentsmdclaudemd-files-from-272-repos-and-a-regex-bug-taught-me-not-to-trust-1ocb</link>
      <guid>https://dev.to/sattva2020/i-pulled-480-real-agentsmdclaudemd-files-from-272-repos-and-a-regex-bug-taught-me-not-to-trust-1ocb</guid>
      <description>&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;p&gt;A corpus of real AGENTS.md / CLAUDE.md files, the instruction files coding agents like Claude Code, Copilot, and friends read before touching a repo, pulled verbatim from 272 production repos (React, Grafana, LangChain, Home Assistant, and 268 others). Not a curated list of links: the actual files, stored in full wherever the license permits it, greppable in one tree.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/sattva2020/agents-md-in-the-wild" rel="noopener noreferrer"&gt;https://github.com/sattva2020/agents-md-in-the-wild&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A few things that surprised me in the data
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Explicit prohibitions ("never", "do not") show up in 60% of files, more common than build instructions (38%)&lt;/li&gt;
&lt;li&gt;Only 23% mention anything about secrets, in files that hand an AI agent the run of the repo&lt;/li&gt;
&lt;li&gt;Median file is 60 lines, much shorter than most advice threads suggest&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The bug that taught me the most
&lt;/h2&gt;

&lt;p&gt;One analysis pass tries to detect literal directory-tree diagrams, the kind with box-drawing characters or ASCII branch markers. First version was naive: look for tree-shaped characters on a line, count matches. Ran it across the corpus and got 69% of files "containing a directory map." That felt way too high, a directory tree in an instructions file is a specific, deliberate thing, not something 7 in 10 projects bother writing.&lt;/p&gt;

&lt;p&gt;Turned out the regex was matching markdown tables. A row like &lt;code&gt;| src/  | entry point |&lt;/code&gt; has a pipe and something path-shaped on the left, and my "line looks like a tree branch" check didn't care what came after the first slash. Fix: require a run of 3+ consecutive tree-shaped lines, and explicitly reject lines that parse as table rows before counting them. Dropped the number from 69% to 17%, which matches manual spot-checks.&lt;/p&gt;

&lt;p&gt;Same story with the "mentions secrets" heuristic. First cut matched bare "token," which turned out to catch files talking about LLM context-window tokens, not API tokens. Had to tighten the pattern to require "api," "access," or similar nearby.&lt;/p&gt;

&lt;p&gt;Lesson, twice over: a keyword or shape that looks specific to you is rarely as specific as it looks once you run it against real-world text at scale. 480 files was enough to expose both bugs, I doubt either would've shown up against the 5-10 examples I originally tested with.&lt;/p&gt;

&lt;h2&gt;
  
  
  License handling
&lt;/h2&gt;

&lt;p&gt;Storage is tiered by SPDX license: files under a curated allowlist of about 26 redistributable licenses (MIT, Apache-2.0, BSD variants, GPL/LGPL/AGPL, CC0, etc.) are stored verbatim with provenance. Everything else, including repos with no declared license, gets metadata-only storage: headings and structure, no body text. Default is "all rights reserved" unless the license says otherwise; unlicensed files still get counted in the structural analysis, they just don't get their text redistributed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honesty about the state of it
&lt;/h2&gt;

&lt;p&gt;It's meant to refresh weekly via a GitHub Action, full disclosure, that's currently stuck behind a billing issue on my GitHub account, so treat "weekly" as aspirational until I sort that out.&lt;/p&gt;

&lt;p&gt;Genuinely curious what's missing, or whether there's a pattern signal worth adding. Repo again: &lt;a href="https://github.com/sattva2020/agents-md-in-the-wild" rel="noopener noreferrer"&gt;https://github.com/sattva2020/agents-md-in-the-wild&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>ai</category>
      <category>github</category>
    </item>
  </channel>
</rss>
