<?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: Mokhles Elheni</title>
    <description>The latest articles on DEV Community by Mokhles Elheni (@insatmc).</description>
    <link>https://dev.to/insatmc</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%2F56167%2Fae69b779-ad9f-4477-a4fc-16ea4328e146.jpeg</url>
      <title>DEV Community: Mokhles Elheni</title>
      <link>https://dev.to/insatmc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/insatmc"/>
    <language>en</language>
    <item>
      <title>Stop Adding "Never Do X" to AGENTS.md. Write a Check Instead.</title>
      <dc:creator>Mokhles Elheni</dc:creator>
      <pubDate>Tue, 17 Nov 2026 06:12:25 +0000</pubDate>
      <link>https://dev.to/insatmc/stop-adding-never-do-x-to-agentsmd-write-a-check-instead-1ik3</link>
      <guid>https://dev.to/insatmc/stop-adding-never-do-x-to-agentsmd-write-a-check-instead-1ik3</guid>
      <description>&lt;p&gt;Every team using coding agents hits this at some point.&lt;/p&gt;

&lt;p&gt;You correct the agent. It says sorry and fixes the code. A few days later, in a new session, it makes the exact same mistake. So you open &lt;code&gt;AGENTS.md&lt;/code&gt; and add one more line:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NEVER call &lt;code&gt;fetch&lt;/code&gt; directly. Always use &lt;code&gt;apiClient&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A month later that file has dozens of lines like this, and the agent still gets them wrong now and then. Writing the rule in bigger letters doesn't help.&lt;/p&gt;

&lt;p&gt;Here is what I do instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with "never do X" lines
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;AGENTS.md&lt;/code&gt; (or &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;.cursorrules&lt;/code&gt;, and so on) is a text file the agent reads once at the start of a session. That has a few limits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nobody checks it.&lt;/strong&gt; If the agent forgets a line, nothing fails. You only find out in code review, if you notice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It gets long.&lt;/strong&gt; Each correction adds a line, and old lines are rarely removed. The more lines there are, the easier it is to miss one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It has no idea where a rule applies.&lt;/strong&gt; A rule about SQL migrations is loaded when the agent edits CSS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It often skips the reason.&lt;/strong&gt; "Don't use moment.js" without "because we moved to date-fns to cut bundle size" is hard to apply to new cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is the agent's fault. A note is just a weak way to enforce a rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn the correction into a check
&lt;/h2&gt;

&lt;p&gt;If you had to tell the agent something twice, write a check for it. The agent can ignore a sentence. It can't ignore a failing check.&lt;/p&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpqacaqtoyc0unqf468rw.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpqacaqtoyc0unqf468rw.png" alt="Two ways to handle the same correction" width="799" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the &lt;code&gt;fetch&lt;/code&gt; example as an ESLint rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// eslint.config.js&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"src/**/*.ts"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ignores&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"src/api/client.ts"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="s2"&gt;"no-restricted-globals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"fetch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Use apiClient from src/api/client.ts. It adds auth headers and retries."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things make this work better than the line in &lt;code&gt;AGENTS.md&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;It fails.&lt;/strong&gt; The agent can't finish while the error is there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It only runs where it matters.&lt;/strong&gt; &lt;code&gt;files&lt;/code&gt; and &lt;code&gt;ignores&lt;/code&gt; limit it to the right code, so there are no false alarms in the API client itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The message says why and what to do.&lt;/strong&gt; The agent gets the fix at the exact line with the mistake.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not every rule fits a linter. For those, a small script works fine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# fail if a migration has no rollback&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; f &lt;span class="k"&gt;in&lt;/span&gt; db/migrations/*.up.sql&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt; -f &lt;span class="s2"&gt;"${f%.up.sql}.down.sql"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$f has no .down.sql rollback"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 1&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add one line to &lt;code&gt;AGENTS.md&lt;/code&gt;: "Before you finish, run &lt;code&gt;npm run check&lt;/code&gt; and fix what it reports." That one line does more than fifty "never" lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep decisions separate
&lt;/h2&gt;

&lt;p&gt;Some rules aren't about code style, like "we use Postgres" or "auth lives in the gateway". A linter can't check those well. Keep them in a short list, each with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the decision,&lt;/li&gt;
&lt;li&gt;the reason,&lt;/li&gt;
&lt;li&gt;the folders it applies to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a decision changes, replace the old one. Don't add a new line that contradicts it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean up
&lt;/h2&gt;

&lt;p&gt;Checks are code, so treat them like code. If a check fails on correct code, fix it or remove it. Otherwise the agent learns that checks can be ignored, and you're back where you started.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's left in AGENTS.md
&lt;/h2&gt;

&lt;p&gt;Not much, and that's good:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how to build and test,&lt;/li&gt;
&lt;li&gt;where the main parts of the code live,&lt;/li&gt;
&lt;li&gt;the command that runs all the checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a line could be a check, move it into a check.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tool for this
&lt;/h2&gt;

&lt;p&gt;Writing these checks by hand works, but it's slow, so most people go back to adding lines to a file. Some tools now automate the loop. &lt;a href="https://github.com/WispAgents/ingrain" rel="noopener noreferrer"&gt;ingrain&lt;/a&gt; is one example: it learns lint rules from the corrections you make to your agent's code, limits each rule to the files it applies to, and keeps a list of decisions with reasons that the agent reads before editing a file.&lt;/p&gt;

&lt;p&gt;Use a tool or write the checks yourself. The rule is the same: if you said it twice, make it a check.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
    <item>
      <title>How I run 4 coding agents at once without reading a single transcript</title>
      <dc:creator>Mokhles Elheni</dc:creator>
      <pubDate>Sun, 25 Oct 2026 00:38:53 +0000</pubDate>
      <link>https://dev.to/insatmc/how-i-run-4-coding-agents-at-once-without-reading-a-single-transcript-47h9</link>
      <guid>https://dev.to/insatmc/how-i-run-4-coding-agents-at-once-without-reading-a-single-transcript-47h9</guid>
      <description>&lt;p&gt;A few months ago my day looked like this: four terminal tabs, Claude Code in two of them, Codex in the other two, and me scrolling. Not coding, not reviewing, &lt;em&gt;scrolling&lt;/em&gt;, through hundreds of lines of "Let me read the test helpers" and "Running it again", trying to find out whether the thing was done, stuck, or asking me something.&lt;/p&gt;

&lt;p&gt;The agents were fast. I was the bottleneck. So I changed how I work with them, and then built a tool around it. Here's what actually helped, whether or not you use the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. One task, one worktree
&lt;/h2&gt;

&lt;p&gt;Two agents in one checkout will eventually overwrite each other. Not with an error: session A fixes a file, session B (working from what it read 20 minutes ago) rewrites the same file, and A's fix is quietly gone.&lt;/p&gt;

&lt;p&gt;The fix is boring and total: every task gets its own &lt;code&gt;git worktree&lt;/code&gt; and branch, created from &lt;code&gt;origin/main&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree add &lt;span class="nt"&gt;-b&lt;/span&gt; agent/fix-flaky-auth ../wt/fix-flaky-auth origin/main
&lt;span class="nb"&gt;cd&lt;/span&gt; ../wt/fix-flaky-auth &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; claude &lt;span class="s2"&gt;"fix the flaky auth test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Overlaps now show up as a merge conflict in a PR, which is loud, instead of a lost edit, which isn't. It also means you can throw a task away by deleting a folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Let agents &lt;em&gt;ask&lt;/em&gt;, and put the questions in one place
&lt;/h2&gt;

&lt;p&gt;Most of my scrolling was looking for the moment an agent needed me: "Isolate the mock clock per test, or switch to real timers?" If you miss it, the agent either guesses or waits forever.&lt;/p&gt;

&lt;p&gt;Give the agent an explicit way to ask (an MCP tool like &lt;code&gt;ask_user&lt;/code&gt; works with Claude Code, Codex and opencode), and route every question into one list. Now "what needs me?" is a list with one or two items, not four transcripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Don't read the transcript, read a report
&lt;/h2&gt;

&lt;p&gt;This was the big one. At the end of a task I want to know five things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what changed (the real diff, not the agent's summary of it)&lt;/li&gt;
&lt;li&gt;whether the tests pass&lt;/li&gt;
&lt;li&gt;what it decided, and why&lt;/li&gt;
&lt;li&gt;what it couldn't do&lt;/li&gt;
&lt;li&gt;what to do next&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I ask the agent to end with a small structured report (a hero line, a diff, a test result, a callout, next steps) instead of prose. The diff comes from the agent's own tool calls, so it's what actually changed on disk. Reading that takes about 20 seconds. If something looks off, the full transcript is still there, one click away.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Ship from the report
&lt;/h2&gt;

&lt;p&gt;If the report looks right, the next step is always the same: commit, push, open a PR, watch CI. That should be one click on the report, not a context switch. And when CI goes red, the follow-up ("fix the failing check") goes back to the same agent, in the same worktree, with its context.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool: wisp
&lt;/h2&gt;

&lt;p&gt;I put all of this into &lt;a href="https://github.com/M0xoo/wisp" rel="noopener noreferrer"&gt;wisp&lt;/a&gt;, free and open source (MIT):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqi7l1i4u016xykei96k3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqi7l1i4u016xykei96k3.gif" alt="wisp: send a task off, answer the agent's question in one click, read the report" width="600" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs &lt;strong&gt;Claude Code, Codex, opencode, Cursor, Copilot and Grok&lt;/strong&gt; CLIs, using the subscriptions you already have. Switching is a dropdown, or &lt;strong&gt;Auto&lt;/strong&gt; picks one per task from what worked before.&lt;/li&gt;
&lt;li&gt;Every task in its own &lt;strong&gt;worktree&lt;/strong&gt;, in the background, with a live one-line status.&lt;/li&gt;
&lt;li&gt;Agents get an &lt;code&gt;ask_user&lt;/code&gt; tool; questions land in &lt;strong&gt;Needs you&lt;/strong&gt;, and on your phone.&lt;/li&gt;
&lt;li&gt;Each run ends with a &lt;strong&gt;one-screen report&lt;/strong&gt;: diff, tests, decisions, next steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ship it&lt;/strong&gt; commits, pushes and opens the PR; &lt;strong&gt;Merge&lt;/strong&gt; squash-merges and syncs your local main.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Take over&lt;/strong&gt; reopens the exact session (&lt;code&gt;claude --resume&lt;/code&gt;, &lt;code&gt;codex resume&lt;/code&gt;) in a terminal when you want the wheel back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx wisp-agents
&lt;span class="c"&gt;# or from any repo:&lt;/span&gt;
wisp &lt;span class="s2"&gt;"fix the flaky auth test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with nothing to install: &lt;a href="https://grid.trywisp.dev" rel="noopener noreferrer"&gt;grid.trywisp.dev&lt;/a&gt; gives you your own wisp on a server (sign in with GitHub), so tasks keep running with the laptop closed and you can answer from your phone. It's free while in preview.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd love to hear
&lt;/h2&gt;

&lt;p&gt;I'm looking for people who run agents every day to try it on one real task and tell me where it gets in the way. Comments here, or issues on &lt;a href="https://github.com/M0xoo/wisp" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, both work, and I'll fix what you hit this week.&lt;/p&gt;

&lt;p&gt;How do &lt;em&gt;you&lt;/em&gt; keep up with several agents at once?&lt;/p&gt;

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