Esc

Moving your rules into a config file

How to stop repeating the same instructions in every message, and what belongs in a system prompt against what belongs in the task.

AI Place Hub 44

Paste the same paragraph into every conversation and it is in the wrong place. Every major product now has a spot for standing rules, and moving them there gives you steadier answers and shorter messages.

Where the file lives

The mechanism is the same everywhere. Only the name changes. ChatGPT has custom instructions and project instructions. Claude Code reads a CLAUDE.md from the repository root. Several agent harnesses read AGENTS.md. Editors use a rules file. The API takes a system parameter. They all do what the system-prompt glossary page describes: text that applies to every turn.

What belongs there

Ask whether you would otherwise paste it into every message.

Role and expertise level pass. So do output preferences such as no preamble, code first, name the version you assume. So do domain constraints: the stack, the conventions, what never to touch. Refusal rules pass too.

The task itself does not, and neither does anything that changes between conversations. If the file holds this week's project, you will forget to update it.

Keep it short

Most people go wrong here. A 2000-word rules file dilutes itself. The model weighs forty instructions against each other, and the three that matter get the same attention as the thirty-seven that do not.

Write the rules that would change an answer and delete anything describing behaviour you get anyway. Be helpful and accurate is not a rule.

Check that it loads

Put one odd, checkable instruction in the file, a formatting quirk you would spot at once, and open a fresh session. No quirk means the file is not being read, and the rest of it does nothing either. That catches a wrong directory, a wrong filename or a wrong project faster than the documentation does.

Starting points

The configs section has working files for a PHP project, a TypeScript repo and ChatGPT custom instructions. Take one, delete two thirds, and add what is true about your setup.

Notes from the author

Assumes you have used a chat model for a while and are repeating yourself.

For information only, not professional advice. You use it at your own risk and we are not liable for any loss or damage. See the disclaimer.

Fork

Did this work for you?

Sign in to flag it

Related