Back to Coding

How Do You Set Up Project Rules an Assistant Follows?

How Do You Set Up Project Rules an Assistant Follows?
AI Tutorials Team 23 March 2026

Every serious assistant reads a configuration file from the project root and applies it to every request. It is the highest-value feature available and most people never create one, then spend months restating the same corrections.

What goes in it?

  • What the project is. Two sentences, so answers are not generic.
  • Language and framework versions. Which prevents suggestions for the wrong one.
  • Conventions. How errors are handled, what is logged, naming patterns.
  • Forbidden things. Libraries, patterns and approaches this project does not use.
  • How to run and test. The actual commands.
  • Files to leave alone. Generated code, vendored dependencies, migrations.

Instructions about how to respond are worth keeping out of it. A rules file describing conventions applies to everybody; one specifying how verbose answers should be imposes a personal preference on the whole team through a file in the repository.

Which of those matters most?

The forbidden list and the versions. Both prevent a specific recurring annoyance, which is confidently correct code written for a different version or using an approach your team abandoned two years ago.

Why do short files work better?

Because everything in it competes for attention on every request. A page of rules is followed reasonably; four pages are followed selectively, and you lose the ability to tell which instruction caused what.

Fifteen rules that are applied beat fifty that are approximated.

Where should it live?

In the repository, versioned with the code, rather than in personal settings. That way it applies to everybody, updates through the normal review process and travels with the project.

Personal preferences about verbosity or explanation belong in your own settings instead, since imposing those on the team is noise.

Keeping it accurate matters as much as keeping it short, since a rule describing a convention the project abandoned actively produces wrong suggestions rather than merely wasting attention.

How do you build one without writing it from nothing?

Read this project and draft a rules file: what it does, the versions in use, the conventions you can infer from the existing code, and anything a new contributor would get wrong. Keep it under a page. I will correct it.

The draft is usually about seventy per cent right, and correcting it is considerably faster than starting blank.

Version control also gives you a record of when a rule was added and by whom, which matters when somebody asks why a particular convention is enforced.

What should not go in?

Anything secret, since the file is in the repository and is sent to the provider with every request. Also anything that changes frequently, which will be wrong within a month and is better handled per request.

How do you know it is working?

By what stops happening. Corrections you used to make weekly disappear, and the ones that persist tell you which rules are being ignored, usually because they are vague or because they conflict with something else in the file.

How do you maintain it?

Add a rule when you correct the same thing twice. Remove one when nobody can remember what it prevents. A file that only grows becomes one nobody follows, which is the same failure that affects long prompts generally.

Do different tools read the same file?

Not yet consistently. Each product has settled on its own filename and format, so a team using two tools maintains two files with the same content, and a switch means rewriting rather than moving.

Convergence is happening slowly and there is no standard to rely on. The practical response is to keep the actual rules in one place you control, in plain language, and to generate whichever files your tools want from it. That way the content survives a change of product even though the configuration does not.

What is the first version?

Six lines: what the project is, the versions, the two conventions people get wrong, and the test command. That takes five minutes and removes most of the recurring corrections immediately.