<?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: DaymondHyper</title>
    <description>The latest articles on DEV Community by DaymondHyper (@daymondhyper).</description>
    <link>https://dev.to/daymondhyper</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%2F4069528%2F258ee840-bc98-486c-b29d-e2ec5e72d03c.png</url>
      <title>DEV Community: DaymondHyper</title>
      <link>https://dev.to/daymondhyper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/daymondhyper"/>
    <language>en</language>
    <item>
      <title>I Gave Claude Code an AGENTS.md Contract and Stopped Babysitting It</title>
      <dc:creator>DaymondHyper</dc:creator>
      <pubDate>Sun, 09 Aug 2026 07:11:55 +0000</pubDate>
      <link>https://dev.to/daymondhyper/i-gave-claude-code-an-agentsmd-contract-and-stopped-babysitting-it-53m</link>
      <guid>https://dev.to/daymondhyper/i-gave-claude-code-an-agentsmd-contract-and-stopped-babysitting-it-53m</guid>
      <description>&lt;p&gt;Claude Code follows instructions too well, and that's the whole problem. When nothing tells it what engineering discipline looks like, it invents a plausible version: graceful degradation into &lt;code&gt;any&lt;/code&gt;, tests that assert implementation details so they pass no matter what, silent &lt;code&gt;catch (e) {}&lt;/code&gt; blocks eating the failures you needed to hear about. I spent months working around this one edit at a time. The fix wasn't a better prompt. It was a contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem is that it listens
&lt;/h2&gt;

&lt;p&gt;Claude Code is the best instruction follower I've used, and that's the whole problem. Give it an ambiguous ask and it doesn't stall, it guesses. It picks the fastest plausible path, and on its own that path is usually a small degradation: a type widened to &lt;code&gt;any&lt;/code&gt; here, a test that only asserts what the code already does there, an empty catch block quietly swallowing the error that should have been loud.&lt;/p&gt;

&lt;p&gt;None of this is malice. It's what a very eager, very fast assistant does when nobody has told it what done looks like. And you can't just stand over it and correct every response, there's no point paying for an agent you have to supervise like an intern. The real question is how you draw the line between plausible and correct, and make it stick across every task, every session, every tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  AGENTS.md is a contract, not a wish list
&lt;/h2&gt;

&lt;p&gt;I started with CLAUDE.md, like everyone does, a prose file describing the project. It helped, but it read like documentation. Claude Code skimmed it, absorbed the vibes, and when a situation wasn't covered it went right back to inventing plausible engineering.&lt;/p&gt;

&lt;p&gt;The shift came when I moved everything into AGENTS.md and stopped writing like I was leaving notes for a colleague. Claude Code reads AGENTS.md first, and other agents respect it too, so the discipline travels with the repo instead of living inside one tool's prompt. More importantly, I started writing it like a contract. A wish list says "write good tests." A contract says what good means, what happens when a test is bad, and what to do when the work keeps failing. Specific, numbered, testable. That difference is most of the win.&lt;/p&gt;

&lt;h2&gt;
  
  
  The contract skeleton
&lt;/h2&gt;

&lt;p&gt;Mine has eight baseline rules, a six-rung verification ladder, and a failure protocol. Every change has to climb the ladder before it counts as done, and rungs one through three are non-negotiable. Here's the shape of it, trimmed to the parts that do the actual work:&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="gh"&gt;# AGENTS.md&lt;/span&gt;

&lt;span class="gu"&gt;## Baseline Rules&lt;/span&gt;
&lt;span class="p"&gt;
1.&lt;/span&gt; Never widen a type to &lt;span class="sb"&gt;`any`&lt;/span&gt; to make a check pass. Fix the check.
&lt;span class="p"&gt;2.&lt;/span&gt; A test that cannot fail is not a test. Delete it and write one that can.
&lt;span class="p"&gt;3.&lt;/span&gt; No silent &lt;span class="sb"&gt;`catch (e) {}`&lt;/span&gt;. Handle it, rethrow it, or log it with context.
&lt;span class="p"&gt;4.&lt;/span&gt; Prefer the codebase's existing patterns over new abstractions.
&lt;span class="p"&gt;5.&lt;/span&gt; A change that compiles but is not verified does not exist.
&lt;span class="p"&gt;6.&lt;/span&gt; Public APIs get tests before they get callers.
&lt;span class="p"&gt;7.&lt;/span&gt; If a rule conflicts with a deadline, the deadline loses.
&lt;span class="p"&gt;8.&lt;/span&gt; When in doubt, ask. Guessing is the expensive path.

&lt;span class="gu"&gt;## Verification Ladder&lt;/span&gt;

Rungs 1-3 are mandatory for every change:
&lt;span class="p"&gt;
1.&lt;/span&gt; Does it compile?
&lt;span class="p"&gt;2.&lt;/span&gt; Does the changed behavior actually work?
&lt;span class="p"&gt;3.&lt;/span&gt; Does it break anything adjacent?
&lt;span class="p"&gt;4.&lt;/span&gt; Does it follow this codebase's conventions?
&lt;span class="p"&gt;5.&lt;/span&gt; Does it hold at the boundaries: empty, null, huge, concurrent?
&lt;span class="p"&gt;6.&lt;/span&gt; Is the result observable in production?

&lt;span class="gu"&gt;## Failure Protocol&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; First failure: fix it and re-verify. Normal day.
&lt;span class="p"&gt;-&lt;/span&gt; Second failure: stop and re-derive. Your mental model of the system is wrong.
&lt;span class="p"&gt;-&lt;/span&gt; Third failure: stop, revert to last known good, and document what happened.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The failure protocol
&lt;/h2&gt;

&lt;p&gt;This is the part people ask me about most, and it's the part that saves the most time. Claude Code iterates fast and burns tokens happily grinding on a broken hypothesis. It will re-read the same file, try the same fix a different way, and tell you with total confidence why this time it will work. Without a brake pedal, that's money and patience going down a hole.&lt;/p&gt;

&lt;p&gt;Three attempts, that's the whole protocol. First failure, fix and re-verify, a normal day. Second failure, stop and re-derive, because by then the model's mental model of the system is wrong, not its typing. Third failure, stop, revert to last known good, and document. The revert matters: it puts the system back on known ground instead of worse ground, and the documentation means the next session starts from the lesson instead of repeating it.&lt;/p&gt;

&lt;p&gt;That one rule, stop after three, has saved me more wasted work than anything else in the file. Grinding on a broken hypothesis is the expensive failure mode, and the protocol makes it structurally impossible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflows get their own files
&lt;/h2&gt;

&lt;p&gt;Baseline rules are the floor, but most tasks in a project follow a shape: feature, bugfix, review. Those shapes aren't contracts, they're procedures, steps in order with gates between them. So they live in separate workflow files, and the agent gets pointed at the right one when a task starts.&lt;/p&gt;

&lt;p&gt;Keeping them separate matters because a workflow is sequential and the contract is not. Buried in a system prompt, a workflow gets skimmed. In its own file, it gets followed. When Claude Code starts a feature, it opens the feature workflow, and the first thing that file asks for is a two-sentence contract for the change. That single step kills a surprising amount of drift.&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="gh"&gt;# Feature Workflow&lt;/span&gt;
&lt;span class="p"&gt;
1.&lt;/span&gt; State the contract for this feature in two sentences: what it does, what it deliberately doesn't.
&lt;span class="p"&gt;2.&lt;/span&gt; Find the closest existing pattern in this codebase and follow it.
&lt;span class="p"&gt;3.&lt;/span&gt; Write the behavior-proving test first. Watch it fail.
&lt;span class="p"&gt;4.&lt;/span&gt; Implement the smallest change that makes it pass.
&lt;span class="p"&gt;5.&lt;/span&gt; Climb the verification ladder. Rungs 1-3 are mandatory.
&lt;span class="p"&gt;6.&lt;/span&gt; If the design fights you at rungs 4-5, stop and re-derive before writing more code.
&lt;span class="p"&gt;7.&lt;/span&gt; Report back: what you changed, what you tested, what you left untested.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tests that prove behavior, not implementation
&lt;/h2&gt;

&lt;p&gt;Rung two of the ladder is where the discipline actually lands, because it's where Claude Code's default instincts go to die. Left alone, it writes tests that assert implementation details, tests that can't fail because they only check that the code runs, not that it's right.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Asserts the mechanism, not the behavior. Passes even when the feature is broken.&lt;/span&gt;
&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;addItem stores the item&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Cart&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sword&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// still passes if the total is never charged&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Asserts the behavior. Fails when the feature is broken.&lt;/span&gt;
&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;addItem charges the full price of what was added&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Cart&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sword&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;shield&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;total&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;75&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's the rule I use to judge any test: delete the implementation and the test should fail. If it doesn't, it was never testing anything. Behavior-proving tests are the ones that break when someone breaks the feature, and those are the only tests worth paying Claude Code to write.&lt;/p&gt;

&lt;p&gt;None of this makes Claude Code magic. It's the same model doing the same reasoning. What changed is that the first file it reads now describes discipline as a procedure instead of a preference, and when the procedure says stop, it stops. You still review its work, just a lot less of it.&lt;/p&gt;

&lt;p&gt;Free sample with the full AGENTS.md contract, plus TypeScript, security, and testing rules: &lt;a href="https://github.com/DaymondHyper/agentforge" rel="noopener noreferrer"&gt;https://github.com/DaymondHyper/agentforge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Full pack with feature, bugfix, and review workflows, templates, and 24 rule files for a one-time $29: &lt;a href="https://dedyclan.gumroad.com/l/agentforge" rel="noopener noreferrer"&gt;https://dedyclan.gumroad.com/l/agentforge&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>claude</category>
      <category>testing</category>
    </item>
    <item>
      <title>Cursor Rules: How to Stop Your AI Agent From Writing Slop</title>
      <dc:creator>DaymondHyper</dc:creator>
      <pubDate>Sun, 09 Aug 2026 06:17:21 +0000</pubDate>
      <link>https://dev.to/daymondhyper/cursor-rules-how-to-stop-your-ai-agent-from-writing-slop-2kpl</link>
      <guid>https://dev.to/daymondhyper/cursor-rules-how-to-stop-your-ai-agent-from-writing-slop-2kpl</guid>
      <description>&lt;p&gt;You just installed Cursor, opened a TypeScript file, and asked the agent to fix a bug. Ten seconds later it handed you a &lt;code&gt;type SomeType = any&lt;/code&gt; and a &lt;code&gt;@ts-ignore&lt;/code&gt; above the line that wouldn't compile. This is the moment most developers discover that AI coding agents are powerful but undisciplined.&lt;/p&gt;

&lt;p&gt;The fix isn't a better model. It's rules.&lt;/p&gt;

&lt;p&gt;Most AI coding agent best practices boil down to a single idea: tell the agent what good looks like before it starts typing. Cursor lets you define rules files in &lt;code&gt;.cursor/rules/&lt;/code&gt; that load alongside your project context and tell the agent how to behave. Claude Code has its own rules system, Windsurf has a rules directory, Copilot reads &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;. Learn to configure cursor rules properly and your agent starts behaving like a careful senior engineer instead of an eager intern.&lt;/p&gt;

&lt;h2&gt;
  
  
  What cursor rules files are
&lt;/h2&gt;

&lt;p&gt;Cursor rules are markdown files with a &lt;code&gt;.mdc&lt;/code&gt; extension stored in &lt;code&gt;.cursor/rules/&lt;/code&gt; at your project root. Each file is a set of instructions the agent reads before it starts working. When a rule's conditions match the file being edited, the instruction is injected into the model's context window.&lt;/p&gt;

&lt;p&gt;A cursor rules file has two parts: a YAML frontmatter block between &lt;code&gt;---&lt;/code&gt; markers, and a markdown body with the actual instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to configure cursor rules: the frontmatter fields
&lt;/h2&gt;

&lt;p&gt;Three fields matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;description&lt;/strong&gt; (required). A short summary of what the rule enforces. Cursor surfaces this when you toggle rules, so make it specific.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;globs&lt;/strong&gt; (optional). File patterns the rule applies to. Without globs, the rule applies to everything, which wastes context and creates conflicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;alwaysApply&lt;/strong&gt; (optional). Set to &lt;code&gt;true&lt;/code&gt; for rules that should load in every session, regardless of the files involved. Leave it &lt;code&gt;false&lt;/code&gt; for rules that only trigger when matching files are touched.&lt;/p&gt;

&lt;p&gt;Real example:&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="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Enforce strict TypeScript, no any, no ts-ignore&lt;/span&gt;
&lt;span class="na"&gt;globs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="err"&gt;**&lt;/span&gt;&lt;span class="s"&gt;/*.{ts,tsx}&lt;/span&gt;
&lt;span class="na"&gt;alwaysApply&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Strict TypeScript&lt;/span&gt;

&lt;span class="gu"&gt;## Context&lt;/span&gt;
This codebase runs with &lt;span class="sb"&gt;`strict: true`&lt;/span&gt;. Using &lt;span class="sb"&gt;`any`&lt;/span&gt; disables the type system
for that value and lets bugs through at runtime. Banned types are a team
decision, not a style preference.

&lt;span class="gu"&gt;## Requirements&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Give function parameters and return values explicit types.
&lt;span class="p"&gt;-&lt;/span&gt; Use &lt;span class="sb"&gt;`unknown`&lt;/span&gt; instead of &lt;span class="sb"&gt;`any`&lt;/span&gt; when a value's shape is not known yet, then
  narrow it with a type guard before using it.
&lt;span class="p"&gt;-&lt;/span&gt; Model state with discriminated unions rather than long optional chaining
  chains.

&lt;span class="gu"&gt;## Anti-Patterns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; ❌ &lt;span class="sb"&gt;`any`&lt;/span&gt; type annotations. Use &lt;span class="sb"&gt;`unknown`&lt;/span&gt; and narrow.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ &lt;span class="sb"&gt;`@ts-ignore`&lt;/span&gt; or &lt;span class="sb"&gt;`@ts-expect-error`&lt;/span&gt; to silence the compiler. Fix the type.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ &lt;span class="sb"&gt;`as any`&lt;/span&gt; casts to force a value through.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the structure of the body: Context, Requirements, Anti-Patterns. That pattern is the heart of what makes a rule actually work, and I'll come back to it below.&lt;/p&gt;

&lt;h2&gt;
  
  
  AGENTS.md and CLAUDE.md: how they differ from .cursor/rules
&lt;/h2&gt;

&lt;p&gt;A few related standards do similar jobs, and the naming confuses everyone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AGENTS.md&lt;/strong&gt; is a cross-tool standard: a single markdown file at the repository root that documents how an agent should work in that repo. Think of it as a README written for AI agents. It covers build commands, project conventions, and "don't touch X". Because it's a plain file at the root, any tool that follows the spec picks it up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CLAUDE.md&lt;/strong&gt; is Claude Code's project memory file. The claude code rules system reads it at startup, along with files it references, and treats it as long-term context for the session. Older projects use a &lt;code&gt;CLAUDE/&lt;/code&gt; folder with sub-files; a single root file is the current recommendation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;.cursor/rules&lt;/code&gt;&lt;/strong&gt; files differ from both in one important way: they are scoped and conditional. AGENTS.md and CLAUDE.md are read as context in full. Cursor rules only load when their globs and settings match the current task. That makes them the right tool for file-type-specific discipline, while AGENTS.md is the right tool for repo-wide onboarding information.&lt;/p&gt;

&lt;p&gt;A pragmatic setup: put repository facts (commands, architecture, conventions) in AGENTS.md, then layer scoped rules on top for things like "TypeScript files never get &lt;code&gt;any&lt;/code&gt;" or "every new API endpoint needs input validation". The tools are converging on the same idea under different filenames.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes that make cursor rules useless
&lt;/h2&gt;

&lt;p&gt;Most rule files fail for one of four reasons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Rules are too vague.&lt;/strong&gt; "Write clean code" is not a rule, it's a wish. The agent has no operational definition of "clean", so it ignores the instruction. Good rules name the exact behavior: "no &lt;code&gt;any&lt;/code&gt;", "every function has an explicit return type".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. No anti-patterns.&lt;/strong&gt; Telling the agent what to do is only half of it. Models pattern-match strongly on negative examples. A rule that says "validate all input" but never shows what an invalid attempt looks like produces validation that is decorative. List the exact things you never want to see, with examples, and the agent stops producing them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No globs.&lt;/strong&gt; A rule about API endpoints that applies to every file gets loaded constantly and starts conflicting with other rules. Scope rules to the files they govern. A testing rule probably belongs on &lt;code&gt;**/*.test.{ts,tsx}&lt;/code&gt;, not &lt;code&gt;**/*&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Nobody checks that the agent obeyed.&lt;/strong&gt; Cursor lets you toggle rules in the chat composer, and &lt;code&gt;@&lt;/code&gt;-mentioning a rule or file forces it into context for a conversation. If a rule matters for a task, mention it explicitly instead of trusting that the model read all seventeen rule files. Then verify: review the diff for &lt;code&gt;any&lt;/code&gt; and &lt;code&gt;@ts-ignore&lt;/code&gt;, and send it back if the agent slipped.&lt;/p&gt;

&lt;p&gt;There's also a context budget problem. Every rule that loads costs tokens. Twenty vague rules crowd out real project context and make the agent worse, not better. Prefer a few sharp rules over a pile of aspirational ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Copy-pasteable cursor rules examples
&lt;/h2&gt;

&lt;p&gt;These work in Cursor's &lt;code&gt;.cursor/rules&lt;/code&gt;. The structure transfers to any tool that reads markdown rules. Adjust the globs to your stack.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. TypeScript strictness
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;No any, no ts-ignore in TypeScript files&lt;/span&gt;
&lt;span class="na"&gt;globs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="err"&gt;**&lt;/span&gt;&lt;span class="s"&gt;/*.{ts,tsx}&lt;/span&gt;
&lt;span class="na"&gt;alwaysApply&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Strict TypeScript&lt;/span&gt;

&lt;span class="gu"&gt;## Context&lt;/span&gt;
The project compiles with &lt;span class="sb"&gt;`strict: true`&lt;/span&gt;. Any, ts-ignore and unsafe casts are
banned because they disable compile-time checks and move failures to runtime.

&lt;span class="gu"&gt;## Requirements&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Write explicit types for parameters, return values, and exported variables.
&lt;span class="p"&gt;-&lt;/span&gt; Reach for &lt;span class="sb"&gt;`unknown`&lt;/span&gt; when a value arrives from an untyped boundary, then
  narrow it with a type guard.
&lt;span class="p"&gt;-&lt;/span&gt; Handle &lt;span class="sb"&gt;`null`&lt;/span&gt; and &lt;span class="sb"&gt;`undefined`&lt;/span&gt; explicitly. Prefer early returns over &lt;span class="sb"&gt;`!`&lt;/span&gt;.

&lt;span class="gu"&gt;## Anti-Patterns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; ❌ &lt;span class="sb"&gt;`any`&lt;/span&gt;, &lt;span class="sb"&gt;`as any`&lt;/span&gt;, or &lt;span class="sb"&gt;`as unknown as SomeType`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ &lt;span class="sb"&gt;`@ts-ignore`&lt;/span&gt; and &lt;span class="sb"&gt;`@ts-expect-error`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ Non-null assertion &lt;span class="sb"&gt;`!`&lt;/span&gt; on values that can actually be null.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Tests that prove behavior
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Test files must assert behavior, not cover lines&lt;/span&gt;
&lt;span class="na"&gt;globs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.{test,spec}.{ts,tsx,js,jsx}"&lt;/span&gt;
&lt;span class="na"&gt;alwaysApply&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Behavioral tests&lt;/span&gt;

&lt;span class="gu"&gt;## Context&lt;/span&gt;
Coverage percentages measure nothing if the assertions don't. A passing test
suite that never fails is a treadmill. Each test should demonstrate one
behavior.

&lt;span class="gu"&gt;## Requirements&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; One behavior per test. Name it like &lt;span class="sb"&gt;`should reject expired tokens`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Assert on observable outcomes, not on how the code is wired internally.
&lt;span class="p"&gt;-&lt;/span&gt; Follow arrange, act, assert, and keep the act section to one call.

&lt;span class="gu"&gt;## Anti-Patterns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; ❌ Tests with no assertions, or &lt;span class="sb"&gt;`expect(true).toBe(true)`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ Mocking the system under test so heavily that the test proves nothing.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ Snapshot-only tests that would pass with obviously wrong output.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Security at every boundary
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Validate input and avoid common security traps&lt;/span&gt;
&lt;span class="na"&gt;globs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.{ts,tsx,js,jsx,py,go}"&lt;/span&gt;
&lt;span class="na"&gt;alwaysApply&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Security guardrails&lt;/span&gt;

&lt;span class="gu"&gt;## Context&lt;/span&gt;
Every input is untrusted until proven otherwise. The cheapest vulnerability is
the one you never ship, so apply these checks to new code automatically.

&lt;span class="gu"&gt;## Requirements&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Validate and sanitize all input at the service boundary, before use.
&lt;span class="p"&gt;-&lt;/span&gt; Use parameterized queries or an ORM for any database access. Never build SQL
  by string concatenation.
&lt;span class="p"&gt;-&lt;/span&gt; Escape output in HTML templates. Prefer the framework's built-in escaping.
&lt;span class="p"&gt;-&lt;/span&gt; Redact secrets and tokens in logs. Never log request bodies wholesale.

&lt;span class="gu"&gt;## Anti-Patterns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; ❌ SQL assembled with template strings containing user input.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ Storing secrets in source code or config files that get committed.
&lt;span class="p"&gt;-&lt;/span&gt; ❌ Trusting client-supplied values for authorization decisions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The full rule set and where to get it
&lt;/h2&gt;

&lt;p&gt;The examples above are the foundation. Once you see the pattern, you'll want rules for more of your stack: frontend conventions, backend API design, database migrations, code review workflows, and project templates that ship with rules already wired in.&lt;/p&gt;

&lt;p&gt;That's what &lt;strong&gt;AgentForge&lt;/strong&gt; is: a pack of 24 opinionated, machine-readable rule files across seven categories (general, frontend, backend, testing, AI agents, DevOps, database). Every file uses the frontmatter format and Context / Requirements / Anti-Patterns structure shown above, with accurate globs and &lt;code&gt;alwaysApply&lt;/code&gt; settings so rules load only when relevant. It comes with a one-command installer and project templates, and it's a one-time purchase: US$29 (A$45) at &lt;a href="https://dedyclan.gumroad.com/l/agentforge" rel="noopener noreferrer"&gt;https://dedyclan.gumroad.com/l/agentforge&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Not sure the structure fits your workflow? A free sample pack with three rule files is available on the same page. Drop them into &lt;code&gt;.cursor/rules/&lt;/code&gt; and feel the difference on your next task.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is a cursor rules file?
&lt;/h3&gt;

&lt;p&gt;A cursor rules file is a markdown document with the &lt;code&gt;.mdc&lt;/code&gt; extension placed in the &lt;code&gt;.cursor/rules/&lt;/code&gt; directory. It contains YAML frontmatter (&lt;code&gt;description&lt;/code&gt;, &lt;code&gt;globs&lt;/code&gt;, &lt;code&gt;alwaysApply&lt;/code&gt;) and a markdown body of instructions. Cursor injects the body into the agent's context when the file being worked on matches the rule's globs, or whenever the rule has &lt;code&gt;alwaysApply: true&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I get Cursor to follow my rules?
&lt;/h3&gt;

&lt;p&gt;Three things help. First, make rules specific with explicit anti-patterns, because vague instructions are easy to ignore. Second, &lt;code&gt;@&lt;/code&gt;-mention the rule or file in the chat composer so it's forced into context for that conversation. Third, verify: review the agent's diff for banned patterns like &lt;code&gt;any&lt;/code&gt; or &lt;code&gt;@ts-ignore&lt;/code&gt; and send the change back until it complies.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's the difference between AGENTS.md and .cursor/rules?
&lt;/h3&gt;

&lt;p&gt;AGENTS.md is a plain markdown file at the repository root that any standards-compliant agent tool reads as context. It's best for repo-wide facts: build commands, architecture, conventions. &lt;code&gt;.cursor/rules&lt;/code&gt; files are conditional and scoped by globs, which makes them better for fine-grained discipline like "no &lt;code&gt;any&lt;/code&gt; in TypeScript files". The two complement each other.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>testing</category>
      <category>typescript</category>
    </item>
    <item>
      <title>How to make your AI coding agent stop writing slop</title>
      <dc:creator>DaymondHyper</dc:creator>
      <pubDate>Sun, 09 Aug 2026 06:15:18 +0000</pubDate>
      <link>https://dev.to/daymondhyper/how-to-make-your-ai-coding-agent-stop-writing-slop-265e</link>
      <guid>https://dev.to/daymondhyper/how-to-make-your-ai-coding-agent-stop-writing-slop-265e</guid>
      <description>&lt;p&gt;Every AI coding agent I've used shares one habit: it writes the plausible thing. The code compiles. The tests pass. And a senior engineer reviewing it would reach for a red pen. &lt;code&gt;any&lt;/code&gt; where a union belongs. Tests that assert on implementation so they survive any refactor. &lt;code&gt;catch (e) {}&lt;/code&gt; blocks that quietly swallow production errors.&lt;/p&gt;

&lt;p&gt;The fix isn't a better model or a cleverer prompt. It's a set of rules at the repo level, written in a format the agent is guaranteed to read.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What rules files are&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cursor reads &lt;code&gt;.cursor/rules/*.mdc&lt;/code&gt;. Claude Code reads &lt;code&gt;CLAUDE.md&lt;/code&gt; and &lt;code&gt;AGENTS.md&lt;/code&gt;. The .mdc format is plain markdown with YAML frontmatter. Here's the opening of the TypeScript rule file from the AgentForge sample pack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
description: "Strict TypeScript discipline for production code"
globs: "**/*.{ts,tsx}"
alwaysApply: true
---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three fields carry the weight. &lt;code&gt;description&lt;/code&gt; tells the agent in one sentence what the file is for. &lt;code&gt;globs&lt;/code&gt; scopes it, so a TypeScript rule never fires on a Python file. &lt;code&gt;alwaysApply: true&lt;/code&gt; loads it into every session. Agents skip a 2,000-line rules file. They read a 40-line one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write a discipline contract, not a wish list&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Claude Code follows instructions frighteningly well, and that cuts both ways. Tell it "write good code" and it will be confidently, grammatically wrong.&lt;/p&gt;

&lt;p&gt;An AGENTS.md contract fixes that. Start with a baseline of rules: think before you act, take small verifiable steps, never claim what you haven't verified, no drive-by refactoring. Then add a verification ladder with six rungs. Does it compile? Does the changed behavior work? Does it break anything adjacent? Does it follow the codebase's conventions? Does it hold at the boundaries? Is it observable in production? The first three are mandatory for every change.&lt;/p&gt;

&lt;p&gt;Then the failure protocol, which is the line that pays for itself:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;First failure: fix and re-verify. Second failure: re-derive, your mental model is wrong, form at least two new hypotheses. Third failure: stop, revert to last known-good, document, and re-approach from a different angle.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Agents iterate fast and they'll happily burn tokens on a broken hypothesis. A rule that forces a stop is cheap insurance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules that actually change output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The discipline that matters most lives in the specific rules. From the sample TypeScript file:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Never use &lt;code&gt;any&lt;/code&gt;. When you cannot name a type, use &lt;code&gt;unknown&lt;/code&gt; and narrow it with type guards before use.&lt;br&gt;
Never suppress errors with &lt;code&gt;@ts-ignore&lt;/code&gt; / &lt;code&gt;@ts-expect-error&lt;/code&gt;.&lt;br&gt;
Type every function signature explicitly, parameters and return types.&lt;br&gt;
Handle every branch of a discriminated union with exhaustiveness checking.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The last one is a typed-error pattern that converts future bugs into compile errors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;OrderStatus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pending&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;approved&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rejected&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;refunded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;OrderStatus&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pending&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;queueForReview&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;approved&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fulfill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rejected&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;notifyCustomer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;         &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;assertNever&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;assertNever&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Unexpected: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a fifth status and the build fails until every case is handled. The agent can't silently skip it, and neither can you.&lt;/p&gt;

&lt;p&gt;Errors get the same treatment. &lt;code&gt;catch (e) {}&lt;/code&gt; is an anti-pattern; the sample rule says log, rethrow, or return an explicit error, never swallow. And &lt;code&gt;e&lt;/code&gt; is &lt;code&gt;unknown&lt;/code&gt;, so narrow it with a type guard before touching it. That one habit removes a whole class of silent production failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing that proves behavior&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tests are where agents generate the most waste. The sample testing file sets the standard: test behavior through public interfaces, name tests after the behavior they prove, and assert on outcomes, not calls. Write the assertion first, then the code that makes it pass. That's the closest thing to TDD an agent can follow mechanically. A good name reads like a spec:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rejects orders above the account credit limit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;placeOrder&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;u1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;totalCents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;creditLimitCents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toMatchObject&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rejected&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;credit_limit_exceeded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the hard rule: every bugfix ships with a regression test that fails on the old code and passes on the fix. If you can't write one, you haven't understood the bug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it on your own project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The files quoted above, plus the full AGENTS.md contract, are free. Drop them in a repo and watch what your agent does differently. If the structure holds up for you the way it did for me, the full pack extends it to 24 files across frontend, backend, testing, DevOps, database and agent workflows, with project templates and a one-command installer.&lt;/p&gt;

&lt;p&gt;Free sample: &lt;a href="https://github.com/DaymondHyper/agentforge" rel="noopener noreferrer"&gt;https://github.com/DaymondHyper/agentforge&lt;/a&gt;&lt;br&gt;
Full pack ($29 one-time, no subscription): &lt;a href="https://dedyclan.gumroad.com/l/agentforge" rel="noopener noreferrer"&gt;https://dedyclan.gumroad.com/l/agentforge&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>testing</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
