feat(gh-aw): ship Squad modes with verified consumer bootstrap (#1613-#1618) - #1622
Conversation
Implements the Cast mode agent instructions in workflows/squad.md — the main event for the /squad slash command. When triggered, the Copilot agent: 1. Parses the /squad command to detect mode (default = cast) 2. Analyzes the target repo (languages, structure, CI, patterns) 3. Composes a tailored team using Squad's casting intelligence 4. Generates full .squad/ scaffolding with customized charters 5. Creates meet-the-squad.md introducing the cast 6. Opens a PR via safe-outputs Also addresses Copilot reviewer feedback on shared/squad.md: - Pin squad-init action ref from @dev to @main (stable distribution) - Change if-no-files-found from ignore to error (fail fast) Closes #1614 Closes #1613 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 11 commits — consider squashing before review |
| ✅ | 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 | 1 active Copilot thread(s) resolved (3 outdated skipped) |
| ❌ | CI passing | 7 check(s) failing: sdk-exports-validation, samples-build, Policy Gates, test, docs-quality, Changeset Drift, changes |
Files Changed (2 files, +649 −59)
| File | +/− |
|---|---|
workflows/shared/squad.md |
+11 −21 |
workflows/squad.md |
+638 −38 |
Total: +649 −59
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟢 Impact Analysis — PR #1622Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (2 files)
This report is generated automatically for every PR. See #733 for details. |
There was a problem hiding this comment.
Pull request overview
This PR updates the gh-aw /squad workflow to include a full Cast-mode instruction spec (repo analysis → team composition → universe/name allocation → scaffolding → PR creation) and adjusts the shared bootstrap component to use a more stable action ref and fail fast when expected bootstrap outputs are missing.
Changes:
- Implement detailed Cast-mode coordinator instructions in
workflows/squad.md, including repo analysis, casting, scaffolding, and PR creation guidance. - Update bootstrap to use
squad-init@maininstead of@dev. - Fail fast in bootstrap artifact upload when expected files are missing (
if-no-files-found: error).
Show a summary per file
| File | Description |
|---|---|
| workflows/squad.md | Adds comprehensive Cast-mode behavior/instructions and updates mode parsing + status-mode behavior guidance. |
| workflows/shared/squad.md | Pins the bootstrap init action to @main and makes missing bootstrap outputs fail the activation job. |
Review details
Suppressed comments (1)
workflows/squad.md:285
- The Cast-mode intro says Scribe, Ralph, and Rai are always-on agents, but the meet-the-squad template’s Always-On Support table omits Rai. This will cause the generated intro doc to disagree with the rest of the Cast-mode scaffolding rules.
| Name | Role | Notes |
|------|------|-------|
| Scribe | Session Logger | Tracks all agent sessions silently |
| Ralph | Work Monitor | Watches the backlog and alerts on stale work |
- Files reviewed: 2/2 changed files
- Comments generated: 4
- Review effort level: Lite
…eps (#1618, #1619) Enhances the Cast mode output: - meet-the-squad.md template now includes: - 4-column team table (emoji+name, role, specialty, interaction method) - "How to Work With Your Squad" section (labels, commands, routing) - Mode-specific "What Happened Here" rationale block - Cast/Connect/Adopt variations - copilot-setup-steps.yml auto-inclusion: - Checks if .github/workflows/copilot-setup-steps.yml exists - If missing, generates language-appropriate setup (Node/Python/Go/other) - Never overwrites existing file - Mentions in PR body when included Also fixes step ordering (setup-steps check now runs before PR creation). Closes #1618 Closes #1619 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expanded scope (commit 2)This PR now also addresses:
Both are in the second commit. The |
…1617) Replaces all remaining TODO stubs in workflows/squad.md with full agent instructions: Connect mode (/squad from org/repo): - Parse and validate source URL via gh API - Write lightweight .squad/config.json pointer only - Generate meet-the-squad.md noting external management - Open PR with minimal footprint (no squad files committed) Adopt mode (/squad adopt org/repo): - Parse, validate, and fetch full source squad - Install scaffolding locally with ownership transfer - Adapt repo-specific references in routing - Include copilot-setup-steps.yml if missing - Open PR with full squad committed Cast Member (/squad cast-member): - Natural language member addition with casting intelligence - Modify/rename existing members preserving identity - Universe-aware name allocation avoiding conflicts - Context-aware PR behavior (push to existing or open new) Retire (/squad retire): - Flexible matching by name, role, or ID - Archive charter to _alumni/ (never delete) - Update all squad files (registry, team, routing) - Context-aware PR behavior The /squad command workflow is now feature-complete for all 7 modes. Closes #1615 Closes #1616 Closes #1617 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Commit 3: All remaining modes implementedThis PR now closes the ENTIRE epic (#1612). All 7 modes are implemented:
The |
Fixes 4 of 5 findings from the in-depth review: 1. workflow_dispatch now declares a 'command' input so manual dispatch can supply mode arguments (fixes #1626) 2. Cast mode team.md template now includes the ## Coding Agent section with @copilot row and auto-assign marker (fixes #1623) 3. Retire mode archives the entire agent directory to _alumni/{lowercase-name}/ instead of a flat file (fixes #1624) 4. Standardized on cast name (lowercase) as the canonical identifier for registry keys, labels, charter paths, and meet-the-squad references — eliminates role-id vs name ambiguity (fixes #1625) The 5th finding (#1627 — Connect mode bootstrap lacks remote squad resolution) requires a design decision about where that logic lives (shared/squad.md vs squad-init action). Tracked separately. Closes #1623 Closes #1624 Closes #1625 Closes #1626 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Teaches the squad-init composite action to handle Connect mode: - New inputs: mode (default|connect) and source (owner/repo) - When mode=connect: fetches .squad/ files from remote source via gh API (team.md, routing.md, agent charters, squad.agent.md) - Writes .squad/config.json pointer with squadSource and connectedAt - Existing 'squad init' step is gated on mode != connect - Input validation extended for new parameters Also updates shared/squad.md bootstrap to detect existing .squad/config.json and pass mode/source to the action automatically. Closes #1627 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enables gh aw add from feature branch during development. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gh-aw doesn't recognize this field in safe-outputs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… mode gh-aw strict mode rejects contents:write, issues:write, and pull-requests:write. Switch to safe-outputs pattern: add-comment and create-issue declarations alongside existing create-pull-request. Convert direct git push in Cast-Member and Retire modes to use create-pull-request safe-output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tmatter Add issues:read and pull-requests:read permissions required by the issues and pull_requests toolsets. Fix ambient-folders frontmatter field in shared/squad.md that gh-aw doesn't recognize. Ref #1630 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #1613 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
Ships the complete
/squadAgentic Workflow prompt for Cast, Connect, Adopt, Cast Member, Retire, and Status modes, including tailored team scaffolding andmeet-the-squad.md.This revision also applies the consumer configuration proven end-to-end in
bradygaster/squad-gh-aw-test:/squadfrom issue bodies, issue comments, PR review comments, and manual dispatch.npx --yes "@bradygaster/squad-cli@${SQUAD_CLI_VERSION:-0.11.0}" init --preset default --state-backend localin the unrestricted activation job.SQUAD_CLI_VERSIONto0.11.0, with a repository-variable override.squad/*branches, which Cast Member and Retire use for follow-up PRs against an existing Squad branch.engine.version: 1.0.78while this source is compiled with gh-aw v0.85.4; the toolcache executable-path fix in github/gh-aw#50908 first appears in v0.86.0..github/actions/squad-init/action.ymlto the base branch. The workflow does not use the composite action because Squad v0.11.0 has no release assets.The successful consumer run opened
bradygaster/squad-gh-aw-test#19.Copilot setup steps remain a separate repository prerequisite. This workflow intentionally does not create or modify
.github/workflows/**, avoiding the GitHub App-onlyworkflows: writepermission required by gh-aw'sallow-workflowsmode.Security review
The compiled workflow references the optional restricted secrets
SQUAD_GITHUB_APP_PRIVATE_KEYandSQUAD_GITHUB_TOKEN. Both were reviewed: the private key is consumed only byactions/create-github-app-token@v3.2.0, and the fallback token is exposed only asGH_TOKENto the activation bootstrap. No redirect changes were introduced. Agent writes remain mediated by gh-aw safe outputs and the explicit file allowlist.Validation
gh aw compile workflows/squad.md --no-emit --approve(gh-aw v0.85.4)node --test test/workflows.test.cjs(27 passing)npm run build --ignore-scriptsCloses #1613
Closes #1614
Closes #1615
Closes #1616
Closes #1617
Closes #1618