Reference
controxity.yml
The file at the top of your repository that tells the fixer how to check a fix, what it may never change, and how to deploy.
Controxity reads it from the code before each fix, never from a fix's own branch, so a fix can't change the rules it's judged by.
Start with one written for you: node controxity.js init reads your repository and writes a first controxity.yml, and an AGENTS.md guide when you have none. See Releases from CI, and a first setup.
A full example#
install: npm ci
test: npm test
guide: docs/CONTRIBUTING.md
protected:
- path: src/content/**
why: Verified text. Never edited by AI.
- path: src/pricing.ts
mode: review
allow_changes: [billing]
components:
server: {path: apps/server, test: npm test -w server, owner: backend}
mobile: {path: apps/mobile, test: npm test -w mobile}
deploy:
staging: sh scripts/deploy-staging.sh
production: docker compose up -d --build
health: https://shop.example/healthKeys#
| Key | What it does |
|---|---|
install | Runs first, in the fixer's container, with the network on. Then the network goes off. |
test | The command that proves a fix: exit code 0 is passing. A test that failed before and passes with the fix is the proof. |
checks | For an app with no tests yet, in place of test: a list of commands a fix must pass. Shown as "Checks pass, not proven". See Apps with no tests yet. |
guide | A file the fixer reads first: how your code is laid out. CLAUDE.md, AGENTS.md, CONTRIBUTING.md or README.md are found by themselves. |
protected | What the fixer must never change, or only with a person's yes: paths with why, mode and match. See Protect files. protect works too. |
allow_changes | Lifts a built-in rule (billing, a path): it holds until an admin accepts it, with a reason. |
components | The parts of a big app, each with its own path, test, install and owner. An error is put on the part that owns its code, and a small fix runs only its part's tests. |
libraries | How a library's change is tried in the apps that use it: Kit: npm install --no-save {path}. npm and Python are known by themselves. |
deploy | How a version goes live: staging and production commands (exit code 0 means it's up), health (an address that answers 200 once the new version is up) and keep (files git doesn't have that the deploy needs; ignored .env files and the folders a compose file mounts are found by themselves). npx controxity deploy, the helper on your server and Deploy command, run here all run the same command. See Deploy. |
image | The container the checks run in, when the one chosen from your repository isn't right. |
codeowners | off to ignore the repository's CODEOWNERS when asking for yeses. |
Without the file#
A Python project is tested with pytest. Anything else has no way to check a fix, and a fix nobody can check is never called fixed: add the file, or press Set up tests.
Controxity 1.132.0These pages are in the repository: docs/site