install-gates · git:20261022.867b0e0 · 2026-10-22 · sha256 994a937c1cf93082
install-gates git:20261022.867b0e0A
Immutable. This exact content never changes and is served at /api/v1/blob/994a937c1cf93082.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_rqo2gjhljikowf7u/994a937c1cf930821be2ec593b93e1e5042da16db604691e6dbd6db8ca8dd57f.json
Then /plugin install install-gates@markdownregistry-rqo2gjhljikowf7u in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
---
name: install-gates
description: "Use when: a repo wants the process gates behind the plugin's rules - commit discipline, sensitive-info scan of PR text, PR title and branch, dead branches - as GitHub workflows. Asks which gates and which runner, then runs scripts/install_gates.py, which writes the files and never overwrites."
---
# install-gates - put the SDLC gates into a repo
The rules (`commit-unit`, `pr-no-leaks`, `git-process`) only remind. These five gates count, so a PR that ignores a rule goes red:
| Gate | What it checks | Config keys it reads (`.vibemaestro/sdlc.json`) |
|---|---|---|
| `commit-discipline` | commits per PR, touches per file, side-branch merges, wip/fixup marks, one commit per review round; the exemption is one body line | `commits.*`, `tokens.commit_exception` |
| `pr-sensitive` | secrets, e-mail, phone, public IP, account ids in the PR body, comments and commit messages; a hash-only allowlist | `sensitive.scan`, `sensitive.allowlist` |
| `pr-title` | title pattern and length, branch pattern, no intent-file title on a ready PR that carries code | `pr.title.*`, `branch.pattern` |
| `pr-body` | the PR body over its cap: characters in all, summary lines, evidence lines (on by default; the live body is read, so `gh pr edit` is checked) | `pr.body.*`, `tokens.summary_heading`, `tokens.evidence_heading` |
| `dead-branches` | remote branches already inside the main line (reports; deletes nothing) | `dead_branches.*`, `branch.protected` |
Skills ask, scripts do: this skill collects the answers; `scripts/install_gates.py` writes the files with no model in between.
## Ask (at most three questions)
1. **Which gates?** Default: all five. (`--only commit-discipline,pr-title` for a subset.)
2. **Which runner?** The GitHub variable that names the runner and the fallback label, for `runs-on: ${{ vars.<variable> || '<label>' }}`. Default `CI_RUNNER` and `ubuntu-latest`; a repo with a self-hosted runner gives its own pair. The installed gates also read the optional repo variable `CI_GATE_RUNNER` first (a light runner for gate jobs); unset, they use that pair. If the repo's `.vibemaestro/sdlc.json` already has `ci.runner_var` / `ci.runner_default`, take those and do not ask.
3. **Do the thresholds need changing?** The defaults are 15 commits per PR, 4 touches per file, 0 merged branches left on the remote. Anything else is a value in `.vibemaestro/sdlc.json`, not a code change (`kb.py config check` validates it).
## Do
Work in a worktree inside the repo (rule `git-process`), then:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/install_gates.py" --dry-run # what would be written
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/install_gates.py" [--only <gates>] [--runner-var <VAR>] [--runner-default <label>]
```
- Workflows go to `.github/workflows/`, the gate scripts and the config loader to `.vibemaestro/gates/`, and an allowlist containing only its header to the path of `sensitive.allowlist`.
- **Nothing is overwritten.** Each file is reported `wrote`, `kept` (identical to what would be written) or `kept (differs)`; a second run is a no-op. If a file is `kept (differs)`, show the person the difference and let them decide; do not delete it for them.
- The script prints the config keys the gates read. It does not create `.vibemaestro/sdlc.json`; with none, every key has its default.
- Commit the files and open the PR with `vibemaestro-sdlc:ship`. Say in the PR body that the workflows change what runs with the repo's token, so `.github/` is reviewed like code.
## What to tell the person
- **A gate judges a PR by the scripts and the config of its BASE branch.** The templates check out the base and only fetch the PR's commits as data, so a PR cannot relax its own gate. The PR that installs the gates has no scripts on its base yet: each workflow says so in a warning and passes, once. From the next PR the gates apply.
- **The vendored gates know only the plugin version that installed them.** Everything in `.vibemaestro/gates/` (the gate scripts, the config loader `sdlc_config.py`, the message table `messages.py` the gates print from) is a copy, and a re-run keeps it (`kept (differs)`). Before the repo's `.vibemaestro/sdlc.json` takes a key a newer plugin added (for example `agents.*`, or `language` when the gates should print in it), delete `.vibemaestro/gates/` and re-run this skill in the same PR or an earlier one: the re-run writes every file again, all from one plugin version. The gates read the config of the base branch, so a PR that adds the key without the refresh passes its own gates, then turns every later PR (and the scheduled dead-branches run) red on `unknown key`.
- **What no template can stop:** the workflow file itself comes from the PR, so a PR can still edit it. Reviewing changes under `.github/` is the guard.
- **Allowlist:** a false positive of `pr-sensitive` is exempted by the sha256 of exactly that value (the scanner prints it on a local run, never in CI), never by loosening a rule. The value itself is never written to the file. A new line takes effect for PRs after it has merged.
- **The runner variable is checked, read-only.** After installing, the script lists the repo's Actions variables and the organization's with `gh api -X GET` and prints one line: `set`, a `WARNING` that names the fallback label and `gh variable set <VAR> --body <label>` (unset, or set to an empty value, which falls back too: on a hosted runner whose minutes are locked the gates never start and read as failed), or `check skipped` when `gh` is missing, not logged in, or cannot read one of the two lists (the organization list can need more permission than the repo's, so a 403 or 404 on either list is a skip, never a warning). The exit code never changes. Pass the warning on to the person; setting the variable is theirs (or the org admin's).
- **Runner needs:** `python3` 3.8 or newer, `git`, and `gh` (present on GitHub-hosted runners). A red run is a signal on the PR; making it a required check is the repo's ruleset.
- Third-party actions: the templates use only `actions/checkout`, pinned by a full commit SHA. Keep it that way.