<?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: Mitesh Sharma</title>
    <description>The latest articles on DEV Community by Mitesh Sharma (@miteshethos).</description>
    <link>https://dev.to/miteshethos</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%2F3983379%2F0daf1d92-a05a-412a-8e49-28987ea68d62.png</url>
      <title>DEV Community: Mitesh Sharma</title>
      <link>https://dev.to/miteshethos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/miteshethos"/>
    <language>en</language>
    <item>
      <title>What's Actually in My AGENTS.md</title>
      <dc:creator>Mitesh Sharma</dc:creator>
      <pubDate>Mon, 22 Jun 2026 12:18:07 +0000</pubDate>
      <link>https://dev.to/miteshethos/whats-actually-in-my-agentsmd-434e</link>
      <guid>https://dev.to/miteshethos/whats-actually-in-my-agentsmd-434e</guid>
      <description>&lt;p&gt;&lt;strong&gt;The instruction file that runs my codebase started as a junk drawer. The rules that ended up mattering weren't the ones I expected.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A note on credit before I start: most of what follows isn't original to me. I picked up these ideas from other engineers sharing what worked for them — scattered across Twitter/X threads, blog posts, and conversations — then tested them against my own codebase to see what actually held up. This is a synthesis, not an invention. Where something came from the community rather than from me, I've tried to say so. Consider it a thank-you to everyone quietly posting what they've learned.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first time I wrote an AGENTS.md, I treated it like a README's annoying cousin. Tech stack, a few style notes, a line begging the agent to run the tests. Then I watched the agent ignore half of it and confidently do the wrong thing with the other half.&lt;/p&gt;

&lt;p&gt;So I kept editing. Months later, the file looks nothing like where it started. And the surprising part is which rules earned their place. It wasn't the formatting conventions or the careful style guidance. It was a small number of rules that fight an agent's worst instincts, plus one hard lesson about the difference between asking and enforcing.&lt;/p&gt;

&lt;p&gt;Here's what I found actually mattered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first rule isn't about code. It's about permission to stop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The very first thing in my file has nothing to do with syntax. It tells the agent that when something is unclear, it should stop and ask. State your assumptions. If two interpretations exist, name both instead of silently picking one. If a simpler approach exists, say so.&lt;/p&gt;

&lt;p&gt;I put this first because the default failure mode of a coding agent isn't bad code. It's confident code built on a wrong reading of an ambiguous request. Left alone, a model resolves ambiguity quietly and keeps going, and you don't find out until you're reviewing two hundred lines that solve the wrong problem.&lt;/p&gt;

&lt;p&gt;What surprised me was that the agent needed permission to stop. Without it, the model optimizes for looking helpful, and looking helpful means producing something rather than admitting confusion. Telling it that stopping to ask is the desired outcome — not a failure — changed its behavior more than any other single line.&lt;/p&gt;

&lt;p&gt;The lesson generalized: an agent will fill silence with confidence unless you tell it that "I'm not sure" is an acceptable answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most of the useful rules just name a bad habit and forbid it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once I started paying attention, I noticed that my most valuable rules all had the same shape. Each one named a specific, predictable bad instinct and told the agent not to do it. None of them were clever. They were just earned.&lt;/p&gt;

&lt;p&gt;Agents over-build. Ask for a function and you can get a configurable framework with options nobody requested. So one rule is blunt about it: minimum code that solves the problem, nothing speculative, and if you wrote two hundred lines where fifty would do, rewrite it. Naming the tax is what keeps it from being paid.&lt;/p&gt;

&lt;p&gt;Agents over-reach. An agent that helpfully reformats the whole file alongside its actual change turns a ten-line diff into a two-hundred-line one you can't safely review. So another rule constrains the blast radius: touch only what you must, match the existing style even if you'd do it differently, and make every changed line trace back to the request. This one is really about protecting review, not code. A diff you can't read is a diff you can't trust.&lt;/p&gt;

&lt;p&gt;The rule I'd most recommend stealing is one I didn't appreciate until it bit me. When an agent finds two competing patterns in a codebase, its instinct is to find a middle path that honors both. The result belongs to neither pattern and confuses everyone who reads it later. So the rule is: don't average conflicting patterns. Pick one, explain why, flag the other for cleanup. Average code that satisfies two contradictory rules is the worst code in the repo.&lt;/p&gt;

&lt;p&gt;There's a companion to all of these that I keep coming back to: if the agent can't explain why existing code is shaped the way it is, it should ask before adding next to it. "Looks unrelated to me" is the most expensive assumption in any mature codebase. Most subtle breakages come from changes that looked perfectly isolated to the person making them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The lesson that reshaped the whole file&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If I could keep only one thing I learned, it's this, and it took the longest to accept.&lt;/p&gt;

&lt;p&gt;I once had a hard requirement written in plain, unmissable language at the top of the file. The agent still skipped it sometimes. Not often — just often enough to cause real problems. When I dug into why, the answer was deflating in its simplicity: models drift from instructions. A rule in a markdown file is a strong suggestion, not a contract. Over enough runs, any instruction gets ignored eventually.&lt;/p&gt;

&lt;p&gt;That one realization split my entire file into two tiers.&lt;/p&gt;

&lt;p&gt;There's guidance — the style preferences, the philosophy, the "prefer this over that." Guidance lives in prose and gets followed most of the time, and most of the time is fine for that category.&lt;/p&gt;

&lt;p&gt;Then there's the stuff that has to hold every single time. And what I learned is that this stuff does not belong in prose at all. If something absolutely must happen, don't rely on instructions. Enforce it. Put it in a hook, a script, a CI check — something deterministic that makes the violation impossible to merge, not merely discouraged.&lt;/p&gt;

&lt;p&gt;My file still says "run the checks before you call it done." But the real guarantee isn't that sentence. It's that CI fails on lint errors no matter what the agent intended. The instruction is a courtesy. The gate is the guarantee.&lt;/p&gt;

&lt;p&gt;The practical test I use now: every time I write "always" or "never" in an instruction file, I ask whether there's a mechanism enforcing it. If there isn't, I don't have a rule. I have a hope.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make the agent prove it, not promise it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Two more rules in the file are really about the gap between "I did it" and "it works."&lt;/p&gt;

&lt;p&gt;The first changes how a task is framed. Instead of "add validation," the instruction is to define what success looks like and loop until it's met: write tests for the invalid inputs, then make them pass. "Fix the bug" becomes "write a test that reproduces it, then make it pass." A vague directive becomes one with a finish line the agent can check itself against, instead of declaring victory on vibes.&lt;/p&gt;

&lt;p&gt;The second is blunt about trust: don't claim tests pass from memory — re-run them. I added this after watching the agent report a clean run that wasn't, and after watching sub-agent reviews invent bugs that didn't exist in the source. Both are the same failure: a claim untethered from a fresh check. So the rule ties every claim back to a command actually run, and tells the agent to verify a reported bug against the real code before acting on it.&lt;/p&gt;

&lt;p&gt;The principle underneath both: trust the check, not the claim. An agent's confidence is not evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep the laws out of the manual&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One structural decision kept the whole file maintainable: my AGENTS.md doesn't try to contain the architecture.&lt;/p&gt;

&lt;p&gt;The structural laws — dependency direction, frozen contracts, the boundaries that can't be crossed — live in a separate constitution document. The working file just points at it: read this before you add a package, cross a layer, or touch anything safety-critical. And it's explicit that if a change conflicts with the constitution, the move is to refactor or open an amendment, never to slip in a violation to ship faster, because that cost compounds.&lt;/p&gt;

&lt;p&gt;The reason to separate them is pace. The working manual is full of conventions and gotchas that change constantly and should be edited freely. The constitution holds laws that should be slow to change and mechanically enforced. Cram both into one file and the stable laws get buried under operational churn. Keep them apart, and each can move at its own speed.&lt;/p&gt;

&lt;p&gt;The takeaway: things that change weekly and things that should never change don't belong in the same document.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write down the scars&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The back half of my file is the part I'd most encourage every team to keep: a running log of non-obvious lessons. Not conventions — scars. The specific things that cost someone half a day and would cost the next person the same half-day if they weren't written down.&lt;/p&gt;

&lt;p&gt;They're deliberately concrete. The database pseudo-column that isn't selected by default, and the exact error you get when you forget it. The streaming API that keys its events by index instead of ID and arrives in a surprising order. The native dependency that silently fails to compile unless it's on an allowlist. None of these are principles. They're landmines, mapped.&lt;/p&gt;

&lt;p&gt;This section matters more with agents than it ever did with people, because an agent has no scar tissue. A human who lost a day to something tends to remember it. An agent will rediscover the same landmine the hard way every single time, unless the knowledge is written where it'll read it. That's the quiet value here: it's how a codebase's painful, accumulated knowledge gets inherited instead of relearned.&lt;/p&gt;

&lt;p&gt;Every unexpected hour you lose is only worth paying once. Writing it down is how you make sure of that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the file is really for&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After all the editing, here's how I think about it now. This file isn't a style guide. The formatter handles tabs and semicolons. What the file actually does is encode judgment — the judgment that used to live only in the heads of the few people who'd been around long enough to have it.&lt;/p&gt;

&lt;p&gt;The rules that matter are the ones that counteract an agent's predictable instincts: over-building, over-reaching, guessing silently, blending conflicting patterns, claiming success it never verified. And the most important distinction in the whole file is the line between guidance you state and guarantees you enforce.&lt;/p&gt;

&lt;p&gt;So if you're writing one of these, that's where I'd spend the effort. Give the agent permission to stop and ask. Name the bad habits you keep seeing and forbid them by name. Move anything that must always hold out of prose and into a check that fails the build. Point at your architecture instead of restating it. And keep a growing log of your scars, because the agent will step on every landmine you don't map.&lt;/p&gt;

&lt;p&gt;The formatting rules write themselves. The judgment is the part worth writing down.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>coding</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Give Your Codebase a Constitution</title>
      <dc:creator>Mitesh Sharma</dc:creator>
      <pubDate>Sat, 20 Jun 2026 09:14:24 +0000</pubDate>
      <link>https://dev.to/miteshethos/give-your-codebase-a-constitution-3k4h</link>
      <guid>https://dev.to/miteshethos/give-your-codebase-a-constitution-3k4h</guid>
      <description>&lt;h3&gt;
  
  
  Architecture that lives only in people's heads doesn't survive agents.
&lt;/h3&gt;

&lt;p&gt;For most of my career, the real rules of a codebase weren't written down.&lt;/p&gt;

&lt;p&gt;People knew them.&lt;/p&gt;

&lt;p&gt;Senior engineers knew which layers could talk to which. They knew which dependencies were forbidden, which schemas were effectively frozen, and which shortcuts would create problems six months later. New engineers learned those rules the traditional way: break one, get caught in review, get the explanation, and eventually remember not to do it again.&lt;/p&gt;

&lt;p&gt;It wasn't perfect, but it mostly worked.&lt;/p&gt;

&lt;p&gt;What I didn't fully appreciate until I started working heavily with coding agents is how dependent that model is on tribal knowledge. Humans accumulate context over time. Agents don't.&lt;/p&gt;

&lt;p&gt;They don't remember the migration that went sideways three years ago. They weren't around when the team spent weeks untangling a dependency cycle. They don't know why a particular boundary exists.&lt;/p&gt;

&lt;p&gt;They only know what they can see.&lt;/p&gt;

&lt;p&gt;Which means if a rule isn't written down, from the agent's perspective, the rule doesn't exist.&lt;/p&gt;

&lt;p&gt;I've seen agents wire inner layers directly to outer layers. I've seen them introduce dependencies we intentionally avoided and extend contracts everyone on the team considered settled. The code often worked, which was the dangerous part.&lt;/p&gt;

&lt;p&gt;The problem wasn't correctness.&lt;/p&gt;

&lt;p&gt;The problem was architectural drift.&lt;/p&gt;

&lt;p&gt;That's when something clicked for me.&lt;/p&gt;

&lt;p&gt;Architecture can't remain folklore once agents start writing code.&lt;/p&gt;

&lt;p&gt;It has to become law.&lt;/p&gt;

&lt;p&gt;Not a convention. Not a suggestion. Not something a reviewer remembers at 6 PM on a Friday.&lt;/p&gt;

&lt;p&gt;A law.&lt;/p&gt;

&lt;p&gt;Written down, explicit, and enforceable.&lt;/p&gt;

&lt;p&gt;That's what I mean by a constitution.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Constitution Is Not Documentation
&lt;/h2&gt;

&lt;p&gt;The first mistake I made was treating the constitution like another documentation file.&lt;/p&gt;

&lt;p&gt;It isn't.&lt;/p&gt;

&lt;p&gt;Documentation explains how the system works today. A constitution defines what the system is allowed to become. Those sound similar, but they serve very different purposes.&lt;/p&gt;

&lt;p&gt;Package names change. Directories move. Frameworks get replaced. Implementations come and go.&lt;/p&gt;

&lt;p&gt;None of that belongs in a constitution.&lt;/p&gt;

&lt;p&gt;The constitution should contain only things that should survive a major refactor: the laws, the invariants, and the boundaries that define the shape of the system.&lt;/p&gt;

&lt;p&gt;A useful test is simple. If a statement could become false next quarter and nobody would care, it probably doesn't belong in the constitution.&lt;/p&gt;

&lt;p&gt;That's documentation.&lt;/p&gt;

&lt;p&gt;Not law.&lt;/p&gt;

&lt;p&gt;The best constitutions I've seen share three properties. They're short, restrictive, and slow to change.&lt;/p&gt;

&lt;p&gt;Short because nobody reads a 50-page constitution.&lt;/p&gt;

&lt;p&gt;Restrictive because a law that forbids nothing protects nothing.&lt;/p&gt;

&lt;p&gt;Slow to change because laws only create trust when people can rely on them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Ended Up In Mine
&lt;/h2&gt;

&lt;p&gt;I didn't design the structure upfront.&lt;/p&gt;

&lt;p&gt;Most of it came from repeatedly explaining the same architectural rules in reviews. After the tenth explanation, I stopped explaining and started writing.&lt;/p&gt;

&lt;p&gt;The first section contains a handful of principles. Very few. Five or six at most.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency direction is one-way&lt;/li&gt;
&lt;li&gt;Contracts are defined before implementations&lt;/li&gt;
&lt;li&gt;Inner layers must not know about outer layers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't implementation details.&lt;/p&gt;

&lt;p&gt;They're foundational assumptions.&lt;/p&gt;

&lt;p&gt;If one of them changes, you're not editing architecture. You're redefining it.&lt;/p&gt;

&lt;p&gt;The second section defines the layers and their allowed dependencies. One rule turned out to be surprisingly important:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer membership is determined by role, not directory.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Directories change all the time. Roles don't.&lt;/p&gt;

&lt;p&gt;A module that opens a network listener is still an entry point even if someone moves it tomorrow. A domain model is still a domain model regardless of which folder it lives in.&lt;/p&gt;

&lt;p&gt;Tying architecture to directories makes it fragile.&lt;/p&gt;

&lt;p&gt;Tying architecture to responsibilities makes it durable.&lt;/p&gt;

&lt;p&gt;Every law also gets a reason.&lt;/p&gt;

&lt;p&gt;This turned out to be more important than I expected. A rule without a rationale eventually gets deleted by someone who doesn't understand why it exists. The rule teaches behavior. The rationale teaches judgment.&lt;/p&gt;

&lt;p&gt;You need both.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Part That Actually Makes It Work
&lt;/h2&gt;

&lt;p&gt;Everything above helps.&lt;/p&gt;

&lt;p&gt;None of it is enough.&lt;/p&gt;

&lt;p&gt;The biggest lesson I've learned working with agents is one I keep relearning in different forms:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Instructions are guidance. Enforcement is reality.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can write "inner layers must never depend on outer layers" in the clearest prose imaginable.&lt;/p&gt;

&lt;p&gt;An agent will still violate it occasionally.&lt;/p&gt;

&lt;p&gt;Humans will too.&lt;/p&gt;

&lt;p&gt;Not because they're careless. Because instructions drift.&lt;/p&gt;

&lt;p&gt;That's when I realized every rule falls into one of two categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guidance&lt;/li&gt;
&lt;li&gt;Enforcement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Guidance belongs in documents.&lt;/p&gt;

&lt;p&gt;Enforcement belongs in code.&lt;/p&gt;

&lt;p&gt;If something absolutely must happen, don't rely on instructions. Enforce it.&lt;/p&gt;

&lt;p&gt;Put it in CI. Put it in a validator. Put it in a lint rule. Put it in a pre-merge check. Use whatever mechanism makes the violation impossible to merge.&lt;/p&gt;

&lt;p&gt;A law that can't be enforced is just a comment with good intentions.&lt;/p&gt;

&lt;p&gt;That's why every important rule in my constitution has two forms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The human version&lt;/li&gt;
&lt;li&gt;The machine-enforced version&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The human version explains the intent.&lt;/p&gt;

&lt;p&gt;The machine version guarantees compliance.&lt;/p&gt;

&lt;p&gt;One creates understanding.&lt;/p&gt;

&lt;p&gt;The other creates trust.&lt;/p&gt;

&lt;p&gt;Both matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters More Than Ever
&lt;/h2&gt;

&lt;p&gt;It's easy to look at all this and see process.&lt;/p&gt;

&lt;p&gt;I see leverage.&lt;/p&gt;

&lt;p&gt;The goal isn't to slow agents down. The goal is to trust them more.&lt;/p&gt;

&lt;p&gt;Once architecture becomes enforceable, I don't need to manually inspect every decision. The validator does that for me. An agent can touch ten files across multiple layers and I don't have to wonder whether dependency boundaries stayed intact.&lt;/p&gt;

&lt;p&gt;The system already checked.&lt;/p&gt;

&lt;p&gt;That's the unlock.&lt;/p&gt;

&lt;p&gt;The constitution isn't what limits autonomy.&lt;/p&gt;

&lt;p&gt;It's what makes autonomy possible.&lt;/p&gt;

&lt;p&gt;Because once the important boundaries are guaranteed, you can safely delegate everything else.&lt;/p&gt;

&lt;p&gt;The same thing happens with onboarding.&lt;/p&gt;

&lt;p&gt;New engineers no longer need months of tribal knowledge. Agents no longer need endless prompt engineering. Everyone starts from the same set of laws, and the machine enforces them equally.&lt;/p&gt;

&lt;p&gt;Knowledge stops being gatekept by tenure.&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Start
&lt;/h2&gt;

&lt;p&gt;Don't start by writing fifty laws.&lt;/p&gt;

&lt;p&gt;Start by paying attention.&lt;/p&gt;

&lt;p&gt;Every time you hear yourself say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"We don't do that because..."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You've probably found a candidate law.&lt;/p&gt;

&lt;p&gt;Every time an agent makes a change that makes you uncomfortable, ask yourself why. More often than not, you've discovered a boundary that exists in your head but nowhere else.&lt;/p&gt;

&lt;p&gt;Start with the handful of rules whose violation would genuinely hurt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency direction&lt;/li&gt;
&lt;li&gt;Secret handling&lt;/li&gt;
&lt;li&gt;Critical contracts&lt;/li&gt;
&lt;li&gt;Boundary ownership&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Write the rule.&lt;/p&gt;

&lt;p&gt;Write the reason.&lt;/p&gt;

&lt;p&gt;Then add the check that makes it impossible to ignore.&lt;/p&gt;

&lt;p&gt;Because that's the part people usually skip.&lt;/p&gt;

&lt;p&gt;A law without enforcement is a suggestion.&lt;/p&gt;

&lt;p&gt;A constitution without enforcement is documentation.&lt;/p&gt;

&lt;p&gt;And architecture that exists only in people's heads doesn't survive agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give your codebase a constitution.
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Then give it teeth.
&lt;/h2&gt;

</description>
      <category>architecture</category>
      <category>ai</category>
      <category>coding</category>
      <category>agents</category>
    </item>
    <item>
      <title>Working With AI: What Actually Works For Me</title>
      <dc:creator>Mitesh Sharma</dc:creator>
      <pubDate>Tue, 16 Jun 2026 15:36:21 +0000</pubDate>
      <link>https://dev.to/miteshethos/working-with-ai-what-actually-works-for-me-37nf</link>
      <guid>https://dev.to/miteshethos/working-with-ai-what-actually-works-for-me-37nf</guid>
      <description>&lt;p&gt;I think a lot of people still imagine AI coding as opening ChatGPT, asking for code, and copy-pasting the result. That's not really how I work anymore.&lt;/p&gt;

&lt;p&gt;The biggest shift for me is that planning matters far more than coding.&lt;/p&gt;

&lt;p&gt;Earlier, execution was expensive, so most of the effort went into writing code. Now execution is cheap. I can have an agent implement something in minutes. The hard part is making sure the plan is correct.&lt;/p&gt;

&lt;p&gt;Most of my effort goes into thinking through the architecture, edge cases, failure modes, test strategy, and how the change fits into the broader system. If the plan is vague, the agent will confidently implement the wrong thing. The quality of the result is mostly determined by the quality of the plan.&lt;/p&gt;

&lt;p&gt;Once I have a plan, I break it into small independent pieces. Each piece should be executable without additional clarification. If an agent needs to stop and ask questions, the task probably isn't broken down enough.&lt;/p&gt;

&lt;p&gt;Those pieces become tickets.&lt;/p&gt;

&lt;p&gt;Then an agent picks up a ticket and implements it.&lt;/p&gt;

&lt;p&gt;The important thing is that the agent isn't operating in a vacuum. I try to give it a good environment to work in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear architectural rules&lt;/li&gt;
&lt;li&gt;Reusable skills and workflows&lt;/li&gt;
&lt;li&gt;Guardrails&lt;/li&gt;
&lt;li&gt;Hooks for things that must always happen&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One lesson that really stuck with me is that instructions are guidance, not guarantees.&lt;/p&gt;

&lt;p&gt;At one point I had "always use a git worktree" written in AGENTS.md. The model still ignored it occasionally. When I dug into it, the answer was simple: models can drift from instructions.&lt;/p&gt;

&lt;p&gt;So if something absolutely must happen, don't rely on instructions. Enforce it. Put it in a hook, script, validation step, CI check, or some other deterministic mechanism.&lt;/p&gt;

&lt;p&gt;If it is important, make it impossible to skip.&lt;/p&gt;

&lt;p&gt;Once the implementation is done, the agent opens a PR.&lt;/p&gt;

&lt;p&gt;This is where another useful pattern comes in: don't let the same model review the code it wrote.&lt;/p&gt;

&lt;p&gt;I usually have one model implement and another model review.&lt;/p&gt;

&lt;p&gt;Different models catch different things. They have different strengths, weaknesses, and blind spots. The disagreements between them are often where the real issues are hiding.&lt;/p&gt;

&lt;p&gt;A surprising amount of feedback can be handled at this stage before a human ever looks at the PR.&lt;/p&gt;

&lt;p&gt;After that, human review depends on what changed.&lt;/p&gt;

&lt;p&gt;If the change touches critical infrastructure, security, core architecture, data correctness, or anything with a large blast radius, I want human eyes on it.&lt;/p&gt;

&lt;p&gt;For lower-risk changes, I care about two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does it work?&lt;/li&gt;
&lt;li&gt;Does it follow the architectural rules?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If both are true, I don't think every change needs a mandatory human line-by-line review.&lt;/p&gt;

&lt;p&gt;The other thing that has become important is having a written constitution for the codebase.&lt;/p&gt;

&lt;p&gt;For me this is usually an architecture document that defines the rules of the system.&lt;/p&gt;

&lt;p&gt;For example, if the architecture says inner layers cannot depend on outer layers, then that rule should be written down explicitly. Not tribal knowledge. Not something that only senior engineers know.&lt;/p&gt;

&lt;p&gt;When the rules are documented, every agent can follow them consistently.&lt;/p&gt;

&lt;p&gt;The workflow ends up looking something like:&lt;/p&gt;

&lt;p&gt;Plan → Break into small tasks → Create tickets → Agent implements → Different model reviews → Human reviews critical changes → Merge&lt;/p&gt;

&lt;p&gt;What's interesting is how little of my time is spent writing implementation code.&lt;/p&gt;

&lt;p&gt;Most of my time goes into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Planning&lt;/li&gt;
&lt;li&gt;Architecture&lt;/li&gt;
&lt;li&gt;Reviewing critical decisions&lt;/li&gt;
&lt;li&gt;Improving the harness&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that's probably the biggest change.&lt;/p&gt;

&lt;p&gt;The real leverage isn't getting AI to write code.&lt;/p&gt;

&lt;p&gt;The real leverage is continuously improving the system around the AI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better plans&lt;/li&gt;
&lt;li&gt;Better skills&lt;/li&gt;
&lt;li&gt;Better guardrails&lt;/li&gt;
&lt;li&gt;Better hooks&lt;/li&gt;
&lt;li&gt;Better architectural rules&lt;/li&gt;
&lt;li&gt;Better review workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The better the harness becomes, the better every future task becomes.&lt;/p&gt;

&lt;p&gt;That's where most of the compounding value comes from.&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>architecture</category>
      <category>agents</category>
      <category>code</category>
    </item>
    <item>
      <title>AI Coding at Scale: What Actually Works</title>
      <dc:creator>Mitesh Sharma</dc:creator>
      <pubDate>Sun, 14 Jun 2026 08:27:35 +0000</pubDate>
      <link>https://dev.to/miteshethos/ai-coding-at-scale-what-actually-works-2dod</link>
      <guid>https://dev.to/miteshethos/ai-coding-at-scale-what-actually-works-2dod</guid>
      <description>&lt;h1&gt;
  
  
  AI Coding at Scale: What Actually Works
&lt;/h1&gt;

&lt;p&gt;I've been building &lt;a href="https://github.com/ethosagent/ethos" rel="noopener noreferrer"&gt;Ethos&lt;/a&gt;, a personality-first AI agent, and like many engineers today, I rely heavily on AI coding tools. Claude Code, Codex, and others have become part of my daily workflow.&lt;/p&gt;

&lt;p&gt;What I've learned is that simply adding AI to software development doesn't automatically make development faster or better.&lt;/p&gt;

&lt;p&gt;Without structure, AI tends to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate more code than necessary&lt;/li&gt;
&lt;li&gt;Skip established conventions&lt;/li&gt;
&lt;li&gt;Take implementation shortcuts&lt;/li&gt;
&lt;li&gt;Create large changes that are difficult to review&lt;/li&gt;
&lt;li&gt;Optimize for completion rather than maintainability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After experimenting with different workflows, a few of us sat down and discussed what actually works when AI becomes part of a real engineering process.&lt;/p&gt;

&lt;p&gt;The conclusion was surprisingly simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spend most of the effort on planning&lt;/li&gt;
&lt;li&gt;Build automated feedback loops into execution&lt;/li&gt;
&lt;li&gt;Enforce deterministic checks&lt;/li&gt;
&lt;li&gt;Keep tasks and PRs small&lt;/li&gt;
&lt;li&gt;Standardize engineering practices&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these principles are new. The interesting part is how much more important they become when AI is writing a significant portion of the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Planning is the Highest-Leverage Activity
&lt;/h2&gt;

&lt;p&gt;The biggest shift for me has been treating planning as the primary activity rather than a precursor to coding.&lt;/p&gt;

&lt;p&gt;Most implementation mistakes are not coding mistakes. They are understanding mistakes.&lt;/p&gt;

&lt;p&gt;If the feature requirements are unclear, architecture decisions are incomplete, edge cases are unexplored, or test strategies are undefined, AI simply executes the ambiguity faster.&lt;/p&gt;

&lt;p&gt;I now spend the majority of effort upfront:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understanding the problem&lt;/li&gt;
&lt;li&gt;Identifying architecture implications&lt;/li&gt;
&lt;li&gt;Finding gaps in requirements&lt;/li&gt;
&lt;li&gt;Thinking through failure scenarios&lt;/li&gt;
&lt;li&gt;Defining validation and testing strategies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A problem discovered during planning is a discussion.&lt;/p&gt;

&lt;p&gt;The same problem discovered after implementation is usually a rewrite.&lt;/p&gt;

&lt;p&gt;Model selection matters here as well. Planning is where reasoning quality has the highest impact, so I use the strongest model available for planning. Execution can often be delegated to a cheaper and faster model once the direction is clear.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Execution Should Include Feedback Loops
&lt;/h2&gt;

&lt;p&gt;AI-generated code should not go directly from implementation to merge.&lt;/p&gt;

&lt;p&gt;Execution needs review loops.&lt;/p&gt;

&lt;p&gt;One approach that has worked well is using different models for implementation and review. If one model writes the code, another reviews it.&lt;/p&gt;

&lt;p&gt;Different models tend to have different strengths and blind spots. Having a second model review the output often surfaces issues that would otherwise make it into a PR.&lt;/p&gt;

&lt;p&gt;The goal is not to remove human review.&lt;/p&gt;

&lt;p&gt;The goal is to ensure humans spend their time reviewing decisions and outcomes rather than catching avoidable mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Deterministic Checks Matter More Than AI Reviews
&lt;/h2&gt;

&lt;p&gt;AI reviews are helpful.&lt;/p&gt;

&lt;p&gt;Deterministic checks are mandatory.&lt;/p&gt;

&lt;p&gt;Linting, formatting, tests, type checks, and validation should run automatically and consistently.&lt;/p&gt;

&lt;p&gt;The key insight is simple:&lt;/p&gt;

&lt;p&gt;If something must happen every single time, do not rely on AI to remember it.&lt;/p&gt;

&lt;p&gt;Automate it.&lt;/p&gt;

&lt;p&gt;Start with one check if necessary. A single enforced linting rule provides more value than an elaborate workflow that nobody adopts.&lt;/p&gt;

&lt;p&gt;Once that foundation exists, expand gradually.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Small Tasks Produce Better Results
&lt;/h2&gt;

&lt;p&gt;Large tasks create large outputs.&lt;/p&gt;

&lt;p&gt;Large outputs create difficult reviews.&lt;/p&gt;

&lt;p&gt;Whether the reviewer is a human or an AI model, review quality drops as scope increases.&lt;/p&gt;

&lt;p&gt;Breaking work into milestones, small tickets, and focused PRs improves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementation quality&lt;/li&gt;
&lt;li&gt;Review quality&lt;/li&gt;
&lt;li&gt;Iteration speed&lt;/li&gt;
&lt;li&gt;Rollback safety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A smaller change is easier to reason about, easier to validate, and easier to ship.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Standardize Principles, Not Tools
&lt;/h2&gt;

&lt;p&gt;One mistake teams often make is trying to standardize every tool and workflow.&lt;/p&gt;

&lt;p&gt;What matters more is standardizing the engineering principles.&lt;/p&gt;

&lt;p&gt;Different engineers can use different tools as long as they follow the same expectations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Plan before implementing&lt;/li&gt;
&lt;li&gt;Build feedback loops into execution&lt;/li&gt;
&lt;li&gt;Use deterministic validation&lt;/li&gt;
&lt;li&gt;Keep changes small&lt;/li&gt;
&lt;li&gt;Follow shared engineering practices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consistency of thinking matters more than consistency of tooling.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Current Workflow
&lt;/h2&gt;

&lt;p&gt;Today, my workflow is fairly straightforward.&lt;/p&gt;

&lt;p&gt;I work inside a development sandbox and use both Claude Code and Codex depending on the task.&lt;/p&gt;

&lt;p&gt;Before opening a PR:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local hooks run validation&lt;/li&gt;
&lt;li&gt;Tests execute locally&lt;/li&gt;
&lt;li&gt;Linting and formatting are enforced&lt;/li&gt;
&lt;li&gt;The same checks that run in CI run locally first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One model reviews the generated code&lt;/li&gt;
&lt;li&gt;A second model reviews the review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is significantly less back-and-forth during code review and higher confidence before a human reviewer ever looks at the change.&lt;/p&gt;

&lt;p&gt;I also use Git worktrees extensively to isolate parallel streams of work.&lt;/p&gt;

&lt;p&gt;That led to one of the more important lessons I've learned about AI-assisted development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Natural Language for Guidance. Hooks for Guarantees.
&lt;/h2&gt;

&lt;p&gt;Initially, I documented a simple rule in AGENTS.md:&lt;/p&gt;

&lt;p&gt;Always use worktrees.&lt;/p&gt;

&lt;p&gt;For a while, it worked.&lt;/p&gt;

&lt;p&gt;Then it didn't.&lt;/p&gt;

&lt;p&gt;When I asked Claude why it occasionally ignored the instruction, the answer was surprisingly accurate: instructions are guidance, not enforcement.&lt;/p&gt;

&lt;p&gt;A model can follow them.&lt;/p&gt;

&lt;p&gt;A model can also drift from them.&lt;/p&gt;

&lt;p&gt;This is the distinction that matters when building reliable AI workflows.&lt;/p&gt;

&lt;p&gt;Use natural-language instructions for preferences.&lt;/p&gt;

&lt;p&gt;Use deterministic systems for requirements.&lt;/p&gt;

&lt;p&gt;If something is mandatory, enforce it with hooks, automation, validation, or policy.&lt;/p&gt;

&lt;p&gt;Do not rely on a probabilistic system to provide deterministic guarantees.&lt;/p&gt;

&lt;p&gt;Once I moved worktree enforcement into hooks, the issue disappeared.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;The most useful mental model I've found is to treat AI like another engineer on the team.&lt;/p&gt;

&lt;p&gt;A very fast engineer.&lt;/p&gt;

&lt;p&gt;A very capable engineer.&lt;/p&gt;

&lt;p&gt;But still an engineer operating within a system.&lt;/p&gt;

&lt;p&gt;Good engineering organizations do not rely on individual engineers to remember every rule, every process, and every validation step.&lt;/p&gt;

&lt;p&gt;They create systems that make the right thing easy and the wrong thing difficult.&lt;/p&gt;

&lt;p&gt;The same principle applies to AI.&lt;/p&gt;

&lt;p&gt;Use strong models for planning.&lt;/p&gt;

&lt;p&gt;Use automated feedback loops during execution.&lt;/p&gt;

&lt;p&gt;Enforce deterministic validation.&lt;/p&gt;

&lt;p&gt;Keep changes small.&lt;/p&gt;

&lt;p&gt;And whenever something absolutely must happen every time, automate it.&lt;/p&gt;

&lt;p&gt;PS: I'm building Ethos in public — an AI agent with a soul: locked core values, evolving expression, governed self-improvement. If this kind of thing interests you, come say hi: &lt;a href="https://x.com/EthosAgentAI" rel="noopener noreferrer"&gt;@EthosAgentAI&lt;/a&gt;.&lt;/p&gt;

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