<?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: KANG TAI</title>
    <description>The latest articles on DEV Community by KANG TAI (@kangtaicn).</description>
    <link>https://dev.to/kangtaicn</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%2F4214126%2F65605d67-63a9-4853-ae2e-4b8066243503.png</url>
      <title>DEV Community: KANG TAI</title>
      <link>https://dev.to/kangtaicn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kangtaicn"/>
    <language>en</language>
    <item>
      <title>Which Cursor rules deserve alwaysApply (and which should wait for a glob)</title>
      <dc:creator>KANG TAI</dc:creator>
      <pubDate>Thu, 29 Oct 2026 02:21:33 +0000</pubDate>
      <link>https://dev.to/kangtaicn/which-cursor-rules-deserve-alwaysapply-and-which-should-wait-for-a-glob-58m7</link>
      <guid>https://dev.to/kangtaicn/which-cursor-rules-deserve-alwaysapply-and-which-should-wait-for-a-glob-58m7</guid>
      <description>&lt;p&gt;Someone asked me: &lt;em&gt;how do you decide which rules earn the always-on slot, and which can wait until a matching file shows up?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's the real product question. Not "how many rules can I zip."&lt;/p&gt;

&lt;h2&gt;
  
  
  The wrong answer
&lt;/h2&gt;

&lt;p&gt;Putting everything in &lt;code&gt;alwaysApply: true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You pay context rent every turn. After compaction, long or generic rules get quietly deprioritized anyway. The model still invents a second form library.&lt;/p&gt;

&lt;h2&gt;
  
  
  The filter I use
&lt;/h2&gt;

&lt;p&gt;A rule earns &lt;strong&gt;alwaysApply&lt;/strong&gt; only if all three are true:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;It must survive compression&lt;/strong&gt; — if the agent forgets it mid-session, you lose money or time (security, anti-scope-creep, "re-read AGENTS.md after compaction").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It applies to almost every edit&lt;/strong&gt; — not just React forms or Spring controllers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It stays tiny&lt;/strong&gt; — a few imperative lines, not a style guide novel.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Everything else gets &lt;strong&gt;globs&lt;/strong&gt; (or &lt;code&gt;alwaysApply: false&lt;/code&gt; + a sharp &lt;code&gt;description&lt;/code&gt; the agent can request).&lt;/p&gt;

&lt;h2&gt;
  
  
  Concrete split (React + Java repos)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Always-on (tiny core)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Anti-amnesia / session handoff: plan briefly, persist decisions on disk, re-read after compaction&lt;/li&gt;
&lt;li&gt;Anti-scope-creep: if I asked for a bug fix, do not refactor the folder structure "while you're here"&lt;/li&gt;
&lt;li&gt;Security baseline: no secrets in commits, no inventing auth bypasses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Globbed (stack layer)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React forms / TanStack Query / zod boundaries → &lt;code&gt;**/*.{tsx,ts}&lt;/code&gt; under UI paths&lt;/li&gt;
&lt;li&gt;Spring controllers / Bean Validation / no JPA entities in responses → &lt;code&gt;**/controller/**/*.java&lt;/code&gt;, &lt;code&gt;**/web/**/*.java&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;zod ↔ Bean Validation mapping → only when touching API contract files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same methodology works if your stack is Next-only or Go — the &lt;em&gt;filter&lt;/em&gt; is the product, not the file count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why free "900-skill dumps" still fail here
&lt;/h2&gt;

&lt;p&gt;Breadth dumps optimize for GitHub stars. They don't decide what must stay in context after compression. Repo-native memory is a &lt;strong&gt;priority queue&lt;/strong&gt;, not a junk drawer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the tiny core first
&lt;/h2&gt;

&lt;p&gt;I open-sourced a free Starter: three always-on rules + one PR-review Skill.&lt;/p&gt;

&lt;p&gt;Landing + Starter: &lt;a href="https://kangtai-cn.github.io/agent-memory-pack/?ref=devto-always-on" rel="noopener noreferrer"&gt;https://kangtai-cn.github.io/agent-memory-pack/?ref=devto-always-on&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Full React/Java Bundle ($29 one-time): &lt;a href="https://pancake.waffo.ai/store/facai-p8dgqpdw/product/PROD_3jvtO8nHvcOv2YPQSyOpzf?type=onetime&amp;amp;currency=USD&amp;amp;ref=devto-always-on" rel="noopener noreferrer"&gt;https://pancake.waffo.ai/store/facai-p8dgqpdw/product/PROD_3jvtO8nHvcOv2YPQSyOpzf?type=onetime&amp;amp;currency=USD&amp;amp;ref=devto-always-on&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install the Starter. After your next compaction, force a recovery from AGENTS.md. If that alone saves a session, the globbed pack is the upgrade — not another mega-ZIP.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;No fabricated sales. Honest cold-start: methodology posts convert better than hard sell on a small account.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cursor</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Your Cursor agent isn't dumb — it's amnesiac</title>
      <dc:creator>KANG TAI</dc:creator>
      <pubDate>Thu, 29 Oct 2026 02:20:00 +0000</pubDate>
      <link>https://dev.to/kangtaicn/your-cursor-agent-isnt-dumb-its-amnesiac-1lil</link>
      <guid>https://dev.to/kangtaicn/your-cursor-agent-isnt-dumb-its-amnesiac-1lil</guid>
      <description>&lt;p&gt;I used to blame the model when Cursor "forgot" that we use TanStack Query, zod at the boundary, and never return JPA entities from controllers. Then I watched a session survive a long refactor… until context compression. After that, the agent cheerfully invented a second data-fetching style and refactored three unrelated files "while it was here."&lt;/p&gt;

&lt;p&gt;The model didn't get worse. &lt;strong&gt;The memory evaporated.&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Pasting a mega-prompt into chat is theater. Chat is volatile. What sticks is &lt;strong&gt;repo-native memory&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;.cursor/rules/*.mdc&lt;/code&gt; with real &lt;code&gt;globs&lt;/code&gt; / &lt;code&gt;alwaysApply&lt;/code&gt; and a crisp &lt;code&gt;description&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;AGENTS.md&lt;/code&gt; the agent is told to re-read after compaction&lt;/li&gt;
&lt;li&gt;Small &lt;strong&gt;Skills&lt;/strong&gt; (stepplaybooks) for recurring jobs: add a page, add an endpoint, review a PR&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The highest-leverage rule I've found isn't "write clean code." It's an explicit &lt;strong&gt;anti-scope-creep + session handoff&lt;/strong&gt; rule: plan in three bullets, persist decisions on disk, re-read after compression, and don't implement the drive-by idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  alwaysApply vs globs (the question people actually ask)
&lt;/h2&gt;

&lt;p&gt;Someone replied to my cold-start post: do you scope rules per directory with globs, or keep everything always-on and tiny?&lt;/p&gt;

&lt;p&gt;Both, on purpose.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;alwaysApply&lt;/strong&gt; stays tiny: anti-amnesia, anti-scope-creep, security baseline. That layer has to survive context compression every turn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;globs&lt;/strong&gt; hang stack rules (React forms, Spring controllers, zod ↔ Bean Validation) so they fire only in matching files and don't burn tokens on every open.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you make fifty rules always-on, you pay context rent and the model still ignores half of them. The free Starter is the tiny always-on core; the paid pack adds the globbed React/Java layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  React + Java in one pack
&lt;/h2&gt;

&lt;p&gt;Most Gumroad rule packs are Next-only English soup. Dual-stack teams (React/TS front, Spring back) keep re-teaching both sides. Mapping &lt;strong&gt;zod ↔ Bean Validation&lt;/strong&gt; in one rule file sounds boring — until the agent stops mixing DTOs and entities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try before you buy
&lt;/h2&gt;

&lt;p&gt;There's a free Starter: three rules (anti-amnesia, security baseline, docs handoff) + a PR-review Skill. The full &lt;strong&gt;Agent Memory Pack&lt;/strong&gt; Bundle (19 rules + 6 Skills, React/Java, EN/ZH) is &lt;strong&gt;$29 one-time&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this is not
&lt;/h2&gt;

&lt;p&gt;Not a promise of bug-free AI. Not a 200-prompt PDF. It's an installable engineering memory layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Distribution note (honest)
&lt;/h2&gt;

&lt;p&gt;Public experiments in this niche keep showing the same funnel: &lt;strong&gt;longform proof on Dev.to → public repo → checkout&lt;/strong&gt;. X soft posts help refine the angle; they rarely close the sale alone. So this article is the top of that funnel — not a tweet thread with a buy link.&lt;/p&gt;

&lt;h2&gt;
  
  
  CTA
&lt;/h2&gt;

&lt;p&gt;Landing + free Starter: &lt;a href="https://kangtai-cn.github.io/agent-memory-pack/?ref=devto-amnesia" rel="noopener noreferrer"&gt;https://kangtai-cn.github.io/agent-memory-pack/?ref=devto-amnesia&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub (Starter source): &lt;a href="https://github.com/kangtai-cn/agent-memory-pack" rel="noopener noreferrer"&gt;https://github.com/kangtai-cn/agent-memory-pack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Buy Full Bundle ($29): &lt;a href="https://pancake.waffo.ai/store/facai-p8dgqpdw/product/PROD_3jvtO8nHvcOv2YPQSyOpzf?type=onetime&amp;amp;currency=USD&amp;amp;ref=devto-amnesia" rel="noopener noreferrer"&gt;https://pancake.waffo.ai/store/facai-p8dgqpdw/product/PROD_3jvtO8nHvcOv2YPQSyOpzf?type=onetime&amp;amp;currency=USD&amp;amp;ref=devto-amnesia&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install the Starter. Force one "after compaction" recovery using AGENTS.md. If that alone saves you a session per week, the Bundle pays for itself.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;No fabricated sales numbers. Free dumps are great for breadth; this pack is for repo-native memory.&lt;/em&gt;&lt;/p&gt;

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