<?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>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>
