Skip to content

chore: simplify workflow files by removing .ai-team fallback logic#1263

Open
bradygaster wants to merge 1 commit into
devfrom
squad/1167-simplify-workflow-files
Open

chore: simplify workflow files by removing .ai-team fallback logic#1263
bradygaster wants to merge 1 commit into
devfrom
squad/1167-simplify-workflow-files

Conversation

@bradygaster

Copy link
Copy Markdown
Owner

Summary

Removes dead .ai-team/ fallback code from workflow templates. The .squad/ directory has been the canonical location since the rename — these fallback paths were never triggered and added unnecessary complexity to every workflow file.

Changes

  • Removed .ai-team/ fallback branches from 4 workflow templates (triage, issue-assign, heartbeat, sync-squad-labels)
  • Cleaned up empty if-blocks left by the removal
  • Simplified warning messages to reference only .squad/team.md
  • Changed letconst for file paths that are no longer reassigned
  • Synced all template copies (.squad-templates/, packages/squad-cli/templates/, packages/squad-sdk/templates/)

Not Changed

Guard rail checks in squad-preview.yml and squad-promote.yml are intentionally preserved — they legitimately prevent legacy .ai-team/ files from being shipped to production.

Scope Note

The broader simplification (moving workflow logic into CLI commands like squad workflow <name>) is a larger architectural change tracked separately. This PR focuses on the quick win: removing dead code paths that add complexity without value.

Closes #1167

Remove dead .ai-team/ fallback code from workflow templates. The .squad/
directory is the canonical location since the rename — the fallback paths
were never triggered and added unnecessary complexity.

Changes:
- Remove .ai-team/ fallback branches from triage, issue-assign, heartbeat,
  and sync-squad-labels workflows
- Clean up empty if-blocks left by fallback removal
- Simplify warning messages to reference only .squad/team.md
- Change let → const for team/routing file paths (no longer reassigned)
- Sync all template copies (.squad-templates/, packages/)

Guard rail checks in squad-preview.yml and squad-promote.yml are preserved
since they legitimately prevent .ai-team/ files from shipping.

Closes #1167

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 19:02
@github-actions

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #1263

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 16
Files added 0
Files modified 16
Files deleted 0
Modules touched 4

🎯 Risk Factors

  • 16 files changed (6-20 → MEDIUM)
  • 4 modules touched (2-4 → MEDIUM)

📦 Modules Affected

root (4 files)
  • templates/workflows/squad-heartbeat.yml
  • templates/workflows/squad-issue-assign.yml
  • templates/workflows/squad-triage.yml
  • templates/workflows/sync-squad-labels.yml
squad-cli (4 files)
  • packages/squad-cli/templates/workflows/squad-heartbeat.yml
  • packages/squad-cli/templates/workflows/squad-issue-assign.yml
  • packages/squad-cli/templates/workflows/squad-triage.yml
  • packages/squad-cli/templates/workflows/sync-squad-labels.yml
squad-sdk (4 files)
  • packages/squad-sdk/templates/workflows/squad-heartbeat.yml
  • packages/squad-sdk/templates/workflows/squad-issue-assign.yml
  • packages/squad-sdk/templates/workflows/squad-triage.yml
  • packages/squad-sdk/templates/workflows/sync-squad-labels.yml
templates (4 files)
  • .squad-templates/workflows/squad-heartbeat.yml
  • .squad-templates/workflows/squad-issue-assign.yml
  • .squad-templates/workflows/squad-triage.yml
  • .squad-templates/workflows/sync-squad-labels.yml

This report is generated automatically for every PR. See #733 for details.

@github-actions

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 21ba6b8

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

Status Check Details
Single commit 1 commit — clean history
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved No Copilot review threads
CI passing 9 check(s) still running

Files Changed (16 files, +202 −282)

File +/−
.squad-templates/workflows/squad-heartbeat.yml +164 −167
.squad-templates/workflows/squad-issue-assign.yml +3 −7
.squad-templates/workflows/squad-triage.yml +3 −11
.squad-templates/workflows/sync-squad-labels.yml +2 −7
packages/squad-cli/templates/workflows/squad-heartbeat.yml +2 −5
packages/squad-cli/templates/workflows/squad-issue-assign.yml +3 −7
packages/squad-cli/templates/workflows/squad-triage.yml +3 −11
packages/squad-cli/templates/workflows/sync-squad-labels.yml +2 −7
packages/squad-sdk/templates/workflows/squad-heartbeat.yml +2 −5
packages/squad-sdk/templates/workflows/squad-issue-assign.yml +3 −7
packages/squad-sdk/templates/workflows/squad-triage.yml +3 −11
packages/squad-sdk/templates/workflows/sync-squad-labels.yml +2 −7
templates/workflows/squad-heartbeat.yml +2 −5
templates/workflows/squad-issue-assign.yml +3 −7
templates/workflows/squad-triage.yml +3 −11
templates/workflows/sync-squad-labels.yml +2 −7

Total: +202 −282


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies Squad workflow templates by removing the legacy .ai-team/ fallback logic now that .squad/ is the canonical configuration location, reducing conditional branches and clarifying user-facing messages.

Changes:

  • Removed .ai-team/ fallback checks from the triage, issue-assign, heartbeat, and sync-squad-labels workflow templates.
  • Simplified warning/info messages to reference only .squad/team.md and updated some path variables from letconst.
  • Kept template copies in sync across templates/, .squad-templates/, and the CLI/SDK package template directories.
Show a summary per file
File Description
templates/workflows/sync-squad-labels.yml Removes .ai-team/team.md trigger path and fallback logic; simplifies “missing team” message.
templates/workflows/squad-triage.yml Removes .ai-team fallback for roster/routing paths; standardizes .squad-only warnings.
templates/workflows/squad-issue-assign.yml Removes .ai-team roster fallback and updates comment text to .squad/team.md only.
templates/workflows/squad-heartbeat.yml Removes .ai-team roster fallback and updates agent assignment instructions to .squad only.
packages/squad-sdk/templates/workflows/sync-squad-labels.yml Synced copy of sync-squad-labels template changes for the SDK package.
packages/squad-sdk/templates/workflows/squad-triage.yml Synced copy of triage template changes for the SDK package.
packages/squad-sdk/templates/workflows/squad-issue-assign.yml Synced copy of issue-assign template changes for the SDK package.
packages/squad-sdk/templates/workflows/squad-heartbeat.yml Synced copy of heartbeat template changes for the SDK package.
packages/squad-cli/templates/workflows/sync-squad-labels.yml Synced copy of sync-squad-labels template changes for the CLI package.
packages/squad-cli/templates/workflows/squad-triage.yml Synced copy of triage template changes for the CLI package.
packages/squad-cli/templates/workflows/squad-issue-assign.yml Synced copy of issue-assign template changes for the CLI package.
packages/squad-cli/templates/workflows/squad-heartbeat.yml Synced copy of heartbeat template changes for the CLI package.
.squad-templates/workflows/sync-squad-labels.yml Synced copy of sync-squad-labels template changes for .squad-templates/.
.squad-templates/workflows/squad-triage.yml Synced copy of triage template changes for .squad-templates/.
.squad-templates/workflows/squad-issue-assign.yml Synced copy of issue-assign template changes for .squad-templates/.
.squad-templates/workflows/squad-heartbeat.yml Synced copy of heartbeat template changes for .squad-templates/.

Copilot's findings

Comments suppressed due to low confidence (4)

templates/workflows/squad-triage.yml:91

  • routingFile/routingContent are read from .squad/routing.md but never used anywhere in this workflow, so this block is dead code (and adds an unnecessary filesystem read). Consider removing it to keep the workflow logic minimal.
            const routingFile = '.squad/routing.md';
            let routingContent = '';
            if (fs.existsSync(routingFile)) {
              routingContent = fs.readFileSync(routingFile, 'utf8');
            }

.squad-templates/workflows/squad-triage.yml:91

  • routingFile/routingContent are read from .squad/routing.md but never used anywhere in this workflow, so this block is dead code (and adds an unnecessary filesystem read). Consider removing it to keep the workflow logic minimal.
            const routingFile = '.squad/routing.md';
            let routingContent = '';
            if (fs.existsSync(routingFile)) {
              routingContent = fs.readFileSync(routingFile, 'utf8');
            }

packages/squad-cli/templates/workflows/squad-triage.yml:91

  • routingFile/routingContent are read from .squad/routing.md but never used anywhere in this workflow, so this block is dead code (and adds an unnecessary filesystem read). Consider removing it to keep the workflow logic minimal.
            const routingFile = '.squad/routing.md';
            let routingContent = '';
            if (fs.existsSync(routingFile)) {
              routingContent = fs.readFileSync(routingFile, 'utf8');
            }

packages/squad-sdk/templates/workflows/squad-triage.yml:91

  • routingFile/routingContent are read from .squad/routing.md but never used anywhere in this workflow, so this block is dead code (and adds an unnecessary filesystem read). Consider removing it to keep the workflow logic minimal.
            const routingFile = '.squad/routing.md';
            let routingContent = '';
            if (fs.existsSync(routingFile)) {
              routingContent = fs.readFileSync(routingFile, 'utf8');
            }
  • Files reviewed: 16/16 changed files
  • Comments generated: 0

@bradygaster bradygaster requested a review from tamirdresher June 10, 2026 19:26

@tamirdresher tamirdresher left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the 16-file diff. Pure dead-code removal — strips .ai-team/ fallback branches from 4 workflow templates (heartbeat, issue-assign, triage, sync-squad-labels), keeps the .squad/ paths. Synced across all 4 template directories. Correct.

Confirmed the guard-rail keep-out reasoning: squad-preview.yml and squad-promote.yml are intentionally LEFT alone because they specifically prevent legacy .ai-team/ files from shipping. Good call.

Policy Gates CI failure is a real but trivial gap:

::error::No changeset or CHANGELOG.md update found, but SDK/CLI source or template files were changed.
::error::Run 'npx changeset add' or edit CHANGELOG.md. Escape hatch: add 'skip-changelog' label.

The PR touches template files which fall under the changelog-gate's scope. Options:

  • (recommended) Add skip-changelog label — this is purely dead-code removal with no user-visible behavior change, so a changeset entry would just be noise
  • Alternatively, add a tiny changeset patch entry

Approving the change; merge gate just needs the label or a changeset add.

@tamirdresher

Copy link
Copy Markdown
Collaborator

Status: Content approved. Only blocker is the Changelog Gate in Policy Gates:

::error::No changeset or CHANGELOG.md update found, but SDK/CLI source or template files were changed.
::error::Run 'npx changeset add' or edit CHANGELOG.md. Escape hatch: add 'skip-changelog' label.

This PR is purely dead-code removal (the .ai-team/ fallback paths in workflow templates) with no user-visible behavior change — a changeset entry would be noise.

Recommended unblock

Add the skip-changelog label. The gate explicitly documents this as the right escape hatch for non-user-facing changes.

Alternative: add a one-line .changeset/ entry, but it would just say "internal cleanup, no user-visible change" which is what the label communicates.

Other notes

The PR correctly leaves squad-preview.yml and squad-promote.yml untouched — those guard rails actively prevent legacy .ai-team/ files from shipping to production. Good call.

Once the label is on, this is mergeable.

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.

enhancement: Simplify workflow files

3 participants