Repository navigation
Description
Summary
Comprehensive CI/CD audit and release hardening plan for v0.5.0. All workflows reviewed, gaps identified, release checklist proposed. This is a planning issue β no code changes yet.
π Full Audit Findings
β What's Solid
-
10 workflows deployed and mirrored
.github/workflows/βtemplates/workflows/β verified byte-perfect mirrors- All 10 workflows: ci, docs, heartbeat, issue-assign, label-enforce, main-guard, preview, release, triage, sync-labels
-
Guard workflow is robust
squad-main-guard.ymlblocks.ai-team/**andteam-docs/**from main/preview- Pagination support (handles PRs with >100 files)
- Actionable error messages with fix commands
- Allows removals (deleting forbidden files is fine)
-
Test suite coverage
- 45 passing tests (mcp-config, plugin-marketplace, workflows)
- Tests validate workflow template mirroring
- State integrity validated (upgrade doesn't corrupt
.ai-team/)
-
Release workflow is idempotent
squad-release.ymlchecks for existing tags before creating- Prevents duplicate releases
- Uses
ghCLI for GitHub Release creation (no PAT needed)
-
Documentation deployment is independent
squad-docs.ymlhas manual trigger (workflow_dispatch)- Deploys from
previewbranch whendocs/**changes - Brady's requirement met: docs can be updated without cutting a release
-
Team workflows are isolated
- 6 team workflows (heartbeat, triage, issue-assign, label-enforce, sync-labels) don't depend on releases
- Read
.ai-team/team.mdwhich is excluded from main/preview by guard - No risk of state corruption during release
-
Three-layer state protection
.gitignoreexcludes.ai-team/locallypackage.jsonfilesarray excludes.ai-team/from distributionsquad-main-guard.ymlblocks.ai-team/PRs to main/preview
β οΈ Gaps and Risks
1. No formal release checklist
- Gap: Process documented in
docs/scenarios/release-process.mdbut no step-by-step checklist with STOP gates - Risk: Human error during releases (wrong version, missing CHANGELOG entry, skipped validation)
- Impact: Medium β increases likelihood of botched releases
2. No patch release workflow
- Gap: Bug fixes (0.4.1, 0.4.2) require manual process
- Risk: Patch releases bypass CI validation
- Impact: Medium β hotfixes could ship without proper testing
3. Version field in package.json is stale
- Current:
0.4.0in package.json - CHANGELOG.md: Documents features for future releases (0.4.0 already shipped per history.md)
- Risk: Could ship next release with wrong version number
- Impact: High β version mismatch would break
npx github:bradygaster/squad#v{version}pinning
4. No CI validation of version consistency
- Gap: CI doesn't check that package.json version matches CHANGELOG.md
- Risk: Could tag
v0.5.0but ship0.4.0in package.json - Impact: High β users would get wrong version
5. No automated previewβmain workflow
- Gap: Human must manually merge preview to main after validation
- Risk: Merge conflicts, human forgets to merge, manual errors
- Impact: Low β manual merge is safer until process is battle-tested
6. Branch protection rules not documented
- Gap: Workflows enforce constraints but repo settings are opaque
- Risk: Someone with admin access could push directly to main, bypassing guard
- Impact: Medium β direct pushes could corrupt state
7. Guard only runs on PRs, not direct pushes
- Gap: If branch protection rules aren't set, direct push to main bypasses guard
- Risk: Admin could accidentally push
.ai-team/directly to main - Impact: Medium β would corrupt distribution
π Proposed Release Checklist
Create docs/release-checklist.md with three release types:
Patch Release (0.4.1)
When: Bug fixes only, no new features
Human steps:
- β STOP: Verify only bug fixes in this release (no "Added" or "Changed" in CHANGELOG.md)
- Update CHANGELOG.md with
## [0.4.X] β YYYY-MM-DDand "### Fixed" section - Update
versionin package.json to0.4.X - Commit to dev:
git commit -m "chore: prepare patch release v0.4.X" - Push to dev:
git push origin dev - Run tests on dev:
gh workflow run squad-ci.yml --ref dev - β STOP: Verify CI passes
- Checkout main:
git checkout main && git pull origin main - Cherry-pick commit:
git cherry-pick <commit-sha>OR merge:git merge --no-ff dev - Push to main:
git push origin main - β STOP: Verify release workflow succeeds
- Tag release:
git tag -a v0.4.X -m "Release v0.4.X: <summary>" - Push tag:
git push origin v0.4.X - β STOP: Verify GitHub Release created
Kobayashi MUST refuse if:
- CHANGELOG.md has "Added" or "Changed" sections (not a patch)
- Version in package.json doesn't match tag
- Tests fail on dev or main
Minor Release (0.5.0)
When: New features, breaking changes OK before v1
Human steps:
- β STOP: Verify features documented in CHANGELOG.md under "### Added" or "### Changed"
- Update CHANGELOG.md with
## [0.5.0] β YYYY-MM-DD - Update
versionin package.json to0.5.0 - Commit to dev:
git commit -m "chore: prepare release v0.5.0" - Push to dev:
git push origin dev - Run tests on dev:
gh workflow run squad-ci.yml --ref dev - β STOP: Verify CI passes on dev
- Create preview branch:
git checkout -b release/previewOR reset existing:git checkout release/preview && git reset --hard dev - Remove forbidden files:
git rm --cached -r .ai-team/ 2>/dev/null; git rm --cached -r team-docs/ 2>/dev/null - Commit removal:
git commit -m "chore: remove forbidden paths for preview" 2>/dev/null(OK if nothing to remove) - Push preview:
git push -f origin release/preview - β STOP: Verify guard workflow passes on preview branch
- β STOP: Verify preview validation workflow passes
- Create PR to main:
gh pr create --base main --head release/preview --title "Release v0.5.0" --body "Full release. Guard enforces file restrictions." - β STOP: Human reviews PR and approves
- Merge PR to main:
gh pr merge --merge --auto - β STOP: Verify release workflow succeeds (auto-creates tag and GitHub Release)
- Sync back to dev:
git checkout dev && git merge main --no-ff && git push origin dev
Kobayashi MUST refuse if:
- Version in package.json doesn't match intended release
- CHANGELOG.md doesn't have entry for this version
- Guard workflow fails on preview
- Tests fail on preview
- Human hasn't confirmed "go for release"
Major Release (1.0.0)
When: Breaking changes after v1, or first stable release
Human steps:
- All steps from Minor Release above
- β STOP: Verify CHANGELOG.md has "### Breaking Changes" section if applicable
- β STOP: Verify migration guide exists if breaking changes present
- Post community announcement (Discussions, blog post, social)
Kobayashi MUST refuse if:
- Any Minor Release STOP gate fails
- Breaking changes documented but no migration guide exists
π§ Proposed Changes
Priority 0 (block v0.5.0)
1. Create release checklist
- Create
docs/release-checklist.mdwith content above - Link from
docs/scenarios/release-process.md
2. Fix package.json version field
- Immediate action: Set to next planned version (
0.5.0or0.4.1) - Question for Brady: What's the next release number?
3. Add version validation to CI
- Add step to
squad-preview.yml:
- name: Validate version consistency
run: |
VERSION=$(node -e "console.log(require('./package.json').version)")
CHANGELOG_VERSION=$(grep -m1 "## \[$VERSION\]" CHANGELOG.md || echo "")
if [ -z "$CHANGELOG_VERSION" ]; then
echo "::error::Version $VERSION not found in CHANGELOG.md"
exit 1
fi
echo "β
Version $VERSION validated in CHANGELOG.md"- Add same step to
squad-release.ymlbefore creating tag
Priority 1 (ship with v0.5.0)
4. Document branch protection rules
Add section to docs/scenarios/release-process.md:
Required branch protection settings:
-
main:
- β Require pull request before merging (1 approval)
- β
Require status checks to pass:
Squad CI,Squad Protected Branch Guard - β Require branches to be up to date
- β Do not allow force pushes
- β Do not allow deletions
-
preview:
- β
Require status checks to pass:
Squad Protected Branch Guard,Squad Preview Validation - β Require branches to be up to date
- β Do not allow force pushes
- β Do not allow deletions
- β
Require status checks to pass:
-
dev:
- No restrictions (team works freely)
5. Create patch release workflow
Option A: Add input to existing squad-release.yml:
on:
push:
branches: [main]
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
default: 'minor'
type: choice
options:
- patch
- minor
- majorOption B: Create separate squad-patch-release.yml (cleaner separation)
Validation in patch workflow:
- Check CHANGELOG.md has "### Fixed" section for this version
- Check CHANGELOG.md has NO "### Added" or "### Changed" sections
- Fail if features detected in patch release
Priority 2 (future)
6. Automated previewβmain merge
- Add
workflow_dispatchinput tosquad-release.ymlto trigger previewβmain merge - Requires human approval via GitHub UI (button click, not CLI)
7. Version auto-increment
- Add CLI subcommand:
squad version bump patch|minor|major - Updates package.json, creates CHANGELOG.md entry stub
- Commits changes to dev
β Questions for Community
-
Patch release strategy: Should hotfixes branch off main (
hotfix/0.4.1) or always come from latest dev?- Option A (safer): Hotfix branches off main, cherry-picked back to dev
- Option B (simpler): Always patch from dev, merge to main
-
Preview branch lifespan: Should preview be deleted after merge to main, or kept as permanent staging?
- Option A (cleaner): Delete after merge, recreate for next release
- Option B (persistent): Keep as permanent staging branch
-
Automated merge: Should release workflow auto-merge previewβmain after guard passes, or require human approval?
- Option A (faster): Auto-merge if guard + CI pass
- Option B (safer): Human must approve PR
-
Version bumping: Should Kobayashi auto-increment version in package.json during release, or require human to update beforehand?
- Option A (automated): Workflow reads current version, increments, commits
- Option B (manual): Human updates package.json before triggering release
-
Release notes: Should GitHub Release notes be auto-generated (
--generate-notes) or pulled from CHANGELOG.md?- Current: Auto-generated
- Option B: Parse CHANGELOG.md and use that version's content
-
Branch protection enforcement: Should we add a CI check that verifies branch protection rules are set correctly?
- Why: Prevents admin from accidentally disabling protections
π― Risk Assessment
| Risk | Severity | Mitigation |
|---|---|---|
| Ship wrong version number | π΄ High | P0: Add version validation to CI |
| Human error during release | π‘ Medium | P0: Create formal checklist with STOP gates |
| Hotfix bypasses CI | π‘ Medium | P1: Create patch release workflow |
| Direct push bypasses guard | π‘ Medium | P1: Document branch protection rules, verify they're set |
| Team workflows read stale state | π’ Low | Guard prevents .ai-team/ from shipping; workflows already safe |
π¦ Implementation Plan
Phase 1 (before v0.5.0):
- Create release checklist document
- Fix package.json version
- Add version validation to preview and release workflows
Phase 2 (ship with v0.5.0):
- Document branch protection rules
- Create patch release workflow
- Test entire release process with v0.5.0
Phase 3 (v0.6.0+):
- Automated previewβmain merge
- Version auto-increment CLI command
- CHANGELOG.md parsing for release notes
π Next Steps
- Community discussion on questions above
- Brady approval on priority and scope
- Implementation by Kobayashi (or delegate to squad)
- Test run with v0.5.0 release
Filed by: Kobayashi (Git & Release Engineer)
Filed on: 2026-02-15
Status: Awaiting community feedback
cc @bradygaster
Activity
bradygaster commentedon Feb 15, 2026
π¬ Brady's Follow-Up β Branch Strategy & Separation of Concerns
Brady added critical context that reshapes several of the questions above:
Directive: Push back on wrong decisions
What this means for Kobayashi: I should validate preconditions on EVERY request β including which branch a PR targets. If someone (including Brady) says "PR to dev" but the work is a hotfix that should go straight to main, I refuse and explain why. This isn't about being difficult β it's about the process being smarter than any individual decision.
Directive: Three Independent Lanes
Brady crystallized the core goal:
This answers several of the open questions:
Q1 (Patch release strategy): This argues for Option A (hotfix off main) β if the goal is independent lanes, patches shouldn't have to go through the full devβpreviewβmain pipeline. A hotfix branch off main, cherry-picked back to dev, keeps the lanes independent.
Q2 (Preview branch): This argues for persistent preview β it's the staging lane for software. Docs have their own lane (
squad-docs.ymlalready deploys from preview independently). Deleting preview would conflate the lanes.Q3 (Automated merge): This argues for Option B (human approval) β Brady explicitly wants STOP gates. Auto-merge removes a gate.
Q5 (Release notes): With three independent lanes, release notes should come from CHANGELOG.md (Option B) β auto-generated notes would include docs commits, team-state commits, and other noise from the wrong lanes.
Branch-to-Lane Mapping (Proposed)
mainnpx github:bradygaster/squadinstallspreviewdevhotfix/*docs(or trigger)What Kobayashi Should Refuse
Adding to the checklist's STOP gates:
This is the kind of feedback I was hoping for. These directives make the release plan significantly more opinionated β which is exactly what "bullet-proof" means.
I'll update the checklist with these lanes and STOP gates when we move to implementation.
β Kobayashi
bradygaster commentedon Feb 18, 2026
Week 1 Priority: Insider Program Setup
Brady directive (Feb 18): Insider Program (nightly builds) ships FIRST in v0.5.0, not Week 3. This enables incremental testing as #69, #76, #86 land.
Your Week 1 task:
insiderbranch (auto-publishes to npm withinsiderdist-tag)v0.5.0-insider+{commit}for bug reportingnpx github:bradygaster/squad#insider[INSIDER]recognitionWhy first: Contributors can test #69 migration, #76 refactor, #86 fix as they merge to dev β not waiting until Week 3 beta. Testing infrastructure before features.
Timeline: Complete by Feb 21 (end of Week 1) so McManus's blog post #1 can announce "insider program open NOW"
Full directive in
.ai-team/decisions/inbox/copilot-directive-nightly-first.mdbradygaster commentedon Feb 18, 2026
Week 1 Priority: Insider Program Setup
Brady directive (Feb 18): Insider Program (nightly builds) ships FIRST in v0.5.0, not Week 3. This enables incremental testing as #69, #76, #86 land.
Your Week 1 task:
insiderbranch (auto-publishes to npm withinsiderdist-tag)v0.5.0-insider+{commit}for bug reportingnpx github:bradygaster/squad#insider[INSIDER]recognitionWhy first: Contributors can test #69 migration, #76 refactor, #86 fix as they merge to dev β not waiting until Week 3 beta. Testing infrastructure before features.
Timeline: Complete by Feb 21 (end of Week 1) so McManus's blog post #1 can announce "insider program open NOW"
Full directive in
.ai-team/decisions/inbox/copilot-directive-nightly-first.mdchore: v0.5.0 release hardening β version bump, CI validation, releasβ¦
bradygaster commentedon Feb 20, 2026
Implemented by PR #120 (merged to dev). Version bumped to 0.5.0, CI version validation added to squad-preview.yml and squad-release.yml, release checklist added at docs/release-checklist.md, CHANGELOG updated.