Skip to content

feat: branching & deploy baseline — two-branch flow, workflows, init script#2

Open
BGebken wants to merge 2 commits intomainfrom
feat/branching-and-deploy-baseline
Open

feat: branching & deploy baseline — two-branch flow, workflows, init script#2
BGebken wants to merge 2 commits intomainfrom
feat/branching-and-deploy-baseline

Conversation

@BGebken
Copy link
Copy Markdown
Contributor

@BGebken BGebken commented Apr 19, 2026

Summary

Bakes HRL's two-branch promotion model into every new repo created from this template. After the Muster adoption (muster#97, muster#98) and the Pirates-Codex canonical doc (Pirates-Codex#15), this completes the loop so new projects start compliant without any additional setup work.

What new projects get out of the box

  • docs/BRANCHING.md — project-scoped doc template with an environment-tier picker; points to the org-wide canonical in Pirates-Codex
  • .github/workflows/deploy-dev.yml + deploy.yml — placeholder deploy workflows (Dev triggers on develop, Prod triggers on main with a security gate scanning for BYPASS_AUTH)
  • .github/workflows/prune-merged-branches.yml — weekly scheduled cleanup of merged feature branches older than 14 days; manual dispatch defaults to dry-run
  • scripts/init-repo.sh — one-shot gh CLI setup that creates develop, enables auto-delete-on-merge, and adds baseline branch protection

What got updated

  • CONTRIBUTING.md — the key fix: "Create a branch from `main`" → "Branch from `develop`"; adds hotfix flow, dev-only callout, and prefix conventions aligned with the prune workflow
  • README.md — Deployment section documents the two-branch flow and points to init-repo.sh for first-run setup

Coordination with PR #1

PR #1 (Adopt HRL org-wide tracking standards) is currently open and touches CONTRIBUTING.md, README.md, and .github/pull_request_template.md.

Recommended merge order: PR #1 first → rebase this PR on top → merge.

First-time user flow (after this merges)

# 1. Pirate Council member creates the repo from template-project
# 2. Clone locally
git clone https://github.com/huntridge-labs/new-project.git
cd new-project

# 3. Run the init script
bash scripts/init-repo.sh
# → creates develop, enables auto-delete, sets branch protection

# 4. Fill in the TODOs in docs/BRANCHING.md, README.md, and the workflows
# 5. First PR: feat/... into develop

Related

Test plan

  • Reviewer reads docs/BRANCHING.md — confirms tier menu and references look right
  • Reviewer skims the three new workflows — confirms TODOs are clear
  • Spot-check scripts/init-repo.sh on a throwaway repo (or a new repo spun up from the template after this merges)
  • Confirm CONTRIBUTING.md + README.md edits don't break PR Adopt HRL org-wide tracking standards #1's edits semantically

Follow-ups

  • After merge: update PR Adopt HRL org-wide tracking standards #1's pull_request_template.md to include a target-branch check section
  • Consider a corresponding Terraform template module sandbox-ecs (separate repo or module) for Tier 3+ projects

🤖 Generated with Claude Code

…script

Bakes HRL's two-branch promotion model into every new repo created from
this template. After Muster adoption (muster#97, muster#98) and the
Pirates-Codex canonical doc (Pirates-Codex#15), this completes the loop
so new projects start compliant without any additional setup work.

Additions:
- docs/BRANCHING.md — project-scoped doc template; picks env tier, points
  to the org-wide canonical in Pirates-Codex
- .github/workflows/deploy-dev.yml — placeholder deploy workflow for develop
- .github/workflows/deploy.yml — placeholder deploy workflow for main, with
  security gate scanning for BYPASS_AUTH before prod push
- .github/workflows/prune-merged-branches.yml — weekly scheduled cleanup of
  merged feature branches older than 14 days (dry-run on manual dispatch)
- scripts/init-repo.sh — one-shot gh-CLI setup that creates develop branch,
  enables auto-delete-on-merge, and adds baseline branch protection

Updates:
- CONTRIBUTING.md — replaces "branch from main" with "branch from develop",
  adds hotfix flow, dev-only callout, and naming conventions aligned with
  the prune workflow
- README.md — Deployment section documents the two-branch flow and points
  to init-repo.sh for first-run setup

This PR coordinates with PR #1 (standards alignment) — both touch
CONTRIBUTING.md and README.md but in different sections. Merge order
should be PR #1 first, then this PR will rebase cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 19, 2026

🔑 Gitleaks Secrets Detection Results

Branch: feat/branching-and-deploy-baseline
Commit: fa6b7c1

🔍 GitLeaks

Status: ⏭️ Skipped


Generated by Argus

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 19, 2026

🔍 OpenGrep SAST Results

Branch: feat/branching-and-deploy-baseline
Commit: fa6b7c1

🔍 OpenGrep SAST

Status: Completed

Findings Summary

Error Warning Info Total
0 0 0 0

No security findings detected.

Artifacts: OpenGrep Reports


Generated by Argus

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 19, 2026

🐍 Bandit Python Security Results

Branch: feat/branching-and-deploy-baseline
Commit: fa6b7c1

🔍 Bandit Python Security

Status: ✅ Completed

📊 Findings Summary

🔴 High 🟠 Medium 🟢 Low 📦 Total
0 0 0 0

No security findings detected!

📁 Artifacts: Bandit Reports


Generated by Argus

Same class of bug Muster had in muster#105: pull_request workflows scoped
to `branches: [main]` only, which skips every check on feature PRs into
develop. Fixes it in the template so new repos don't inherit the gap.

Changes:
- .github/workflows/security.yml — add develop to push + pull_request branches
- .github/workflows/ci.yml — new placeholder workflow that runs on PRs into
  main OR develop; ships with TODOs for contributors to fill in real
  lint/typecheck/test/build steps for their stack
- docs/BRANCHING.md — new "CI / Required Checks" section explaining the
  required-status-check story
- scripts/init-repo.sh — branch protection now requires the "Lint, Type
  Check, Build" status check on both main and develop, so red CI blocks
  merging from day one

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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