<?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: Lukas Metzler</title>
    <description>The latest articles on DEV Community by Lukas Metzler (@lukasmetzler).</description>
    <link>https://dev.to/lukasmetzler</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%2F3860119%2F81a968b9-b69c-4cc0-b993-6fbf40b13593.png</url>
      <title>DEV Community: Lukas Metzler</title>
      <link>https://dev.to/lukasmetzler</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lukasmetzler"/>
    <language>en</language>
    <item>
      <title>You test your code. Why aren’t you testing your AI instructions?</title>
      <dc:creator>Lukas Metzler</dc:creator>
      <pubDate>Fri, 03 Apr 2026 21:38:59 +0000</pubDate>
      <link>https://dev.to/lukasmetzler/you-test-your-code-why-arent-you-testing-your-ai-instructions-4j2p</link>
      <guid>https://dev.to/lukasmetzler/you-test-your-code-why-arent-you-testing-your-ai-instructions-4j2p</guid>
      <description>&lt;h2&gt;
  
  
  You test your code. Why aren't you testing your AI instructions?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why instruction quality matters more than model choice, and a tool to measure it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every team using AI coding tools writes instruction files. &lt;code&gt;CLAUDE.md&lt;/code&gt; for Claude Code, &lt;code&gt;AGENTS.md&lt;/code&gt; for Codex, &lt;code&gt;copilot-instructions.md&lt;/code&gt; for GitHub Copilot, &lt;code&gt;.cursorrules&lt;/code&gt; for Cursor. You spend time crafting these files, change a paragraph, push it, and hope for the best.&lt;/p&gt;

&lt;p&gt;Your codebase has tests. Your APIs have contracts. Your AI instructions have hope.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://github.com/lukasmetzler/agenteval" rel="noopener noreferrer"&gt;&lt;strong&gt;agenteval&lt;/strong&gt;&lt;/a&gt; to fix that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The variable nobody is testing
&lt;/h2&gt;

&lt;p&gt;A recent study tested three agent frameworks running the same model on 731 coding problems. Same model. Same tasks. The only difference was the instruction scaffolding.&lt;/p&gt;

&lt;p&gt;The spread was 17 points.&lt;/p&gt;

&lt;p&gt;We obsess over which model to use. Sonnet vs Opus vs GPT-5.4. But the instructions you give the model have a bigger effect on the outcome than the model itself. And nobody tests them.&lt;/p&gt;

&lt;p&gt;Think about that. You wouldn't deploy an API without tests. You wouldn't ship a feature without CI. But the file that controls how your AI writes code? You edit it in a text editor and hope.&lt;/p&gt;

&lt;h2&gt;
  
  
  What goes wrong in instruction files
&lt;/h2&gt;

&lt;p&gt;I've scanned a lot of instruction files at this point. The same problems show up everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dead references
&lt;/h3&gt;

&lt;p&gt;You renamed &lt;code&gt;src/auth.ts&lt;/code&gt; to &lt;code&gt;src/authentication.ts&lt;/code&gt; six months ago. Your instruction file still says "see src/auth.ts for the authentication module." The AI reads that instruction, looks for a file that doesn't exist, and gets confused.&lt;/p&gt;

&lt;p&gt;This is the most common issue. Almost every instruction file over 3 months old has at least one dead reference.&lt;/p&gt;

&lt;h3&gt;
  
  
  Filler that eats your context budget
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;"Make sure to always thoroughly test everything and ensure comprehensive coverage of all edge cases in a robust manner."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That sentence burns 25 tokens and says nothing the model doesn't already know. With a 200K context window and a 30% instruction budget, you have about 60,000 tokens. Every token spent on "make sure to" is a token not available for actual code context.&lt;/p&gt;

&lt;p&gt;The worst offenders: &lt;em&gt;"it is important that", "in order to", "at the end of the day", "make sure to", "please ensure that"&lt;/em&gt;. They're everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contradictions
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;"Always use semicolons"&lt;/em&gt; in your code style section. &lt;em&gt;"Follow the Prettier config"&lt;/em&gt; three sections later, where Prettier removes semicolons. The model gets conflicting instructions and picks one at random.&lt;/p&gt;

&lt;p&gt;It happens more than you'd think, especially in files maintained by multiple people over months.&lt;/p&gt;

&lt;h3&gt;
  
  
  Context budget overruns
&lt;/h3&gt;

&lt;p&gt;Your &lt;code&gt;CLAUDE.md&lt;/code&gt; is 300 lines. Your &lt;code&gt;AGENTS.md&lt;/code&gt; is 200 lines. Your &lt;code&gt;copilot-instructions.md&lt;/code&gt; is 150 lines. Together they consume 40% of your model's context window before a single line of code is loaded.&lt;/p&gt;

&lt;p&gt;The AI's performance degrades uniformly as instruction count increases. It's not that later instructions get ignored. All instructions get followed less precisely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overlap between files
&lt;/h3&gt;

&lt;p&gt;Your &lt;code&gt;CLAUDE.md&lt;/code&gt; says "use TypeScript strict mode, tabs for indentation." Your &lt;code&gt;AGENTS.md&lt;/code&gt; says the same thing. That's duplicated instructions consuming double the tokens for zero additional value. Worse, when you update one copy and forget the other, they drift apart and contradict each other.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;agenteval&lt;/strong&gt; is a CLI. You install it, run one command, and see what's wrong.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://raw.githubusercontent.com/lukasmetzler/agenteval/main/install.sh]&lt;span class="o"&gt;(&lt;/span&gt;https://raw.githubusercontent.com/lukasmetzler/agenteval/main/install.sh&lt;span class="o"&gt;)&lt;/span&gt; | bash
agenteval lint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It reads your instruction files, parses the markdown, counts tokens, checks file references, and reports real problems with actionable suggestions. No LLM in the loop. Deterministic. Runs in under a second.&lt;/p&gt;

&lt;p&gt;Here's what it found on my own project the first time I ran it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLAUDE.md
  ERROR  Referenced file "docs/schema.md" does not exist
         → Remove the reference or create the missing file
  info   Section "Testing" contains 1 filler phrase(s)
         → Rewrite without phrases like 'make sure to'
  info   Vague instructions: "be careful with error handling"
         → Replace with a specific example or threshold
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every issue has a suggestion. You don't need to figure out what to do about it.&lt;/p&gt;

&lt;p&gt;It supports every major instruction format:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt; (Claude Code)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; (OpenAI Codex)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.github/copilot-instructions.md&lt;/code&gt; and scoped &lt;code&gt;.instructions.md&lt;/code&gt; files (GitHub Copilot)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.cursorrules&lt;/code&gt; (Cursor)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.claude/skills/*/SKILL.md&lt;/code&gt; (Anthropic skills)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Beyond linting: measuring instruction quality over time
&lt;/h2&gt;

&lt;p&gt;The linter catches problems statically. But what if you want to know whether your instruction changes actually made the AI perform better?&lt;/p&gt;

&lt;p&gt;agenteval has a deeper pipeline for that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Harvest&lt;/strong&gt; scans your git history for AI-assisted commits. It detects 14 tools (Claude, Copilot, Cursor, Devin, Aider, Amazon Q, Gemini, and more) and generates replayable benchmark tasks from them. Each task includes a snapshot of what your instruction files looked like at that commit. No synthetic test cases needed. Your own git history is the benchmark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; gives a task to an AI agent in an isolated git worktree, captures what it produces, and scores the result. Four dimensions: did it change the right files (correctness), did it only change what needed changing (precision), how many tokens did it use (efficiency), did it follow conventions (conventions).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare&lt;/strong&gt; puts two runs side by side. Change your instruction files, re-run the same tasks, see if the scores improved. If both runs have instruction snapshots, it shows exactly what changed in your instructions alongside the score delta.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI&lt;/strong&gt; runs all your tasks and fails the build if instruction quality regresses. Add one line to your GitHub Actions workflow and instruction quality becomes a merge gate, just like tests:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;agenteval ci&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If someone changes the instructions in a PR and quality drops below the threshold, the build fails.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live review&lt;/strong&gt; scores your working tree changes before you commit. Are your changes focused or scattered? Did you update tests? Any debug artifacts left in? Add &lt;code&gt;--analyze&lt;/code&gt; and it sends the diff to your AI tool for convention compliance scoring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trends&lt;/strong&gt; tracks scores over time. Is your team getting better at writing instructions this quarter? Which tasks are improving? Which are regressing?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The uncomfortable question
&lt;/h2&gt;

&lt;p&gt;How much time has your team spent debating which AI model to use? Now how much time have you spent testing whether your instruction files actually work?&lt;/p&gt;

&lt;p&gt;The model is a commodity. The instructions are your competitive advantage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://raw.githubusercontent.com/lukasmetzler/agenteval/main/install.sh]&lt;span class="o"&gt;(&lt;/span&gt;https://raw.githubusercontent.com/lukasmetzler/agenteval/main/install.sh&lt;span class="o"&gt;)&lt;/span&gt; | bash
agenteval lint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command. Standalone binary. Works on Linux and macOS. Point it at any project with instruction files and see what it finds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/lukasmetzler/agenteval" rel="noopener noreferrer"&gt;https://github.com/lukasmetzler/agenteval&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you try it, I'd love to hear what it catches and what checks are missing.&lt;/p&gt;

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