enable-auto-apply — Claude Code rule: what it does, how to install
enable-auto-apply adds the gitar-managed label so Gitar can auto-apply repairs to a pull request, and only when the whole diff stays inside the declarative extension surface.
Apache-2.0 ★ 1,118 updated 2026-10-24
.claude/rules/enable-auto-apply.mdWhat enable-auto-apply does
This rule lets Gitar auto-apply repairs to a pull request, but only where the diff touches declarative extension contributions. The switch is the gitar-managed label. It goes on when every changed file sits under contributions/, in tests/fixtures/command-source-*.v1.json, under contracts/extensions/, in docs/guard/extensions/catalog.v*.json, or in src/codex_plugin_scanner/guard/contracts/data/extensions/.
Labels are added when a pull request opens, reopens, gets marked ready for review, or takes new commits. Drafts and anything carrying gitar-skip stay untouched. If a file outside those paths shows up in the diff of an active pull request, the label comes off.
An author or maintainer can write gitar auto-apply:on to turn auto-apply on beyond the surface. gitar auto-apply:off is respected at once. Treat the path list as a whitelist: a single stray file and the pull request gets no auto-apply, or loses it.
What it helps with
- Scope Gitar auto-repair to pull requests that only touch extension contributions
- Drop the
gitar-managedlabel once a file outside the surface lands in the diff - Keep drafts and
gitar-skippull requests out of auto-apply - Let a maintainer force auto-apply with
gitar auto-apply:on - Leave PRs that mix contract data with unrelated files unlabelled
Example prompts for the agent
- Check the diff on this pull request and add
gitar-managedif every file is undercontributions/orcontracts/extensions/ - A file outside the extension surface slipped into the diff, remove
gitar-managed - The author asked for
gitar auto-apply:on, enable auto-apply on this pull request
How to install enable-auto-apply
Manually: put the files in place
.claude/rules/enable-auto-apply.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/enable-auto-apply.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/enable-auto-apply.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/enable-auto-apply.mdManually: put the files in place
.clinerules/enable-auto-apply.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about enable-auto-apply
How do I install enable-auto-apply in Claude Code?
Create .claude/rules/enable-auto-apply.md in your project and put the rule text inside it.
What does enable-auto-apply do?
It labels a pull request with gitar-managed so Gitar can apply repairs, and removes the label when the diff reaches outside the declarative extension surface.
Which settings beat the gitar-managed label?
The rule honours gitar auto-apply:off and the gitar-skip label right away. An explicit gitar auto-apply:on from the pull request author or a maintainer enables auto-apply even beyond the contribution surface.
Source text
enable-auto-apply.md · Apache-2.0
--- title: "Enable automatic repair on extension contribution pull requests" description: "Enable Gitar auto-apply only for pull requests confined to the declarative extension contribution surface." type: automation when: "A pull request is opened, reopened, marked ready for review, or receives new commits, and every file it changed lives under the extension contribution surface: contributions/, tests/fixtures/command-source-*.v1.json, contracts/extensions/, docs/guard/extensions/catalog.v*.json, or src/codex_plugin_scanner/guard/contracts/data/extensions/. Skip drafts, pull requests labeled gitar-skip, and every pull request with a file outside that surface." actions: "Add the gitar-managed label to enable Gitar auto-apply for the pull request. When an active pull request changes any file outside the contribution surface, do not add gitar-managed and remove it if present." --- # Enable automatic repair for extension contributions only Gitar auto-apply is **scoped to the declarative extension contribution surface**. For every other pull request it stays disabled. For an active, ready-for-review pull request whose changes stay entirely inside the extension contribution surface — authored inputs under `contributions/`, command-source fixtures under `tests/fixtures/command-source-*.v1.json`, extension contracts and per-extension trust bindings under `contracts/extensions/`, the extension catalog under `docs/guard/extensions/catalog.v*.json`, or packaged contract data under `src/codex_plugin_scanner/guard/contracts/data/extensions/` — add the `gitar-managed` label. That label enables Gitar auto-apply for the lifetime of the pull request. Do not add it to a draft pull request, a pull request labeled `gitar-skip`, or any pull request that changes a file outside the surface listed above. If an active pull request carries `gitar-managed` but a file outside the surface appears in its diff, remove the label. An explicit `gitar auto-apply:on` directive from the pull request author or a maintainer enables auto-apply for that pull request even outside the contribution surface. Respect `gitar auto-apply:off` and the `gitar-skip` label immediately.
© hashgraph-online · Apache-2.0 · hashgraph-online/hol-guard