Write the Rules File
The standing rules, taken from your actual project
Not tested yet
The short answer
A rules file gives a coding agent reusable project context. The filename, location and scope depend on the tool; putting any markdown file in the project root does not prove the agent loaded it.
Use the prompt below to draft instructions from real project files. Before relying on the result, check your tool’s current documentation and confirm that a fresh session loads the intended instructions.
What it does
Asks your agent to read the project and draft standing instructions — tools, commands, habits and boundaries — from files that really exist. Save them in the format and location your tool supports, then check a fresh session.
When to use it
Day one of anything an AI will work on more than once.
A worked example
This is a setup example from the tools’ documentation, not a Vibebrator agent test. Claude Code supports project instructions in CLAUDE.md or .claude/CLAUDE.md. Run /context to inspect the memory files it loaded. Its support for other instruction files depends on the version and configuration.
Cursor project rules use .mdc files under .cursor/rules/, with settings that control when they apply. AGENTS.md is a plain-markdown alternative. A plain .md file placed inside .cursor/rules/ is ignored by that rules system.
Sources checked October 6, 2026: Claude Code project memory documentation and Cursor rules documentation. Follow the documentation for your installed tool, then open a fresh session and ask it to identify the test command and the file it came from. Run that command yourself and compare the output.
The prompt
CONTEXT
AI will work on this project many times, and it forgets
everything between sessions. It needs a rules file that
survives that.
RULES
- Every line has to come from something really in this
project — a settings file, a script, a pattern already
used. Say which file it came from at the end of the line.
- Under 80 lines. If it does not fit, it is not a rule, it
is documentation.
- Nothing wishful. Only what is true today.
DONE MEANS
- Somebody reading only this file could start the project,
run the tests, and know what not to touch.
- You have actually run every command you list, in this
session, and it worked.
LAY IT OUT LIKE THIS
# Tools — exact versions, from the lockfile
# Commands — install / run / test / check / build, one line each
# How we do things — five to eight rules, each saying where it came from
# Never — three to five hard nos
# What finished means — bulletsWays to use it
- Use the name, location and scope your tool documents; a generic file in the project root is not guaranteed to load
- Redo it every few months and compare it to the old one
- Make Stop Refactoring the very first rule in it
What it will not do
- This prompt has no logged agent run. The documentation check above is not evidence that the generated rules worked.
- Instructions guide the agent; they are not an access-control or security boundary.
- A correct filename does not prove every rule applied. Check the loaded files, scope and observed behavior in a fresh session.
Test log
Nobody has logged a run of this prompt yet. That means no date, no tool, no model and no result to show you, so treat it as a starting point and check what comes back.
Why: this prompt needs a tool that can edit files and run code. A chat window can do neither, so it was left out of the chat runs.
When a run is logged it goes in a table here: the date, the tool and model it ran on, whether it worked, and what happened. Runs that fail get logged too.
The pass standard for this prompt: six criteria and an automatic-fail rule, written down on September 27, 2026, before any run.
Related words
- system prompt — Standing instructions that apply to every message in a conversation, sitting behind whatever you type.
- mise en place — Getting all your notes, rules and reference material together before you type the first prompt.
- context engineering — Deciding on purpose what goes in front of the AI: the instructions, the files, the notes, the tools, the earlier conversation.
Where to go next
- Rules-file lesson — a workflow for writing and checking standing instructions
- Lock the Stack — keep the agent within the project’s actual tools
- Show Your Work — ask for changed lines, exact commands and unchecked work