<?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: Clogmeter</title>
    <description>The latest articles on DEV Community by Clogmeter (@clogmeter).</description>
    <link>https://dev.to/clogmeter</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%2F4226737%2F74dda585-e330-471a-a25c-289875a9555d.png</url>
      <title>DEV Community: Clogmeter</title>
      <link>https://dev.to/clogmeter</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clogmeter"/>
    <language>en</language>
    <item>
      <title>Why Cursor is ignoring your rules (.mdc + frontmatter)</title>
      <dc:creator>Clogmeter</dc:creator>
      <pubDate>Wed, 04 Nov 2026 16:23:52 +0000</pubDate>
      <link>https://dev.to/clogmeter/why-cursor-is-ignoring-your-rules-mdc-frontmatter-2kfl</link>
      <guid>https://dev.to/clogmeter/why-cursor-is-ignoring-your-rules-mdc-frontmatter-2kfl</guid>
      <description>&lt;p&gt;&lt;em&gt;If Cursor keeps skipping your project rules, it's usually frontmatter, scoping or context pressure rather than the model. Here are the common causes and how to fix each one.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://clogmeter.vercel.app/guides/why-cursor-ignoring-rules" rel="noopener noreferrer"&gt;clogmeter.vercel.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On X and Reddit, “Cursor is ignoring my rules” is often not an adherence problem — the rule never entered&lt;br&gt;
context. Cursor project rules live in &lt;code&gt;.cursor/rules/&lt;/code&gt; as &lt;code&gt;.mdc&lt;/code&gt; files with YAML&lt;br&gt;
frontmatter. A plain &lt;code&gt;.md&lt;/code&gt; in that folder is ignored. Cursor also reads root&lt;br&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; / &lt;code&gt;CLAUDE.md&lt;/code&gt; as simpler always-on markdown.&lt;/p&gt;

&lt;p&gt;Checklist below matches Cursor’s public Rules docs (keep rules under 500 lines; split large ones).&lt;/p&gt;

&lt;h2&gt;
  
  
  Five checks before you rewrite the rule
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extension:&lt;/strong&gt; file must end in &lt;code&gt;.mdc&lt;/code&gt; inside &lt;code&gt;.cursor/rules/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontmatter fields:&lt;/strong&gt; only &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;globs&lt;/code&gt;, and &lt;code&gt;alwaysApply&lt;/code&gt; control load mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always Apply:&lt;/strong&gt; &lt;code&gt;alwaysApply: true&lt;/code&gt; puts the rule in every chat (use sparingly — it costs tokens every turn).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File-scoped:&lt;/strong&gt; set &lt;code&gt;globs&lt;/code&gt; and &lt;code&gt;alwaysApply: false&lt;/code&gt; so it attaches when matching files are in context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply Intelligently / manual:&lt;/strong&gt; a &lt;code&gt;description&lt;/code&gt; without globs lets the agent decide; with neither description nor globs nor alwaysApply, you typically need to &lt;code&gt;@&lt;/code&gt;-mention the rule.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Minimal working example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&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;TypeScript conventions for this repo&lt;/span&gt;
&lt;span class="na"&gt;globs&lt;/span&gt;&lt;span class="pi"&gt;:&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"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**/*.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="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Prefer explicit return types on exported functions&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Follow the patterns in @src/lib/result.ts instead of inventing new Result helpers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  If it loads but still feels ignored
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vague wording:&lt;/strong&gt; “write clean code” loses to “use 2-space indentation” — Cursor’s docs ask for actionable rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conflicts:&lt;/strong&gt; the same always/never restated differently across AGENTS.md and several &lt;code&gt;.mdc&lt;/code&gt; files makes the model hedge. Cut one canonical line first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too much always-on:&lt;/strong&gt; large always-applied rules compete with the task. Prefer globs/skills for procedures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stale pasted docs:&lt;/strong&gt; reference canonical files; don’t paste whole style guides (Cursor explicitly warns against this).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prefer a short &lt;a href="https://clogmeter.vercel.app/guides/agents-md-example" rel="noopener noreferrer"&gt;AGENTS.md example&lt;/a&gt; for cross-tool basics, and reserve&lt;br&gt;
&lt;code&gt;.mdc&lt;/code&gt; for activation control. Compare formats in&lt;br&gt;
&lt;a href="https://clogmeter.vercel.app/guides/claude-md-vs-agents-md" rel="noopener noreferrer"&gt;CLAUDE.md vs AGENTS.md vs Cursor rules&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;If you want to see where your own AGENTS.md, CLAUDE.md or Cursor rules spend tokens, I built a free browser-only checker that also flags duplicates and always/never conflicts: &lt;a href="https://clogmeter.vercel.app" rel="noopener noreferrer"&gt;Clogmeter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cursor</category>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How long should CLAUDE.md / AGENTS.md be?</title>
      <dc:creator>Clogmeter</dc:creator>
      <pubDate>Wed, 04 Nov 2026 16:22:56 +0000</pubDate>
      <link>https://dev.to/clogmeter/how-long-should-claudemd-agentsmd-be-51m8</link>
      <guid>https://dev.to/clogmeter/how-long-should-claudemd-agentsmd-be-51m8</guid>
      <description>&lt;p&gt;&lt;em&gt;Every always-on instruction file costs tokens on every turn, and past a point it starts costing adherence too. Here is what Claude Code, Cursor and Codex actually document about size, plus a checklist for trimming.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://clogmeter.vercel.app/guides/how-long-should-agents-md-be" rel="noopener noreferrer"&gt;clogmeter.vercel.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Short answer: aim for a lean always-on file — roughly &lt;strong&gt;under 200 lines per &lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
(Anthropic’s documented target) and treat Cursor project rules as &lt;strong&gt;under 500 lines each&lt;/strong&gt;,&lt;br&gt;
split by concern. There is no universal “perfect” line count. The real limit is whether the model&lt;br&gt;
still follows the rules that matter once system prompt, tools, skills and the task compete for the&lt;br&gt;
same attention budget.&lt;/p&gt;

&lt;p&gt;No invented benchmarks here. The numbers below come from vendor docs and published guidance as of late 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the tools themselves say
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Published guidance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt; / rules&lt;/td&gt;
&lt;td&gt;Target under 200 lines per file; longer files consume more context and reduce adherence. Imports organise files but still load with the parent.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.cursor/rules&lt;/code&gt; / &lt;code&gt;AGENTS.md&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Keep rules under 500 lines; split large rules into focused files. Prefer references over pasting whole docs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI Codex&lt;/td&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Combined project instruction files are capped (default 32 KiB); overflow is truncated.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Community write-ups often talk about a practical “~150 instruction” attention budget for frontier&lt;br&gt;
models before adherence drops — that is research/context, not a hard file limit. Your instruction&lt;br&gt;
file shares that budget with the agent’s system prompt and tool descriptions, so leave headroom.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bloated files get ignored
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Everything always-on costs every turn.&lt;/strong&gt; Root &lt;code&gt;CLAUDE.md&lt;/code&gt; / &lt;code&gt;AGENTS.md&lt;/code&gt; is re-read at session start; fat files tax every message and every general-purpose subagent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Markdown is advisory.&lt;/strong&gt; Claude Code docs treat memory files as context, not enforced config. A “never” in prose can still be skipped; hooks and permissions enforce must-holds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conflicts cancel each other.&lt;/strong&gt; Duplicate or contradictory always/never rules across files make the model pick arbitrarily.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long sessions compress early rules.&lt;/strong&gt; Mid-thread, package-manager or style rules often shrink first while code stays — which feels like “Cursor/Claude is ignoring my rules.”&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A practical size checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Measure first.&lt;/strong&gt; In Claude Code, run &lt;code&gt;/context&lt;/code&gt; (and &lt;code&gt;/doctor&lt;/code&gt; for trim proposals). For any stack, paste the files into Clogmeter to see token weight vs common windows and spot duplicates/conflicts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep always-on content tiny.&lt;/strong&gt; Project identity, hard constraints, build/test commands, and pointers. Delete anything the agent can discover by reading the repo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Move procedures to skills.&lt;/strong&gt; Release checklists and long how-tos should load on demand, not on every prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope directory rules.&lt;/strong&gt; Nested &lt;code&gt;AGENTS.md&lt;/code&gt; / path-scoped Cursor or &lt;code&gt;.claude/rules&lt;/code&gt; files beat one giant root file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce never-rules outside markdown.&lt;/strong&gt; If ignoring it once would hurt, use a hook, linter or CI check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One source of truth.&lt;/strong&gt; Prefer a canonical &lt;code&gt;AGENTS.md&lt;/code&gt; with thin &lt;code&gt;CLAUDE.md&lt;/code&gt; / Cursor adapters instead of divergent copies.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How long is “too long” in practice?
&lt;/h2&gt;

&lt;p&gt;If the root file is hundreds of lines, mixes architecture essays with one-off workflows, or repeats&lt;br&gt;
the same rule in three places, it is already too long for reliable adherence — even if the model&lt;br&gt;
still “sees” the file. Vendors warn that longer instruction files reduce compliance before hard&lt;br&gt;
truncation kicks in (Codex’s 32 KiB cap being the blunt case).&lt;/p&gt;

&lt;p&gt;A useful rule of thumb many teams use: if you would not ask a new teammate to memorise the whole&lt;br&gt;
file before their first PR, do not force the agent to either. Make the root file the map; put the&lt;br&gt;
territory in scoped docs and skills.&lt;/p&gt;




&lt;p&gt;If you want to see where your own AGENTS.md, CLAUDE.md or Cursor rules spend tokens, I built a free browser-only checker that also flags duplicates and always/never conflicts: &lt;a href="https://clogmeter.vercel.app" rel="noopener noreferrer"&gt;Clogmeter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>cursor</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
