AI Coding Standards That Actually Get Followed

A standards document only works if something reads it. Write your conventions once as a ruleset, attach them to your projects, and every AI assistant receives them on every task — with a view of exactly which rules were in effect.

Why standards documents stop working

Most teams already have the standards written down. The problem is delivery. A document an assistant was shown once, forty messages ago, is not a standard — it is a hope. And when a convention is missed, nobody can reconstruct what the agent was actually told.

Copies drift

The same conventions pasted into six repositories. One gets updated. Five do not, and nobody notices until review.

Everyone works differently

Each person prompts their assistant their own way, so the same codebase gets built to slightly different conventions.

Nothing is auditable

When something ships wrong, there is no record of which instructions reached the agent, so you cannot tell whether the rule failed or was never delivered.

What good looks like

Write the standard once, at team level

Not per repository. Attach the same ruleset to as many projects as you like, edit it in one place, and every project picks up the change.

Say how strongly you mean it

A requirement stops the agent when it cannot comply. A preference lets it work around a genuine exception. Reach for preference more often than feels natural.

Make prohibitions unoverridable

Put "never commit credentials" in the workspace baseline, where no project can opt out. Keep house style in ordinary rulesets, where a project reasonably can.

Point at documents instead of pasting them

A consult rule links to your design system rather than inlining it. The pointer costs almost nothing and the document loads only when the work calls for it.

Be honest about what is enforced

Mark a rule as checked only when a real lint rule, CI check, test or gate backs it. Everything else is guidance, and should read that way.

Repository file or workspace ruleset?

A file in the repoA ruleset
ScopeOne repositoryEvery project you attach it to
UpdatingEdit each copyEdit once, applies everywhere
StrengthAll instructions read the sameMust, must not, prefer, consult
ProhibitionsCan be edited away locallyBaseline prohibitions cannot be overridden
HistoryWhatever git showsVersioned, with who changed what
VisibilityRead the file and hopeSee which rules were in effect, and why not

Already using a repository file? See how the two compare.

Common questions

Why do AI assistants ignore our coding standards?

Usually because the standards live somewhere the assistant never looks — a wiki page, an onboarding doc, or a long file handed over once at the start of a session. The fix is not a longer document; it is a short, structured set of rules delivered with every request.

Should every standard be a hard requirement?

No — and making them all hard is the most common mistake. If you can imagine a legitimate exception, it belongs as a preference. A workspace full of hard rules that keep stopping the agent trains people to ignore all of them.

Where should standards live if not in the repository?

Repository files work until you have more than one repository or more than one person. Then you get drift: copies edited separately, no history, and no way to make one standard non-negotiable everywhere.

What is the difference between advisory and enforced?

Advisory means the agent is told. Enforced means a lint rule, CI check, test or workflow gate actually blocks the behaviour. Both are useful — but calling something enforced when nothing enforces it is worse than saying nothing.

Standards your assistants actually receive

Start free