<?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: Kitforge</title>
    <description>The latest articles on DEV Community by Kitforge (@kitforge).</description>
    <link>https://dev.to/kitforge</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%2F4114791%2F6d229c13-648c-48a7-9a74-d2abb5ea9d00.png</url>
      <title>DEV Community: Kitforge</title>
      <link>https://dev.to/kitforge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kitforge"/>
    <language>en</language>
    <item>
      <title>The context window is your real budget</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Wed, 09 Sep 2026 09:23:57 +0000</pubDate>
      <link>https://dev.to/kitforge/the-context-window-is-your-real-budget-45p</link>
      <guid>https://dev.to/kitforge/the-context-window-is-your-real-budget-45p</guid>
      <description>&lt;p&gt;Everyone talks about model quality. Almost nobody talks about the resource that actually decides whether your AI coding session succeeds: the context window. It is a budget, and you are spending it every turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you are actually spending
&lt;/h2&gt;

&lt;p&gt;A session with an agent loads your instructions, the files it read, its own earlier attempts, tool outputs, and your corrections. All of it sits in the same window. At the start of a session the model is sharp and follows your conventions. Ninety minutes later it is "forgetting" rules you stated up front. It didn't forget. Your rules got diluted by 40,000 tokens of stack traces and half-finished diffs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three leaks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Reading whole files when a function would do.&lt;/strong&gt; Every &lt;code&gt;cat entire-module.py&lt;/code&gt; costs you thousands of tokens that stay in the window for the rest of the session. Teach the agent to grep first, then read the narrowest range that answers the question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Letting failed attempts accumulate.&lt;/strong&gt; Three wrong turns leave three full diffs and their error output in context. The model starts pattern-matching on its own mistakes. When an approach fails twice, start a fresh session with a one-paragraph summary of what you learned, not the whole transcript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Stuffing the context file.&lt;/strong&gt; A 300-line CLAUDE.md is a tax on every single turn. Keep it under 80 lines and push detail into files the agent loads only when a task needs them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What works instead
&lt;/h2&gt;

&lt;p&gt;Treat context like memory in an embedded system. Small, deliberate allocations. Subagents for research, so their exploration never pollutes your main session. Explicit handoffs: when a session gets long, write the state to a file and restart clean. Hooks that re-inject the two or three rules that matter right before the model writes code, instead of hoping they survived from message one.&lt;/p&gt;

&lt;p&gt;The teams getting reliable output from coding agents are not using smarter models. They are spending the window on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this is going
&lt;/h2&gt;

&lt;p&gt;Context discipline is a workflow, not a setting. I packaged mine - context presets that stay small, subagent definitions that isolate exploration, hooks that re-assert rules at the moment of code generation - into &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt;. 34 files, drop them into a repo. But the mindset is free: every token in the window is a token the model is not spending on your actual problem.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your CLAUDE.md is too long (and other context-file mistakes</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Wed, 09 Sep 2026 08:38:56 +0000</pubDate>
      <link>https://dev.to/kitforge/your-claudemd-is-too-long-and-other-context-file-mistakes-4n3a</link>
      <guid>https://dev.to/kitforge/your-claudemd-is-too-long-and-other-context-file-mistakes-4n3a</guid>
      <description>&lt;p&gt;Most CLAUDE.md files I see fail the same way: they try to be documentation. Three hundred lines of architecture overview, API conventions, folder structure, philosophy. The model reads none of it when it counts.&lt;/p&gt;

&lt;p&gt;Your context file is not a wiki. It is a preload. Every token in it competes with your actual request for attention, and the model will happily trade away your testing conventions for a confident answer to whatever you just asked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mistakes that matter
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Writing for a human new hire.&lt;/strong&gt; Humans skim, bookmark, and come back later. Models get one pass, every session, whether they need it or not. If a line would help a new hire but doesn't change what the AI writes today, cut it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Stating what instead of enforcing how.&lt;/strong&gt; "We use pytest" is trivia. "Every new module ships with tests in tests/ and CI fails without them" is a rule the agent can act on. If a sentence can't change a decision, it's decoration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No negative rules.&lt;/strong&gt; The most valuable lines in my context file are the "never" list: never mock the database in integration tests, never add a dependency without asking, never silence a type error with &lt;code&gt;any&lt;/code&gt;. Agents default to the path of least resistance. Negative rules are the rails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Burying the load-bearing rule at line 180.&lt;/strong&gt; Models weight the beginning and end of context. Your three non-negotiables belong in the first ten lines, not in a subsection between "Project history" and "Team rituals."&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape that works
&lt;/h2&gt;

&lt;p&gt;Mine is under 80 lines. Roughly: a one-paragraph project summary, the stack, five non-negotiable rules, the test command, the "never" list, and a pointer to deeper docs the agent can read when a task actually needs them. Everything else got deleted or moved to files the agent loads on demand.&lt;/p&gt;

&lt;p&gt;The test is simple: after editing, ask the agent to do a task that used to go wrong. If it still goes wrong, the rule isn't in the file or isn't enforceable. Rewrite it until the failure disappears.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this is going
&lt;/h2&gt;

&lt;p&gt;Context files are the first layer. The next layers are subagents with narrow jobs, hooks that block bad commits before they exist, and slash commands that encode whole workflows. A short, sharp context file is what makes those layers reliable instead of decorative.&lt;/p&gt;

&lt;p&gt;I packaged my own setup - the context presets for five stacks, the subagents, the hooks, the commands - into &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt;. 34 files, drop them into a repo, done. But the lesson works without it: shorter file, enforceable rules, non-negotiables first.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your AI agent needs a runbook, not a vibe</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Wed, 09 Sep 2026 07:20:00 +0000</pubDate>
      <link>https://dev.to/kitforge/your-ai-agent-needs-a-runbook-not-a-vibe-372i</link>
      <guid>https://dev.to/kitforge/your-ai-agent-needs-a-runbook-not-a-vibe-372i</guid>
      <description>&lt;p&gt;Ask an AI coding agent to deploy your service and watch what happens. It will improvise: guess the deploy command, skip the health check, forget to warm the cache, and announce success before the rollback window even opens.&lt;/p&gt;

&lt;p&gt;Now ask a senior engineer the same thing. They don't improvise. They follow the runbook — the boring, written-down, step-by-step procedure that exists precisely so nobody has to think during a risky operation.&lt;/p&gt;

&lt;p&gt;Your agent needs that document too. Not a paragraph of encouragement in a rules file. An actual runbook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vibes don't survive contact with production
&lt;/h2&gt;

&lt;p&gt;Rules files tell agents how to behave in general. Runbooks tell them exactly what to do in a specific, dangerous situation. The difference matters most when the stakes are highest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deploys.&lt;/strong&gt; Order of operations, health checks, rollback triggers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migrations.&lt;/strong&gt; Backup first, run in a transaction, verify row counts, have the reverse migration ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incident response.&lt;/strong&gt; What to check first, who to page, what never to touch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you skip the runbook, the agent pattern-matches from training data — which means it runs the deploy procedure from a 2021 Medium post about a stack you don't use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Anatomy of a runbook an agent can execute
&lt;/h2&gt;

&lt;p&gt;A good agent runbook is not the wiki page you wrote for humans. Humans tolerate ambiguity, infer context, and know which steps are skippable. Agents execute literally and confidently. Write accordingly:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Preconditions as checks, not prose.&lt;/strong&gt;&lt;br&gt;
Bad: "Make sure the migration is reversible."&lt;br&gt;
Good: &lt;code&gt;ls migrations/down/ | grep &amp;lt;migration_name&amp;gt;&lt;/code&gt; must return a file. If not, STOP and ask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Explicit STOP conditions.&lt;/strong&gt;&lt;br&gt;
Agents default to forward progress. Every runbook needs a list of states where the correct action is to halt and report: "If the health check fails twice, do NOT retry a third time. Revert and report."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Verification after every mutating step.&lt;/strong&gt;&lt;br&gt;
Not "deploy the service" but "deploy, then curl /healthz expecting 200, then check the error rate for 2 minutes." An agent that verifies catches its own mistakes. An agent that doesn't, ships them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Named commands, never described commands.&lt;/strong&gt;&lt;br&gt;
"Run the test suite" gets you &lt;code&gt;pytest&lt;/code&gt; on a repo that uses &lt;code&gt;make test&lt;/code&gt;. Write the exact command. If the exact command varies, write how to discover it (&lt;code&gt;cat Makefile | grep -A2 test&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Deploy: api-service&lt;/span&gt;

Preconditions (check ALL, stop if any fail):
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`git status`&lt;/span&gt; clean on main
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`make test`&lt;/span&gt; passes
&lt;span class="p"&gt;-&lt;/span&gt; No active incident: &lt;span class="sb"&gt;`curl -s status.internal/health | grep OK`&lt;/span&gt;

Steps:
&lt;span class="p"&gt;1.&lt;/span&gt; &lt;span class="sb"&gt;`make build &amp;amp;&amp;amp; make deploy-staging`&lt;/span&gt;
&lt;span class="p"&gt;2.&lt;/span&gt; Verify: &lt;span class="sb"&gt;`curl -s staging.api/healthz`&lt;/span&gt; returns 200
&lt;span class="p"&gt;3.&lt;/span&gt; Run smoke suite: &lt;span class="sb"&gt;`make smoke-staging`&lt;/span&gt;
&lt;span class="p"&gt;4.&lt;/span&gt; &lt;span class="sb"&gt;`make deploy-prod`&lt;/span&gt;
&lt;span class="p"&gt;5.&lt;/span&gt; Watch error rate for 120s: &lt;span class="sb"&gt;`make watch-errors`&lt;/span&gt;

STOP and rollback (&lt;span class="sb"&gt;`make rollback`&lt;/span&gt;) if:
&lt;span class="p"&gt;-&lt;/span&gt; Any health check returns non-200
&lt;span class="p"&gt;-&lt;/span&gt; Error rate exceeds 0.5% at any point
&lt;span class="p"&gt;-&lt;/span&gt; Any step hangs longer than 5 minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Six lines of structure, and the agent goes from improvising theater to executing a procedure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where runbooks live
&lt;/h2&gt;

&lt;p&gt;Keep them in the repo, in a &lt;code&gt;runbooks/&lt;/code&gt; directory, referenced from your rules file by path: "Before any deploy, read runbooks/deploy-api.md and follow it exactly." The rules file points; the runbook executes.&lt;/p&gt;

&lt;p&gt;This also fixes the context-window problem from my last post: the agent loads the runbook when it needs it, instead of carrying 400 lines of deploy lore in every session.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The kit I sell includes ready-to-adapt runbook templates for deploys, migrations, and incident response, alongside the CLAUDE.md templates and git hook suite: &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt; - $19, one-time, free v1.x updates.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://aitoolslist.tools" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faitoolslist.tools%2Fbadges%2Faitoolslist-listed-light.svg" alt="Listed on AiToolsList.Tools"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>devops</category>
    </item>
    <item>
      <title>Rules files don't work unless they're testable</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Tue, 08 Sep 2026 23:02:28 +0000</pubDate>
      <link>https://dev.to/kitforge/rules-files-dont-work-unless-theyre-testable-20n4</link>
      <guid>https://dev.to/kitforge/rules-files-dont-work-unless-theyre-testable-20n4</guid>
      <description>&lt;p&gt;Every team I know that adopted AI coding agents did the same thing first: they wrote a rules file. CLAUDE.md, .cursorrules, AGENTS.md. Pages of conventions, style guides, and stern warnings.&lt;/p&gt;

&lt;p&gt;Then, three weeks later, the agent force-pushed to main anyway.&lt;/p&gt;

&lt;p&gt;Here's the uncomfortable truth: &lt;strong&gt;a rule that isn't testable is a suggestion.&lt;/strong&gt; And agents treat suggestions the way a junior dev treats a comment that says "don't change this" — with curiosity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why rules files fail
&lt;/h2&gt;

&lt;p&gt;Rules files fail the same way documentation fails: nothing checks them. When a rule says "never commit directly to main," there is no mechanism enforcing it. There's just a paragraph of English hoping a probabilistic model feels cooperative today.&lt;/p&gt;

&lt;p&gt;The failure modes are predictable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context window eviction.&lt;/strong&gt; Long sessions push your rules file out of the effective context. The agent isn't disobeying. It literally cannot see the rule anymore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instruction dilution.&lt;/strong&gt; A 400-line rules file is 400 lines of equal-weight text. The model can't tell "we prefer semicolons" from "you will break production if you do X."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No feedback loop.&lt;/strong&gt; When the agent violates a rule, nothing happens. The violation ships. You find out in review, or in an incident.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The fix: turn rules into checks
&lt;/h2&gt;

&lt;p&gt;The teams getting real value from agents figured out one thing: every rule worth writing down is worth expressing as a test, a hook, or a CI gate.&lt;/p&gt;

&lt;p&gt;The pattern looks like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule (English):&lt;/strong&gt; "Never commit secrets."&lt;br&gt;
&lt;strong&gt;Check (enforced):&lt;/strong&gt; a pre-commit hook that scans staged diffs for high-entropy strings and known key patterns, and refuses the commit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule:&lt;/strong&gt; "All new endpoints need tests."&lt;br&gt;
&lt;strong&gt;Check:&lt;/strong&gt; a CI job that fails when &lt;code&gt;git diff --name-only&lt;/code&gt; shows a new route file without a matching spec file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule:&lt;/strong&gt; "Don't force-push shared branches."&lt;br&gt;
&lt;strong&gt;Check:&lt;/strong&gt; a server-side &lt;code&gt;pre-receive&lt;/code&gt; hook or branch protection rule. Full stop, no exceptions, no agent creativity.&lt;/p&gt;

&lt;p&gt;The English version still belongs in your rules file — it explains &lt;em&gt;why&lt;/em&gt;. But the check is what makes it true.&lt;/p&gt;
&lt;h2&gt;
  
  
  The testable-rule audit
&lt;/h2&gt;

&lt;p&gt;Go through your rules file right now and mark every rule with one of three labels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enforced&lt;/strong&gt; — a hook, test, linter, or CI gate fails when it's violated. Keep.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testable but not enforced&lt;/strong&gt; — you &lt;em&gt;could&lt;/em&gt; write a check. Write it this week. These are your highest-risk gaps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Judgment call&lt;/strong&gt; — genuinely not testable ("prefer composition over inheritance"). Keep these, but move them to a short "taste" section and accept the agent will get them wrong sometimes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I run this audit on real setups, the split is usually 15% enforced, 55% testable-but-not, 30% judgment. That middle bucket is where agents hurt you.&lt;/p&gt;
&lt;h2&gt;
  
  
  A worked example
&lt;/h2&gt;

&lt;p&gt;One of the highest-leverage conversions I've done:&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;# .git/hooks/pre-push&lt;/span&gt;
&lt;span class="nv"&gt;branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git rev-parse &lt;span class="nt"&gt;--abbrev-ref&lt;/span&gt; HEAD&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$branch&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"main"&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="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$branch&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"master"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Direct pushes to &lt;/span&gt;&lt;span class="nv"&gt;$branch&lt;/span&gt;&lt;span class="s2"&gt; are disabled. Open a PR."&lt;/span&gt;
  &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four lines. It replaced a paragraph of rules-file prose that three different agents had independently ignored. The paragraph explained policy. The hook &lt;em&gt;is&lt;/em&gt; policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The deeper win
&lt;/h2&gt;

&lt;p&gt;Something unexpected happens once your rules are checks: your rules file gets &lt;em&gt;shorter and better&lt;/em&gt;. You delete the rules that are now enforced (the hook is the documentation) and what remains is the actual hard stuff — architecture intent, naming philosophy, when to break the rules.&lt;/p&gt;

&lt;p&gt;Agents do noticeably better with a 60-line file of real judgment calls than a 400-line file of unenforced commands.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I packaged my full setup — the testable CLAUDE.md, the git hook suite, the subagent patterns, and the audit checklist — into &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt;. It's $19, one-time, with free v1.x updates. If it saves you one afternoon of wrangling a runaway agent, it paid for itself.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Subagent Patterns: How to Split Work Across AI Coding Agents Without Losing Coherence</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Tue, 08 Sep 2026 22:10:13 +0000</pubDate>
      <link>https://dev.to/kitforge/subagent-patterns-how-to-split-work-across-ai-coding-agents-without-losing-coherence-1205</link>
      <guid>https://dev.to/kitforge/subagent-patterns-how-to-split-work-across-ai-coding-agents-without-losing-coherence-1205</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a chapter from &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt; - 34 ready-to-use files that package a senior engineer's AI coding setup: CLAUDE.md templates, permission guardrails, git hooks, and subagent playbooks. $19, instant download.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Claude Code and other agentic coding tools can spawn subagents: separate agent instances that get a slice of the work, their own context window, and a narrow job description. Used well, subagents are how you get parallel speed without the main agent losing the plot. Used badly, they are how you get five half-finished refactors that don't compile together.&lt;/p&gt;

&lt;p&gt;After running subagent-heavy workflows on real codebases for months, here are the patterns that hold up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pattern 1: Scout agents for read-only exploration
&lt;/h2&gt;

&lt;p&gt;The cheapest, safest subagent is one that can only read. Send it to answer a question like "where is authentication enforced in this repo?" or "what breaks if I change this interface?"&lt;/p&gt;

&lt;p&gt;Why it works: the scout burns its own context on the boring traversal - opening 30 files, tracing imports - and returns a 10-line answer. Your main agent's context stays clean for the actual work.&lt;/p&gt;

&lt;p&gt;Rules that keep scouts useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give it a question, not a task. "Map the billing flow" not "refactor billing."&lt;/li&gt;
&lt;li&gt;Cap the output. "Return the file paths, the key functions, and a 5-sentence summary."&lt;/li&gt;
&lt;li&gt;Forbid writes entirely. A scout that edits is no longer a scout.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pattern 2: Worker agents with a definition of done
&lt;/h2&gt;

&lt;p&gt;A worker subagent gets a concrete, verifiable task: "add input validation to these three endpoints, with tests that fail before and pass after." The key is that the task must be checkable without judgment.&lt;/p&gt;

&lt;p&gt;If you can't write the done-condition in one sentence, the task isn't ready to delegate. Split it further or do it yourself.&lt;/p&gt;

&lt;p&gt;The playbook version I use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scope&lt;/strong&gt;: exact files or directories it may touch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Done condition&lt;/strong&gt;: the command that must pass (e.g. &lt;code&gt;npm test -- billing&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget&lt;/strong&gt;: stop and report after N minutes or M failed attempts, instead of spiraling.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That third one is the one everyone skips. An unbounded worker will confidently produce 800 lines of wrong. A bounded one reports "stuck, here's what I tried" and costs you two minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pattern 3: The reviewer is not the author
&lt;/h2&gt;

&lt;p&gt;Never let the agent that wrote code be the agent that reviews it. Same context, same blind spots. A fresh reviewer subagent, given only the diff and the requirements, catches things the author agent sailed past - because it has no sunk cost in the approach.&lt;/p&gt;

&lt;p&gt;This mirrors human teams for a reason. The kit's review checklist templates exist to give the reviewer agent the same bar every time: error handling, injection surface, migration safety, test quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to never delegate
&lt;/h2&gt;

&lt;p&gt;Some work should stay with the main agent (or with you):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deciding what to build.&lt;/strong&gt; Subagents execute judgment; they shouldn't create it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-cutting design.&lt;/strong&gt; Anything that changes contracts between modules needs one coherent mind.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Final review before merge.&lt;/strong&gt; Delegated review is a filter, not a gate. The last pass belongs to whoever owns the outcome.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets and destructive ops.&lt;/strong&gt; Permission guardrails should make this impossible, not just discouraged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The coordination tax
&lt;/h2&gt;

&lt;p&gt;Every subagent adds overhead: you write a brief, wait, and integrate the result. If the task takes less time than the brief, do it inline. My rule of thumb: delegate when the subtask needs more than ~10 minutes of focused work or a separate context window's worth of reading.&lt;/p&gt;

&lt;p&gt;The win isn't parallelism for its own sake. It's keeping the main agent's attention on the decisions while the grunt work happens in quarantined contexts.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The full subagent playbooks - scout, worker, reviewer templates with done-conditions, budgets, and integration checklists - are in &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt;, along with the CLAUDE.md template and permission guardrails that make delegation safe. One-time $19, lifetime updates.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Anatomy of a CLAUDE.md That Actually Controls Your AI Agent</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Tue, 08 Sep 2026 19:12:42 +0000</pubDate>
      <link>https://dev.to/kitforge/anatomy-of-a-claudemd-that-actually-controls-your-ai-agent-2d9n</link>
      <guid>https://dev.to/kitforge/anatomy-of-a-claudemd-that-actually-controls-your-ai-agent-2d9n</guid>
      <description>&lt;p&gt;Every Claude Code setup lives or dies by one file. Not the model, not the prompts you type at 2 AM - the CLAUDE.md sitting at the root of the repo. It is the first thing the agent reads and the only thing it reads every single time.&lt;/p&gt;

&lt;p&gt;I have reviewed a lot of these files, and the bad ones fail in predictable ways. They are either novels nobody would read, wish lists with no enforcement, or walls of style rules the model ignores because nothing says what matters most. Here is the structure that actually works, section by section.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Identity and mission (2-3 sentences, no more)
&lt;/h2&gt;

&lt;p&gt;Open with what the project is and what the agent's job is. Not marketing copy - operational context.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;This is a B2B invoicing API in TypeScript (Fastify + Postgres). You are the
primary maintainer. Prioritize correctness of money math over speed. When in
doubt, ask before changing anything under /billing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last line does real work. It tells the agent where the blast radius is.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Commands that must work
&lt;/h2&gt;

&lt;p&gt;The agent will run things. Tell it exactly which commands are the source of truth so it does not invent &lt;code&gt;npm run test:quick&lt;/code&gt; and hallucinate success.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Install: &lt;span class="sb"&gt;`pnpm install`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Test: &lt;span class="sb"&gt;`pnpm test`&lt;/span&gt; (must pass before every commit)
&lt;span class="p"&gt;-&lt;/span&gt; Typecheck: &lt;span class="sb"&gt;`pnpm typecheck`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Lint: &lt;span class="sb"&gt;`pnpm lint --fix`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agents are surprisingly obedient here. If you give them the exact command, they run the exact command. If you do not, they guess, and guesses fail silently.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Hard rules, stated as rules
&lt;/h2&gt;

&lt;p&gt;This is where most files go soft. "Try to avoid committing to main" is a suggestion. Write rules like a linter would:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; NEVER commit directly to main. Always create a feature branch.
&lt;span class="p"&gt;-&lt;/span&gt; NEVER use &lt;span class="sb"&gt;`git push --force`&lt;/span&gt; on shared branches.
&lt;span class="p"&gt;-&lt;/span&gt; NEVER commit files matching .env&lt;span class="err"&gt;*&lt;/span&gt; or containing API keys.
&lt;span class="p"&gt;-&lt;/span&gt; ALWAYS run &lt;span class="sb"&gt;`pnpm test`&lt;/span&gt; before committing. No exceptions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ALL-CAPS markers are not for style. Models weight emphatic, absolute language more heavily, and these are the rules you most want to survive a long context window.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Architecture map (the 60-second version)
&lt;/h2&gt;

&lt;p&gt;Agents waste enormous effort exploring. Give them the map:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;/src/routes - HTTP handlers, thin by design
/src/domain - business logic, no I/O allowed here
/src/db - migrations and queries
/tests - mirrors /src structure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five lines saves dozens of exploratory tool calls per session.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. How to verify work
&lt;/h2&gt;

&lt;p&gt;This is the section almost everyone skips, and it is the one that changes behavior the most. Define what "done" means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;A task is done when: tests pass, typecheck is clean, the commit message
follows conventional commits, and you have re-read your own diff for
obvious mistakes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without this, agents declare victory after the code compiles. With it, they self-review.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. What the agent is NOT allowed to do
&lt;/h2&gt;

&lt;p&gt;Boundaries prevent the most expensive mistakes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;Do not: modify CI configuration, change database migrations that have
already been applied, add dependencies without asking, or touch anything
under /infra.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What to leave out
&lt;/h2&gt;

&lt;p&gt;Three things do not belong in CLAUDE.md: your entire style guide (link it), exhaustive API docs (the agent can read code), and anything you would not enforce in review (every unenforced rule teaches the model that rules are optional).&lt;/p&gt;

&lt;h2&gt;
  
  
  The test of a good one
&lt;/h2&gt;

&lt;p&gt;Read your CLAUDE.md and ask: if a talented contractor read only this file, could they work in this repo without asking me a single question for the first hour? If not, that gap is exactly what your agent is silently guessing about.&lt;/p&gt;

&lt;p&gt;If you want this structure without writing it from scratch, I packaged a production-tested version into the &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;Agentic Coding Kit&lt;/a&gt; - a CLAUDE.md template with these six sections, plus the git hooks that enforce the hard rules even when the model forgets them, review subagents, and slash commands. But the anatomy above is the real takeaway: identity, commands, hard rules, map, definition of done, boundaries. Everything else is decoration.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>5 Git Hooks That Stop AI Coding Agents From Breaking Your Repo</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Tue, 08 Sep 2026 14:28:17 +0000</pubDate>
      <link>https://dev.to/kitforge/5-git-hooks-that-stop-ai-coding-agents-from-breaking-your-repo-5c6k</link>
      <guid>https://dev.to/kitforge/5-git-hooks-that-stop-ai-coding-agents-from-breaking-your-repo-5c6k</guid>
      <description>&lt;p&gt;AI coding agents are fast. That is the whole point, and also the whole problem. Claude Code or Cursor can produce ten commits in the time you would normally spend on one, and none of those commits come with the hesitation a human feels before pushing to main.&lt;/p&gt;

&lt;p&gt;Rules in a CLAUDE.md file help, but they rely on the model remembering and obeying them. Git hooks are different: they run outside the model, on your machine, and they cannot be talked out of it. Here are the five hooks I install in every repo where an agent has commit access, with working implementations.&lt;/p&gt;

&lt;p&gt;All of these live in a &lt;code&gt;.githooks/&lt;/code&gt; directory in the repo, activated once with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config core.hooksPath .githooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That keeps the hooks versioned and shared with the team instead of hidden in &lt;code&gt;.git/hooks&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Block direct commits to main
&lt;/h2&gt;

&lt;p&gt;Agents love committing to whatever branch is checked out. If that branch is main, you are one &lt;code&gt;git commit&lt;/code&gt; away from an unreviewed change landing in production history.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.githooks/pre-commit&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;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git symbolic-ref &lt;span class="nt"&gt;--short&lt;/span&gt; HEAD 2&amp;gt;/dev/null&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$branch&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"main"&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="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$branch&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"master"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Direct commits to &lt;/span&gt;&lt;span class="nv"&gt;$branch&lt;/span&gt;&lt;span class="s2"&gt; are not allowed. Create a feature branch."&lt;/span&gt;
  &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent hits this once, reads the message, and creates a branch. That is exactly the behavior you want: the correction happens inside the agent's own loop, not in your review comments three hours later.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Block force pushes to shared branches
&lt;/h2&gt;

&lt;p&gt;An agent that gets confused about history will sometimes reach for &lt;code&gt;--force&lt;/code&gt;. On a shared branch that is unrecoverable damage to everyone else's work.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.githooks/pre-push&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;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;protected&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"main master develop"&lt;/span&gt;
&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read &lt;/span&gt;local_ref local_sha remote_ref remote_sha&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;remote_branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$remote_ref&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s|refs/heads/||'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;p &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$protected&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$remote_branch&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
      if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$remote_sha&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"0000000000000000000000000000000000000000"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; git merge-base &lt;span class="nt"&gt;--is-ancestor&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$remote_sha&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$local_sha&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
          &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Non-fast-forward push to &lt;/span&gt;&lt;span class="nv"&gt;$remote_branch&lt;/span&gt;&lt;span class="s2"&gt; blocked."&lt;/span&gt;
          &lt;span class="nb"&gt;exit &lt;/span&gt;1
        &lt;span class="k"&gt;fi
      fi
    fi
  done
done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This blocks any non-fast-forward update to a protected branch, which covers force pushes and history rewrites in one check.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Require tests to pass before a commit
&lt;/h2&gt;

&lt;p&gt;The most common agent failure mode is "code looks right, tests never ran." A pre-commit hook that runs the fast test suite makes that impossible to skip silently.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.githooks/pre-commit&lt;/code&gt; (append to hook 1):&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="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; package.json &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;npm &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--silent&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;"Tests failing. Commit blocked."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit &lt;/span&gt;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; pytest.ini &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="nt"&gt;-f&lt;/span&gt; pyproject.toml &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;pytest &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="nt"&gt;-q&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;"Tests failing. Commit blocked."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit &lt;/span&gt;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your full suite is slow, point this at a smoke subset. The point is not coverage, it is that "commit" and "ran tests" can no longer drift apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Enforce commit message format
&lt;/h2&gt;

&lt;p&gt;Agents write commit messages like "update files" when they are moving fast. If your repo uses conventional commits (and your changelog tooling depends on them), enforce it at the door.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.githooks/commit-msg&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;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;pattern&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"^(feat|fix|docs|refactor|test|chore)(&lt;/span&gt;&lt;span class="se"&gt;\(&lt;/span&gt;&lt;span class="s2"&gt;.+&lt;/span&gt;&lt;span class="se"&gt;\)&lt;/span&gt;&lt;span class="s2"&gt;)?: .{10,}"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-qE&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$pattern&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Commit message must be conventional: type(scope): description"&lt;/span&gt;
  &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agents adapt to this instantly because the error message tells them the exact format to retry with.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Block secrets at the door
&lt;/h2&gt;

&lt;p&gt;Agents paste example keys, tokens from logs, and credentials from your &lt;code&gt;.env.example&lt;/code&gt; into code more often than anyone admits. A cheap pattern check catches the obvious ones.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.githooks/pre-commit&lt;/code&gt; (append):&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="k"&gt;if &lt;/span&gt;git diff &lt;span class="nt"&gt;--cached&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-qE&lt;/span&gt; &lt;span class="s1"&gt;'(sk-[a-zA-Z0-9]{20,}|AKIA[0-9A-Z]{16}|-----BEGIN (RSA|EC) PRIVATE KEY-----)'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Possible secret in staged changes. Commit blocked."&lt;/span&gt;
  &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a replacement for a real scanner like gitleaks, but it catches the three patterns that cause the most pain, in zero dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern that matters
&lt;/h2&gt;

&lt;p&gt;Notice what these have in common: none of them trust the model. Every rule that lives only in a prompt is a suggestion. Every rule that lives in a hook is physics.&lt;/p&gt;

&lt;p&gt;If you do not want to write and tune these yourself, I packaged this exact setup - the hooks, the CLAUDE.md presets, the subagents, and the slash commands - into the &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;Agentic Coding Kit&lt;/a&gt;. It unzips into any repo and gives Claude Code or Cursor this discipline from the first prompt. But whether you use my kit or copy the snippets above, put the guardrails in git, not in the prompt.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>git</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I Audited 50 Claude Code Setups. Here's What the Good Ones Have in Common</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Tue, 08 Sep 2026 04:51:29 +0000</pubDate>
      <link>https://dev.to/kitforge/i-audited-50-claude-code-setups-heres-what-the-good-ones-have-in-common-1aip</link>
      <guid>https://dev.to/kitforge/i-audited-50-claude-code-setups-heres-what-the-good-ones-have-in-common-1aip</guid>
      <description>&lt;p&gt;Most Claude Code and Cursor setups I see fail the same way: the model writes plausible code, breaks conventions, invents APIs, and the human spends the session correcting it. The fix is never a better prompt typed into the chat box. It is the files the agent reads before it writes a single line.&lt;/p&gt;

&lt;p&gt;After comparing dozens of working setups from senior engineers, the pattern is boring and consistent. The good setups all have five things.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A CLAUDE.md (or AGENTS.md) that reads like onboarding docs
&lt;/h2&gt;

&lt;p&gt;Not "You are a helpful assistant." A real one: the stack, the commands that actually run the tests, the naming conventions, the directories the agent should never touch, and the definition of done. Weak setups skip this and pay for it in every session.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Explicit workflow contracts
&lt;/h2&gt;

&lt;p&gt;Strong setups tell the agent &lt;em&gt;how&lt;/em&gt; to work, not just what the project is. Plan before code. Show the diff strategy before large refactors. Run the test suite before declaring victory. These are checklists, and they belong in files the agent loads every time, not in your head.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Review checklists tuned to the repo
&lt;/h2&gt;

&lt;p&gt;Generic "review this code" prompts catch generic problems. The setups that catch real bugs point the agent at the project's actual failure modes: the ORM gotchas, the auth boundary, the places where migrations go wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Guardrails against confident nonsense
&lt;/h2&gt;

&lt;p&gt;The best configs include rules like "if you are about to invent a function, search the codebase first" and "if the test command fails, stop and report instead of patching around it." Agents hallucinate least when the rules name the failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Task templates for repeat work
&lt;/h2&gt;

&lt;p&gt;Writing a migration, adding an endpoint, cutting a release: the good setups have a template for each, so the agent produces the same shape every time instead of improvising.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shortcut
&lt;/h2&gt;

&lt;p&gt;I got tired of reassembling this from scratch for every repo, so I packaged my own setup into &lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;The Agentic Coding Kit&lt;/a&gt;: 34 files covering CLAUDE.md and AGENTS.md templates, system prompts, agent rules, code review checklists, and workflows for Claude Code, Cursor, and similar tools. Drop it into a repo and the agent starts behaving like it read the onboarding docs, because it did.&lt;/p&gt;

&lt;p&gt;Whether you buy a pack or write your own, the lesson from the audit stands: the setup files are the product. The chat prompt is just the ignition.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Agentic Coding Kit: a senior engineer's AI coding setup, packaged</title>
      <dc:creator>Kitforge</dc:creator>
      <pubDate>Tue, 08 Sep 2026 02:53:33 +0000</pubDate>
      <link>https://dev.to/kitforge/the-agentic-coding-kit-a-senior-engineers-ai-coding-setup-packaged-ih0</link>
      <guid>https://dev.to/kitforge/the-agentic-coding-kit-a-senior-engineers-ai-coding-setup-packaged-ih0</guid>
      <description>&lt;p&gt;AI coding assistants are only as good as the instructions you give them. Most repos give them nothing, so they guess: wrong test commands, no commit discipline, no idea what "done" means for your project.&lt;/p&gt;

&lt;p&gt;I packaged the setup a senior engineer would write for your repo into a single drop-in kit: &lt;strong&gt;The Agentic Coding Kit&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;What's inside (34 files)&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CLAUDE.md presets for 5 stacks&lt;/strong&gt; - Python/FastAPI, TypeScript/Node, React/Next.js, Go, Rust. Scoped permissions, build/test commands, and conventions the agent follows from the first prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;6 Cursor rules (.mdc)&lt;/strong&gt; - testing, git discipline, security review, refactor guardrails, docs, style.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5 Claude Code subagents&lt;/strong&gt; - code reviewer, test writer, security auditor, refactorer, doc writer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4 slash commands&lt;/strong&gt; - &lt;code&gt;/review&lt;/code&gt;, &lt;code&gt;/test&lt;/code&gt;, &lt;code&gt;/secure&lt;/code&gt;, &lt;code&gt;/ship&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3 hook recipes with ready-to-use scripts&lt;/strong&gt; - block force pushes, require tests before commit, auto-lint on save.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CI workflow templates, pre-commit config, ADR templates, MIT license.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Why it works&lt;/h2&gt;

&lt;p&gt;Agents drift when the rules live in your head. A CLAUDE.md that says "run pytest before committing, never force-push, keep diffs under 400 lines" turns a chaotic assistant into a predictable one. The kit gives you that file, tuned per stack, plus the hooks that enforce it mechanically.&lt;/p&gt;

&lt;p&gt;Unzip into your repo, pick the preset for your stack, done. Every file is plain Markdown, JSON, or shell - no lock-in, read everything before it runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://kitforgedev.itch.io/agentic-coding-kit" rel="noopener noreferrer"&gt;Get The Agentic Coding Kit - $19, one-time&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Free updates for all v1.x releases. If it saves you one afternoon of wrangling a runaway agent, it paid for itself.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://toolfame.com/item/the-agentic-coding-kit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftoolfame.com%2Fbadge-light.svg" alt="Featured on toolfame.com" width="160" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
