Pattern 6 of 10

Save your rules in a config file

If you retype your standards every session, you are doing work the tool can remember for you. Persistent instruction files hold your rules once.

Put your standing rules in a persistent file instead of repeating them each time.

Many AI coding and agent tools read a persistent instructions file at the start of every task. Common names include AGENTS.md and claude.md. In chat tools, the equivalent is a saved system prompt or custom instructions.

The file holds the things that are true every time: your stack, conventions, tone, what to avoid, and how "done" is defined.

Why it works

Repeating context wastes effort and drifts over time. A config file makes your standards consistent and version-controlled, so every session starts from the same baseline instead of your memory.

How to do it

Keep it short and high-signal. Rules that apply always, not notes for one task.

Example you can copy

A minimal AGENTS.md
# Project rules

Stack: TypeScript, React, Vitest.
Style: functional components, no class components.
Tests: every new function needs a test.
Never: commit secrets, edit files outside /src, add new dependencies without asking.
Done means: code compiles, tests pass, lint is clean.

When it helps

  • Repeated work in the same project or with the same standards
  • Coding agents and tools that read an instructions file
  • Teams who want consistent AI behavior across people

When to skip it

  • One-off tasks with no reusable rules
  • When the rules change every time (then a fixed file adds little)

Common mistakes

  • Stuffing one-time task details into the permanent file
  • Letting it grow long and contradictory until the model ignores parts
  • Never updating it as the project changes

Frequently asked

What is AGENTS.md or claude.md?

They are persistent instruction files that some AI coding and agent tools read before every task, holding your standing rules such as stack, conventions, and what to avoid, so you do not repeat them each session.