agentleFS
Tamircohen28Tamircohen28/tamirs-superpowers/.cursor/rules/github-repository-policy.mdc

tamirs-superpowers / rules

Cursor rule2 starsChanged 3 months agoMITView on GitHub

GitHub repository policy — rulesets on ~DEFAULT_BRANCH, strict status checks deliberately off, per-repo required contexts, Actions concurrency classification. Canonical: rules/dev/github-repository-policy.md

The file

We split this github-repository-policy.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All GitHub access goes through gh (never MCP) via scripts/lib/github-common.sh.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
github-repository-policy.mdc
---
description: "GitHub repository policy — rulesets on ~DEFAULT_BRANCH, strict status checks deliberately off, per-repo required contexts, Actions concurrency classification. Canonical: rules/dev/github-repository-policy.md"
alwaysApply: false
globs: ["config/github/**/*", "core/schemas/repository-policy.json", "scripts/github-policy.sh", "scripts/lib/github-common.sh", "scripts/check-github-policy.sh", ".github/workflows/**/*", "skills/repo/**/*"]
---

<!-- GENERATED FILE — DO NOT EDIT.
     Source:    rules/dev/github-repository-policy.md (frontmatter + summary: platforms/cursor/rules.map.json)
     Generator: scripts/build-cursor-rules.sh
     Regenerate: make cursor-rules -->

# GitHub repository policy

Canonical rule: `rules/dev/github-repository-policy.md`. The policy itself is data in `config/github/repository-policy.json`, constrained by `core/schemas/repository-policy.json` — never restate a rule, a status-check context, or a concurrency group anywhere else.

Governance is expressed as **repository rulesets**, not classic branch protection. Classic `branches/*/protection` 404s on a correctly governed repo, so reading it reports a protected repository as unprotected.

Target the default branch with GitHub's **`~DEFAULT_BRANCH`** magic ref. Never write a literal branch name: the governed repos mix both spellings, and a literal stops matching the day a branch is renamed.

**`strict_required_status_checks_policy` is `false` deliberately — do not "fix" it.** With it on, every merge un-greens every other open PR under the parallel-worker / one-PR architecture, turning N merges into O(N²) CI runs. Linear history plus a full CI run on the integration branch protects correctness instead.

Required status-check **contexts are per repository, never global** — a context is a CI job name, and a name that no workflow produces blocks every PR forever. Adding a CI job does not make it blocking.

Reviews: **0 required approvals with mandatory review-thread resolution**. On a single-author account an approval requirement is only satisfiable by `--admin`, and a routinely bypassed rule is worse than none. `bypass_actors` stays empty.

Actions concurrency: cancel superseded runs on **tests, lint, typecheck, build, validation, and read-only scans**. **Never** cancel deployments, releases, publishing, migrations, or provisioning — a cancelled run leaves external state half-written. On a tie, never-cancel wins; unclassified workflows are reported, not guessed at.

All GitHub access goes through `gh` (never MCP) via `scripts/lib/github-common.sh`. Here `gh` is not optional: repository policy *is* a GitHub action, so a missing or unauthenticated `gh` is a hard, reportable failure.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.