Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .ai-team-templates/constraint-tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Constraint Budget Tracking

When the user or system imposes constraints (question limits, revision limits, time budgets), maintain a visible counter in your responses and in the artifact.

## Format

```
📊 Clarifying questions used: 2 / 3
```

## Rules

- Update the counter each time the constraint is consumed
- When a constraint is exhausted, state it: `📊 Question budget exhausted (3/3). Proceeding with current information.`
- If no constraints are active, do not display counters
- Include the final constraint status in multi-agent artifacts

## Example Session

```
Coordinator: Spawning agents to analyze requirements...
📊 Clarifying questions used: 0 / 3

Agent asks clarification: "Should we support OAuth?"
Coordinator: Checking with user...
📊 Clarifying questions used: 1 / 3

Agent asks clarification: "What's the rate limit?"
Coordinator: Checking with user...
📊 Clarifying questions used: 2 / 3

Agent asks clarification: "Do we need RBAC?"
Coordinator: Checking with user...
📊 Clarifying questions used: 3 / 3

Agent asks clarification: "Should we cache responses?"
Coordinator: 📊 Question budget exhausted (3/3). Proceeding without clarification.
```
46 changes: 46 additions & 0 deletions .ai-team-templates/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copilot Coding Agent — Squad Instructions

You are working on a project that uses **Squad**, an AI team framework. When picking up issues autonomously, follow these guidelines.

## Team Context

Before starting work on any issue:

1. Read `.squad/team.md` for the team roster, member roles, and your capability profile.
2. Read `.squad/routing.md` for work routing rules.
3. If the issue has a `squad:{member}` label, read that member's charter at `.squad/agents/{member}/charter.md` to understand their domain expertise and coding style — work in their voice.

## Capability Self-Check

Before starting work, check your capability profile in `.squad/team.md` under the **Coding Agent → Capabilities** section.

- **🟢 Good fit** — proceed autonomously.
- **🟡 Needs review** — proceed, but note in the PR description that a squad member should review.
- **🔴 Not suitable** — do NOT start work. Instead, comment on the issue:
```
🤖 This issue doesn't match my capability profile (reason: {why}). Suggesting reassignment to a squad member.
```

## Branch Naming

Use the squad branch convention:
```
squad/{issue-number}-{kebab-case-slug}
```
Example: `squad/42-fix-login-validation`

## PR Guidelines

When opening a PR:
- Reference the issue: `Closes #{issue-number}`
- If the issue had a `squad:{member}` label, mention the member: `Working as {member} ({role})`
- If this is a 🟡 needs-review task, add to the PR description: `⚠️ This task was flagged as "needs review" — please have a squad member review before merging.`
- Follow any project conventions in `.squad/decisions.md`

## Decisions

If you make a decision that affects other team members, write it to:
```
.squad/decisions/inbox/copilot-{brief-slug}.md
```
The Scribe will merge it into the shared decisions file.
9 changes: 9 additions & 0 deletions .ai-team-templates/identity/now.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
updated_at: {timestamp}
focus_area: {brief description}
active_issues: []
---

# What We're Focused On

{Narrative description of current focus — 1-3 sentences. Updated by coordinator at session start.}
15 changes: 15 additions & 0 deletions .ai-team-templates/identity/wisdom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
last_updated: {timestamp}
---

# Team Wisdom

Reusable patterns and heuristics learned through work. NOT transcripts — each entry is a distilled, actionable insight.

## Patterns

<!-- Append entries below. Format: **Pattern:** description. **Context:** when it applies. -->

## Anti-Patterns

<!-- Things we tried that didn't work. **Avoid:** description. **Why:** reason. -->
90 changes: 90 additions & 0 deletions .ai-team-templates/mcp-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# MCP Integration — Configuration and Samples

MCP (Model Context Protocol) servers extend Squad with tools for external services — Trello, Aspire dashboards, Azure, Notion, and more. The user configures MCP servers in their environment; Squad discovers and uses them.

> **Full patterns:** Read `.squad/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, and graceful degradation.

## Config File Locations

Users configure MCP servers at these locations (checked in priority order):
1. **Repository-level:** `.copilot/mcp-config.json` (team-shared, committed to repo)
2. **Workspace-level:** `.vscode/mcp.json` (VS Code workspaces)
3. **User-level:** `~/.copilot/mcp-config.json` (personal)
4. **CLI override:** `--additional-mcp-config` flag (session-specific)

## Sample Config — Trello

```json
{
"mcpServers": {
"trello": {
"command": "npx",
"args": ["-y", "@trello/mcp-server"],
"env": {
"TRELLO_API_KEY": "${TRELLO_API_KEY}",
"TRELLO_TOKEN": "${TRELLO_TOKEN}"
}
}
}
}
```

## Sample Config — GitHub

```json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
```

## Sample Config — Azure

```json
{
"mcpServers": {
"azure": {
"command": "npx",
"args": ["-y", "@azure/mcp-server"],
"env": {
"AZURE_SUBSCRIPTION_ID": "${AZURE_SUBSCRIPTION_ID}",
"AZURE_CLIENT_ID": "${AZURE_CLIENT_ID}",
"AZURE_CLIENT_SECRET": "${AZURE_CLIENT_SECRET}",
"AZURE_TENANT_ID": "${AZURE_TENANT_ID}"
}
}
}
}
```

## Sample Config — Aspire

```json
{
"mcpServers": {
"aspire": {
"command": "npx",
"args": ["-y", "@aspire/mcp-server"],
"env": {
"ASPIRE_DASHBOARD_URL": "${ASPIRE_DASHBOARD_URL}"
}
}
}
}
```

## Authentication Notes

- **GitHub MCP requires a separate token** from the `gh` CLI auth. Generate at https://github.com/settings/tokens
- **Trello requires API key + token** from https://trello.com/power-ups/admin
- **Azure requires service principal credentials** — see Azure docs for setup
- **Aspire uses the dashboard URL** — typically `http://localhost:18888` during local dev

Auth is a real blocker for some MCP servers. Users need separate tokens for GitHub MCP, Azure MCP, Trello MCP, etc. This is a documentation problem, not a code problem.
28 changes: 28 additions & 0 deletions .ai-team-templates/multi-agent-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Multi-Agent Artifact Format

When multiple agents contribute to a final artifact (document, analysis, design), use this format. The assembled result must include:

- Termination condition
- Constraint budgets (if active)
- Reviewer verdicts (if any)
- Raw agent outputs appendix

## Assembly Structure

The assembled result goes at the top. Below it, include:

```
## APPENDIX: RAW AGENT OUTPUTS

### {Name} ({Role}) — Raw Output
{Paste agent's verbatim response here, unedited}

### {Name} ({Role}) — Raw Output
{Paste agent's verbatim response here, unedited}
```

## Appendix Rules

This appendix is for diagnostic integrity. Do not edit, summarize, or polish the raw outputs. The Coordinator may not rewrite raw agent outputs; it may only paste them verbatim and assemble the final artifact above.

See `.squad/templates/run-output.md` for the complete output format template.
49 changes: 49 additions & 0 deletions .ai-team-templates/plugin-marketplace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Plugin Marketplace

Plugins are curated agent templates, skills, instructions, and prompts shared by the community via GitHub repositories (e.g., `github/awesome-copilot`, `anthropics/skills`). They provide ready-made expertise for common domains — cloud platforms, frameworks, testing strategies, etc.

## Marketplace State

Registered marketplace sources are stored in `.squad/plugins/marketplaces.json`:

```json
{
"marketplaces": [
{
"name": "awesome-copilot",
"source": "github/awesome-copilot",
"added_at": "2026-02-14T00:00:00Z"
}
]
}
```

## CLI Commands

Users manage marketplaces via the CLI:
- `squad plugin marketplace add {owner/repo}` — Register a GitHub repo as a marketplace source
- `squad plugin marketplace remove {name}` — Remove a registered marketplace
- `squad plugin marketplace list` — List registered marketplaces
- `squad plugin marketplace browse {name}` — List available plugins in a marketplace

## When to Browse

During the **Adding Team Members** flow, AFTER allocating a name but BEFORE generating the charter:

1. Read `.squad/plugins/marketplaces.json`. If the file doesn't exist or `marketplaces` is empty, skip silently.
2. For each registered marketplace, search for plugins whose name or description matches the new member's role or domain keywords.
3. Present matching plugins to the user: *"Found '{plugin-name}' in {marketplace} marketplace — want me to install it as a skill for {CastName}?"*
4. If the user accepts, install the plugin (see below). If they decline or skip, proceed without it.

## How to Install a Plugin

1. Read the plugin content from the marketplace repository (the plugin's `SKILL.md` or equivalent).
2. Copy it into the agent's skills directory: `.squad/skills/{plugin-name}/SKILL.md`
3. If the plugin includes charter-level instructions (role boundaries, tool preferences), merge those into the agent's `charter.md`.
4. Log the installation in the agent's `history.md`: *"📦 Plugin '{plugin-name}' installed from {marketplace}."*

## Graceful Degradation

- **No marketplaces configured:** Skip the marketplace check entirely. No warning, no prompt.
- **Marketplace unreachable:** Warn the user (*"⚠ Couldn't reach {marketplace} — continuing without it"*) and proceed with team member creation normally.
- **No matching plugins:** Inform the user (*"No matching plugins found in configured marketplaces"*) and proceed.
24 changes: 24 additions & 0 deletions .ai-team-templates/workflows/squad-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Squad CI

on:
pull_request:
branches: [dev, preview, main, insider]
types: [opened, synchronize, reopened]
push:
branches: [dev, insider]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- name: Run tests
run: node --test test/*.test.js
50 changes: 50 additions & 0 deletions .ai-team-templates/workflows/squad-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Squad Docs — Build & Deploy

on:
workflow_dispatch:
push:
branches: [preview]
paths:
- 'docs/**'
- '.github/workflows/squad-docs.yml'

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install build dependencies
run: npm install --no-save markdown-it markdown-it-anchor

- name: Build docs site
run: node docs/build.js --out _site --base /squad

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading
Loading