{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "akimiya-z-codex-guard--tune-gate-policy-per-repo",
 "repo": "Akimiya-z/codex-guard",
 "repo_url": "https://github.com/Akimiya-z/codex-guard",
 "repo_slug": "akimiya-z-codex-guard",
 "title": "Set a per-repo gate policy agents cannot loosen",
 "page_title": "How to set a per-repo gate policy agents cannot loosen with Codex Guard",
 "summary": "Put the policy in .github/codex-guard.yml on the default branch to set blocking rules.",
 "who": "A repository owner who wants to choose which findings block merges and does not want agents to change that in their own PRs.",
 "problem": "Different repos need different tolerance for TODOs and secret patterns, and per-PR changes should not weaken the rules.",
 "outcome": "A policy file on the default branch sets the preset, blocking checks, labels and comment behavior for every matching PR.",
 "steps": [
  "Copy examples/codex-guard.yml from the Codex Guard repository into .github/codex-guard.yml.",
  "Set `preset: balanced` and list your agent-labels and secret-exclude-paths.",
  "Commit the file to the default branch.",
  "Run `npx --yes codex-guard doctor` to check the policy file."
 ],
 "agent_prompt": "In the repository at <repo-path>, create .github/codex-guard.yml with `preset: balanced` and `comment-mode: replace`, then run `npx --yes codex-guard doctor`. Expected output: the policy file is accepted with no errors. Verify that the file is on the default branch and not only in a feature branch.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The policy file only counts when it is on the default branch, so changes made inside an agent PR do not apply to that PR.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "javascript",
 "requirements": [
  "A GitHub repository with Actions enabled and permission to add a workflow file",
  "Node.js with npx available on your machine",
  "A Git working copy of the repository (the init command runs from its root)",
  "Permission to change branch protection settings if you want the check to block merges"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/akimiya-z-codex-guard/tune-gate-policy-per-repo/",
 "md": "https://dedupedai.com/use-cases/akimiya-z-codex-guard/tune-gate-policy-per-repo/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/akimiya-z-codex-guard--tune-gate-policy-per-repo.json",
 "api_version": "v1"
}
