squad
AGENTS.md3.4k starsChanged 2 months agoMITView on GitHub
Agent-facing guide to using Squad — the multi-agent team orchestrator for GitHub Copilot. Covers installation, slash commands, planning lifecycle, structured artifacts, and safe-output constraints.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- bradygaster/squadword for word, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- bradygaster/squad★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository247 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- packages/squad-cli/templates/copilot-instructions.mdCopilot instructions
- packages/squad-sdk/templates/copilot-instructions.mdCopilot instructions
- .squad-templates/copilot-instructions.mdCopilot instructions
- .squad/templates/copilot-instructions.mdCopilot instructions
- templates/copilot-instructions.mdCopilot instructions
- action-skill-contractsSkill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- architectural-reviewSkill
- archival-integritySkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- content-scopeSkill
- distributed-meshSkill
- documentation-maintenanceSkill
- github-multi-accountSkill
- git-workflowSkill
- history-hygieneSkill
- init-modeSkill
- model-selectionSkill
- pr-lifecycleSkill
- protected-filesSkill
- release-processSkill
- reskillSkill
- reviewer-protocolSkill
- secret-handlingSkill
- security-reviewSkill
- squad-conventionsSkill
- test-disciplineSkill
- windows-compatibilitySkill
- agentic-workflow-designerSkill
- gh-aw-reliabilitySkill
- iterative-retrievalSkill
- reflectSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- coordinator-init-modeSkill
- coordinator-response-modeSkill
- coordinator-source-of-truthSkill
- cross-machine-coordinationSkill
- cross-squad-communicationSkill
- cross-squadSkill
- distributed-meshSkill
- docs-standardsSkill
- e2e-template-testingSkill
- economy-modeSkill
- error-recoverySkill
- external-commsSkill
- fact-checkingSkill
- gh-auth-isolationSkill
- gh-aw-enlistmentSkill
- github-multi-accountSkill
- The first 60 shown.
The file
We split this agents.md into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 76
After running the command, confirm all eight source/lock pairs exist and strict compilation succeeds: Squad, Implement Worker, Review, Deps …
- Distinctive: line 101
Create a new issue describing what you want to build.
- Very specific: line 141
All commands are issued as comments on a GitHub issue.
- Distinctive: line 218
Use when: the intent is clear, the scope is small-to-medium, and you trust the decomposition without intermediate review.
- Distinctive: line 233
Use when: scope is large or ambiguous, you need stakeholder sign-off at each stage, or you want to revise intermediate artifacts before …
- Distinctive: line 288
Add a policy directive line to the issue body:
- Distinctive: line 294
Use a plain visible line — not an HTML comment.
- Distinctive: line 321
All mutations are explicitly declared — no surprise side effects
- Distinctive: line 322
If a plan produces more than 20 tasks, activation will create the first 20.
- Distinctive: line 331
Every planning artifact uses the gh-aw safe-output data envelope:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Using Squad in This Repository
Squad is a multi-agent team orchestrator for GitHub Copilot. It composes specialist AI agents into a coordinated team that lives in your repository, then drives planning and execution through structured workflows.
Getting started
GitHub Agentic Workflows (gh-aw) are composable AI workflows triggered by slash commands in GitHub issues. Squad uses them to orchestrate multi-agent planning and execution directly inside your repository.
Prerequisites
- GitHub CLI (
gh) installed and authenticated — install guide gh awextension available (ships with recentghversions; rungh aw --helpto verify)
Install the Squad workflows
Agent action required: If a user asks you to install or set up Squad Agentic Workflows, execute the complete seven-step quick start in their repository. Do not only quote or run the
gh aw addcommand below. The supported path verifies that GitHub Issues are enabled (and enables them when the authenticated user has repository administration permission), configures workflow-created pull requests, installs and validates the complete generated artifact set, commits it on an isolated branch, and opens a human-reviewed bootstrap PR. If disabled Issues cannot be enabled, stop before installation and ask a repository administrator to enable them./squadcommands use issue comments, and bootstrap creates a research/proposals issue. Stop at the bootstrap PR; the human merges it./squadslash commands become active only after that merge reaches the repository's default branch. The installation PR is a manual trust boundary: its PR-controlled workflow cannot mint a trusted Squad verdict. After merge, require the Cast PR (automatically opened, or manually opened from a signed fallback issue whenGITHUB_TOKENcannot create it) to pass the deterministic relay's nativeSquad Review / reviewjob, which is authoritative only when it validates the exact trusted automatic run from the base-controlledpull_request_targetworkflow. Authoritative merge enforcement requires a source-bound required-workflow or equivalent ruleset. Where source binding is unavailable, treat the context as advisory and continue to require an independent human approving review. The relay requires no separate PAT, GitHub App, private key, secret, environment, or external service.
The quick start installs this workflow set:
SQUAD_SHA="<40-character-commit-sha>" # explicit, maintainer-approved; never `commits/dev`
gh aw add "bradygaster/squad/workflows@${SQUAD_SHA}"
rm -f .github/skills/agentic-workflows/SKILL.mdThe removal is intentional: gh-aw v0.91.5 generates that generic tool-owned
router, which loads mutable prompts from the current github/gh-aw repository.
It is not Squad-owned or bound to SQUAD_SHA. Keep the exact
.github/skills/gh-aw-enlistment/SKILL.md installed by Squad.
This repository routes gh-aw work directly through the
agentic-workflows-dev specialist in .squad/routing.md, with the local
agentic-workflow-designer and gh-aw-reliability skills for design and
contract validation. None depends on the deleted router. Retaining a rewritten
or pinned copy would make Squad the owner of a forked generic gh-aw prompt
router and its upstream corpus; removal preserves the package boundary without
vendoring or synchronizing that mutable scaffold.
This command:
- Fetches the Squad dispatcher, general and dependency workers, independent reviewer with a required-check gate, retrospective, and approval-gated improvement worker
- Compiles them into GitHub Actions–compatible workflows
- Adds the workflow sources and generated files to your repository's
.github/directory
Verify installation
After running the command, confirm all eight source/lock pairs exist and strict
compilation succeeds: Squad, Implement Worker, Review, Deps Worker, Retro and
Improvement Worker, plus the dedicated Bootstrap and Command Router workflows. The improvement
worker is standard but dormant until an exact human approval is relayed through
the dispatcher. Bootstrap wakes after the installation lands on the default
branch and normally creates the linked draft Cast PR and research-proposals
issue; if can_approve_pull_request_reviews is false (the recommended
setting), GITHUB_TOKEN cannot open that PR, so Bootstrap instead opens a
bot-authored fallback issue with a signed provenance record and a
ready-to-click compare URL for a human to open the PR manually — Squad
Review verifies that record before treating the manual PR as trusted (see the
gh-aw guide for the exact
conditions).
Retrospectives remain report/proposal-only by default. Ordinary auto-fixes need
"squadRetroAutoImplement": "allow" in .squad/config.json. A proposal restricted
to eligible Markdown paths under .squad/skills/** or .squad/decisions/inbox/**
instead needs /squad approve-improvement, an Approved-Revision: hash and
exact Approved-Path: lines. /squad revoke-improvement reserves the human's
durable revocation without dispatching. Both workers open drafts, never merge
or mark ready. See the gh-aw guide
for revision calculation, caps and manual retry.
Try your first command
- Create a new issue describing what you want to build.
- Post a comment on that issue:
/squad cast - Squad generates a specialist team tailored to your project and opens a PR with the
.squad/directory.
Usage modes
Once installed, Squad supports two interaction modes:
| Mode | Trigger | Best for |
| gh-aw (GitHub Agentic Workflows) | Slash commands in issues | Automated, issue-driven planning and execution |
| CLI (interactive) | squad command in terminal | Local development, experimentation |
This guide focuses on the gh-aw approach — the primary mode for agent-driven work. Everything below assumes you've completed the installation steps above.
Where the team lives
.squad/
├── team.md # Roster, roles, capabilities
├── routing.md # Work-type → agent mapping
├── decisions.md # Architectural decisions log
├── casting/
│ └── registry.json # Agent registry
└── agents/
└── {name}/
└── charter.md # Agent identity, constraints, skillsSlash Commands — Complete Reference
All commands are issued as comments on a GitHub issue. Prefix: /squad.
Team Management
| Command | Purpose | Preconditions | Repo artifacts | User sees |
/squad cast | Generate a specialist team for the repository | Issue exists with description of what to build | PR opened with .squad/ directory + .github/agents/squad.agent.md | PR link posted as comment |
/squad cast-member <role> | Add a single team member to an existing team | .squad/team.md exists with roster | PR updating .squad/agents/{name}/charter.md and team.md | PR link posted as comment |
/squad retire <name> | Remove a team member | Named agent exists in .squad/agents/ | PR removing agent directory and roster entry | PR link posted as comment |
/squad status | Show team status and health | .squad/team.md exists | None | Comment with team state summary |
/squad connect <owner/repo> | Connect to a GitHub repository for issue management | Target repo accessible | .squad/config updated with connected repo | Confirmation comment |
/squad adopt <path> | Adopt an existing .squad/ directory from another source | Path contains valid .squad/ structure | PR with adopted .squad/ directory | PR link posted as comment |
Planning Workflow
| Command | Purpose | Preconditions | Repo artifacts | User sees |
/squad research | Deep-dive analysis of the issue and repository; consults current online technical documentation when the repo's gh-aw network policy permits | Issue exists with intent | Comment with squad_artifact: research data | Structured research findings |
/squad triage | Classify research findings into work, decisions, and exclusions | Research artifact exists | Comment with squad_artifact: triage data | Categorized findings table |
/squad triage revise <feedback> | Adjust triage dispositions based on feedback | Triage artifact exists | Updated triage artifact | Revised triage |
/squad plan | Generate combined program + implementation plan (fast path) | Triage artifact exists | Comment with squad_artifact: plan data | Combined plan |
/squad plan program | Generate high-level program plan with epics and milestones | Triage artifact exists | Comment with squad_artifact: program data | Epics, milestones, user stories |
/squad plan program revise <feedback> | Adjust program plan based on feedback | Program plan artifact exists | Updated program artifact | Revised program plan |
/squad plan implementation | Decompose program plan into PR-sized tasks | Program plan artifact exists | Comment with squad_artifact: implementation data | Task breakdown with deps and sizing |
/squad plan validate | Run structural readiness checks on the plan | Implementation plan artifact exists | Comment with squad_artifact: validation data | Pass/fail checklist |
/squad plan revise <feedback> | Revise the current plan based on feedback | Program or implementation plan exists | Updated plan artifact | Revised plan |
/squad plan accept | Accept scope + implementation + activate (fast path) | Implementation plan + validation pass | Structured acceptance/activation artifacts; issues created | Acceptance confirmations + issue links |
/squad plan accept scope | Approve the program plan's scope | Program plan artifact exists | Comment with squad_artifact: scope-accepted data | Scope lock confirmation |
/squad plan accept implementation | Approve the implementation plan | Implementation plan + validation pass | Comment with squad_artifact: impl-accepted data | Implementation lock confirmation |
/squad plan activate | Create GitHub issues from accepted plan | Both scope and implementation accepted | Issues + milestones + labels; activated artifact | Issue links and summary |
The Planning Lifecycle
State Machine
idle
→ researching (/squad research)
→ triaging (/squad triage)
→ program_planning (/squad plan program)
→ implementation_planning (/squad plan implementation)
→ validating (/squad plan validate)
→ scope_accepted (/squad plan accept scope)
→ impl_accepted (/squad plan accept implementation)
→ activated (/squad plan activate)Stage-by-Stage Reference
| Stage | Command | squad_artifact | Location | Idempotent? |
| Intent | (issue body) | — | Issue description | N/A |
| Research | /squad research | research | Issue comment | Yes — re-running replaces previous |
| Triage | /squad triage | triage | Issue comment | Yes |
| Program Plan | /squad plan program | program | Issue comment | Yes |
| Implementation Plan | /squad plan implementation | implementation | Issue comment | Yes |
| Validation | /squad plan validate | validation | Issue comment | Yes |
| Scope Acceptance | /squad plan accept scope | scope-accepted | Issue comment | No — locks scope |
| Impl Acceptance | /squad plan accept implementation | impl-accepted | Issue comment | No — locks implementation |
| Activation | /squad plan activate | activated | Issue comment | No — creates issues |
| Lifecycle State | (auto-updated) | lifecycle-state | Issue comment | Auto-maintained |
Idempotency note: Research, triage, plans, and validation can be re-run safely — each re-run replaces the previous artifact. Acceptance and activation are one-way transitions.
Fast Paths vs Granular Commands
Fast path — fewer steps, less control
/squad plan → generates program + implementation in one pass
/squad plan accept → accepts scope + implementation + activatesUse when: the intent is clear, the scope is small-to-medium, and you trust the decomposition without intermediate review.
Granular path — more control, full auditability
/squad research
/squad triage
/squad plan program
/squad plan implementation
/squad plan validate
/squad plan accept scope
/squad plan accept implementation
/squad plan activateUse when: scope is large or ambiguous, you need stakeholder sign-off at each stage, or you want to revise intermediate artifacts before proceeding.
You can mix: use /squad plan for the fast program+implementation pass, then review and /squad plan accept scope and /squad plan accept implementation separately.
What Gets Created in the Repo
.squad/ directory
Created by /squad cast. Contains team state, agent charters, routing rules, and configuration. Delivered as a PR — never committed directly to the default branch.
Labels
squad— applied to all Squad-managed issues and PRssquad:{agent-name}— assigns ownership to a specific team member
Issues
Created during /squad plan activate:
- Epics — high-level work items with sub-issues
- Tasks — PR-sized implementation units linked to epics
- Hierarchy uses GitHub sub-issues when available
Milestones
Created during activation to group epics by delivery phase.
Comments
Structured planning artifacts are posted as human-readable issue comments. gh-aw appends a validated Structured data: JSON block for programmatic identification.
Pull requests
/squad cast→ PR with.squad/scaffolding/squad cast-member→ PR adding a new agent/squad retire→ PR removing an agent
Planning Policy
Squad's planning behavior is configurable through policy profiles.
Built-in Profiles
| Profile | Max issues | Milestones required | Acceptance criteria | Best for |
default | 20 | Yes | Yes | Most projects |
lean | 10 | No | No | Small scope, fast iteration |
enterprise | 50 | Yes (strict) | Yes (strict) | Large orgs, compliance needs |
spike | 5 | No | No | Exploration, prototyping |
Selecting a Profile
Add a policy directive line to the issue body:
Squad-Policy: leanUse a plain visible line — not an HTML comment. gh-aw strips HTML comments from issue bodies before the agent sees them, so a commented directive is silently ignored.
Or configure at the repo level in .squad/planning-policy.md with YAML frontmatter.
Priority Order
- Issue body (
Squad-Policy: ...) — highest - Repository file (
.squad/planning-policy.md) - Profile name (built-in)
- Default — fallback
Safe-Output Constraints
GitHub Agentic Workflows enforce output limits per run to prevent runaway mutations.
| Output type | Maximum per run | Notes |
create-issue | 75 | For large decompositions, split into multiple plan/accept cycles |
create-pull-request | 3 | Cast, cast-member, and retire each produce one PR |
add-comment | 20 | Planning artifacts are posted as comments |
Implications
- All mutations are explicitly declared — no surprise side effects
- If a plan produces more than 20 tasks, activation will create the first 20; re-run to continue
- Allowed branch patterns for PRs:
squad/* - Allowed file patterns for PRs:
.squad/**,.github/agents/squad.agent.md,meet-the-squad.md - Labels
[squad]are applied automatically to all created issues and PRs
Structured Data for Programmatic Access
Every planning artifact uses the gh-aw safe-output data envelope:
{
"squad_artifact": "research",
"schema_version": "1",
"origin_issue": 123,
"phases": []
}gh-aw appends the envelope as a Structured data: fenced JSON block. phases is empty except on phase-state artifacts, where it contains the accumulated phase numbers. Paginate all comments, parse the JSON, match the current origin_issue and desired squad_artifact, then take the newest match.
HTML comments are not Squad state: gh-aw removes them from compiled prompts and sanitized safe-output bodies. See the planning ontology §4 for the complete artifact registry.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

