What problem does it solve? Setting up a repo for agent-driven delivery requires manually creating state labels, configuring verification gates, scaffolding memory files, and wiring up tokens and branch protection — a repetitive, error-prone process that this Skill automates in one idempotent pass. ## Core Features & Use Cases - Label and gate setup: Creates the nine state:* and priority:* labels via gh, then detects the project's stack from real evidence (lockfiles, manifests, Makefile targets) and fills GATES.md with format, typecheck, lint, test, build, audit, and secret-scan commands — writing TODO instead of guessing. - Memory scaffolding and codebase mapping: Creates memory/USER.md, memory/MEMORY.md, and generates a coarse, language-agnostic memory/ARCHITECTURE.md describing directories and their purposes while ignoring vendor and build output. - Token verification and branch protection: Checks that the FACTORY_PAT secret and .env GITHUB_PAT exist (never reading or writing token values), and offers to protect main with required PRs, gates/size status checks, and admin enforcement — only after explicit user confirmation. - Use Case: After installing the Ratchet delivery loop into an existing Node.js repo, run this Skill once to create all labels, auto-detect pnpm-based gate commands, map the codebase, and confirm the PAT and branch protection are in place before agents start picking up issues. ## Quick Start Run the ratchet-init skill to set up this repository's labels, gates, memory files, and branch protection for the agent delivery loop.