The Pain: Explaining from Scratch Every Time
Ever notice that every new session you have to tell the Agent again: "we indent with two spaces," "commit messages in Chinese"…? Annoying, right?
The Fix: Put a Project Convention File in the Repo
Put a convention file in the project root (e.g. Claude Code's CLAUDE.md, or Cursor's .cursor/rules/ rule files—the older form was .cursorrules, now migrated) and write the project's fixed rules into it. AI tools that support this convention read it automatically before each job, so you don't have to repeat yourself.
# 项目规矩
- 缩进用 2 个空格
- 提交信息用中文
- 不要直接改 main 分支
- 改完先跑 `npm test`What to Write, What Not To
Good to write: stable rules—code style, directory conventions, commit conventions, common commands.
Not good to write: one-off temporary requests (just say those directly), and details that will change soon.
自测 · 学完检查一下
想真正动手做题、记进度、攒连胜?到互动课里练。
What pain point does a project convention file (like CLAUDE.md) mainly solve?
答案:Sparing you from re-explaining the project's rules every new session
Distill the fixed rules into a file the Agent reads automatically, so you don't have to repeat them over and over.
Judge: without a convention file, a project's fixed rules often have to be re-explained in every new session.
答案:True
It's this very pain point of repeated labor that gave rise to writing the rules into a file.
Which is best suited to go into a project convention file?
答案:"This project uniformly indents with 2 spaces and uses Chinese commit messages"
Only stable, repeatedly-applicable rules are worth putting in the convention file; a one-off request can just be said on the spot.
Judge: one-off temporary requests should also all be stuffed into the convention file—the more the better.
答案:False
Temporary requests can just be said on the spot; the more bloated the file, the more it triggers long-context derailment—keep only stable rules.
The key property of a convention file is: the Agent ___ it before every job, so you don't have to repeat yourself.
答案:auto-reads
It's because it's auto-read every time that the rules written into it stay continuously in effect.
Judge: the longer the convention file the better—write in everything you can think of, to be safe.
答案:False
Too long dilutes the key points and triggers long-context derailment—keep it concise with stable, frequently-used content.