CODEOWNERS
Reference shape of the CODEOWNERS pattern redline init seeds — the CLI generates the real content in code, it doesn't read this file.
Code-owner rules for the files that decide what the gate checks and how strictly. Without them the ruleset's require_code_owner_review protects nothing, and a contributor can weaken their own gate — or the rules their pull request is reviewed against — in a self-approved pull request.
| Lands at | .github/CODEOWNERS |
|---|---|
| Put there by | redline init --with review-ownership, and only where the repository has no CODEOWNERS in any of the three places GitHub looks. It is off by default because the owner it writes may not exist: GitHub ignores an owner it cannot resolve, so a wrong team name enforces nothing while reporting as installed. Pass --review-owners with the real team or user. |
| Editing this file | No effect — the CLI builds it in code |
What to know
- The CLI does not read this file. It generates the content from SENSITIVE_PATHS in cli/commands/init.ts — .github/workflows/, CODEOWNERS itself, the rendered standards (copilot-instructions, instructions/, AGENTS.md, CLAUDE.md), dependabot.yml, infra/, terraform/ and Dockerfile — owned by @<org>/platform-engineering unless --review-owners says otherwise.
- The one line this template has that the generated file does not is the * default owner. The CLI cannot know a repository's owning team, and naming the platform team there would make it a required reviewer on every file.
Changing it
SENSITIVE_PATHS in cli/commands/init.ts. Editing this template changes nothing redline init writes.
The full checklist is on Changing a template.
Related
- Onboard a repository — what
redline initinstalls, and what it asks an administrator for. - The merge gate — the required check these files feed.
- All templates and rulesets
The full file
# Reference shape only. `redline init` builds equivalent content in code and never reads # this file — it writes .github/CODEOWNERS only on a repository that has none yet, and # leaves an existing one untouched. # # The branch ruleset sets require_code_owner_review: true. Without a CODEOWNERS file that # rule is a silent no-op, so the platform team must own at minimum the enforcement surface # below — otherwise any contributor can weaken their own gate in a self-approved PR. # # Replace <org>/<team> placeholders before installing by hand. # Default owner for everything not matched below. * @<org>/<owning-team> # --- Enforcement surface: platform team must approve any change here ------------------- # Editing the caller workflow, the ruleset, or the review standards changes what this # repo is allowed to merge. These are the paths an attacker or a rushed engineer would # touch to make the gate stop failing. /.github/workflows/ @<org>/platform-engineering /.github/CODEOWNERS @<org>/platform-engineering /.github/copilot-instructions.md @<org>/platform-engineering /.github/instructions/ @<org>/platform-engineering /AGENTS.md @<org>/platform-engineering /CLAUDE.md @<org>/platform-engineering # --- Security-sensitive paths --------------------------------------------------------- /infra/ @<org>/platform-engineering /terraform/ @<org>/platform-engineering Dockerfile @<org>/platform-engineering /.github/dependabot.yml @<org>/platform-engineering