Best Practices for AI Coding Assistants

Chapter 1 · Practice 3 of 4

Keep the file short and prune it when rules get ignored

From Project instruction files

Why it matters

A long instruction file is not a thorough one. Claude Code's docs warn that bloated files cause the assistant to ignore your actual instructions, because important rules get lost in the noise.

Signs the file needs work:

  • The assistant keeps breaking a rule that is in the file: the file is probably too long and the rule is buried.
  • The assistant asks questions the file already answers: the wording is probably ambiguous.

Treat the file like code: review it when things go wrong, delete rules the assistant already follows without being told, and test changes by watching whether behaviour shifts.

If one rule keeps being skipped, emphasis such as "IMPORTANT" on that line alone can help. Emphasise many lines and none stands out.