<?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: Mohamed Salah</title>
    <description>The latest articles on DEV Community by Mohamed Salah (@mohamed_salah_0da32518593).</description>
    <link>https://dev.to/mohamed_salah_0da32518593</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%2F3942785%2F839832f1-88e6-4f54-934f-cb6ae9d773f6.jpg</url>
      <title>DEV Community: Mohamed Salah</title>
      <link>https://dev.to/mohamed_salah_0da32518593</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohamed_salah_0da32518593"/>
    <language>en</language>
    <item>
      <title>How I made every AI coding agent on my machine follow the same rules with one markdown file</title>
      <dc:creator>Mohamed Salah</dc:creator>
      <pubDate>Wed, 20 May 2026 17:49:26 +0000</pubDate>
      <link>https://dev.to/mohamed_salah_0da32518593/how-i-made-every-ai-coding-agent-on-my-machine-follow-the-same-rules-with-one-markdown-file-4ibg</link>
      <guid>https://dev.to/mohamed_salah_0da32518593/how-i-made-every-ai-coding-agent-on-my-machine-follow-the-same-rules-with-one-markdown-file-4ibg</guid>
      <description>&lt;p&gt;I use Claude Code, GitHub Copilot, OpenAI Codex CLI, and Cursor — sometimes in the same day. Each one drifts the same way: skips planning, forgets tests, picks stale library versions, and asks twelve questions in the middle of a build. So I wrote one markdown template and a small installer that drops the same rules into every agent on my machine. Here is the design.&lt;/p&gt;

&lt;h2&gt;
  
  
  The drift problem
&lt;/h2&gt;

&lt;p&gt;If you have ever said "build me a kanban app" to an AI coding agent, you have lived this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It picks a stack you would never pick yourself&lt;/li&gt;
&lt;li&gt;It scaffolds, then stops to ask "what database do you want?" three files in&lt;/li&gt;
&lt;li&gt;It writes the happy path and skips error handling&lt;/li&gt;
&lt;li&gt;It "forgets" to add tests until you remind it&lt;/li&gt;
&lt;li&gt;It pulls a 3-year-old version of a library because that is what its training data remembers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these are intelligence problems. They are workflow problems. The model is genuinely capable; the protocol around it is missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fragmentation problem
&lt;/h2&gt;

&lt;p&gt;Every agent reads a different configuration file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Copilot reads &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Claude Code reads &lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;~/.claude/skills/&amp;lt;name&amp;gt;/SKILL.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Cursor reads &lt;code&gt;.cursorrules&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Windsurf reads &lt;code&gt;.windsurfrules&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Codex CLI, Cursor, Aider, Windsurf all also read &lt;code&gt;AGENTS.md&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is five files saying the same thing, drifting independently the moment one gets updated. Most people pick one tool and ignore the rest, which traps them in that tool. I wanted the opposite — to be able to swap agents like editors and keep the same operating rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-template-many-files solution
&lt;/h2&gt;

&lt;p&gt;The whole project is a folder of markdown. One source-of-truth template (&lt;code&gt;SKILL.md&lt;/code&gt;), then a small build step that materializes the agent-specific files from it. The result: every agent on my machine reads the same intake, the same protocol, the same quality gates.&lt;/p&gt;

&lt;p&gt;The protocol itself is four steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. One-shot intake
&lt;/h3&gt;

&lt;p&gt;Instead of the agent asking questions mid-build, it asks them all upfront, in a single round, with sensible defaults derived from the one-line command. I reply "go" or override specific lines. Then it executes without interruption.&lt;/p&gt;

&lt;p&gt;This is the biggest single improvement. It removes ~80% of mid-build derails.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Plan before code
&lt;/h3&gt;

&lt;p&gt;The agent writes &lt;code&gt;PLAN.md&lt;/code&gt; listing features, dependencies, and order. No code is written until the plan exists. That sounds obvious but most agents skip it by default when given an action-shaped prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Ralph-style feature loop
&lt;/h3&gt;

&lt;p&gt;For each feature: spec → failing test → implement → run → on-fail debug-and-retry → on-pass checkpoint → next feature. Maximum three retry passes before escalating back to me.&lt;/p&gt;

&lt;p&gt;The retry budget matters. Without it, the agent will grind on a broken edge case for an hour. With it, the loop exits loudly when it is stuck instead of silently when I stop watching.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Binary quality gate
&lt;/h3&gt;

&lt;p&gt;Before "done" is allowed: lint passes, types pass, tests pass, build passes. Any red and it goes back to the loop. No "mostly working" allowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it works the same across agents
&lt;/h2&gt;

&lt;p&gt;Because the same &lt;code&gt;SKILL.md&lt;/code&gt; is the source. The materialized agent-specific files are formatting wrappers around the same protocol body. The Copilot version has Copilot front-matter, the Claude version has Claude front-matter, the rules are byte-identical.&lt;/p&gt;

&lt;p&gt;Side benefit: when I switch from Copilot to Claude Code to test something, I do not relearn anything. The agent recognizes the same skill, runs the same intake, hits the same gates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Localhost-first by design
&lt;/h2&gt;

&lt;p&gt;I made one explicit choice that surprises some people: this is localhost-first. There is no "deploy to Vercel" step, no Docker, no production paths in v1. The reason is simple — every "ship to prod" feature I have seen baked into a coding agent has been the source of half its bugs. Shipping to localhost is a deterministic problem. Shipping to production is a conversation. Keeping those separate makes the agent behave better.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Skill auto-discovery varies by model. Claude triggers it reliably. Codex needs me to type &lt;code&gt;/myvibe&lt;/code&gt;. Copilot picks it up from the prompt directory.&lt;/li&gt;
&lt;li&gt;It will not save you from a weak model. If the base model cannot write the code, no workflow rescues it. What this does is fail earlier and louder, which is itself an improvement.&lt;/li&gt;
&lt;li&gt;It is opinionated. If you disagree with "failing test first" or "three retries then ask", you will not like it. That is fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The whole thing is open source, MIT, no telemetry, no paid tier. The installer is ~80 lines you can read before running.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;iwr&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://raw.githubusercontent.com/Mohamed201389/myVibe/main/bootstrap.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;macOS / Linux:&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; https://raw.githubusercontent.com/Mohamed201389/myVibe/main/bootstrap.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/Mohamed201389/myVibe" rel="noopener noreferrer"&gt;https://github.com/Mohamed201389/myVibe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The file I would read first is &lt;code&gt;INTAKE.md&lt;/code&gt; — that is the "no mid-build interrogation" promise, and the highest-leverage idea in the kit.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally written from running into the same drift for the hundredth time. Feedback welcome.&lt;/em&gt;&lt;/p&gt;

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