How to
Protect files from the fixer
Say what the fixer must never change, why, and what it may change only with a person's yes.
Already protected, always#
Without any setting, the fixer never changes code about auth, login, sessions, passwords, payments, billing, checkout, Stripe, subscriptions, invoices, secrets, credentials, migrations or admin (a word in a folder or file name is enough: src/adminAuth.ts), keys and secrets (.env, .pem, .key), or how the app is checked and shipped (controxity.yml, CI workflows, Dockerfiles). A fix that touches one is refused.
Your own rules#
In controxity.yml at the top of your repository:
protected:
- path: src/content/**
why: Verified religious text. Never edited by AI.
- path: server/src/privacyPage.ts
why: Our privacy promise. A person changes it.
- path: server/src/pricing.ts
mode: review
why: Prices people pay.
- path: server/src/index.ts
match: "cleanLook|cleanState"
mode: review
why: Child-safety filters.| Key | What it does |
|---|---|
path | A folder, a file, or a pattern: src/content/**, *.sql. |
why | Told to the AI before it starts, shown when a fix is refused, and on Product settings → Tests and code. |
mode: never | The default. A fix that changes it is refused, with the reason. |
mode: review | The fix goes on, but it isn't merged by itself and doesn't go to production until an admin or a lead presses Allow this change on it. Who said yes is in the record. |
match | Only changes to lines that match this pattern count, so part of a file can be protected and the rest stays free. |
A plain list works too: protected: [src/orders, src/content].
How it holds#
- The rules are read from the code before the fix, never from the fix's own branch, so a fix can't change its rules.
controxity.ymlitself is always off limits. - The AI is told each rule and why up front, so it works around them. The real check comes after: every changed file is checked against the rules, whatever the AI said.
- A
reviewrule never loosens a built-in one. To let the fixer change, say,billing, addallow_changes: [billing]: it holds until an admin accepts it, with a reason, in Product settings.
Controxity 1.132.0These pages are in the repository: docs/site