Skip to content

docs(template): fix stale branch-protection ruleset + seed glossary - #108

Merged
evanharmon1 merged 5 commits into
mainfrom
docs/template-branch-protection-glossary
Jun 25, 2026
Merged

evanharmon1 merged 5 commits into
mainfrom
docs/template-branch-protection-glossary

Conversation

@evanharmon1

Copy link
Copy Markdown
Owner

A focused pass over the template docs (template/docs/). A read-only review found the docs are in good shape overall — ci-cd.md, security.md, conventions.md, CHECKLIST.md, and the devcontainer guides are accurate and appropriately specific — with one genuinely broken doc and one near-empty one.

branch-protection.md was stale and self-contradictory

The template's docs/architecture/branch-protection.md still carried harmon-infra-specific content that misrepresented the ruleset the template actually ships (verify + security) and contradicted ci-cd.md:

  • Embedded ruleset JSON had a hardcoded "id": 14110902, wrong required checks (secrets/validate/build-homepage), no merge_queue, and a bypass actor that didn't match the shipped .github/Branch Protection Ruleset - Protect Main.json. Replaced with a faithful jinja mirror of that file: verify + security, org-conditional merge_queue + OrganizationAdmin bypass vs personal RepositoryRole bypass, no hardcoded id. Added a "keep in sync" note.
  • bypass_actors: [] section claimed "no one can bypass" while the JSON above it showed a bypass actor — fixed to describe the real org/personal posture.
  • Required-checks table (validate-compose/validate-templates/build-homepage) → verify + security, with what verify rolls up (project-type aware), consistent with ci-cd.md.
  • Added an org-only merge_queue explanation; removed a stray ponderous org reference.

glossary.md seeded with template-known terms

Was a single TODO: row. Seeded with the toolchain vocabulary the template genuinely defines — verify, security, task/Taskfile, release-please, the <org>-ci GitHub App, devcontainer bot/dev profiles, 1Password Environments, bot vs operator — gated by the relevant copier conditionals, keeping a trailing TODO for project-specific (domain) terms.

Scope / conservative bar

Per a conservative specificity bar, docs whose content is genuinely repo-specific were left as well-crafted TODO scaffolds (no invented content): product/{vision,roadmap,domain}, architecture/README overview + diagram, guides/deploying, design-language, DESIGN.md. tests.md was left as-is (accurate; its only TODO is genuinely repo-specific coverage expectations).

Verification

  • Rendered both an org (web-astro) and a personal (general) profile via copier copy --vcs-ref=HEAD; in each, the doc's embedded JSON matches the rendered ruleset file exactly (org → verify+security+merge_queue+OrganizationAdmin; personal → RepositoryRole, no merge_queue), conditionals render cleanly, no [[ ]]/[% %] leftovers, and a leakage grep (ponderous/14110902/validate-compose/etc.) is clean across both trees.
  • task test:template PASS; task check and markdownlint clean.
  • Root dogfood copies (docs/architecture/branch-protection.md, docs/glossary.md) re-rendered to match.

🤖 Generated with Claude Code

evanharmon1 and others added 5 commits June 25, 2026 12:34
The template's docs/architecture/branch-protection.md carried stale,
harmon-infra-specific content that misrepresented the ruleset the template
actually ships and contradicted ci-cd.md:

- Embedded ruleset JSON had a hardcoded id (14110902), wrong required checks
  (secrets/validate/build-homepage), no merge_queue, and a bypass actor that
  didn't match the shipped ruleset. Replaced it with a faithful mirror of
  `.github/Branch Protection Ruleset - Protect Main.json` (verify + security;
  org-conditional merge_queue + OrganizationAdmin bypass vs personal
  RepositoryRole), plus a "keep in sync" note.
- Fixed the `bypass_actors: []` section, which claimed "no one can bypass"
  while the JSON showed a bypass actor — now describes the real org/personal
  posture.
- Replaced the required-checks table (validate-compose/validate-templates/
  build-homepage) with verify + security and what verify rolls up (project-type
  aware), consistent with ci-cd.md.
- Added a merge_queue rule explanation (org-only) and removed a stray
  `ponderous` org reference.

Also seed docs/glossary.md (was a single TODO row) with the template-known
toolchain terms (verify, security, task/Taskfile, release-please, the
`<org>-ci` GitHub App, devcontainer profiles, 1Password Environments, bot vs
operator), keeping a trailing TODO for project-specific terms.

Root dogfood copies (docs/architecture/branch-protection.md, docs/glossary.md)
re-rendered to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
RepositoryRole actor_id 5 is the **Repository admin** role, not Maintain
(confirmed via github/rest-api-description#4406). Fix the prose in the
personal-profile bypass_actors section of branch-protection.md (template +
root dogfood copy); the JSON was already correct.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Change the admin bypass on the Protect Main ruleset from bypass_mode
"always" to "pull_request" for both profiles (personal RepositoryRole admin
and org OrganizationAdmin). Admins can still merge PRs that haven't met every
requirement (a solo maintainer's own PR that can't be self-approved, or a
stuck check) but can no longer push directly to main — an accidental
`git push origin main` is now rejected by the ruleset like any other actor's.

Updates the shipped ruleset JSON, the embedded JSON + prose in
branch-protection.md, and the root dogfood copies (ruleset + doc).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…always)

Add an explicit, regression-resistant note in branch-protection.md explaining
why every bypass actor is scoped to pull_request mode (admins may merge a
non-compliant PR but cannot push directly to main) and warning that widening to
always is a deliberate security loosening. Re-render the root dogfood copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…(MD049)

The design-intent note used single-asterisk emphasis (*merge*) in the template
source, which renders to an MD049 violation in generated repos. Switch to
underscore emphasis and re-render the root dogfood copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant