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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copilot/skills/client-compatibility/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The `sql` tool is **CLI-only**. It does not exist on VS Code, JetBrains, or GitH
**Example 1: CLI parallel spawn**
```typescript
// Coordinator detects task tool available → CLI mode
task({ agent_type: "general-purpose", mode: "background", model: "claude-sonnet-4.5", ... })
task({ agent_type: "general-purpose", mode: "background", model: "claude-sonnet-4.6", ... })
task({ agent_type: "general-purpose", mode: "background", model: "claude-haiku-4.5", ... })
// Later: read_agent for both
```
Expand Down
7 changes: 4 additions & 3 deletions .copilot/skills/economy-mode/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ When economy mode is **active**, Layer 3 auto-selection uses this table instead

| Task Output | Normal Mode | Economy Mode |
|-------------|-------------|--------------|
| Writing code (implementation, refactoring, bug fixes) | `claude-sonnet-4.5` | `gpt-4.1` or `gpt-5-mini` |
| Writing prompts or agent designs | `claude-sonnet-4.5` | `gpt-4.1` or `gpt-5-mini` |
| Writing code (implementation, refactoring, bug fixes) | `claude-sonnet-4.6` | `gpt-4.1` or `gpt-5-mini` |
| Writing prompts or agent designs | `claude-sonnet-4.6` | `gpt-4.1` or `gpt-5-mini` |
| Docs, planning, triage, changelogs, mechanical ops | `claude-haiku-4.5` | `gpt-4.1` or `gpt-5-mini` |
| Architecture, code review, security audits | `claude-opus-4.5` | `claude-sonnet-4.5` |
| Code review | `claude-sonnet-4.6` | `gpt-4.1` or `gpt-5-mini` |
| Architecture proposals, reviewer gates, security audits | `claude-opus-4.6` | `claude-sonnet-4.6` |
| Scribe / logger / mechanical file ops | `claude-haiku-4.5` | `gpt-4.1` |

**Prefer `gpt-4.1` over `gpt-5-mini`** when the task involves structured output or agentic tool use. Prefer `gpt-5-mini` for pure text generation tasks where latency matters.
Expand Down
10 changes: 7 additions & 3 deletions .copilot/skills/model-selection/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,16 @@ After resolving the model and including it in the spawn template, this skill is

## Fallback Chains

If a model is unavailable (rate limit, plan restriction), retry within the same tier:
If a model is unavailable (rate limit, plan restriction), retry within the same
tier until the documented chain is exhausted:

```
Premium: claude-opus-4.6 → claude-opus-4.6-fast → claude-opus-4.5 → claude-sonnet-4.6
Premium: claude-opus-4.6 → claude-opus-4.5 → claude-sonnet-4.6 → claude-sonnet-4.5
Standard: claude-sonnet-4.6 → gpt-5.4 → claude-sonnet-4.5 → gpt-5.3-codex → claude-sonnet-4
Fast: claude-haiku-4.5 → gpt-5.1-codex-mini → gpt-4.1 → gpt-5-mini
Fast: claude-haiku-4.5 → gpt-5.4-mini → gpt-4.1 → gpt-5-mini
Comment on lines +109 to +115

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

The text says fallback retries stay “within the same tier”, but the Premium chain includes claude-sonnet-* entries which are listed elsewhere as Standard-tier models. Either adjust the wording (e.g., allow tier downgrade but never upgrade) or keep the Premium chain strictly premium/vision-capable models.

Copilot uses AI. Check for mistakes.
```

If the user explicitly selects `claude-opus-4.7`, start at the top of the
premium chain with `claude-opus-4.6` as the first fallback.

**Never fall UP in tier.** A fast task won't land on a premium model via fallback.
62 changes: 43 additions & 19 deletions .github/agents/squad.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,25 @@ For each squad member with assigned issues, note them in the session context. Wh

**Proactive issue pickup:** If a user starts a session and there are open `squad:{member}` issues, mention them: *"Hey {user}, {AgentName} has an open issue — #42: Fix auth endpoint timeout. Want them to pick it up?"*

**Issue-first branch sourcing:** For any push-capable work that requires a
`squad/{issue-number}-{slug}` branch and the user did **not** provide an issue
number, resolve the issue number before asking the user for branch details:

1. Check the current GitHub repository for relevant **open** issues. Prefer the
GitHub MCP tools when available; otherwise use `gh issue list` or
`gh issue search`.
Comment on lines +154 to +155

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

gh issue search is not a standard GitHub CLI subcommand; this guidance will fail when users follow it. Use gh search issues ... or gh issue list --search "..." as the CLI fallback when MCP tools aren’t available.

Suggested change
GitHub MCP tools when available; otherwise use `gh issue list` or
`gh issue search`.
GitHub MCP tools when available; otherwise use
`gh issue list --search "..."` or `gh search issues ...`.

Copilot uses AI. Check for mistakes.
2. If one open issue clearly matches the requested change, reuse that issue
number.
3. If multiple open issues are plausible matches, show the candidates and ask
the user which one to use.
4. If no open issue matches, create a new GitHub issue from the requested
change summary, then use that new issue number for branch naming.
5. Only after the issue number is resolved should the coordinator derive the
branch name `squad/{issue-number}-{slug}`.

This avoids guessed or duplicated issue numbers when preparing branches, commits,
and PR metadata.

**Issue triage routing:** When a new issue gets the `squad` label (via the sync-squad-labels workflow), the Lead triages it — reading the issue, analyzing it, assigning the correct `squad:{member}` label(s), and commenting with triage notes. The Lead can also reassign by swapping labels.

**⚡ Read `.squad/team.md` (roster), `.squad/routing.md` (routing), and `.squad/casting/registry.json` (persistent names) as parallel tool calls in a single turn. Do NOT read these sequentially.**
Expand Down Expand Up @@ -356,41 +375,41 @@ Before spawning an agent, determine which model to use. Check these layers in or

| Task Output | Model | Tier | Rule |
|-------------|-------|------|------|
| Writing code (implementation, refactoring, test code, bug fixes) | `claude-sonnet-4.5` | Standard | Quality and accuracy matter for code. Use standard tier. |
| Writing prompts or agent designs (structured text that functions like code) | `claude-sonnet-4.5` | Standard | Prompts are executable — treat like code. |
| Writing code (implementation, refactoring, test code, bug fixes) | `claude-sonnet-4.6` | Standard | Quality and accuracy matter for code. Use standard tier. |
| Writing prompts or agent designs (structured text that functions like code) | `claude-sonnet-4.6` | Standard | Prompts are executable — treat like code. |
| NOT writing code (docs, planning, triage, logs, changelogs, mechanical ops) | `claude-haiku-4.5` | Fast | Cost first. Haiku handles non-code tasks. |
| Visual/design work requiring image analysis | `claude-opus-4.5` | Premium | Vision capability required. Overrides cost rule. |
| Visual/design work requiring image analysis | `claude-opus-4.6` | Premium | Vision capability required. Overrides cost rule. |

**Role-to-model mapping** (applying cost-first principle):

| Role | Default Model | Why | Override When |
|------|--------------|-----|---------------|
| Core Dev / Backend / Frontend | `claude-sonnet-4.5` | Writes code — quality first | Heavy code gen → `gpt-5.2-codex` |
| Tester / QA | `claude-sonnet-4.5` | Writes test code — quality first | Simple test scaffolding → `claude-haiku-4.5` |
| Lead / Architect | auto (per-task) | Mixed: code review needs quality, planning needs cost | Architecture proposals → premium; triage/planning → haiku |
| Core Dev / Backend / Frontend | `claude-sonnet-4.6` | Writes code — quality first | Heavy code gen → `gpt-5.3-codex` |
| Tester / QA | `claude-sonnet-4.6` | Writes test code — quality first | Simple test scaffolding → `claude-haiku-4.5` |
| Lead / Architect | auto (per-task) | Mixed: review needs depth, planning needs cost | Architecture proposals or reviewer gates → premium; triage/planning → haiku |
| Prompt Engineer | auto (per-task) | Mixed: prompt design is like code, research is not | Prompt architecture → sonnet; research/analysis → haiku |
| Copilot SDK Expert | `claude-sonnet-4.5` | Technical analysis that often touches code | Pure research → `claude-haiku-4.5` |
| Designer / Visual | `claude-opus-4.5` | Vision-capable model required | — (never downgrade — vision is non-negotiable) |
| Copilot SDK Expert | `claude-sonnet-4.6` | Technical analysis that often touches code | Pure research → `claude-haiku-4.5` |
| Designer / Visual | `claude-opus-4.6` | Vision-capable model required | — (never downgrade — vision is non-negotiable) |
| DevRel / Writer | `claude-haiku-4.5` | Docs and writing — not code | — |
| Scribe / Logger | `claude-haiku-4.5` | Mechanical file ops — cheapest possible | — (never bump Scribe) |
| Git / Release | `claude-haiku-4.5` | Mechanical ops — changelogs, tags, version bumps | — (never bump mechanical ops) |

**Task complexity adjustments** (apply at most ONE — no cascading):
- **Bump UP to premium:** architecture proposals, reviewer gates, security audits, multi-agent coordination (output feeds 3+ agents)
- **Bump DOWN to fast/cheap:** typo fixes, renames, boilerplate, scaffolding, changelogs, version bumps
- **Switch to code specialist (`gpt-5.2-codex`):** large multi-file refactors, complex implementation from spec, heavy code generation (500+ lines)
- **Switch to code specialist (`gpt-5.3-codex`):** large multi-file refactors, complex implementation from spec, heavy code generation (500+ lines)
- **Switch to analytical diversity (`gemini-3-pro-preview`):** code reviews where a second perspective helps, security reviews, architecture reviews after a rejection

**Layer 4 — Default:** If nothing else matched, use `claude-haiku-4.5`. Cost wins when in doubt, unless code is being produced.

**Fallback chains — when a model is unavailable:**

If a spawn fails because the selected model is unavailable (plan restriction, org policy, rate limit, deprecation, or any other reason), silently retry with the next model in the chain. Do NOT tell the user about fallback attempts. Maximum 3 retries before jumping to the nuclear fallback.
If a spawn fails because the selected model is unavailable (plan restriction, org policy, rate limit, deprecation, or any other reason), silently retry with the next model in the relevant chain until that chain is exhausted. Do NOT tell the user about fallback attempts.

```
Premium: claude-opus-4.6 → claude-opus-4.6-fast → claude-opus-4.5 → claude-sonnet-4.5 → (omit model param)
Standard: claude-sonnet-4.5 → gpt-5.2-codex → claude-sonnet-4 → gpt-5.2 → (omit model param)
Fast: claude-haiku-4.5 → gpt-5.1-codex-mini → gpt-4.1 → gpt-5-mini → (omit model param)
Premium: claude-opus-4.6 → claude-opus-4.5 → claude-sonnet-4.6 → claude-sonnet-4.5 → (omit model param)
Standard: claude-sonnet-4.6 → gpt-5.4claude-sonnet-4.5 → gpt-5.3-codex → claude-sonnet-4 → gpt-5.2 → (omit model param)
Fast: claude-haiku-4.5 → gpt-5.4-mini → gpt-4.1 → gpt-5-mini → (omit model param)
Comment on lines 409 to +412

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

The “Premium” fallback chain includes claude-sonnet-* models, which appear elsewhere in this document as Standard-tier and may not meet “vision required” constraints. Consider splitting fallbacks by capability (vision vs non-vision) or clarifying that premium tasks may downgrade to standard only when vision isn’t required.

Copilot uses AI. Check for mistakes.
```

`(omit model param)` = call the `task` tool WITHOUT the `model` parameter. The platform uses its built-in default. This is the nuclear fallback — it always works.
Expand All @@ -413,7 +432,7 @@ prompt: |
...
```

Only set `model` when it differs from the platform default (`claude-sonnet-4.5`). If the resolved model IS `claude-sonnet-4.5`, you MAY omit the `model` parameter — the platform uses it as default.
Pass the resolved model as the `model` parameter on `task` tool calls when it differs from the platform default. If the resolved model matches the platform default, you MAY omit the `model` parameter.

If you've exhausted the fallback chain and reached nuclear fallback, omit the `model` parameter entirely.

Expand All @@ -422,8 +441,8 @@ If you've exhausted the fallback chain and reached nuclear fallback, omit the `m
When spawning, include the model in your acknowledgment:

```
🔧 Fenster (claude-sonnet-4.5) — refactoring auth module
🎨 Redfoot (claude-opus-4.5 · vision) — designing color system
🔧 Fenster (claude-sonnet-4.6) — refactoring auth module
🎨 Redfoot (claude-opus-4.6 · vision) — designing color system
📋 Scribe (claude-haiku-4.5 · fast) — logging session
⚡ Keaton (claude-opus-4.6 · bumped for architecture) — reviewing proposal
📝 McManus (claude-haiku-4.5 · fast) — updating docs
Expand All @@ -433,9 +452,13 @@ Include tier annotation only when the model was bumped or a specialist was chose

**Valid models (current platform catalog):**

Premium: `claude-opus-4.6`, `claude-opus-4.6-fast`, `claude-opus-4.5`
Standard: `claude-sonnet-4.5`, `claude-sonnet-4`, `gpt-5.2-codex`, `gpt-5.2`, `gpt-5.1-codex-max`, `gpt-5.1-codex`, `gpt-5.1`, `gpt-5`, `gemini-3-pro-preview`
Fast/Cheap: `claude-haiku-4.5`, `gpt-5.1-codex-mini`, `gpt-5-mini`, `gpt-4.1`
Premium: `claude-opus-4.7` (explicit override), `claude-opus-4.6`, `claude-opus-4.5`
Standard: `claude-sonnet-4.6`, `claude-sonnet-4.5`, `claude-sonnet-4`, `gpt-5.4`, `gpt-5.3-codex`, `gpt-5.2-codex`, `gpt-5.2`, `gemini-3-pro-preview`
Fast/Cheap: `claude-haiku-4.5`, `gpt-5.4-mini`, `gpt-5-mini`, `gpt-4.1`

Task-aware auto and the fallback chains above standardize on `claude-opus-4.6`
for premium work. Use `claude-opus-4.7` only when the user or config
explicitly requests it.

### Client Compatibility

Expand Down Expand Up @@ -1083,6 +1106,7 @@ Before connecting to a GitHub repository, verify that the `gh` CLI is available
| "show the backlog" / "what issues are open?" | List issues from connected repo |
| "work on issue #N" / "pick up #N" | Route issue to appropriate agent |
| "work on all issues" / "start the backlog" | Route all open issues (batched) |
| "push these changes" / "open a PR" with no issue number | Resolve matching open issue first; if none exists, create one before branching |

---

Expand Down
3 changes: 2 additions & 1 deletion .squad/agents/aragorn/charter.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ You are Aragorn, the Lead Developer on the {ProjectName} project. You own archit

## Model
Preferred: auto
- Code review, architecture decisions → claude-sonnet-4.5
- Architecture proposals, reviewer gates → claude-opus-4.6
- Code review, design-heavy implementation work → claude-sonnet-4.6
- Triage, planning, issue routing → claude-haiku-4.5

## Critical Rules
Expand Down
5 changes: 3 additions & 2 deletions .squad/agents/boromir/charter.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ You are Boromir, the DevOps engineer on the {ProjectName} project. You own CI/CD
4. Aspire resource names must be consistent between AppHost and ServiceDefaults.

## Model
Preferred: claude-haiku-4.5 (mostly config/YAML — not application code)
Override: claude-sonnet-4.5 for complex workflow logic
Preferred: auto
- Routine config, changelog, and mechanical ops → claude-haiku-4.5
- Complex workflow, AppHost, and CI logic → claude-sonnet-4.6
3 changes: 2 additions & 1 deletion .squad/agents/gandalf/charter.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
You are Gandalf, the Security Officer for {ProjectName}. Your squad label is **squad:gandalf** and your emoji is 🔒 Security.

## Model
- **Preferred:** auto (standard for code/config, fast for analysis)
- **Preferred:** auto (premium for security audits and review gates,
standard for remediation changes, fast for triage)

## Mission
Guard {ProjectName} against security threats. Ensure authentication and authorization are correctly implemented using Auth0. Audit the application for vulnerabilities — SQL injection, XSS, CSRF, insecure endpoints, improper authorization boundaries, secrets in code, and any other intrusion vector. Make the application hostile to attackers and welcoming only to authorized users.
Expand Down
2 changes: 1 addition & 1 deletion .squad/agents/gimli/charter.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ You are Gimli, the Tester on the {ProjectName} project. You own unit tests, inte
8. File-scoped namespaces, tab indentation

## Model
Preferred: claude-sonnet-4.5 (writes test code)
Preferred: auto (test authoring resolves to claude-sonnet-4.6)
2 changes: 1 addition & 1 deletion .squad/agents/legolas/charter.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Before working on any theme, dark/light mode, FOUC, localStorage, or color palet
Key patterns it covers: unified `tailwind-color-theme` storage key, anti-FOUC IIFE placement in `<head>`, Blazor navigation hooks (`enhancedload` + `blazor:navigated`), MutationObserver guard, and `themeManager` JS object coordination.

## Model
Preferred: claude-sonnet-4.5 (writes code)
Preferred: auto (frontend implementation resolves to claude-sonnet-4.6)

## Naming Conventions
- Component files: `{Name}Component.razor`
Expand Down
2 changes: 1 addition & 1 deletion .squad/agents/sam/charter.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ You are Sam, the Backend Developer on the {ProjectName} project. You own MongoDB
- Some repositories use `{Entity}Dto` directly while others use domain Models

## Model
Preferred: claude-sonnet-4.5 (writes code)
Preferred: auto (backend implementation resolves to claude-sonnet-4.6)
12 changes: 6 additions & 6 deletions .squad/casting/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@
},
{
"name": "Gandalf",
"role": "Reviewer",
"role": "Security / Auth",
"legacy_named": true,
"status": "active",
"charter_path": ".squad/agents/gandalf/charter.md",
"notes": "Code review gate, quality"
"notes": "Auth, secrets, vulnerability review"
},
{
"name": "Frodo",
"role": "Security",
"role": "Tech Writer",
"legacy_named": true,
"status": "active",
"charter_path": ".squad/agents/frodo/charter.md",
"notes": "Auth, secrets, vulnerabilities"
"notes": "XML docs, README, CONTRIBUTING"
},
{
"name": "Pippin",
Expand All @@ -76,11 +76,11 @@
},
{
"name": "Bilbo",
"role": "Research",
"role": "Tech Blogger",
"legacy_named": true,
"status": "active",
"charter_path": ".squad/agents/bilbo/charter.md",
"notes": "Spikes, POCs, investigations"
"notes": "Blog posts, release posts, GitHub Pages content"
},
{
"name": "Ralph",
Expand Down
8 changes: 4 additions & 4 deletions .squad/playbooks/pr-merge-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Owner:** Aragorn (Lead) + Ralph (Work Monitor)
**Ref:** `.squad/ceremonies.md` (PR Review Gate, Standard Task Workflow)
**Last Updated:** 2026-04-13
**Last Updated:** 2026-04-19

---

Expand Down Expand Up @@ -42,8 +42,8 @@ gh pr create \
Do NOT request review until CI is green:

```bash
# Poll CI status
gh pr checks <PR-number>
# Watch CI status (refresh every 5 seconds)
gh pr checks <PR-number> --watch --interval 5
# All checks must show ✅ before proceeding
```

Expand All @@ -55,7 +55,7 @@ Ralph MUST verify ALL of the following before spawning reviewers. Any failing ga

| Gate | Command | Expected |
| ------------------- | --------------------------------------------------- | -------------------------- |
| CI green | `gh pr checks <N>` | All passing |
| CI green | `gh pr checks <N> --watch --interval 5` | All passing |
| No conflicts | `gh pr view <N> --json mergeable -q .mergeable` | `MERGEABLE` |
| PR template filled | `gh pr view <N> --json body` | Contains filled checkboxes |
| Branch is `squad/*` | `gh pr view <N> --json headRefName -q .headRefName` | Starts with `squad/` |
Expand Down
Loading
Loading