Templates & rulesets
The files Redline puts into a repository, and the ones it only describes: where each lands, who puts it there, and where to edit it.
ℹ
For the platform team maintaining Redline. If you only want to know what onboarding adds to your repository, read Onboard a repository.
Why this page exists
Not every file in templates/ and rulesets/ is live. Some are copied into a repository as they are. Some are only a picture of what the CLI builds in code. Edit the wrong one and nothing changes. The Editing it column tells you which kind each file is.
All templates and rulesets
| File | Lands at | Put there by | Editing it |
|---|---|---|---|
repo-context.md | The top of AGENTS.md, above the <!-- REDLINE:BEGIN --> marker. | A team member, once | Live — a human copies or imports it |
CODEOWNERS | .github/CODEOWNERS | redline init --with review-ownership | No effect — the CLI builds it in code |
redline.yml | .github/workflows/redline.yml | redline init | Live — redline init writes from this file |
pull_request_template.md | .github/pull_request_template.md | redline init | Live — redline init writes from this file |
azure/pull_request_template.md | .azuredevops/pull_request_template.md | redline init (Azure DevOps) | Live — redline init writes from this file |
azure/gate-template.yml | .azuredevops/redline-gate.yml | redline init (Azure DevOps) | Live — redline init writes from this file |
redline-ruleset.json | Nowhere | Nobody | No effect — nothing applies it |
redline-org-ruleset.json | Nowhere | An org administrator, once | Live — a human copies or imports it |
Changing a template
- Find the real sourceCheck the Editing it column. A file marked no effect is a picture of what the CLI builds in code; its page names the code to change instead.
- Edit itFor a live template, edit the file in templates/ or platforms/azure/. For a generated file, edit the code its page names, such as SENSITIVE_PATHS in cli/commands/init.ts or applyPolicy in cli/platforms/github/install.ts.
- npm test && node scripts/validate.mjsThe install path is unit-tested against a fake host client. validate.mjs checks the shapes the required check name depends on, such as the caller's redline-gate job id.
- Release, then re-run redline initTemplates ship inside the published redlinegate package. For a file redline init writes, a merged edit reaches a repository once it is released and redline init runs there again. Repositories already onboarded keep their copy until then.