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

FileLands atPut there byEditing it
repo-context.mdThe top of AGENTS.md, above the <!-- REDLINE:BEGIN --> marker.A team member, onceLive — a human copies or imports it
CODEOWNERS.github/CODEOWNERSredline init --with review-ownershipNo effect — the CLI builds it in code
redline.yml.github/workflows/redline.ymlredline initLive — redline init writes from this file
pull_request_template.md.github/pull_request_template.mdredline initLive — redline init writes from this file
azure/pull_request_template.md.azuredevops/pull_request_template.mdredline init (Azure DevOps)Live — redline init writes from this file
azure/gate-template.yml.azuredevops/redline-gate.ymlredline init (Azure DevOps)Live — redline init writes from this file
redline-ruleset.jsonNowhereNobodyNo effect — nothing applies it
redline-org-ruleset.jsonNowhereAn org administrator, onceLive — a human copies or imports it

Changing a template

  1. 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.
  2. 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.
  3. 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.
  4. 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.