{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "pliablepixels-gap-trap--set-up-agent-code-gates",
 "repo": "pliablepixels/gap-trap",
 "repo_url": "https://github.com/pliablepixels/gap-trap",
 "repo_slug": "pliablepixels-gap-trap",
 "title": "Set up gates so agent code stays correct",
 "page_title": "How to set up gates so agent code stays correct with Gap Trap",
 "summary": "Generate contracts, gates, and ratchets for a repo so AI-written code is checked before commit.",
 "who": "A developer whose AI agent writes most of the code in a repo and who has noticed drift, such as duplicate helpers or layer-boundary breaks, that nobody reviewed.",
 "problem": "Agents follow written rules only until they forget them, and nothing blocks a broken rule from being committed.",
 "outcome": "The repo has contracts, gates that fail commits or CI runs on broken rules, ratchets for known problems, and playbooks, all committed locally without a push.",
 "steps": [
  "`npx skills add pliablepixels/gap-trap`",
  "Open the target repository in Claude Code or Codex and run `/gap-trap setup`.",
  "Read the short plan the skill shows (contracts, gates, commands) and answer its questions.",
  "Review each generated contract line by line, since the README says this is the most important review step.",
  "Check the commit the skill made and confirm nothing was pushed."
 ],
 "agent_prompt": "In the repo at <repo-path>, run `/gap-trap setup` after confirming gap-trap is installed with `npx skills add pliablepixels/gap-trap`. Report the list of contracts and gates the skill proposed and the commit it created. Verify that `git status` is clean and that no push happened.",
 "agents": [
  "claude-code",
  "codex"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README warns that generated contracts must be validated carefully, and the skill is designed to run only on the top coding model of the harness.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "javascript",
 "requirements": [
  "A git repository you want to set up",
  "Claude Code (Opus or better) or Codex (frontier coding model at high reasoning), since the skill stops on smaller models",
  "The skills CLI via npx, or a git clone for a manual install",
  "Your repo's test command, and git, grep, and awk for non-Node and non-Python repos"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/pliablepixels-gap-trap/set-up-agent-code-gates/",
 "md": "https://dedupedai.com/use-cases/pliablepixels-gap-trap/set-up-agent-code-gates/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/pliablepixels-gap-trap--set-up-agent-code-gates.json",
 "api_version": "v1"
}
