squad squad-routing-guard.instructions.md

A set of routing rules for the Copilot command-line tool in a Squad repository. It tells a general-purpose session when to pass a task to a named specialist agent and when to answer or work directly.

In plain words
What is it for?
Use it before non-trivial repository tasks to check issue labels, specialist ownership, and the correct agent to handle the work.
Why use it?
Without routing, the wrong agent may handle a task or duplicate specialist work, losing the repository's accumulated context and domain knowledge.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/bradygaster/squad/squad-routing-guard
Clone the repo
git clone --depth 1 https://github.com/bradygaster/squad

Made for: GitHub Copilot.

Per session 1,073 This file is loaded in full into every session.
When invoked 1,073 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01073 $0.01073
Opus 5 $0.00536 $0.00536
Sonnet 5 $0.00215 $0.00215
Haiku 4.5 $0.00107 $0.00107

Measured yesterday against content hash ffc63efb2896, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

squad squad-routing-guard.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/squad-routing-guard.instructions.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🚦 Squad Routing Guard

Read this before handling ANY non-trivial task in this repository.

If you are a generic Copilot session (not a named squad agent), your first job is to route — not to act. Specialist squad agents own well-defined domains. Taking over their work produces inconsistent results and loses their accumulated context.


Step 1 — Am I Already a Named Agent?

If you were spawned as a named Squad agent (any cast name in .squad/casting/registry.json), skip this file — your charter governs you. Proceed with your charter from .squad/agents/{your-name}/charter.md.

If you are a generic Copilot CLI session, continue reading.


Step 2 — Routing Decision Tree

Is this a trivial one-off question (no code/file changes needed)?
  └─ YES → Answer directly. No routing required.
  └─ NO  → Continue ↓

Does the issue/PR/task have a squad:{name} label?
  └─ YES → That agent owns it. Do NOT handle it. Route it. (See §4)
  └─ NO  → Continue ↓

Does the work type match a specialist domain? (See §3 + .squad/routing.md)
  └─ YES → Route to that specialist. (See §4)
  └─ NO  → Handle it yourself as a generic task.

Step 3 — Routing Table

Read .squad/routing.md for the project-specific routing table. For generic Squad questions:

Work type Route to Examples
Core runtime, adapter, spawn orchestration EECOM CopilotClient, session pool, tools module
Prompt architecture, coordinator logic Procedures Agent charters, spawn templates, response tier selection
Type system, TypeScript strictness CONTROL Discriminated unions, generics, tsconfig
SDK integration CAPCOM @github/copilot-sdk usage, CopilotSession lifecycle
Tests & quality, CI/CD FIDO Test coverage, Vitest, edge cases, CI/CD gates
Docs, README, API docs PAO README, getting-started, demos, contributor recognition
Architecture, product direction, review Flight Architectural decisions, code review, scope/trade-offs
Session logging, decision merge, DispatchGuard audit Scribe Auto — never needs explicit routing
Work queue, backlog, DispatchGuard verdict alerts Ralph GitHub issues, PR state, idle-watch, violations

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 114 lines · 1,073 tokens per session scan A ffc63efb2896

Subscribe to this mod's changes

squad squad-routing-guard.instructions.md is an instructions file published in the GitHub repository bradygaster/squad (3,140 stars, last pushed 2d ago), licensed MIT. It adds 1,073 tokens to every session, about $0.0054 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode-unify-chat-provider AGENTS.md

Instructions for smallmain/vscode-unify-chat-provider, a project described as: Integrate multiple LLM API providers into VS Code's GitHub Copilot Chat using the Language Model API. One-click use of your Claude Code, Gemini CLI, Antigravity, Github Copilot, OpenAI Codex (ChatGPT Plus/Pro), xAI Grok (SuperGrok / X…

smallmain/vscode-unify-chat-provider · 271 tokens

apex-accelerator agent-skills.instructions.md

Guidelines for creating high-quality Agent Skills for GitHub Copilot.

jonathan-vella/apex-accelerator · 1,962 tokens

apex-accelerator context-optimization.instructions.md

Context window optimization rules for agent definitions, skills, and instruction files.

jonathan-vella/apex-accelerator · 1,957 tokens

apex-accelerator no-interactive-shell.instructions.md

Prevents interactive shell prompts and long-output terminal replays from being injected into chat. Forbids -i flags on mv/rm/cp, read -p, and confirm prompts (incl. inside bash -c '...'). Pipe long output to files. Scoped to chat-context-loaded files; skill references/ and templates/ are exempt because they hold…

jonathan-vella/apex-accelerator · 1,396 tokens

apex-accelerator github-actions.instructions.md

Project-specific standards for GitHub Actions workflows in this repository.

jonathan-vella/apex-accelerator · 1,074 tokens

apex-accelerator iac-terraform-best-practices.instructions.md

Terraform-specific IaC best practices for Azure templates. AVM-first, CAF naming, security baseline, provider pins.

jonathan-vella/apex-accelerator · 1,161 tokens