Add @copilot coding agent as a Squad member type#13
Merged
bradygaster merged 33 commits intobradygaster:mainfrom Feb 11, 2026
Merged
Add @copilot coding agent as a Squad member type#13bradygaster merged 33 commits intobradygaster:mainfrom
bradygaster merged 33 commits intobradygaster:mainfrom
Conversation
- New member type: 🤖 Coding Agent with three-tier capability profile - Init Mode asks if user wants @copilot on the team - Configurable auto-assign via <!-- copilot-auto-assign --> in team.md - Lead evaluates issues against capability profile during triage - copilot-instructions.md template for autonomous coding agent context - Upgrade updates copilot-instructions.md when @copilot is enabled - squad:copilot label synced automatically - Workflows: triage routes to @copilot, issue-assign auto-assigns - Intercept rule ensures 'Enable @copilot' is not treated as greeting - Docs: feature guide, README, upgrading docs updated - Tests: 5 new tests (38 total, all passing)
Move @copilot command detection to a mandatory pre-check table at the very top of Team Mode, before any routing or interpretation. Explicit STOP instructions prevent the coordinator from treating the command as a file reference or session greeting.
Typing '@copilot' in Copilot chat triggers IDE file-tagging, preventing the coordinator from seeing the command text. Changed all trigger phrases to use 'coding-agent' which is unambiguous and won't collide with file/folder names.
'@copilot' triggered IDE file-tagging, 'coding-agent' triggered Azure MCP tools (azd coding-agent config). New triggers use squad-prefixed phrases or 'hire copilot' which are unambiguous.
…squad' - Moved trigger check to top-level (before Init/Team Mode split) so it runs before any routing or interpretation - Primary trigger: 'add copilot to squad' - unambiguous, won't trigger IDE file-tagging (@) or Azure tools (coding-agent) - Previous triggers failed: '@copilot' (IDE intercept), 'coding-agent' (Azure MCP), 'hire copilot' (confused with existing team hiring language)
'add copilot to squad' was interpreted as adding a new cast member named Copilot. Adding 'agent' disambiguates — it's clearly about the GitHub Copilot coding agent, not a person. Also added explicit 'NOT a new cast member' warnings in the command check and routing table.
- Add 'squad copilot' subcommand (--auto-assign, --off flags) - Remove unreliable agent instruction triggers - CLI directly modifies team.md and copies copilot-instructions.md - Update agent.md to reference CLI instead of chat commands - Rewrite tests for copilot subcommand (44/44 passing) - Update feature docs with CLI usage
- Primary flow: coordinator handles in conversation during init or team mode - Routing signal: 'add team member copilot' maps to Copilot Coding Agent Member section - CLI subcommand kept as backup option - Updated docs to show conversation-first, CLI-second approach
- Add @copilot exemption in Name Allocation (like Scribe) - Add 'add team member copilot' guard in Human Team Members triggers - Both redirect to Copilot Coding Agent Member section - Prevents coordinator from casting copilot as a universe character
- Remove unreliable mid-session chat triggers (7 failed attempts) - Keep init-time question (conversational, works in setup flow) - Keep CLI subcommand for existing teams - Keep casting exemption for @copilot (like Scribe) - Clean up docs to reflect actual working flows
- Place check at the very top of the agent file (line 21-24) - Before Team Mode, before project context loading - Exact phrase match avoids collision with project copilot code - 'squad' prefix makes it command-like, not a name to cast - Falls through to Team Mode if phrase doesn't match
- Slash-command syntax signals 'this is a command, not a work request' - 'bot' has zero semantic overlap with project copilot code - Placed at line 21 with explicit STOP instructions - Prevents file scanning, name casting, project analysis
- squad:copilot label now always assigns @copilot (no roster lookup needed) - Assignment happens immediately in the copilot branch, not conditionally - Simplified comment (removed auto-assign conditional) - Removed redundant auto-assign block
- 'Already up to date' path was skipping workflow and agent copies - Now always refreshes squad-owned files even when version matches - Fixes issue where re-running upgrade didn't pick up workflow changes
- REST API addAssignees doesn't work for @copilot (special entity) - Use 'gh issue edit --add-assignee @copilot' which is the documented approach - Script step sets output, follow-up step runs gh CLI conditionally
- Use execSync with gh issue edit --add-assignee inside the script step - Pass GH_TOKEN via env to the step - Removes separate step that wasn't executing (output issue)
- Use --add-assignee copilot (no @) - Use --repo GITHUB_REPOSITORY - Use secrets.GITHUB_TOKEN per official docs
The gh CLI 'add-assignee copilot' fails with 'copilot not found' in workflow context. Switch to github.rest.issues.addAssignees() which properly recognizes the Copilot coding agent bot user.
The REST API addAssignees silently ignores 'copilot' - it returns 201 but doesn't actually assign. The coding agent can only be assigned through the GitHub UI or an authenticated user's CLI session. The workflow now posts a comment with the gh CLI command for the team lead to assign @copilot manually.
…sign Per GitHub docs, the coding agent assignee is 'copilot-swe-agent[bot]' (not 'copilot') and requires the agent_assignment payload in the REST API call. Uses SQUAD_TOKEN (PAT) if available, falls back to GITHUB_TOKEN.
Match the exact pattern from GitHub docs: separate step using github-token with a PAT secret (COPILOT_ASSIGN_TOKEN), calling github.request() with copilot-swe-agent[bot] assignee and agent_assignment payload.
…gnees No PAT needed. Use github.rest.issues.addAssignees with 'copilot-swe-agent' (no [bot] suffix) and default GITHUB_TOKEN. Single step, no separate secrets required.
GITHUB_TOKEN (app token) silently fails to assign copilot-swe-agent. GitHub docs require a user token (PAT) for coding agent assignment. Falls back to GITHUB_TOKEN if COPILOT_ASSIGN_TOKEN not configured.
…ment The PAT can't post comments (Resource not accessible). Use default GITHUB_TOKEN for routing/comments step, and COPILOT_ASSIGN_TOKEN PAT only for the copilot-swe-agent assignment step.
Try copilot-swe-agent[bot] with agent_assignment payload first (per GitHub docs), fall back to copilot-swe-agent without. Wrapped in try/catch so routing comment still posts even if assignment fails. May require classic PAT with repo scope.
Slidemaker uses 'master' not 'main'. The agent_assignment base_branch was hardcoded to 'main' causing a ruleset-like error. Now fetches the repo's default_branch via API.
When running 'npx squad copilot', the CLI now tells the user to create a classic PAT and set it as COPILOT_ASSIGN_TOKEN repo secret. This is required for the auto-assign workflow to work.
- Added Prerequisites section with repo requirements - Added Quick Start with step-by-step commands - Added dedicated COPILOT_ASSIGN_TOKEN section explaining why classic PAT is required (fine-grained fails, GITHUB_TOKEN silently ignores) - Removed unreliable /squad-bot conversation trigger - CLI is the recommended enable path - Updated README prerequisites with PAT requirement - CLI now shows PAT setup instructions when enabling copilot
bradygaster
added a commit
that referenced
this pull request
Feb 11, 2026
This was referenced Feb 13, 2026
bradygaster
added a commit
that referenced
this pull request
Feb 13, 2026
Session: 2026-02-13-v040-boards-and-docs Requested by: Brady Changes: - Created Squad Backlog project board (#13) - Fenster: Phase 1 foundation — skill, proposal 006a, gate decision - McManus: Blog post, README/guide.md updates - Closed spikes: #22, #32, #33, #34, #35 - Merged decisions from inbox - Logged session
joniba
pushed a commit
to joniba/squad
that referenced
this pull request
Mar 26, 2026
Orchestration: Gandalf completed coffee-ratings squad-infra audit + reviewer hire planning. Changes: - Created 7 GitHub issues (bradygaster#7-bradygaster#13) with dependency chains: * Squad-infra audit: Elrond research → Bilbo docs → Gandalf decide → Gimli port → Bilbo template * Reviewer hire: Elrond study Bobbie patterns → Gandalf hire new Reviewer - Merged decision inbox: clean-chat directive + coffee-port-plan - Updated gandalf history.md with learnings Labels created: squad:elrond (blue), squad:bilbo (green), squad:gandalf (yellow) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 5, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12
Summary
Adds the GitHub Copilot coding agent (
@copilot) as a first-class member type in Squad, alongside AI agents (✅) and humans (👤). When enabled, the team Lead can triage issues to@copilotand the coding agent picks them up autonomously — creating branches, writing code, and opening draft PRs.What's new
🤖 Coding Agent member type
🤖 Coding Agentbadge distinguishes from✅ Active(AI) and👤 Human@copilotis always named "@copilot" — exempt from universe casting (like Scribe)Enable paths
initif you want to include the coding agentnpx squad copilot/copilot --auto-assign/copilot --offAuto-assign workflow
squad:copilotlabel is added to an issue, the workflow:GITHUB_TOKEN)copilot-swe-agent[bot]to the issue (viaCOPILOT_ASSIGN_TOKENPAT)main,master, etc.)copilot-instructions.md
Init-time question
initif you want to include the coding agentSetup requirements
COPILOT_ASSIGN_TOKEN (required for auto-assign)
The auto-assign workflow requires a classic Personal Access Token with
reposcope:reposcopegh secret set COPILOT_ASSIGN_TOKENWhy? The default
GITHUB_TOKENcannot assigncopilot-swe-agent[bot]. Fine-grained PATs also fail (403). Only a classic PAT withreposcope works.Copilot coding agent must be enabled
copilot-setup-steps.ymlmust exist in.github/Files changed
New files
templates/copilot-instructions.md.github/copilot-instructions.mddocs/features/copilot-coding-agent.mdModified files
index.jscopilotsubcommand, upgrade early-exit fix, copilot-instructions.md copy, PAT setup guidance.github/agents/squad.agent.mdtemplates/roster.mdtemplates/routing.mdsquad:copilotlabel, Lead triage guidancetemplates/workflows/squad-issue-assign.ymlsquad:copilotdetection,copilot-swe-agent[bot]assignment via PAT, dynamic default branchtemplates/workflows/squad-triage.ymltemplates/workflows/sync-squad-labels.ymlsquad:copilotlabel when coding agent on rostertest/index.test.jsREADME.mdsquad:copilotlabeldocs/scenarios/upgrading.mdUpgrade safety
upgradedoes NOT touch.ai-team/team.md— your team roster, members, and decisions are preservedsquad.agent.md, workflows, templates, andcopilot-instructions.md(if enabled)Bugs fixed
isAlreadyCurrentpath calledprocess.exit(0)before reaching workflow/agent copy code. Now refreshes all squad-owned files even when version matches.agent_assignment.base_branchwas hardcoded tomain. Now fetches the repo'sdefault_branchvia API.Testing
spboyer/slidemaker:squad:copilotlabel → workflow fires → comment posted → agent assigned → agent starts working