DEV Community

KANG TAI
KANG TAI

Posted on

Your Cursor agent isn't dumb — it's amnesiac

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."

The model didn't get worse. The memory evaporated.

What actually works

Pasting a mega-prompt into chat is theater. Chat is volatile. What sticks is repo-native memory:

  1. .cursor/rules/*.mdc with real globs / alwaysApply and a crisp description
  2. An AGENTS.md the agent is told to re-read after compaction
  3. Small Skills (stepplaybooks) for recurring jobs: add a page, add an endpoint, review a PR

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

alwaysApply vs globs (the question people actually ask)

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

Both, on purpose.

  • alwaysApply stays tiny: anti-amnesia, anti-scope-creep, security baseline. That layer has to survive context compression every turn.
  • globs 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.

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.

React + Java in one pack

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

Try before you buy

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

What this is not

Not a promise of bug-free AI. Not a 200-prompt PDF. It's an installable engineering memory layer.

Distribution note (honest)

Public experiments in this niche keep showing the same funnel: longform proof on Dev.to → public repo → checkout. 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.

CTA

Landing + free Starter: https://kangtai-cn.github.io/agent-memory-pack/?ref=devto-amnesia

GitHub (Starter source): https://github.com/kangtai-cn/agent-memory-pack

Buy Full Bundle ($29): https://pancake.waffo.ai/store/facai-p8dgqpdw/product/PROD_3jvtO8nHvcOv2YPQSyOpzf?type=onetime&currency=USD&ref=devto-amnesia

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.


No fabricated sales numbers. Free dumps are great for breadth; this pack is for repo-native memory.

Top comments (0)