Repository navigation
Description
Problem Statement
Every PR push to bradygaster/squad triggers ~19 separate runner instances across 4 workflows (Squad CI, Repo Health, PR Readiness, Impact Analysis). With 12+ open PRs getting frequent pushes, this creates significant Actions minute consumption. Many of these runners do <10 seconds of actual work but each incurs 1-2 minutes of runner boot overhead.
This is a consolidation PRD ΓÇö the safety gates stay, they just get packaged more efficiently.
PRD v3 update: This PRD now includes a greenfield target architecture (4-5 runners per PR push) as the end state. The phased proposals below are the migration path toward that target. See Target Architecture (Greenfield) for the full design.
Current State (Per-PR Push)
| Workflow | File | Jobs | Notes |
|---|---|---|---|
| Squad CI | squad-ci.yml |
11 | changes, docs-quality, test, changelog-gate, changelog-protection, exports-map-check, samples-build, publish-policy, workspace-integrity, prerelease-version-guard, export-smoke-test |
| Repo Health | squad-repo-health.yml |
5 | bootstrap-protection, diff-guard, squad-leakage, architectural-review, security-review. Each spins up its own runner with checkout + fetch-depth:0 + setup-node + git fetch for scripts that run in <10 seconds. |
| PR Readiness | squad-pr-readiness.yml |
1 | Runs TWICE per push (once on pull_request_target, once on workflow_run after CI completes) |
| Impact Analysis | squad-impact.yml |
1 | Single job |
| Total | ~19 | Per PR push |
Proposal
Priority 1 ΓÇö High Impact
1. Consolidate Repo Health into 1-2 jobs (currently 5)
The 5 repo-health jobs (bootstrap-protection, diff-guard, squad-leakage, architectural-review, security-review) each spin up a runner, do full checkout with fetch-depth:0, setup-node, and git fetch. The actual scripts run in seconds.
Action: Consolidate into a single job with sequential script steps. Use fetch-depth: 0 (required by all sub-checks). Three jobs post PR comments via repo-health-comment.mjs ΓÇö comment logic must handle sequential outputs with unique step IDs.
Debugging visibility: Use if: always() on every step so all checks run even if one fails. Add a final summary step that writes a per-check pass/fail table to $GITHUB_STEP_SUMMARY. Name each step clearly ΓÇö GitHub Actions UI shows step names within a job.
Savings: ~4 runner boot-ups per PR push (~8 min).
2. Consolidate Squad CI lightweight policy gates into 1 job (currently 6)
changelog-gate, changelog-protection, exports-map-check, workspace-integrity, prerelease-version-guard, and publish-policy are all lightweight checks that read files and grep ΓÇö each gets its own runner for <5 seconds of work. (samples-build and export-smoke-test are excluded ΓÇö they require full SDK builds and are not lightweight.)
Action: Merge into a single "policy-gates" job. Preserve per-step skip labels (skip-changelog, skip-exports-check, skip-workspace-check, skip-version-check, skip-export-smoke) as step-level if: conditions. Preserve per-step feature flags (vars.SQUAD_*) independently ΓÇö do NOT use a single "skip-policy-gates" label.
Note on Proposals 10 & 11:
publish-policyandchangelog-protectionare consolidated INTO this job rather than removed. See Priority 3 rationale below.
Debugging visibility: Use if: always() on every step + write per-gate pass/fail to $GITHUB_STEP_SUMMARY. Each skip-label evaluated independently per-step:
- name: Check skip-changelog label
id: skip-changelog
run: |
LABELS='${{ toJSON(github.event.pull_request.labels.*.name) }}'
if echo "$LABELS" | grep -q "skip-changelog"; then echo "skip=true" >> "$GITHUB_OUTPUT"; fi
- name: Changelog gate
if: always() && steps.skip-changelog.outputs.skip != 'true'
run: node scripts/changelog-gate.mjsSavings: ~5 runner boot-ups per PR push (~8 min).
3. Reduce PR Readiness duplicate runs (revised)
Original: Remove pull_request_target trigger entirely.
Revised (per Booster, FIDO review): Removing pull_request_target entirely loses the edited and ready_for_review event types that workflow_run doesn't provide. PR description edits and draft→ready transitions would stop updating readiness.
Action: Keep pull_request_target for edited and ready_for_review events only. Remove it for opened, synchronize, and reopened ΓÇö those are covered by the workflow_run trigger (fires after Squad CI completes).
# Before:
pull_request_target:
types: [opened, synchronize, reopened, edited, ready_for_review]
# After:
pull_request_target:
types: [edited, ready_for_review]Savings: Eliminates the redundant full-push run while preserving event coverage.
4. Add path-based filtering to squad-ci.yml (revised)
Original: Add paths-ignore: at workflow level.
Revised (per FIDO, Booster review): Workflow-level paths-ignore can leave required status checks stuck in "pending" state, blocking merges for docs-only PRs. GitHub does not auto-pass skipped required checks ΓÇö they just never report.
Action: Use paths-filter action with conditional job execution instead of top-level paths-ignore. The changes job pattern already partially exists in squad-ci.yml ΓÇö extend it to gate the full pipeline. This ensures the workflow still triggers (satisfying required checks) but individual jobs exit early when irrelevant.
docs-quality orphaning: If the entire workflow gates on code paths, docs-quality gets skipped on docs-only PRs. Move docs-quality to its own lightweight workflow triggered on docs paths, or to squad-repo-health.yml.
Savings: ~15 min per docs-only push (jobs still report but exit immediately).
5. Add missing concurrency groups ΓÇö split policy (revised)
Original: Add cancel-in-progress: true to all 10 workflows.
Revised (per Booster, RETRO, FIDO — all flagged this as 🔴 CRITICAL): cancel-in-progress: true on publish/release workflows is dangerous. Cancelling an in-flight publish can leave packages partially published (e.g., SDK on npm registry but CLI not yet published).
Action: Split into two concurrency policies:
| Policy | Workflows | Behavior |
|---|---|---|
Cancel stale runs (cancel-in-progress: true) |
squad-scope-check, squad-preview, sync-squad-labels |
Safe ΓÇö read-only or idempotent checks |
Queue, don't cancel (cancel-in-progress: false) |
squad-release, squad-promote, squad-insider-release, squad-insider-publish, squad-npm-publish |
Prevents partial publishes ΓÇö queued run waits for current to finish |
Dropped from proposal: squad-docs-links ΓÇö workflow_dispatch only, no rapid-push risk.
# PR/validation workflows:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Publish/release workflows:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: falseSavings: Eliminates stacked redundant runs on rapid pushes without risking partial publishes.
Priority 2 ΓÇö Medium Impact
6. Consolidate issue-event workflows (3 → 1)
squad-triage, squad-issue-assign, and squad-label-enforce all fire on issues: [labeled]. That's up to 3 runners for a single label click (though if: conditions on squad-triage and squad-issue-assign already prevent boot for non-matching labels ΓÇö squad-label-enforce has no such guard).
Action: Consolidate into squad-issue-ops.yml. Add a combined filter. Note: squad-issue-assign uses secrets.COPILOT_ASSIGN_TOKEN PAT ΓÇö the combined workflow needs this secret.
Savings: 1-2 runners per label event.
7. Share build artifacts in publish pipelines
squad-insider-publish (5 jobs, ~20-30 min) and squad-npm-publish (6 jobs, ~25-35 min) both rebuild npm install + build 2-3x across jobs.
Action: Use upload-artifact/download-artifact to build once and share.
Artifact integrity requirements (per RETRO):
- Verify artifact digests ΓÇö use
actions/upload-artifact@v4immutable artifacts - Pin action versions by SHA (not just
@v4) to prevent supply chain attacks via tag mutation - Verify
npm publish --provenanceSLSA attestations still work when build and publish are in separate jobs (publish job must haveid-token: write) - Only share
dist/build outputs ΓÇö never sharenode_modules/ - Build job never sees
NPM_TOKEN(principle of least privilege)
Savings: 15-20 min per publish.
8. Cache Playwright browsers in CI
Playwright installed every CI run (~2 min) without caching. Note: --with-deps installs system apt packages that won't be cached ΓÇö only the browser binary (~150MB) benefits.
Action: Add actions/cache for Playwright browser binaries with version key.
Savings: ~1-1.5 min per CI run.
9. Extract reusable composite action for test logic
ci-rerun.yml duplicates the entire squad-ci test job.
Action: Extract into .github/actions/test-squad-ci/ composite action.
Savings: Eliminates drift between CI and rerun workflows.
Priority 3 ΓÇö Consolidate, Not Remove
Design change from v1: Team review determined that proposals 10 and 11 should be consolidated into the policy-gates job (Proposal 2) rather than removed entirely. Both checks are lightweight (<5 seconds) and enforce policies that cannot be reliably enforced outside CI.
10. Consolidate publish-policy into policy-gates (revised)
Original: Remove and move to pre-commit hook.
Revised (per RETRO, FIDO): Pre-commit hooks are client-side and bypassable with --no-verify. A contributor or bot could add bare npm publish to a workflow file undetected. The check is a 2-second grep ΓÇö costs nothing as a step.
Action: Keep as a step in the consolidated "policy-gates" job. No separate runner needed.
11. Keep changelog-protection in policy-gates (revised)
Original: Remove as redundant with changelog-gate.
Revised (per Booster, FIDO): These enforce different policies:
changelog-gate: Requires a changeset file exists when SDK/CLI source changes (and allows direct CHANGELOG.md edits as an alternative)changelog-protection: Restricts who can directly edit CHANGELOG.md to approved authors (bradygaster, bots)
Without changelog-protection, any contributor could bypass the changeset workflow by editing CHANGELOG.md directly. These are complementary, not redundant.
Action: Keep as a step in the consolidated "policy-gates" job. No separate runner needed.
Target Architecture (Greenfield)
Added in PRD v3 based on Flight's greenfield CI analysis. The phased proposals above are the migration path; this section describes the end state all phases work toward.
The core insight: organize CI around resource tiers, not feature categories. Every safety feature falls into a resource tier based on what it actually needs to run. The current system often boots a Tier 4 runner (full npm install + build + Playwright — 4 min setup) for Tier 0 work (grep a file — 3 seconds).
Resource Tier Model
| Tier | What It Needs | Setup Time | Features | Example Checks |
|---|---|---|---|---|
| Tier 0 — Zero-install | actions/checkout only. git diff, grep, node -e (pre-installed). |
~45s | 14 | Changelog gate, publish-policy, workspace-integrity, scope-boundary, version guard |
| Tier 1 — Node-only | actions/setup-node but NO npm install. Runs .mjs scripts with node:* built-ins. |
~55s | 10 | Bootstrap protection, squad leakage, architectural review, security review, impact analysis, exports-map-check |
| Tier 2 — Sparse install | Installs specific tools (markdownlint-cli2, cspell) but not the full monorepo. |
~75s | 5 | Markdown linting, spelling check, docs build |
| Tier 3 — Full install + build | Full npm ci + npm run build. |
~180s | 5 | Export smoke test, samples build, npm publish |
| Tier 4 — Full install + build + browser | Everything in Tier 3 plus Playwright browser install. | ~240s | 6 | Full test suite, CI rerun, insider build+test |
| API-only | actions/github-script or gh CLI. Sparse or no checkout. |
~30s | 8 | Label enforcement, triage, issue assignment, heartbeat |
Target Workflow Layout (10 workflows)
The end state consolidates 19 workflows into 10, organized by event lifecycle and resource tier:
PR Lifecycle (3 workflows, 4-5 runners per push)
squad-pr-validate.yml — All read-only PR checks in ONE runner
Trigger: pull_request_target [opened, synchronize, reopened, edited, ready_for_review]
Security: checkout BASE only, fetch PR head as ref, NEVER execute PR code
Runner count: 1
Job: validate (Tier 1, ~60-90s actual work)
Steps (all with if: always()):
├─ Checkout base (fetch-depth: 0, persist-credentials: false)
├─ Fetch PR head ref (refs/pull/<N>/head — fork-safe)
├─ Setup Node 22
├─ Path change detection → outputs: code_changed, docs_changed
├─ Changelog gate
├─ Changelog protection
├─ Publish policy
├─ Workspace integrity
├─ Prerelease version guard
├─ Scope boundary (if repo-health branch/label)
├─ Canary check + large deletion guard
├─ Exports map check
├─ Bootstrap zero-dep protection
├─ Diff guard (contamination heuristic)
├─ Squad leakage detection → post PR comment
├─ Architectural review → post PR comment
├─ Security review → post PR comment
├─ Impact analysis → post PR comment
├─ PR readiness scoring (on all event types)
└─ Summary → $GITHUB_STEP_SUMMARY with per-check pass/fail table
This consolidates features from 5 current workflows (squad-ci policy gates, squad-repo-health, squad-impact, squad-scope-check, squad-pr-readiness) into 1 runner. The existing repo-health-comment.mjs upsert pattern continues to work — consolidate execution, not comment format.
Security invariant: This workflow NEVER executes PR code. It checks out BASE branch scripts and reads PR content via
git diffonly. Fork-safe diff access usesrefs/pull/<number>/head. No PR metadata is interpolated into shell commands — all metadata access goes through Node + GitHub API.
squad-pr-ci.yml — Build & test (the expensive stuff)
Trigger: pull_request [opened, synchronize, reopened] on [dev, preview, main, insider]
Concurrency: cancel-in-progress: true
Runner count: 1-2 (conditional on what changed)
Job 1: full-ci (Tier 4, ~8-10min) — if code_changed
├─ npm install + build + Playwright install
├─ npm test
├─ [if: always()] Export smoke test (reuses build — no extra runner)
└─ [if: always()] Samples build (reuses build — no extra runner)
Job 2: docs-quality (Tier 2, ~30s) — if docs_changed
├─ npm install --no-save markdownlint-cli2 cspell
├─ markdownlint
└─ cspell
squad-readiness-post-ci.yml — Update readiness after CI
Trigger: workflow_run [Squad PR CI] completed
Runner count: 1 (Tier 1, ~10s)
Issue Lifecycle (1 workflow, 1 runner per event)
squad-issue-ops.yml — All issue operations in one runner
Trigger: issues [labeled, closed], pull_request [closed], workflow_dispatch
Runner count: 1
Job: ops (API-only + sparse checkout, ~15s)
├─ Rate limit check
├─ [if go:/release:/type:/priority: label] Label enforcement
├─ [if 'squad' label] Triage + routing
├─ [if 'squad:*' label] Assignment
├─ [if 'squad:copilot' label] Copilot agent assignment (PAT)
├─ [if closed] Orphan label repair
├─ [if closed] Smart triage
└─ [if closed] Copilot auto-assign
Consolidates: squad-triage, squad-issue-assign, squad-label-enforce, squad-heartbeat (4 → 1).
Release & Publish (3 workflows)
squad-insider.yml — Insider pipeline (push to insider)
Runner count: 2-3
Job 1: build-and-test (Tier 4)
Job 2: publish SDK + CLI with insider tag (Tier 3, needs Job 1)
Job 3: create insider release tag (Tier 1, needs Job 1)
Consolidates: squad-insider-publish + squad-insider-release (2 → 1).
squad-npm-publish.yml — Production publish (release event)
Runner count: 3
Job 1: validate + build + smoke test (Tier 4)
Job 2: publish SDK with provenance (Tier 3, needs Job 1)
Job 3: publish CLI with provenance (Tier 3, needs Job 2)
squad-release.yml — Production release (push to main)
Runner count: 1 (Tier 1)
- node --test + CHANGELOG validation + tag + GitHub release
Operational (3 workflows, infrequent triggers)
| Workflow | Trigger | Runners | Change from Current |
|---|---|---|---|
squad-docs.yml |
Push to main (docs path) | 2 | Unchanged |
sync-squad-labels.yml |
Push to team.md | 1 | Unchanged |
squad-promote.yml |
Manual | 2 | Unchanged |
Manual-only workflows kept as-is:
ci-rerun.ymlandsquad-docs-links.ymlremain separate manual workflows. They fire infrequently and don't contribute to per-PR runner waste.
Target Runner Counts (End State)
| Event | Current (19 wf) | PRD Incremental (9-11) | Greenfield Target (4-5) |
|---|---|---|---|
| PR push (code change) | ~19 runners | 9-11 runners | 4-5 runners |
| PR push (docs-only) | ~19 runners | 4-5 runners | 3 runners |
| Issue labeled | 1-3 runners | 1-2 runners | 1 runner |
| Push to insider | 5 runners | 5 runners | 3 runners |
| Production release | 6-7 runners | 6-7 runners | 4 runners |
| Manual promote | 2 runners | 2 runners | 2 runners |
How Phases Map to Greenfield Target
Each PRD phase moves the architecture closer to the greenfield end state:
| Phase | PRD Proposal | Greenfield Contribution |
|---|---|---|
| Phase 0 | Branch protection audit | Same — prerequisite for all check renaming |
| Phase 1 | Consolidate repo-health (5→1) + policy-gates (6→1) | Extended: consolidate BOTH into squad-pr-validate.yml along with impact, scope-check, and readiness |
| Phase 2 | Path filters + concurrency | Same — but full-ci job now includes export-smoke-test and samples-build as post-build steps |
| Phase 3 | Issue workflow consolidation (3→1) | Extended: also absorb squad-heartbeat into squad-issue-ops.yml (4→1) |
| Phase 4 | Publish pipeline optimization | Extended: merge insider-publish + insider-release into squad-insider.yml |
Impact Estimate
| Metric | Current (19 wf) | Incremental (Proposals 1-11) | Greenfield Target |
|---|---|---|---|
| Runners per PR push (code) | ~19 | ~9-11 | 4-5 |
| Runner boot overhead per push | ~28 min | ~15 min | ~6 min |
| Actual CI work per push | ~12 min | ~12 min | ~10 min |
| Wasted runner-minutes per push | ~16 min | ~8 min | ~2-3 min |
| Docs-only PR cost | Full CI (~15 min) | Early-exit (~1 min) | Early-exit (~1 min) |
| Stacked runs on rapid push | Unlimited | Cancel/Queue split | Cancel/Queue split |
| Label-event runners | 3 | 1-2 | 1 |
| Insider push runners | 5 | 5 | 3 |
| Publish pipeline runners | 5-6 | 5-6 | 3 |
| Time-to-green (wall clock) | ~10-12 min | ~10-12 min | ~9-10 min |
Note: Incremental target revised from 8-10 to 9-11 per review feedback. Greenfield target of 4-5 runners per PR push is the end state, achieved by organizing around resource tiers rather than feature categories. See Flight's analysis for full details.
Implementation Approach
Target state: Each phase below moves toward the greenfield target architecture. The incremental proposals are the migration path; the greenfield layout is the destination.
| Phase | Items | Risk | Notes |
|---|---|---|---|
| Phase 0 | Branch Protection Audit | None | Prerequisite for all phases. Audit Settings → Branches → Branch protection rules for dev, main, preview, and insider. Document all required status check names. Renaming/consolidating a required check = merges blocked until branch protection is updated. |
| Phase 1 | Consolidations (1-3) | Low | Safe, behavior-preserving. Land repo-health consolidation first (lowest risk), then policy-gates, then PR Readiness. |
| Phase 2 | Path filters + concurrency (4-5) | Medium | Requires branch protection coordination. Use paths-filter action (not paths-ignore). Split concurrency policy for publish safety. Address docs-quality orphaning. |
| Phase 3 | Issue workflow consolidation (6) | Medium | Requires testing label routing with each event type. Needs COPILOT_ASSIGN_TOKEN secret. |
| Phase 4 | Publish pipeline optimization (7-9) | Medium | Requires artifact integrity verification, provenance chain testing, and dry-run publish. |
Rollback Plan
Each phase can be independently reverted by restoring the original workflow YAML files. No data migrations or external state changes are involved ΓÇö all changes are to .github/workflows/ files.
| Phase | Rollback Procedure |
|---|---|
| Phase 0 | No changes to revert (audit only) |
| Phase 1 | Restore original job definitions in squad-ci.yml and squad-repo-health.yml. Re-push to branch. Update branch protection rules back to original check names if changed. |
| Phase 2 | Remove paths-filter conditions and concurrency blocks. Restore workflow-level triggers. Move docs-quality back if relocated. |
| Phase 3 | Restore squad-triage.yml, squad-issue-assign.yml, squad-label-enforce.yml. Remove squad-issue-ops.yml. |
| Phase 4 | Remove upload-artifact/download-artifact steps. Restore per-job npm install && npm run build steps in publish workflows. |
Canary testing: Before each phase merges, open a test PR that intentionally violates each gate to confirm it still blocks. For publish pipeline changes, do a manual workflow_dispatch dry-run publish with a prerelease tag (e.g., 0.0.0-ci-test).
Non-Goals
- Changing what checks exist (the safety gates stay, just packaged more efficiently)
- Modifying test coverage or test behavior
- Changing CI trigger semantics (same events, fewer runners) ΓÇö note: Proposals 3 and 4 do modify when workflows fire, but preserve the same event coverage
Success Metrics
- Phase gate: Runners per PR push reduced from ~19 to ~9-11 (incremental)
- End state: Runners per PR push reduced to ~4-5 (greenfield target)
- No CI failures introduced by consolidation
- All existing safety gates still enforced (including
publish-policyandchangelog-protection) - PR readiness still updates after CI completes, on description edit, and on draft→ready
- Docs-only PRs exit early without leaving required checks in pending state
- Rapid pushes cancel stale validation runs but queue publish/release runs
- Skip labels continue to work independently per-check in consolidated jobs
-
$GITHUB_STEP_SUMMARYshows clear per-gate pass/fail in consolidated jobs
Owner
Booster (CI/CD specialist) ΓÇö primary implementer
Flight (Lead) ΓÇö review and approval
Review Feedback Incorporated
PRD v2 ΓÇö updated based on full team review (5 reviewers: PAO, EECOM, RETRO, Booster, FIDO). All reviewers approved with changes.
| # | Finding | Source | Resolution |
|---|---|---|---|
| 1 | Concurrency groups need split policy ΓÇö cancel-in-progress: true dangerous on publish/release |
Booster 🔴, RETRO 🔴, FIDO 🔴 | Fixed in Proposal 5. Split into cancel (validation) vs queue (publish/release). |
| 2 | Don't fully remove pull_request_target ΓÇö loses edited and ready_for_review events |
Booster 🔴, FIDO 🔴 | Fixed in Proposal 3. Keep pull_request_target for edited/ready_for_review only. |
| 3 | changelog-protection is NOT redundant ΓÇö enforces different policy than changelog-gate |
Booster 🔴, FIDO 🔴 | Fixed in Proposal 11. Moved from "Removals" to "Consolidate into policy-gates." |
| 4 | Keep publish-policy as CI check ΓÇö pre-commit hooks are bypassable |
RETRO 🟡, FIDO 🔴 | Fixed in Proposal 10. Moved from "Removals" to "Consolidate into policy-gates." |
| 5 | Debugging visibility in consolidated jobs | EECOM 🟡, FIDO 🟡 | Added if: always() + $GITHUB_STEP_SUMMARY mitigations to Proposals 1 and 2. |
| 6 | paths-ignore breaks required status checks |
FIDO 🔴, Booster 🔴 | Fixed in Proposal 4. Changed to paths-filter action with conditional job execution. |
| 7 | Add Phase 0 — Branch Protection Audit | Booster 🟡, FIDO 🟡 | Added as prerequisite phase in Implementation Approach. |
| 8 | docs-quality orphaning on path filters |
EECOM 🟡 | Addressed in Proposal 4. Recommend moving docs-quality to own workflow or squad-repo-health.yml. |
| 9 | Artifact integrity for publish pipeline | RETRO 🟡 | Added checksum verification and provenance requirements to Proposal 7. |
| 10 | Rollback plan needed | PAO 🟡 | Added Rollback Plan section with per-phase procedures. |
| 11 | Runner target adjustment | Booster 🟡 | Updated from 8-10 to 9-11 to reflect proposals 10/11 consolidation instead of removal. |
PRD v1 authored by Flight based on CI audit findings. v2 revised by Flight incorporating team review.
Activity
diberry commentedon Apr 5, 2026
📝 PAO — Clarity & Completeness Review
Overall Assessment: CLEAR with targeted improvements needed
Strengths
✅ Excellent specificity: Each consolidation item is tied to concrete file names, job counts, and estimated savings. A contributor can immediately identify what to change.
✅ Risk stratification: Phased approach (5 phases) with risk levels shows thoughtful sequencing.
✅ Quantified impact: Tables showing current/future state make trade-offs visible.
✅ Clear non-goals: Explicitly states what's NOT changing (checks remain, just repackaged).
✅ Owner assignment: Booster + Flight identified upfront.
Suggested Improvements
1. Clarify "How to Verify" for Each Phase
Each consolidation should include a quick smoke-test. Example for Phase 1:
Currently, success metrics are listed but per-phase verification steps are missing.
2. Add Rollback Plan
If a consolidation breaks a safety gate, what's the rollback procedure? Suggest adding a "Rollback Procedure" section:
3. Clarify PR Readiness Double-Run Issue (Item #3)
The statement "first run produces stale results because CI hasn't completed" needs context:
4. Missing: Concurrency Group Naming Convention
Item #5 adds concurrency groups but doesn't specify the naming pattern:
5. Item #10 (publish-policy) Needs Validation
You say "this is a one-time check that never regresses" — but has this been verified?
6. Item #11 (changelog-protection) — Overlap Question
You mention it's "redundant with changelog-gate," but:
7. Missing: Test Coverage for Consolidated Jobs
When 5 jobs merge into 1, how do you prevent one failing check from masking others?
8. Docs-Only PR Optimization (Item #4) — Edge Case
paths-ignore: [docs/*, *.md] will skip CI for docs-only changes.
Missing Sections
Acceptance Criteria Checklist: A checkbox list that a reviewer can use to sign off. Example:
Communication Plan: Will contributors notice the job consolidation in their PR checks? Do they need docs updates?
Monitoring & Metrics: How will you track actual savings post-implementation? GitHub Actions usage reports?
Timeline: Phases are described but no target dates or milestones.
Summary: This PRD is strong on what and why, but could be sharper on how to verify and how to rollback. Add per-phase smoke tests and clarify design choices (concurrency groups, changelog-protection redundancy, pre-commit hook coverage) and it's ready for Booster.
diberry commentedon Apr 5, 2026
🔧 EECOM — Developer Workflow Review
Overall Assessment: APPROVE WITH CHANGES
I reviewed the PRD against
squad-ci.yml(11 jobs),squad-repo-health.yml(5 jobs),squad-pr-readiness.yml, andsquad-impact.yml, focusing on daily developer experience impact.Developer Experience Impact
pull_request_targettriggerpaths-ignoreto squad-ci.ymldocs-qualityjob orphaning risk — see belowpublish-policyjobchangelog-protection(redundant withchangelog-gate)Detailed Analysis
1. Feedback Loop (Concern: 🟢 Low)
Consolidation will NOT slow time-to-green in practice. Current parallel repo-health jobs each incur ~2 min runner boot for <10 sec of actual script work. A single consolidated job = ~2 min boot + ~50 sec total script work = ~3 min total, roughly the same as the parallel wall-clock time. The savings are in runner cost (5 boots → 1), not developer wait time. Same analysis applies to the CI policy gates.
2. Debugging Experience (Concern: 🟡 Medium — Requires Design Decision)
This is the most significant DX tradeoff. Currently, each repo-health job appears as a separate status check in the PR checks list. Developers see exactly which check failed at a glance:
After consolidation, this becomes:
Mitigations required:
if: always()on every step within the consolidated job so all checks run even if one fails (currently, independent jobs run regardless of each other's status)$GITHUB_STEP_SUMMARY) to produce a clear pass/fail table at the top of the job output3. PR Comment Steps in Repo Health (Concern: 🟡 Medium — Easy to Get Wrong)
Three of the 5 repo-health jobs (
squad-leakage,architectural-review,security-review) post PR comments usingactions/github-script@v7withif: always(). In a consolidated job:$GITHUB_OUTPUTwith unique IDsif: always()to run regardless of earlier step failuresactions/github-script@v7steps must reference the correct step IDs (not job IDs)This is doable but is a common source of bugs during consolidation. Recommend a dedicated test PR with intentional failures in each sub-check to verify all comment steps fire correctly.
4. Path Filters —
docs-qualityOrphaning Risk (Concern: 🟡 Medium)The PRD proposes
paths-ignore: docs/, .squad/, *.mdonsquad-ci.yml. Thedocs-qualityjob currently lives inside squad-ci.yml and is gated by thechangesjob's path detection. If squad-ci.yml skips entirely for docs-only PRs,docs-qualityis also skipped — meaning docs-only PRs lose markdown linting and spell checking.Recommendation: Either:
docs-qualitytosquad-repo-health.ymlor its own workflow (preferred)paths-ignoreNote: GitHub's
paths-ignorecorrectly does NOT skip the workflow when a PR touches both code and docs — it only skips when ALL changes match ignore patterns. This is fine.5. Skip Labels (Concern: 🟢 Low — But Needs Explicit Design)
Current skip labels (
skip-changelog,skip-exports-check,skip-workspace-check,skip-version-check,skip-export-smoke) are per-job. In a consolidated "policy-gates" job, each step can still check its own label — the pattern works:Recommendation: Document in the PRD that skip labels are preserved as step-level conditions. Current 6 skip labels in the "Skip Labels Reference" block (lines 191-206 of squad-ci.yml) need to be updated to reflect the new job structure.
6. Local Testing Comments (Concern: 🟢 None)
The "Local testing" comments in squad-ci.yml (lines 209-215, 333-339, 408-412, 586-593, 671-678, 773-784) reference the underlying scripts, not CI job structure. They remain valid regardless of consolidation. Example: "Run
node scripts/check-exports-map.mjs" works identically whether the script runs in its own job or as a step in a consolidated job.7.
changelog-protectionvschangelog-gate(Concern: 🟡 Medium)The PRD proposes removing
changelog-protectionas redundant withchangelog-gate. They're not identical:changelog-gate: Requires a changeset OR changelog entry when SDK/CLI source changeschangelog-protection: Blocks non-approved authors from directly editing CHANGELOG.mdThese check different dimensions. If changesets are the enforced workflow,
changelog-protectionmay still have value as a guardrail against someone bypassing changesets by editing CHANGELOG.md directly.Recommendation: Either keep
changelog-protectionas a step in the consolidated policy-gates job (it's ~5 seconds of work), or explicitly document why the guard is no longer needed.Recommendations Summary
if: always()on all steps within consolidated jobs + add$GITHUB_STEP_SUMMARYfor clear pass/fail visibilitydocs-qualityorphaning before addingpaths-ignoreto squad-ci.ymlchangelog-protection— it guards a different dimension thanchangelog-gateWhat I Like About This PRD
The PRD is well-structured and the core approach is sound. The concerns above are implementation details that the Booster team should address during Phase 1, not blockers on the overall direction.
— EECOM (Core Dev)
diberry commentedon Apr 5, 2026
🔒 RETRO — Security Review
Overall Assessment: ✅ APPROVE WITH CHANGES
The PRD is well-scoped — consolidation for efficiency, not for changing gates. However, several proposals have security-sensitive edges that need guardrails during implementation.
Security Findings
continue-on-error: true+ aggregate exit codes so all 5 scripts always run, even if one fails. Never letbootstrap-protectionfailure suppresssecurity-review.skip-changelog,skip-exports-check, etc.) must remain independently evaluated per-step. Do NOT use a single "skip-policy-gates" label. Use step-levelif:conditions and track failures in a variable.pull_request_targetworkflow_runruns trusted code from the default branch. Removingpull_request_targeteliminates a class of pwn-request risks. Verify PR data is fetched via API (already true — confirmed in the workflow).squad-ci.ymlsquad-ciis the build/test pipeline. Repo-health (security-review, bootstrap-protection) runs separately onpull_request_targetand is NOT affected by these path filters. Confirm repo-health stays unfiltered.publish-policy(move to pre-commit)--no-verifychangelog-protectionchangelog-gateremains a required status check. Verify branch protection rules explicitly requirechangelog-gate.Concurrency Analysis (Proposal 5) — 🔴 HIGH PRIORITY
The PRD proposes
cancel-in-progress: truefor all 10 workflows without concurrency groups. This is safe for check/validation workflows but dangerous for publish/release workflows.squad-scope-checksquad-docs-linkssync-squad-labelssquad-previewsquad-releasesquad-promotesquad-insider-releasesquad-insider-publishsquad-npm-publishRecommendation:
For
squad-npm-publishandsquad-insider-publish: usecancel-in-progress: falseto prevent partial publishes. A queued publish will wait for the current one to finish — this is the correct behavior.Artifact Sharing Analysis (Proposal 7)
Sharing build artifacts between jobs in the publish pipeline is a net security improvement IF implemented correctly:
Good:
NPM_TOKEN(principle of least privilege)Requirements:
actions/upload-artifact@v4which supports immutable artifacts. Download in the publish job and verify the artifact hasn't been tampered with.actions/upload-artifact@sha) not just@v4to prevent supply chain attacks via tag mutation.npm publish --provenancegenerates SLSA attestations. Verify provenance still works correctly when build and publish are in separate jobs. The publish job must haveid-token: writepermission (already present insquad-npm-publish).node_modules/— Only sharedist/build outputs. Sharingnode_modules/could allow a compromised dependency to persist across jobs.Permission Analysis
contents: read,pull-requests: writecontents: read(default)contents: read,pull-requests: write,issues: write,statuses: read,checks: readcontents: read(build),contents: read+id-token: write(publish)Conclusion: No proposals require broader permissions than the existing jobs. Principle of least privilege is maintained.
Recommended Security Gates for Implementation
Pre-merge validation: Before each phase merges, run the full CI suite and verify all existing gates still trigger correctly. Create a test PR that intentionally violates each gate to confirm it still blocks.
Canary PR for consolidation: After consolidating repo-health, open a PR that modifies a bootstrap-protected file AND has a
.squad/leakage. Verify both checks report independently.Publish pipeline dry-run: Before merging artifact-sharing changes, do a manual
workflow_dispatchpublish to npm with a prerelease tag (e.g.,0.0.0-ci-test) to verify the provenance chain and artifact integrity work end-to-end.Branch protection audit: After removing
changelog-protection(proposal 11) andpublish-policy(proposal 10), auditSettings > Branches > Branch protection rulesto confirmchangelog-gateand other remaining checks are explicitly required.Existing Issue Noted (Out of Scope)
In
squad-repo-health.yml, thegithub-scriptsteps interpolate step outputs into JavaScript template literals:If a PR contains file names with backtick characters, this is a script injection vector in the
pull_request_targetcontext. This is a pre-existing issue outside the PRD's scope, but it should be tracked separately. Recommend creating a follow-up issue to sanitize these outputs or pass them via environment variables instead of expression interpolation.Reviewed by RETRO (Security) • Workflow files analyzed: squad-repo-health.yml, squad-ci.yml, squad-pr-readiness.yml, squad-insider-publish.yml, squad-npm-publish.yml, squad-release.yml, squad-promote.yml, squad-insider-release.yml, squad-scope-check.yml, squad-preview.yml, squad-docs-links.yml
diberry commentedon Apr 5, 2026
⚙️ Booster — CI/CD Domain Review
Overall Assessment: APPROVE WITH CHANGES
I've read every workflow file referenced in the PRD and validated each claim against the actual YAML. The consolidation direction is sound, but there are several technical risks the PRD doesn't account for — two of which could cause outages if shipped as-written.
Per-Proposal Feasibility
needs:dependencies between the 5 jobs.bootstrap-protectionusessparse-checkoutwhile others usefetch-depth: 0— consolidated job needsfetch-depth: 0. Three jobs post PR comments viarepo-health-comment.mjs— comment logic needs to handle sequential outputs. UX tradeoff: individual check pass/fail visibility in PR checks tab is lost; one failure blocks all. Savings estimate of ~8 min is realistic.changelog-gate,changelog-protection,exports-map-check,workspace-integrity,prerelease-version-guard,publish-policy). Noneeds:between them. Each has its own feature flag (vars.SQUAD_*) and skip label — these become step-levelif:conditions.pull_request_targeteditedandready_for_reviewin addition toopened/synchronize. These events do NOT trigger Squad CI, so theworkflow_runtrigger won't fire for them. Removingpull_request_targetmeans: (1) editing a PR description doesn't re-evaluate readiness, (2) marking a draft as "ready for review" doesn't update the readiness comment. Keeppull_request_targetbut only foreditedandready_for_review; remove it foropened/synchronize/reopenedwhereworkflow_runcovers it.squad-ci.ymlpaths-ignorecauses the entire workflow to be skipped for docs-only PRs. Skipped workflows do not satisfy required checks in GitHub branch protection — the PR becomes unmergeable. Solution: either (a) configure branch protection to allow skipped checks, or (b) keep the workflow triggering but add path-based early-exit at the job level via the existingchangesjob pattern. Option (b) is safer.cancel-in-progress: trueon publish/release workflows is dangerous. If a newer push arrives whilesquad-npm-publishis mid-publish (SDK published, CLI not yet), the in-progress run gets cancelled, leaving a partial publish (SDK on registry without matching CLI). Same risk forsquad-insider-publish,squad-release,squad-insider-release,squad-promote. Fix: Usecancel-in-progress: falsefor all publish/release workflows (5 of the 9). Onlysquad-scope-check,squad-preview,sync-squad-labels, andsquad-docs-linksare safe forcancel-in-progress: true. Also:squad-docs-linksisworkflow_dispatchonly — no rapid-push risk; it can be dropped from this proposal.if:conditions at job level (== 'squad',startsWith('squad:')) already prevent runner boot for non-matching labels. Typically only 1-2 runners boot per label event, not 3. The real win:squad-label-enforcehas no job-levelif:— it always boots a runner even for unmanaged labels. Consolidation could add a combined filter. Note:squad-issue-assignusessecrets.COPILOT_ASSIGN_TOKENPAT — the combined workflow needs this secret.squad-insider-publishrebuilds 3 times across jobs;squad-npm-publishrebuilds 2-3 times.upload-artifact/download-artifactwithin a single workflow run is scoped and ephemeral — no security concerns. Savings estimate of 15-20 min for npm-publish is realistic.npx playwright install chromium --with-depsruns every CI pass. Standardactions/cachewith Playwright version key works. Note:--with-depsinstalls system apt packages that won't be cached — only the browser binary (~150MB) benefits. Real savings closer to ~1-1.5 min, not 2 min.ci-rerun.ymlduplicates the entire test job verbatim. A composite action in.github/actions/test-squad-ci/eliminates drift. No minute savings but strong maintainability win.publish-policyjobnpm publish. Better approach: keep the job but addpaths: ['.github/workflows/*.yml']filter so it only runs when workflow files change. This preserves the safety gate while eliminating 99% of unnecessary runs. Full removal to pre-commit loses CI enforcement.changelog-protectionchangelog-gate= "source changes require a changeset OR CHANGELOG edit."changelog-protection= "only approved authors (bradygaster, bots) may directly edit CHANGELOG.md." Withoutchangelog-protection, any contributor can bypass the changeset workflow by editing CHANGELOG.md directly. Together they enforce: "contributors must use changesets; only maintainers may edit CHANGELOG directly." Removingchangelog-protectionweakens the changeset workflow.Missing Considerations
Branch protection audit is prerequisite. Proposals 1, 2, and 4 all rename or remove jobs that may be referenced in branch protection rules. An audit of Settings → Branches → Branch protection rules must happen before any implementation. Suggest adding a "Phase 0: Audit branch protection required checks" to the implementation plan.
PR checks UX degradation. Consolidating 5 jobs into 1 means the PR checks tab shows 1 line instead of 5. When a check fails, developers must read logs to determine which specific gate failed (e.g., was it changelog-gate or workspace-integrity?). Mitigate by using
::error::annotations with clear prefixes and consider adding a summary step.samples-buildandexport-smoke-testare excluded from proposal 2 but should be mentioned. These are NOT lightweight (they build the SDK). The PRD correctly excludes them but doesn't explain why, which could lead to someone adding them to the consolidation later.Feature flag consolidation. Each policy gate has its own
vars.SQUAD_*feature flag. The consolidated job needs a design for how these interact — does a single flag disable the whole job, or does each step keep its own flag? Recommend keeping per-step flags.Concurrency group design for publish workflows. Even with
cancel-in-progress: false, publish workflows should have concurrency groups to queue (not cancel) — this prevents two releases from running simultaneously and conflicting.Recommended Changes to PRD
Proposal 3: Change to "Remove
pull_request_targetforopened/synchronize/reopenedonly; keep it foreditedandready_for_review." This preserves readiness re-evaluation on PR description edits and draft→ready transitions.Proposal 4: Add a prerequisite: "Audit branch protection required checks. If any required check name comes from squad-ci.yml, use job-level path filters (not workflow-level
paths-ignore) to avoid blocking merges on docs-only PRs."Proposal 5: Split into two categories:
cancel-in-progress: true—squad-scope-check,squad-preview,sync-squad-labelscancel-in-progress: false(queue, don't cancel) —squad-release,squad-promote,squad-insider-release,squad-insider-publish,squad-npm-publishsquad-docs-links(workflow_dispatch only, no rapid-push risk)Proposal 10: Change from "remove" to "add
paths:filter on.github/workflows/*.yml" — same savings, preserves the safety gate.Proposal 11: Remove from PRD. The two jobs are complementary, not redundant. If the goal is to save 1 runner, add a path filter instead (only run when CHANGELOG.md is in the diff).
Add Phase 0: "Audit branch protection rules and document all required check names" — this is a prerequisite for Phases 1-2.
Update runner count: With proposal 11 removed and proposal 3 modified, the target should be ~9-11 runners per PR push (not 8-10). Still a significant improvement from ~19.
Risk Summary
cancel-in-progress: falsefor publish/releaseedited/ready_for_reviewonpull_request_targetchangelog-protectionReviewed by Booster (CI/CD Engineer) — all claims validated against workflow source on
devbranch.diberry commentedon Apr 5, 2026
🧪 FIDO — Quality Gate Review
Overall Assessment:⚠️ APPROVE WITH CHANGES
The PRD is well-structured and the savings are real. However, several proposals carry quality risks that need mitigation before implementation. The safety gates themselves are preserved — it's the packaging that needs care.
Safety Gate Analysis
bootstrap-protection) vs INFORMATIONAL jobs have different failure semantics. In a single job, a failed blocking step stops later informational steps/comments from running.continue-on-errorhides real failures.export-smoke-testneedsnpm ci + buildwhile others are zero-install — consolidation forces all checks to pay that cost. Branch protection rules may reference individual job names.pull_request_targetloseseditedandready_for_reviewevent types — readiness won't update when a PR is marked ready or its description changes. Worse: if Proposal 4 addspaths-ignoreand CI is skipped entirely,workflow_runnever fires, so readiness never refreshes. The first run is not "stale" — the script handles in-progress checks and provides early feedback.pull_request_targettrigger. If double-run cost is the concern, add a deduplication check in the script instead.paths-ignoreat the workflow level can leave required status checks stuck in "pending", blocking merges for docs-only PRs. GitHub does not auto-pass skipped required checks — they just never report.paths-filteraction within the workflow (already partially implemented via thechangesjob) to conditionally skip individual jobs rather than the entire workflow. Or: ensure branch protection usesRequire status checks → Do not requirefor these checks.cancel-in-progress: trueis dangerous for publish/release workflows:squad-release,squad-promote,squad-npm-publish,squad-insider-release,squad-insider-publish. Cancelling an in-flight publish can leave packages partially published (some packages on npm, others not).cancel-in-progress: false(queue, don't cancel).Removal Risk Analysis
publish-policynpm publishto a workflow file undetected. Better: consolidate into the proposed "policy-gates" job — it's a 2-second grep, costs nothing. Also note: this job currently runs on pushes too (not just PRs), so consolidation must preserve that trigger coverage.changelog-protectionchangelog-gateverifies a changeset file exists for SDK/CLI changes — and it explicitly allows direct CHANGELOG.md edits as an alternative.changelog-protectionrestricts who can make those direct edits to approved authors. Without it, any contributor could bypass the changeset workflow by editing CHANGELOG.md directly. Not redundant — complementary. If removing: add a CODEOWNERS entry for CHANGELOG.md at minimum.Quality Concerns
Branch protection audit is a prerequisite. Before consolidating or renaming ANY job, enumerate all required status checks in branch protection rules for
dev,main,preview, andinsider. Renaming a required check = merges blocked until branch protection is updated. This should be Step 0 of Phase 1.Proposal 3 + 4 interaction is dangerous. If PR Readiness relies on
workflow_runfrom Squad CI, and Squad CI is skipped viapaths-ignore, then PR Readiness never runs. Docs-only PRs would have no readiness status — potentially blocking or confusing.The "non-goal" of not changing CI trigger semantics is violated by Proposals 3 and 4. Both change when workflows fire. The PRD should acknowledge this explicitly.
Error attribution in consolidated jobs. GitHub Actions shows step-level status within a job, but the job-level badge (✅/❌) is what appears in the PR checks list. After consolidation, a failure in any step of "policy-gates" shows the whole job as failed. Contributors will need to click into the job to find which specific gate failed. Consider adding a summary step that prints a clear table of pass/fail per gate.
Recommended Test Plan
Phase 1 (Consolidations 1-3):
editedandready_for_reviewevents after changesPhase 2 (Path filters + concurrency):
cancel-in-progress: falsePhase 3-5 (Issue ops, publish optimization, removals):
Review by FIDO (Quality Owner) — if it's not tested, it's not done. 🐕
diberry commentedon Apr 5, 2026
🏗️ Flight — Greenfield CI Architecture Analysis
Dina asked: if you were designing the CI from scratch to serve these same safety features, would you architect it differently — and would that save more minutes?
Short answer: yes, substantially. The current system has 19 workflows spawning ~19 runners per PR push. PRD #872 proposes consolidating to 9-11. A greenfield design achieves 4-6 runners by organizing around resource tiers rather than feature categories.
Feature Catalog
I cataloged 47 distinct safety features across all 19 workflows. Here's the full inventory grouped by lifecycle:
Resource Tier Grouping
This is the key insight the PRD doesn't fully exploit. Every safety feature falls into a resource tier, and the current system often boots a Tier 4 runner (full npm install + build + Playwright) for Tier 0 work (grep a file).
actions/checkoutonly. Usesgit diff,grep,node -e(pre-installed on runner), file reads.actions/setup-nodebut NO npm install. Runs.mjsscripts using onlynode:*built-ins.markdownlint-cli2,cspell) but not the full monorepo.npm ci+npm run build. The expensive tier.actions/github-scriptorghCLI. No checkout needed, or sparse checkout for reading.squad/team.md.The waste problem: Currently, features #2-9 (Tier 0 policy gates, ~25s of actual work combined) each get their own runner, paying ~90s of boot overhead PER CHECK. That's ~10 minutes of runner time for 25 seconds of work. Same story for features #11-16 (Tier 1 reviews, ~40s of actual work across 5 separate runners = ~8 minutes of boot overhead).
Greenfield Architecture
Design principles applied:
pull_request_targetfor all read-only validation — the single biggest optimization$GITHUB_STEP_SUMMARYrefs/pull/<number>/head, not direct SHA fetchProposed Workflows (10 total)
1.
squad-pr-validate.yml— All read-only PR checks in ONE runnerThis consolidates 14 runners (features #1-17) into 1 runner. Each check posts its own annotation or comment independently. The existing
repo-health-comment.mjsupsert pattern continues to work — consolidate execution, not comment format.Security invariant: This workflow NEVER executes PR code. It checks out BASE branch scripts and reads PR content via git diff only. Shell injection is mitigated by using Node + GitHub API for all PR metadata access (no direct interpolation of PR titles/filenames into shell).
2.
squad-pr-ci.yml— Build & test (the expensive stuff)Key savings: export-smoke-test and samples-build reuse the full-ci runner's build artifacts instead of booting their own runners. Each runs as a post-build step with
if: always()so test failures don't prevent them from reporting.3.
squad-readiness-post-ci.yml— Update readiness after CI completes4.
squad-issue-ops.yml— All issue lifecycle operationsConsolidates squad-triage + squad-issue-assign + squad-label-enforce + squad-heartbeat (4 workflows → 1). Conditional steps mean only relevant work runs per event.
5.
squad-insider.yml— Insider build + test + publish + release6.
squad-npm-publish.yml— Production publish7.
squad-release.yml— Production release (push to main)8.
squad-docs.yml— Docs build + deploy (push to main, docs path)9.
sync-squad-labels.yml— Label sync (push to team.md)10.
squad-promote.yml— Branch promotion (manual)Removed workflows (absorbed):
Comparison: Current vs PRD #872 vs Greenfield
Key savings breakdown:
pull_request_targetrunner: saves ~13 runner boots (~19 min)Recommendation
Adopt the greenfield architecture as the target state, but implement it using the PRD's phased approach.
The PRD's incremental phases are the right implementation strategy — they're lower risk and independently revertible. But the PRD's target architecture (9-11 runners) leaves significant savings on the table. The greenfield design (4-5 runners per PR push) captures ~85% more waste reduction.
Specific updates I'd make to the PRD:
Add Phase 0.5: Consolidate ALL read-only PR checks into
squad-pr-validate.ymlusingpull_request_target. This is the single highest-value change — it eliminates ~13 runner boots per PR push. The PRD's Phase 1 consolidates repo-health (5→1) and policy gates (6→1) separately. Instead, combine BOTH into onepull_request_targetworkflow. Same migration risk, much bigger payoff.Phase 1 addition: Move export-smoke-test and samples-build into the full-ci job as post-build steps. The build is already done — these just need the artifacts. Use
if: always()so they report regardless of test outcomes.Phase 3 addition: Merge all 4 issue workflows into
squad-issue-ops.yml. The PRD already proposes this for 3 of them — add heartbeat too. All run onissues:events and use GitHub API + sparse checkout.Phase 4 addition: Merge insider-publish and insider-release into one workflow. Both fire on push to insider. The build+test step is already required for both — share it.
Preserve per-check observability. In consolidated workflows, use
$GITHUB_STEP_SUMMARYwith per-check pass/fail tables, step-level annotations, and existing comment upsert patterns. Don't sacrifice debuggability for runner count.Codify the
pull_request_targetsecurity invariant. The consolidated validate workflow must NEVER execute PR code. Add a header comment and a CI check that verifies the workflow doesn't containactions/checkoutwith a PR ref.Bottom line: The PRD is good engineering. The greenfield insight is that organizing around resource tiers — not feature categories — captures an additional ~10 wasted minutes per PR push. The implementation path is the same (phased, revertible), just with a better target architecture.
Analysis by Flight (Lead) — requested by Dina Berry
Data source: All 19 workflow files in
.github/workflows/+ PRD #872ci: consolidate repo-health + policy gates, fix PR readiness double-t…
ci: add path filters, consolidate issue ops, optimize publish pipeline
ci: consolidate workflows, add path filters, concurrency groups (PRD #…
ci: consolidate workflows, path filters, concurrency groups, readines…
ci: consolidate workflows, path filters, concurrency (PRD #872 Phases…
ci: consolidate workflows, path filters, concurrency, readiness expan…
ci: consolidate workflows, path filters, concurrency, readiness expan…
ci: consolidate workflows, path filters, concurrency, readiness expan…