✦ Sample Prompt
Add or update CODEOWNERS file in every repository. Place the file at .github/CODEOWNERS.
Apply these ownership rules:
- * @platform-engineering (default reviewers for all files)
- /infra/ @infrastructure-team
- /.github/ @platform-engineering @security-team
- /deploy/ @infrastructure-team @platform-engineering
- Dockerfile @infrastructure-team
- *.tf @infrastructure-team
- /docs/ @documentation-team
If a CODEOWNERS file already exists, merge these rules with the existing ones.
Do not remove any existing ownership rules. Add missing rules only. The Problem
Without CODEOWNERS, pull requests get merged without the right people reviewing them. Security-sensitive directories change without security team review. Infrastructure configs get updated without platform team approval. Some repos have CODEOWNERS files but they're outdated, referencing teams that no longer exist or missing coverage for new directories.
Getting every repository to have an accurate, up-to-date CODEOWNERS file requires knowing who owns what across the organization and then applying that knowledge consistently across hundreds of repos. It's exactly the kind of governance work that gets deprioritized until something breaks.
What Tidra Does
- Checks each repository for an existing CODEOWNERS file (in root,
.github/, ordocs/) - If no file exists, creates
.github/CODEOWNERSwith the specified ownership rules - If a file exists, reads the current rules and merges in any missing ownership rules without duplicating or removing existing entries
- Creates a PR explaining what ownership rules were added or updated
Before & After
diff
.github/CODEOWNERS
+ # Default reviewers
+ * @platform-engineering
+
+ # Infrastructure
+ /infra/ @infrastructure-team
+ /.github/ @platform-engineering @security-team
+ /deploy/ @infrastructure-team @platform-engineering
+ Dockerfile @infrastructure-team
+ *.tf @infrastructure-team
+
+ # Documentation
+ /docs/ @documentation-team
Customization Tips
- Team names: Replace the team handles in the prompt with your actual GitHub team slugs.
- Per-repo owners: If specific repos have dedicated team owners, add a rule like
* @team-namefor those repos using Tidra's filtering to target them. - Branch protection: CODEOWNERS is only enforced if you also enable "Require review from Code Owners" in branch protection rules. Consider pairing this wave with a branch protection audit.