<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Luke Manning - Blog — Claude Code</title>
        <link>https://lukemanning.ie/</link>
        <description>Breaking things. Building things. Writing about it. (tag: Claude Code)</description>
        <lastBuildDate>Wed, 30 Sep 2026 12:46:24 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <copyright>All rights reserved 2026, Luke Manning</copyright>
        <atom:link href="https://lukemanning.ie/feeds/claude-code.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Why Claude Code Still Prompts for Edits to .claude/ Files (Even with Auto-Accept On)]]></title>
            <link>https://lukemanning.ie/blog/claude-code-accept-edits-claude-directory</link>
            <guid isPermaLink="true">https://lukemanning.ie/blog/claude-code-accept-edits-claude-directory</guid>
            <pubDate>Sat, 03 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[<p>I had auto-accept edits turned on in Claude Code. The status line said so: <code>⏵ accept edits on (shift+tab to cycle)</code>.</p>
<p>But Claude kept asking me to approve edits to <code>.claude/agents/blog-structure-editor/AGENT.md</code>.</p>
<p>Every. Single. Time.</p>
<p>I was working on creating and improving agent definitions with assistance from Claude, and the agents were in <code>~/.claude/agents/</code>. This is the same kind of agent configuration work I later tackled more systematically — see <a href="/blog/opencode-nested-slash-commands-architecture">how I consolidated OpenCode slash commands</a> for the full picture.</p>
<p>I'd hit Shift+Tab a few times to cycle through the modes, confirm I was back on "accept edits on," and try again. Still prompted. What was going on?</p>
<h2>Testing the Theory</h2>
<p>After quite a while of this happening, I decided to test it systematically.</p>
<p>The exact prompt I kept seeing was:</p>
<pre><code>Accept edits to .claude/agents/blog-structure-editor/AGENT.md? (y/n)
</code></pre>
<p>Even though my status line clearly showed <code>⏵ accept edits on (shift+tab to cycle)</code>.</p>
<p>First theory: maybe I wasn't actually in acceptEdits mode? But the status line was clear. And when I asked Claude to edit <code>CLAUDE.md</code> (my project instructions), it went through without prompting. So acceptEdits <em>was</em> working.</p>
<p>Just... not for files in <code>.claude/</code>.</p>
<p>To confirm this wasn't just me, I asked Claude to try editing the same file:</p>
<blockquote>
<p>"Try editing <code>.claude/agents/blog-skeptical-reader/AGENT.md</code> - let's see if you get prompted too."</p>
</blockquote>
<p>Claude got prompted too.</p>
<p>Then I tested it systematically myself in different directories:</p>
<p><strong>In <code>/home/luke/projects/my-app/</code></strong> - No prompt (auto-accept working)
<strong>In <code>/home/luke/.claude/agents/</code></strong> - Got prompted (auto-accept disabled)</p>
<p>I noticed the pattern immediately—only the agents directory was prompting me. So it wasn't my settings. It wasn't a glitch. Something about the <code>.claude/</code> directory was different.</p>
<h2>The Aha Moment</h2>
<p>This wasn't a bug. It was a security feature.</p>
<p>Think about what lives in <code>.claude/</code>:</p>
<ul>
<li><strong>Agent definitions</strong> - the system prompts that define how Claude behaves</li>
<li><strong>Tool permissions</strong> - what Claude can and can't do on your system</li>
<li><strong>Commands and skills</strong> - custom workflows you've defined</li>
<li><strong>Settings</strong> - your preferences and configurations</li>
</ul>
<p>These aren't just any files. These are the files that control <em>how Claude Code works</em>.</p>
<p>If Claude could silently edit them without prompting, even in auto-accept mode, you could accidentally grant broader permissions, change agent behavior, or modify critical settings without realizing it.</p>
<h2>Why This Design Makes Sense</h2>
<p>Auto-accept mode is great for the 95% of edits you want to flow through quickly:</p>
<ul>
<li>Code files you're actively working on</li>
<li>Documentation updates</li>
<li>Test file changes</li>
<li>Configuration tweaks</li>
</ul>
<p>But <code>.claude/</code> files are in a different category. They're meta-level - they affect the tool itself, not just your project.</p>
<p>Requiring explicit approval for these edits is like how <code>sudo</code> requires your password even if you're already logged in. It's a speed bump that makes you pause and think: "Do I really want to make this change?"</p>
<h2>Overriding If You Really Want To</h2>
<p>If you trust Claude completely with your agent definitions and want to skip the prompts, you can add an explicit allow rule:</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#E1E4E8">{</span></span>
<span class="line"><span style="color:#79B8FF">  "permissions"</span><span style="color:#E1E4E8">: {</span></span>
<span class="line"><span style="color:#79B8FF">    "allow"</span><span style="color:#E1E4E8">: [</span><span style="color:#9ECBFF">"Edit(.claude/**)"</span><span style="color:#E1E4E8">]</span></span>
<span class="line"><span style="color:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#E1E4E8">}</span></span></code></pre>
<p>This tells Claude: "Yes, I know what I'm doing. Auto-accept edits to <code>.claude/</code> files too."</p>
<p><strong>After understanding this:</strong> When I edit files in any directory EXCEPT <code>.claude/agents/</code>, they go through immediately with no approval prompt. But when I edit files in the agents directory, I still get prompted—which is exactly what I want for safety.</p>
<p>I'm keeping the default behavior though. The prompts are a feature, not a bug.</p>
<p><strong>What I see now:</strong> When I edit files outside <code>.claude/agents/</code>, the changes happen immediately without any prompt. When I edit files inside the agents directory, I still get asked to approve—which is exactly what I want.</p>
<h2>What I Learned</h2>
<p>When a tool doesn't work the way you expect, there's usually a reason. Sometimes it's a bug. Sometimes it's a misunderstanding. And sometimes - like this - it's intentional design that makes sense once you understand the why.</p>
<p>Claude Code's auto-accept mode is smart enough to know:</p>
<ul>
<li>Most file edits are safe to auto-approve (your project code)</li>
<li>Some file edits need a human check (configuration that affects the tool itself)</li>
</ul>
<p>I went from "Why isn't this working?" to "Oh, that's actually really thoughtful."</p>
<p>This experience shifted how I think about unexpected behavior. Now when something seems broken, I pause and ask: what would break if it worked the way I expected? Maybe the friction exists for a reason.</p>
<hr>
<p><strong>TL;DR</strong>: Claude Code's auto-accept mode skips <code>.claude/</code> files even when it's on. Now that I get why—I realized silent edits to my agent definitions would be dangerous—I'm keeping the default.</p>]]></description>
            <content:encoded><![CDATA[<p>I had auto-accept edits turned on in Claude Code. The status line said so: <code>⏵ accept edits on (shift+tab to cycle)</code>.</p>
<p>But Claude kept asking me to approve edits to <code>.claude/agents/blog-structure-editor/AGENT.md</code>.</p>
<p>Every. Single. Time.</p>
<p>I was working on creating and improving agent definitions with assistance from Claude, and the agents were in <code>~/.claude/agents/</code>. This is the same kind of agent configuration work I later tackled more systematically — see <a href="/blog/opencode-nested-slash-commands-architecture">how I consolidated OpenCode slash commands</a> for the full picture.</p>
<p>I'd hit Shift+Tab a few times to cycle through the modes, confirm I was back on "accept edits on," and try again. Still prompted. What was going on?</p>
<h2>Testing the Theory</h2>
<p>After quite a while of this happening, I decided to test it systematically.</p>
<p>The exact prompt I kept seeing was:</p>
<pre><code>Accept edits to .claude/agents/blog-structure-editor/AGENT.md? (y/n)
</code></pre>
<p>Even though my status line clearly showed <code>⏵ accept edits on (shift+tab to cycle)</code>.</p>
<p>First theory: maybe I wasn't actually in acceptEdits mode? But the status line was clear. And when I asked Claude to edit <code>CLAUDE.md</code> (my project instructions), it went through without prompting. So acceptEdits <em>was</em> working.</p>
<p>Just... not for files in <code>.claude/</code>.</p>
<p>To confirm this wasn't just me, I asked Claude to try editing the same file:</p>
<blockquote>
<p>"Try editing <code>.claude/agents/blog-skeptical-reader/AGENT.md</code> - let's see if you get prompted too."</p>
</blockquote>
<p>Claude got prompted too.</p>
<p>Then I tested it systematically myself in different directories:</p>
<p><strong>In <code>/home/luke/projects/my-app/</code></strong> - No prompt (auto-accept working)
<strong>In <code>/home/luke/.claude/agents/</code></strong> - Got prompted (auto-accept disabled)</p>
<p>I noticed the pattern immediately—only the agents directory was prompting me. So it wasn't my settings. It wasn't a glitch. Something about the <code>.claude/</code> directory was different.</p>
<h2>The Aha Moment</h2>
<p>This wasn't a bug. It was a security feature.</p>
<p>Think about what lives in <code>.claude/</code>:</p>
<ul>
<li><strong>Agent definitions</strong> - the system prompts that define how Claude behaves</li>
<li><strong>Tool permissions</strong> - what Claude can and can't do on your system</li>
<li><strong>Commands and skills</strong> - custom workflows you've defined</li>
<li><strong>Settings</strong> - your preferences and configurations</li>
</ul>
<p>These aren't just any files. These are the files that control <em>how Claude Code works</em>.</p>
<p>If Claude could silently edit them without prompting, even in auto-accept mode, you could accidentally grant broader permissions, change agent behavior, or modify critical settings without realizing it.</p>
<h2>Why This Design Makes Sense</h2>
<p>Auto-accept mode is great for the 95% of edits you want to flow through quickly:</p>
<ul>
<li>Code files you're actively working on</li>
<li>Documentation updates</li>
<li>Test file changes</li>
<li>Configuration tweaks</li>
</ul>
<p>But <code>.claude/</code> files are in a different category. They're meta-level - they affect the tool itself, not just your project.</p>
<p>Requiring explicit approval for these edits is like how <code>sudo</code> requires your password even if you're already logged in. It's a speed bump that makes you pause and think: "Do I really want to make this change?"</p>
<h2>Overriding If You Really Want To</h2>
<p>If you trust Claude completely with your agent definitions and want to skip the prompts, you can add an explicit allow rule:</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#E1E4E8">{</span></span>
<span class="line"><span style="color:#79B8FF">  "permissions"</span><span style="color:#E1E4E8">: {</span></span>
<span class="line"><span style="color:#79B8FF">    "allow"</span><span style="color:#E1E4E8">: [</span><span style="color:#9ECBFF">"Edit(.claude/**)"</span><span style="color:#E1E4E8">]</span></span>
<span class="line"><span style="color:#E1E4E8">  }</span></span>
<span class="line"><span style="color:#E1E4E8">}</span></span></code></pre>
<p>This tells Claude: "Yes, I know what I'm doing. Auto-accept edits to <code>.claude/</code> files too."</p>
<p><strong>After understanding this:</strong> When I edit files in any directory EXCEPT <code>.claude/agents/</code>, they go through immediately with no approval prompt. But when I edit files in the agents directory, I still get prompted—which is exactly what I want for safety.</p>
<p>I'm keeping the default behavior though. The prompts are a feature, not a bug.</p>
<p><strong>What I see now:</strong> When I edit files outside <code>.claude/agents/</code>, the changes happen immediately without any prompt. When I edit files inside the agents directory, I still get asked to approve—which is exactly what I want.</p>
<h2>What I Learned</h2>
<p>When a tool doesn't work the way you expect, there's usually a reason. Sometimes it's a bug. Sometimes it's a misunderstanding. And sometimes - like this - it's intentional design that makes sense once you understand the why.</p>
<p>Claude Code's auto-accept mode is smart enough to know:</p>
<ul>
<li>Most file edits are safe to auto-approve (your project code)</li>
<li>Some file edits need a human check (configuration that affects the tool itself)</li>
</ul>
<p>I went from "Why isn't this working?" to "Oh, that's actually really thoughtful."</p>
<p>This experience shifted how I think about unexpected behavior. Now when something seems broken, I pause and ask: what would break if it worked the way I expected? Maybe the friction exists for a reason.</p>
<hr>
<p><strong>TL;DR</strong>: Claude Code's auto-accept mode skips <code>.claude/</code> files even when it's on. Now that I get why—I realized silent edits to my agent definitions would be dangerous—I'm keeping the default.</p>]]></content:encoded>
            <category>claude-code</category>
        </item>
        <item>
            <title><![CDATA[I Built an AI to Debate Itself So My AI Instructions Don't Bloat]]></title>
            <link>https://lukemanning.ie/blog/ai-debates-itself-to-review-my-ai-instructions</link>
            <guid isPermaLink="true">https://lukemanning.ie/blog/ai-debates-itself-to-review-my-ai-instructions</guid>
            <pubDate>Sun, 28 Dec 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[<p>I have a confession: I built an AI system to not only review my AI instructions, but to <em>argue with each other</em> about what should and shouldn't be in there.</p>
<p>I'd been using Claude Code with the sub-agent orchestration feature for a few months when I realized something. (These days I've moved most of this workflow to OpenCode — see <a href="/blog/opencode-nested-slash-commands-architecture">how I consolidated my slash commands</a> for the architectural details.)</p>
<p>Let me explain how I got here, because the journey from "I should update this file more often" to "let's orchestrate a formal debate between specialized sub-agents" is… well, it's a journey.</p>
<h2>The Problem: Context Drift</h2>
<p>If you're using Claude Code (or any AI coding assistant), you've probably discovered <code>CLAUDE.md</code>, that special instructions file where you tell Claude about your project structure, conventions, and domain knowledge.</p>
<p>It's incredibly powerful when it's accurate, but it as recent studies have shown it can actually become a hindrance when it contains outdated or stale information. Theo did a great YouTube video covering this concept here:
<a href="https://www.youtube.com/watch?v=GcNu6wrLTJc">Delete your CLAUDE.md (and your AGENT.md too)</a></p>
<p>Here's what would typically happen:</p>
<ol>
<li>Start a new feature and make a significant update to my project</li>
<li>Think "I should add this to CLAUDE.md so Claude knows this"</li>
<li>Get distracted by actual work</li>
<li>Forget to update it</li>
<li>Repeat</li>
</ol>
<p>My CLAUDE.md was missing critical context, leading to repetitive conversations where I'd explain the same project structure or conventions over and over. It also often had stale context, because either the directory structure had changed a bit, or some relevant files had moved.</p>
<h2>The Naive Solution: Just Ask Claude</h2>
<p>My first thought was simple: "Hey Claude, after we finish this conversation, can you suggest updates to my CLAUDE.md file?"</p>
<p>Guess what happened?</p>
<p><strong>Bloat. Massive, uncontrolled bloat.</strong></p>
<p>Every conversation ended with Claude suggesting 5-10 new sections to add. Here's an example from one session:</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#E1E4E8">Claude suggested adding:</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "When working with components in src/components/ui, always use..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "For API routes in src/app/api, remember to..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "The build process uses Next.js static exports..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "Color palette is defined in tailwind.config.ts..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "Error handling should follow this pattern..."</span></span></code></pre>
<p>None of the suggestions included <em>removing</em> anything. Within a few iterations, I would have had a 1,000-line instruction file covering every edge case we'd ever discussed.</p>
<p>The problem with asking a single AI agent to improve documentation is the same problem humans have: <strong>additive bias</strong>. It's psychologically easier to add information than to delete it. We don't want to lose potentially useful context, so we keep stacking it on.</p>
<p>But an instruction file that tries to document everything ends up being too long for Claude to effectively use. You hit context limits, instructions contradict each other, and the signal-to-noise ratio tanks.</p>
<h2>The Insight: I Need a Critic, Not Just a Suggester</h2>
<p>The breakthrough came when I realized what was missing: <strong>adversarial review</strong>.</p>
<p>In code reviews, we don't just ask "what else could we add?" We ask "what can we remove?" and "is this really necessary?" That pushback is what keeps codebases maintainable.</p>
<p>That's when I designed the multi-agent debate system.</p>
<h2>The Architecture: Orchestrated Debate</h2>
<p>Here's how it works when I run <code>/improve-claude-md</code>:</p>
<h3>The Three Roles</h3>
<p>There are three agents in this system, and I gave each one a specific personality:</p>
<p><strong>The Orchestrator</strong> runs the show. It reviews our conversation, reads CLAUDE.md, then spawns the other two agents. Its job is to manage the debate and give me a final report.</p>
<p><strong>The Improver</strong> is the optimist. It looks for patterns where Claude got stuck and proposes fixes. Here's the key: it also proposes deletions, which fights that additive bias I mentioned earlier.</p>
<p><strong>The Critic</strong> is... well, a critic. It challenges everything. "Is this <em>really</em> needed?" it asks. "Will this still be relevant in two weeks?" It's the adversarial voice that keeps things lean.</p>
<h3>The Debate Process</h3>
<p><strong>Round 1: Initial Proposals</strong></p>
<ul>
<li>Improver suggests 3-5 high-priority changes</li>
<li>Critic challenges each one: "Is this <em>really</em> necessary?"</li>
</ul>
<p><strong>Round 2: Defense &#x26; Refinement</strong></p>
<ul>
<li>Improver responds with evidence from the conversation</li>
<li>Critic either approves or maintains objections</li>
<li>Proposals get revised or dropped</li>
</ul>
<p><strong>Round 3: Final Consensus (if needed)</strong></p>
<ul>
<li>Resolve remaining disagreements</li>
<li>Document any contested proposals</li>
<li>Agree to disagree if necessary</li>
</ul>
<h3>The Output</h3>
<p>After the debate concludes, I get a structured report:</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#79B8FF;font-weight:bold">## Recommended Additions</span></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### High Priority</span></span>
<span class="line"><span style="color:#E1E4E8">[Critical additions with line counts]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### Medium Priority</span></span>
<span class="line"><span style="color:#E1E4E8">[Helpful clarifications with line counts]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Recommended Removals 🗑️</span></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### High-Impact Deletions</span></span>
<span class="line"><span style="color:#E1E4E8">[Existing bloat to remove with rationale]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Recommended Alternatives</span></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### Commands to Create</span></span>
<span class="line"><span style="color:#E1E4E8">[Workflows that should be slash commands, not docs]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Rejected After Debate</span></span>
<span class="line"><span style="color:#E1E4E8">[Proposals discussed but deemed unnecessary]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Net Impact</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> Lines added: +15</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> Lines removed: -23</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8;font-weight:bold"> **Net change: -8 lines**</span></span></code></pre>
<p>Notice that last section: <strong>net-negative line changes</strong>. That's the goal. Better focus through subtraction.</p>
<h2>Why Debate > Single Agent</h2>
<p>You might be thinking: "Couldn't you just prompt a single agent to be more critical?"</p>
<p>I tried that. It doesn't work as well. Here's why:</p>
<p><strong>1. Role Conflict</strong>
When a single agent is asked to both propose improvements <em>and</em> critique them, the critique is weak. The agent has already committed to the proposal and suffers from the same confirmation bias humans do.</p>
<p><strong>2. Surface-Level Pushback</strong>
A single "be critical" prompt produces generic objections: "This might be too specific" or "Consider if this is needed." It's not genuine adversarial review.</p>
<p><strong>3. No Iterative Refinement</strong>
With two agents, the Improver actually responds to criticism and revises proposals. A single agent just generates a final output without that back-and-forth refinement.</p>
<p><strong>4. Emergent Quality</strong>
The debate process surfaces insights neither agent would generate alone. The Critic might identify a pattern ("three of these proposals could become one slash command"), which then changes the Improver's approach in the next round.</p>
<p>It's the difference between proofreading your own writing and having someone else review it. The external perspective catches things you can't see.</p>
<h2>The Technical Implementation</h2>
<p>This is built using Claude Code's custom slash commands and sub-agent system. Here's the key piece: Claude Code lets you spawn specialized sub-agents from within a conversation, give them specific instructions, and then bring their responses back into the main conversation.</p>
<p>Here's the high-level structure of what I built:</p>
<p><strong>File Structure:</strong></p>
<pre><code>~/.claude/commands/improve-claude-md.md     # Orchestrator prompt
~/.claude/agents/claude-md-improver/       # Improver agent config
~/.claude/agents/claude-md-critic/         # Critic agent config
</code></pre>
<p><strong>The Orchestrator Command</strong> (<code>~/.claude/commands/improve-claude-md.md</code>):</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#E1E4E8">You're analyzing our conversation to identify CLAUDE.md improvements.</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8">Process:</span></span>
<span class="line"><span style="color:#FFAB70">1.</span><span style="color:#E1E4E8"> Read the current CLAUDE.md file (note line count)</span></span>
<span class="line"><span style="color:#FFAB70">2.</span><span style="color:#E1E4E8"> Review recent conversation (last 20-30 messages)</span></span>
<span class="line"><span style="color:#FFAB70">3.</span><span style="color:#E1E4E8"> Spawn the Improver agent with context</span></span>
<span class="line"><span style="color:#FFAB70">4.</span><span style="color:#E1E4E8"> Spawn the Critic agent with the Improver's proposals</span></span>
<span class="line"><span style="color:#FFAB70">5.</span><span style="color:#E1E4E8"> Manage 2-3 debate rounds until convergence</span></span>
<span class="line"><span style="color:#FFAB70">6.</span><span style="color:#E1E4E8"> Synthesize final recommendations</span></span>
<span class="line"><span style="color:#FFAB70">7.</span><span style="color:#E1E4E8"> Present to user (never auto-apply)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8">Always track line counts and net impact.</span></span></code></pre>
<p>The sub-agent configs are much simpler—they just define their focus area. Here's what the Critic looks like:</p>
<p><strong>The Critic Agent</strong> (<code>~/.claude/agents/claude-md-critic/AGENT.md</code>):
The Critic is the more complex of the two sub-agents—it's a 244-line evaluation framework that assesses every proposal along six dimensions (necessity, clarity, over-specification risk, unintended consequences, maintainability, conciseness). It demands message citations, validates the 4-question test, and actively pushes for deletions over additions.</p>
<p>The Improver proposes additions AND deletions. The Orchestrator manages the whole debate. Each one owns a different dimension.</p>
<p><strong>The Orchestrator Workflow:</strong></p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#FFAB70">1.</span><span style="color:#E1E4E8"> Read current CLAUDE.md (note line count)</span></span>
<span class="line"><span style="color:#FFAB70">2.</span><span style="color:#E1E4E8"> Review recent conversation (last 20-30 messages)</span></span>
<span class="line"><span style="color:#FFAB70">   -</span><span style="color:#E1E4E8"> I trigger this with </span><span style="color:#79B8FF">`/improve-claude-md`</span><span style="color:#E1E4E8"> after finishing work</span></span>
<span class="line"><span style="color:#FFAB70">   -</span><span style="color:#E1E4E8"> Claude Code passes the conversation context automatically</span></span>
<span class="line"><span style="color:#FFAB70">3.</span><span style="color:#E1E4E8"> Check project files for context</span></span>
<span class="line"><span style="color:#FFAB70">4.</span><span style="color:#E1E4E8"> Spawn Improver agent with context</span></span>
<span class="line"><span style="color:#FFAB70">5.</span><span style="color:#E1E4E8"> Spawn Critic agent with Improver's proposals</span></span>
<span class="line"><span style="color:#FFAB70">6.</span><span style="color:#E1E4E8"> Manage 2-3 debate rounds</span></span>
<span class="line"><span style="color:#FFAB70">7.</span><span style="color:#E1E4E8"> Synthesize final recommendations</span></span>
<span class="line"><span style="color:#FFAB70">8.</span><span style="color:#E1E4E8"> Present to user (never auto-apply)</span></span></code></pre>
<p>In practice, this means:</p>
<ul>
<li>The Orchestrator reads CLAUDE.md and the conversation</li>
<li>Spawns Improver to propose changes</li>
<li>Spawns Critic to challenge those changes</li>
<li>Manages 2-3 rounds of debate until they converge</li>
<li>Presents me with final recommendations (never auto-applies)</li>
</ul>
<p>The key insight: the debate itself is where the quality comes from. Improver and Critic refine each other's thinking in ways neither could achieve alone.</p>
<p><strong>Key Design Decisions:</strong></p>
<ul>
<li><strong>Never auto-apply changes</strong>: The system only recommends. I approve what goes in.</li>
<li><strong>Time-boxed debate</strong>: Max 3 rounds prevents endless argument</li>
<li><strong>Convergence failure protocol</strong>: If agents can't agree after 3 rounds, both perspectives are presented to me</li>
<li><strong>Metrics throughout</strong>: Line counts, character density, net impact—keeps everyone accountable</li>
</ul>
<h2>What I Learned Building This</h2>
<p><strong>1. Automation Isn't Always About Speed</strong>
This system is slower than just asking Claude to suggest updates. But it produces better results. Sometimes the point of automation is quality control, not throughput.</p>
<p><strong>2. Adversarial Processes Are Underrated</strong>
We use them in code review, security testing, and debugging. Why not in AI workflows? Having one agent challenge another creates better outcomes than "helpful assistant" mode.</p>
<p><strong>3. Meta-Problems Are Real Problems</strong>
"Managing AI instructions" sounds silly until your instruction file is 800 lines of contradictory context. Meta-work (work about work) deserves real engineering solutions.</p>
<p><strong>4. The Irony Is Not Lost on Me</strong>
I built this entire system in a previous conversation with Claude… and then accidentally closed the terminal before documenting it. The very problem this system solves (capturing important decisions before they're lost) is what happened to the original implementation conversation.</p>
<p>The lesson? Ship your documentation system before you need it.</p>
<h2>Key Takeaways</h2>
<p><strong>What Worked</strong></p>
<p>The adversarial debate catches stuff single-agent systems never would. Improver proposed adding a section about Velite's RSS generation, but Critic challenged it: "The Velite config is already in the repo." Turns out Improver was right—Claude kept asking about it despite the config being available—but Critic forced a one-line version instead of a paragraph.</p>
<p>The net-negative focus is real. Most sessions end with more deletions than additions. My CLAUDE.md is actually getting shorter and more focused over time.</p>
<p><strong>What Changed</strong></p>
<p>My workflow is slower now, but the results are better. I used to just ask Claude "any suggestions for CLAUDE.md?" and get 5-10 additions that I'd half-heartedly implement. Now I run <code>/improve-claude-md</code>, watch the debate play out, and get 2-3 carefully-vetted recommendations with clear rationale.</p>
<p>The key difference: the debate forces evidence. Improver can't just say "this might be helpful"—it has to cite specific message numbers where Claude struggled. Critic can't just say "this seems unnecessary"—it has to explain why the evidence is weak or the instruction is redundant.</p>
<h2>What's Next?</h2>
<p>I'm considering extending this pattern to other workflows:</p>
<ul>
<li>Code review debates (one agent finds issues, another challenges severity)</li>
<li>Architecture decision records (proposal vs. devil's advocate)</li>
<li>Documentation quality (writer vs. reader perspective)</li>
</ul>
<p>The core insight—that AI agents benefit from structured disagreement just like humans do—feels broadly applicable.</p>
<hr>
<p><strong>Have you built multi-agent systems or workflow automation?</strong> I'd love to hear what patterns you've discovered.</p>]]></description>
            <content:encoded><![CDATA[<p>I have a confession: I built an AI system to not only review my AI instructions, but to <em>argue with each other</em> about what should and shouldn't be in there.</p>
<p>I'd been using Claude Code with the sub-agent orchestration feature for a few months when I realized something. (These days I've moved most of this workflow to OpenCode — see <a href="/blog/opencode-nested-slash-commands-architecture">how I consolidated my slash commands</a> for the architectural details.)</p>
<p>Let me explain how I got here, because the journey from "I should update this file more often" to "let's orchestrate a formal debate between specialized sub-agents" is… well, it's a journey.</p>
<h2>The Problem: Context Drift</h2>
<p>If you're using Claude Code (or any AI coding assistant), you've probably discovered <code>CLAUDE.md</code>, that special instructions file where you tell Claude about your project structure, conventions, and domain knowledge.</p>
<p>It's incredibly powerful when it's accurate, but it as recent studies have shown it can actually become a hindrance when it contains outdated or stale information. Theo did a great YouTube video covering this concept here:
<a href="https://www.youtube.com/watch?v=GcNu6wrLTJc">Delete your CLAUDE.md (and your AGENT.md too)</a></p>
<p>Here's what would typically happen:</p>
<ol>
<li>Start a new feature and make a significant update to my project</li>
<li>Think "I should add this to CLAUDE.md so Claude knows this"</li>
<li>Get distracted by actual work</li>
<li>Forget to update it</li>
<li>Repeat</li>
</ol>
<p>My CLAUDE.md was missing critical context, leading to repetitive conversations where I'd explain the same project structure or conventions over and over. It also often had stale context, because either the directory structure had changed a bit, or some relevant files had moved.</p>
<h2>The Naive Solution: Just Ask Claude</h2>
<p>My first thought was simple: "Hey Claude, after we finish this conversation, can you suggest updates to my CLAUDE.md file?"</p>
<p>Guess what happened?</p>
<p><strong>Bloat. Massive, uncontrolled bloat.</strong></p>
<p>Every conversation ended with Claude suggesting 5-10 new sections to add. Here's an example from one session:</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#E1E4E8">Claude suggested adding:</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "When working with components in src/components/ui, always use..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "For API routes in src/app/api, remember to..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "The build process uses Next.js static exports..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "Color palette is defined in tailwind.config.ts..."</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> "Error handling should follow this pattern..."</span></span></code></pre>
<p>None of the suggestions included <em>removing</em> anything. Within a few iterations, I would have had a 1,000-line instruction file covering every edge case we'd ever discussed.</p>
<p>The problem with asking a single AI agent to improve documentation is the same problem humans have: <strong>additive bias</strong>. It's psychologically easier to add information than to delete it. We don't want to lose potentially useful context, so we keep stacking it on.</p>
<p>But an instruction file that tries to document everything ends up being too long for Claude to effectively use. You hit context limits, instructions contradict each other, and the signal-to-noise ratio tanks.</p>
<h2>The Insight: I Need a Critic, Not Just a Suggester</h2>
<p>The breakthrough came when I realized what was missing: <strong>adversarial review</strong>.</p>
<p>In code reviews, we don't just ask "what else could we add?" We ask "what can we remove?" and "is this really necessary?" That pushback is what keeps codebases maintainable.</p>
<p>That's when I designed the multi-agent debate system.</p>
<h2>The Architecture: Orchestrated Debate</h2>
<p>Here's how it works when I run <code>/improve-claude-md</code>:</p>
<h3>The Three Roles</h3>
<p>There are three agents in this system, and I gave each one a specific personality:</p>
<p><strong>The Orchestrator</strong> runs the show. It reviews our conversation, reads CLAUDE.md, then spawns the other two agents. Its job is to manage the debate and give me a final report.</p>
<p><strong>The Improver</strong> is the optimist. It looks for patterns where Claude got stuck and proposes fixes. Here's the key: it also proposes deletions, which fights that additive bias I mentioned earlier.</p>
<p><strong>The Critic</strong> is... well, a critic. It challenges everything. "Is this <em>really</em> needed?" it asks. "Will this still be relevant in two weeks?" It's the adversarial voice that keeps things lean.</p>
<h3>The Debate Process</h3>
<p><strong>Round 1: Initial Proposals</strong></p>
<ul>
<li>Improver suggests 3-5 high-priority changes</li>
<li>Critic challenges each one: "Is this <em>really</em> necessary?"</li>
</ul>
<p><strong>Round 2: Defense &#x26; Refinement</strong></p>
<ul>
<li>Improver responds with evidence from the conversation</li>
<li>Critic either approves or maintains objections</li>
<li>Proposals get revised or dropped</li>
</ul>
<p><strong>Round 3: Final Consensus (if needed)</strong></p>
<ul>
<li>Resolve remaining disagreements</li>
<li>Document any contested proposals</li>
<li>Agree to disagree if necessary</li>
</ul>
<h3>The Output</h3>
<p>After the debate concludes, I get a structured report:</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#79B8FF;font-weight:bold">## Recommended Additions</span></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### High Priority</span></span>
<span class="line"><span style="color:#E1E4E8">[Critical additions with line counts]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### Medium Priority</span></span>
<span class="line"><span style="color:#E1E4E8">[Helpful clarifications with line counts]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Recommended Removals 🗑️</span></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### High-Impact Deletions</span></span>
<span class="line"><span style="color:#E1E4E8">[Existing bloat to remove with rationale]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Recommended Alternatives</span></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">### Commands to Create</span></span>
<span class="line"><span style="color:#E1E4E8">[Workflows that should be slash commands, not docs]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Rejected After Debate</span></span>
<span class="line"><span style="color:#E1E4E8">[Proposals discussed but deemed unnecessary]</span></span>
<span class="line"></span>
<span class="line"><span style="color:#79B8FF;font-weight:bold">## Net Impact</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> Lines added: +15</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8"> Lines removed: -23</span></span>
<span class="line"><span style="color:#FFAB70">-</span><span style="color:#E1E4E8;font-weight:bold"> **Net change: -8 lines**</span></span></code></pre>
<p>Notice that last section: <strong>net-negative line changes</strong>. That's the goal. Better focus through subtraction.</p>
<h2>Why Debate > Single Agent</h2>
<p>You might be thinking: "Couldn't you just prompt a single agent to be more critical?"</p>
<p>I tried that. It doesn't work as well. Here's why:</p>
<p><strong>1. Role Conflict</strong>
When a single agent is asked to both propose improvements <em>and</em> critique them, the critique is weak. The agent has already committed to the proposal and suffers from the same confirmation bias humans do.</p>
<p><strong>2. Surface-Level Pushback</strong>
A single "be critical" prompt produces generic objections: "This might be too specific" or "Consider if this is needed." It's not genuine adversarial review.</p>
<p><strong>3. No Iterative Refinement</strong>
With two agents, the Improver actually responds to criticism and revises proposals. A single agent just generates a final output without that back-and-forth refinement.</p>
<p><strong>4. Emergent Quality</strong>
The debate process surfaces insights neither agent would generate alone. The Critic might identify a pattern ("three of these proposals could become one slash command"), which then changes the Improver's approach in the next round.</p>
<p>It's the difference between proofreading your own writing and having someone else review it. The external perspective catches things you can't see.</p>
<h2>The Technical Implementation</h2>
<p>This is built using Claude Code's custom slash commands and sub-agent system. Here's the key piece: Claude Code lets you spawn specialized sub-agents from within a conversation, give them specific instructions, and then bring their responses back into the main conversation.</p>
<p>Here's the high-level structure of what I built:</p>
<p><strong>File Structure:</strong></p>
<pre><code>~/.claude/commands/improve-claude-md.md     # Orchestrator prompt
~/.claude/agents/claude-md-improver/       # Improver agent config
~/.claude/agents/claude-md-critic/         # Critic agent config
</code></pre>
<p><strong>The Orchestrator Command</strong> (<code>~/.claude/commands/improve-claude-md.md</code>):</p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#E1E4E8">You're analyzing our conversation to identify CLAUDE.md improvements.</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8">Process:</span></span>
<span class="line"><span style="color:#FFAB70">1.</span><span style="color:#E1E4E8"> Read the current CLAUDE.md file (note line count)</span></span>
<span class="line"><span style="color:#FFAB70">2.</span><span style="color:#E1E4E8"> Review recent conversation (last 20-30 messages)</span></span>
<span class="line"><span style="color:#FFAB70">3.</span><span style="color:#E1E4E8"> Spawn the Improver agent with context</span></span>
<span class="line"><span style="color:#FFAB70">4.</span><span style="color:#E1E4E8"> Spawn the Critic agent with the Improver's proposals</span></span>
<span class="line"><span style="color:#FFAB70">5.</span><span style="color:#E1E4E8"> Manage 2-3 debate rounds until convergence</span></span>
<span class="line"><span style="color:#FFAB70">6.</span><span style="color:#E1E4E8"> Synthesize final recommendations</span></span>
<span class="line"><span style="color:#FFAB70">7.</span><span style="color:#E1E4E8"> Present to user (never auto-apply)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8">Always track line counts and net impact.</span></span></code></pre>
<p>The sub-agent configs are much simpler—they just define their focus area. Here's what the Critic looks like:</p>
<p><strong>The Critic Agent</strong> (<code>~/.claude/agents/claude-md-critic/AGENT.md</code>):
The Critic is the more complex of the two sub-agents—it's a 244-line evaluation framework that assesses every proposal along six dimensions (necessity, clarity, over-specification risk, unintended consequences, maintainability, conciseness). It demands message citations, validates the 4-question test, and actively pushes for deletions over additions.</p>
<p>The Improver proposes additions AND deletions. The Orchestrator manages the whole debate. Each one owns a different dimension.</p>
<p><strong>The Orchestrator Workflow:</strong></p>
<pre class="shiki github-dark" style="background-color:#24292e;color:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#FFAB70">1.</span><span style="color:#E1E4E8"> Read current CLAUDE.md (note line count)</span></span>
<span class="line"><span style="color:#FFAB70">2.</span><span style="color:#E1E4E8"> Review recent conversation (last 20-30 messages)</span></span>
<span class="line"><span style="color:#FFAB70">   -</span><span style="color:#E1E4E8"> I trigger this with </span><span style="color:#79B8FF">`/improve-claude-md`</span><span style="color:#E1E4E8"> after finishing work</span></span>
<span class="line"><span style="color:#FFAB70">   -</span><span style="color:#E1E4E8"> Claude Code passes the conversation context automatically</span></span>
<span class="line"><span style="color:#FFAB70">3.</span><span style="color:#E1E4E8"> Check project files for context</span></span>
<span class="line"><span style="color:#FFAB70">4.</span><span style="color:#E1E4E8"> Spawn Improver agent with context</span></span>
<span class="line"><span style="color:#FFAB70">5.</span><span style="color:#E1E4E8"> Spawn Critic agent with Improver's proposals</span></span>
<span class="line"><span style="color:#FFAB70">6.</span><span style="color:#E1E4E8"> Manage 2-3 debate rounds</span></span>
<span class="line"><span style="color:#FFAB70">7.</span><span style="color:#E1E4E8"> Synthesize final recommendations</span></span>
<span class="line"><span style="color:#FFAB70">8.</span><span style="color:#E1E4E8"> Present to user (never auto-apply)</span></span></code></pre>
<p>In practice, this means:</p>
<ul>
<li>The Orchestrator reads CLAUDE.md and the conversation</li>
<li>Spawns Improver to propose changes</li>
<li>Spawns Critic to challenge those changes</li>
<li>Manages 2-3 rounds of debate until they converge</li>
<li>Presents me with final recommendations (never auto-applies)</li>
</ul>
<p>The key insight: the debate itself is where the quality comes from. Improver and Critic refine each other's thinking in ways neither could achieve alone.</p>
<p><strong>Key Design Decisions:</strong></p>
<ul>
<li><strong>Never auto-apply changes</strong>: The system only recommends. I approve what goes in.</li>
<li><strong>Time-boxed debate</strong>: Max 3 rounds prevents endless argument</li>
<li><strong>Convergence failure protocol</strong>: If agents can't agree after 3 rounds, both perspectives are presented to me</li>
<li><strong>Metrics throughout</strong>: Line counts, character density, net impact—keeps everyone accountable</li>
</ul>
<h2>What I Learned Building This</h2>
<p><strong>1. Automation Isn't Always About Speed</strong>
This system is slower than just asking Claude to suggest updates. But it produces better results. Sometimes the point of automation is quality control, not throughput.</p>
<p><strong>2. Adversarial Processes Are Underrated</strong>
We use them in code review, security testing, and debugging. Why not in AI workflows? Having one agent challenge another creates better outcomes than "helpful assistant" mode.</p>
<p><strong>3. Meta-Problems Are Real Problems</strong>
"Managing AI instructions" sounds silly until your instruction file is 800 lines of contradictory context. Meta-work (work about work) deserves real engineering solutions.</p>
<p><strong>4. The Irony Is Not Lost on Me</strong>
I built this entire system in a previous conversation with Claude… and then accidentally closed the terminal before documenting it. The very problem this system solves (capturing important decisions before they're lost) is what happened to the original implementation conversation.</p>
<p>The lesson? Ship your documentation system before you need it.</p>
<h2>Key Takeaways</h2>
<p><strong>What Worked</strong></p>
<p>The adversarial debate catches stuff single-agent systems never would. Improver proposed adding a section about Velite's RSS generation, but Critic challenged it: "The Velite config is already in the repo." Turns out Improver was right—Claude kept asking about it despite the config being available—but Critic forced a one-line version instead of a paragraph.</p>
<p>The net-negative focus is real. Most sessions end with more deletions than additions. My CLAUDE.md is actually getting shorter and more focused over time.</p>
<p><strong>What Changed</strong></p>
<p>My workflow is slower now, but the results are better. I used to just ask Claude "any suggestions for CLAUDE.md?" and get 5-10 additions that I'd half-heartedly implement. Now I run <code>/improve-claude-md</code>, watch the debate play out, and get 2-3 carefully-vetted recommendations with clear rationale.</p>
<p>The key difference: the debate forces evidence. Improver can't just say "this might be helpful"—it has to cite specific message numbers where Claude struggled. Critic can't just say "this seems unnecessary"—it has to explain why the evidence is weak or the instruction is redundant.</p>
<h2>What's Next?</h2>
<p>I'm considering extending this pattern to other workflows:</p>
<ul>
<li>Code review debates (one agent finds issues, another challenges severity)</li>
<li>Architecture decision records (proposal vs. devil's advocate)</li>
<li>Documentation quality (writer vs. reader perspective)</li>
</ul>
<p>The core insight—that AI agents benefit from structured disagreement just like humans do—feels broadly applicable.</p>
<hr>
<p><strong>Have you built multi-agent systems or workflow automation?</strong> I'd love to hear what patterns you've discovered.</p>]]></content:encoded>
            <category>claude-code</category>
        </item>
    </channel>
</rss>