### Install Dependencies and Start hello-squad Sample Source: https://github.com/bradygaster/squad/blob/dev/samples/README.md Install npm dependencies and start the 'hello-squad' sample application. ```bash npm install npm start ``` -------------------------------- ### Run Skill Discovery Example Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/022-welcome-to-the-new-squad.md Navigate to the skill-discovery sample directory and install dependencies to run the example. ```bash cd samples/skill-discovery npm install && npm start ``` -------------------------------- ### Quick Start: Install and Run Squad CLI Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/get-started/installation.md Install the Squad CLI globally and run the basic command to get started quickly. ```bash npm install -g @bradygaster/squad-cli squad ``` -------------------------------- ### Install and Setup Index Server Source: https://github.com/bradygaster/squad/blob/dev/samples/plugin-knowledge-index-server/knowledge/index-server-integration.md Install the Index Server globally and run its setup and dashboard commands. ```bash npm install -g @jagilber-org/index-server index-server --setup index-server --dashboard ``` -------------------------------- ### Run Cost-Aware Router Example Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/022-welcome-to-the-new-squad.md Navigate to the cost-aware-router sample directory and install dependencies to run the example. ```bash cd samples/cost-aware-router npm install && npm start ``` -------------------------------- ### Install Squad Plugin Example Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/011-skills-system-learning-from-work.md Demonstrates how to add a plugin marketplace and install a specific skill package using the Squad CLI. ```bash squad plugin marketplace add github:squad-plugins/official squad plugin install aws-deployment-patterns ``` -------------------------------- ### Running a Sample Project Source: https://github.com/bradygaster/squad/blob/dev/samples/README.md Standard commands to install dependencies and start any standalone Squad sample project. ```bash cd samples/{sample-name} npm install npm start ``` -------------------------------- ### Run Autonomous Pipeline Example Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/022-welcome-to-the-new-squad.md Navigate to the autonomous-pipeline sample directory and install dependencies to run the example. ```bash cd samples/autonomous-pipeline npm install && npm start ``` -------------------------------- ### Quickstart: Initialize and Run a Squad Agent Source: https://github.com/bradygaster/squad/blob/dev/src/Squad.Agents.AI/README.md This snippet demonstrates the basic setup for a Squad Agent using .NET's Host builder and dependency injection. It shows how to register the agent, build the host, and run a simple query. ```csharp using Microsoft.Agents.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Squad.Agents.AI; var builder = Host.CreateApplicationBuilder(args); builder.Services.AddSquadAgent(o => { o.SquadFolderPath = @"C:\path\to\your\team-root"; }); using var host = builder.Build(); var squad = host.Services.GetRequiredService(); var session = await squad.CreateSessionAsync(); var response = await squad.RunAsync("What can this Squad team do?", session); Console.WriteLine(response.Text); ``` -------------------------------- ### Run Documentation Locally Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/028-new-docs-site.md Commands to install dependencies and start the local development server for the documentation site. ```bash cd docs npm install npm run dev ``` -------------------------------- ### Install Dependencies and Run Sample Source: https://github.com/bradygaster/squad/blob/dev/samples/cost-aware-router/README.md Installs project dependencies and runs the cost-aware router demo. Ensure Node.js >= 20 and npm are installed, and the SDK is built first. ```bash npm install npm run dev ``` -------------------------------- ### Install and Initialize Squad Source: https://github.com/bradygaster/squad/blob/dev/docs/_internal/launch/migration-announcement.md Standard commands to install the CLI, initialize a project, and start the Copilot integration. ```bash npm install -g @bradygaster/squad-cli squad init copilot ``` -------------------------------- ### Initialize New Project with Squad CLI Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/scenarios/keep-my-squad.md Set up a new project directory, initialize Git, and install the Squad CLI globally. Then, run `squad init` to begin the project setup. ```bash mkdir ~/projects/new-mobile-app cd ~/projects/new-mobile-app git init npm install -g @bradygaster/squad-cli squad init ``` -------------------------------- ### Install and Run MemPalace Source: https://github.com/bradygaster/squad/blob/dev/samples/plugin-memory-mempalace/memory/mempalace-provider.md These commands demonstrate how to install and initialize the MemPalace project. Ensure MemPalace is installed separately before using these commands. ```bash pip install mempalace mempalace init ~/projects/myapp mempalace mine ~/projects/myapp mempalace mine ~/.claude/projects/ --mode convos mempalace search "query" mempalace wake-up ``` -------------------------------- ### Prompt for Trello Integration Setup Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/features/mcp.md Initiate the Trello integration by providing your Trello board URL. Agents will then guide you through the API key setup. ```text Connect my Trello board so agents can create cards. My board is at https://trello.com/b/YOUR_BOARD_ID ``` -------------------------------- ### Run Azure Function Sample Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/024-v0823-release.md Commands to install dependencies and start the Azure Function sample project. ```bash cd samples/azure-function-squad npm install func start # Requires Azure Functions Core Tools ``` -------------------------------- ### Initial Team Setup Prompt Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/tips-and-tricks.md Use this prompt to initialize a new AI team. Provide a brief project description, the technology stack, and key requirements to guide the team's setup and initial tasks. ```shell I'm building [brief description]. Set up the team. Stack: [language, framework, database] Key requirements: - [requirement 1] - [requirement 2] - [requirement 3] ``` -------------------------------- ### Start SSH Agent and Add Key Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/scenarios/troubleshooting.md Use these commands to start your SSH agent and load your SSH key, which can resolve installation hangs when using `github:` specifiers. ```bash eval "$(ssh-agent -s)" ssh-add ``` -------------------------------- ### Install Squad CLI and Initialize Squad Source: https://github.com/bradygaster/squad/blob/dev/README.md Installs the Squad command-line interface globally and initializes a new Squad project. Use `squad init --preset default` for a pre-configured setup. ```bash npm install -g @bradygaster/squad-cli squad init ``` -------------------------------- ### Initiate Project Setup with Squad Agent in VS Code Source: https://github.com/bradygaster/squad/blob/dev/README.md Example prompt to give to the Squad agent in VS Code Copilot Chat to set up a new project team. ```plaintext I'm starting a new project. Set up the team. Here's what I'm building: a recipe sharing app with React and Node. ``` -------------------------------- ### Install and Enable Extension Locally Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/guide/building-extensions.md Install your extension into Squad and then enable its components. The list command shows installed plugins. ```bash squad plugin install . squad plugin enable my-extension squad plugin list --json ``` -------------------------------- ### Install Dependencies Source: https://github.com/bradygaster/squad/blob/dev/samples/hook-governance/docs/PRD.md Run this command in the samples/hook-governance directory to install project dependencies. ```bash npm install ``` -------------------------------- ### Full Stack Squad Application Setup Source: https://github.com/bradygaster/squad/blob/dev/docs/_internal/internal/getting-started-journey.md This script demonstrates the complete setup of a Squad application, including resolving configuration, initializing infrastructure components like EventBus, HookPipeline, and CostTracker, casting agents, creating sessions, and setting up monitoring. It's intended for use as a starting point for complex Squad applications. ```typescript import { resolveSquad, loadConfig, SquadClient, EventBus, HookPipeline, CostTracker, CastingEngine, RalphMonitor, StreamingPipeline, } from '@bradygaster/squad-sdk'; // Resolve and configure const squadPath = resolveSquad(); const config = await loadConfig(squadPath); // Infrastructure const bus = new EventBus(); const costTracker = new CostTracker(); costTracker.wireToEventBus(bus); const hooks = new HookPipeline({ allowedWritePaths: ['src/**', 'test/**', '.squad/**'], scrubPii: true, maxAskUserPerSession: 3, }); const streaming = new StreamingPipeline(); streaming.onDelta((delta) => process.stdout.write(delta.content)); // Cast const casting = new CastingEngine({ universe: 'usual-suspects', agentCount: 5 }); const cast = casting.castTeam({ roles: ['lead', 'frontend', 'backend', 'tester', 'scribe'], }); // Monitor const ralph = new RalphMonitor({ teamRoot: squadPath, healthCheckInterval: 30000, statePath: `${squadPath}/ralph-state.json`, }); await ralph.start(bus); // Create client and sessions const client = new SquadClient({ useStdio: true, autoReconnect: true }); for (const member of cast) { const session = await client.createSession({ agentName: member.agentName, task: `Handle ${member.role} responsibilities`, persistPath: `${squadPath}/sessions/${member.agentName.toLowerCase()}.json`, }); console.log(`🎭 ${member.agentName} (${member.role}) — ready`); } // Run your pipeline here... // Report console.log(costTracker.formatSummary()); const health = await ralph.healthCheck(); health.forEach(s => console.log(` ${s.agentName}: ${s.state}`)); await ralph.stop(); ``` -------------------------------- ### Install and Initialize Squad Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/023-subsquads-horizontal-scaling.md Install the CLI tool and initialize Squad within a repository. ```bash # Install Squad npm install -g @bradygaster/squad-cli # Init in your repo squad init ``` -------------------------------- ### Install dependencies for hello-squad Source: https://github.com/bradygaster/squad/blob/dev/samples/hello-squad/TEST-SCRIPT.md Navigate to the sample directory and install required Node.js packages. ```bash cd samples/hello-squad npm install ``` -------------------------------- ### Install dependencies for hook-governance Source: https://github.com/bradygaster/squad/blob/dev/samples/hook-governance/TEST-SCRIPT.md Navigate to the sample directory and install required packages. ```bash cd samples/hook-governance npm install ``` -------------------------------- ### Install Dependencies and Build Sample Source: https://github.com/bradygaster/squad/blob/dev/samples/autonomous-pipeline/TEST-SCRIPT.md Installs project dependencies and builds the sample application. Run this in the sample directory. ```bash cd samples/autonomous-pipeline npm install npm run build ``` -------------------------------- ### Verify squad-cli Installation Source: https://github.com/bradygaster/squad/blob/dev/packages/squad-cli/README.md Checks the installed version of squad-cli and validates the setup. ```bash squad --version squad doctor # Validate setup ``` -------------------------------- ### Install Plugin for Agent Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/concepts/portability.md Downloads and installs a specified plugin for a particular agent, enhancing its capabilities. For example, installing the Azure plugin for the DevOps agent. ```bash install the azure-infrastructure plugin for the DevOps agent ``` -------------------------------- ### Run hello-squad Sample Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/022-welcome-to-the-new-squad.md Demonstrates basic agent casting and onboarding. Use this to see the "hello world" of the SDK. ```bash cd samples/hello-squad npm install && npm start ``` -------------------------------- ### Install Squad SDK (Old) Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/get-started/migration.md Example of installing the old Squad SDK package. This package is no longer maintained. ```bash # OLD npm install @bradygaster/squad ``` -------------------------------- ### Initialize Project and Install Dependencies Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/guide/build-autonomous-agent.md Sets up a new project directory, initializes npm, and installs the Squad SDK and TypeScript. ```bash mkdir my-autonomous-agent cd my-autonomous-agent npm init -y npm install @bradygaster/squad-sdk npm install -D typescript ``` -------------------------------- ### Prompt for Teams Notifications Setup Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/features/mcp.md Use this prompt to initiate the setup of Teams notifications, guiding agents to the relevant documentation for configuration. ```text I want to get pinged on Teams when agents need input. Walk me through it. ``` -------------------------------- ### Run the demo Source: https://github.com/bradygaster/squad/blob/dev/samples/storage-provider-sqlite/README.md Execute the demonstration script to exercise storage provider operations. ```bash npm run demo ``` -------------------------------- ### Graphify Tool Setup and Query Source: https://github.com/bradygaster/squad/blob/dev/samples/plugin-knowledge-graphify/README.md Commands to install the Graphify tool and query the knowledge graph for repository insights. This setup is separate from the Squad plugin lifecycle. ```bash uv tool install graphifyy graphify install --platform copilot graphify query "How does this repository fit together?" ``` -------------------------------- ### Verify Build and Run Sample Source: https://github.com/bradygaster/squad/blob/dev/samples/autonomous-pipeline/TEST-SCRIPT.md Verifies the build and starts the sample application to observe the pipeline run. Check for colored output. ```bash npm run start ``` -------------------------------- ### Example Routing Comments for Copilot Triage Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/features/copilot-coding-agent.md These examples show how a lead can route issues to Copilot or suggest reassignment. They are used in comments to guide the triage process. ```markdown > This test coverage task could go to @copilot — want me to reassign? > @copilot might struggle with this — suggesting we reassign to Ripley. ``` -------------------------------- ### Install and Run Autonomous Pipeline Source: https://github.com/bradygaster/squad/blob/dev/samples/autonomous-pipeline/README.md Navigate to the sample directory, install dependencies, and run the development server. ```bash cd samples/autonomous-pipeline npm install npm run dev ``` -------------------------------- ### Example README for Extension Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/guide/building-extensions.md A README file should explain the extension's purpose, installation, and its included components. ```markdown # My Extension Codifies client-delivery workflows for consulting teams. ## Install squad plugin install . squad plugin enable my-extension ## What's Inside - **discovery-interview** skill — clarify requirements - **evidence-bundler** knowledge — collect test results - **plan-review** ceremony — gate for approval ``` -------------------------------- ### Install and Run Squad SDK Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/024-v0823-release.md Install the SDK package and execute the build command to generate documentation files. ```bash npm install @bradygaster/squad-sdk npx squad build # Generates .squad/team.md, .squad/routing.md, .squad/agents/*/charter.md ``` -------------------------------- ### Navigate to sample directory Source: https://github.com/bradygaster/squad/blob/dev/samples/storage-provider-sqlite/README.md Change the current working directory to the SQLite storage provider sample folder. ```bash cd samples/storage-provider-sqlite ``` -------------------------------- ### Bootstrap a New Project Prompt Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/cookbook/recipes.md Use this prompt to quickly set up a new project, specifying the technology stack and desired team collaboration for immediate start. ```text I'm building a CLI tool in Go that monitors AWS costs and sends Slack alerts when spending exceeds thresholds. Set up the team. I want this done fast — everyone works at once. ``` -------------------------------- ### Initialize Project with a Preset Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/features/preset.md Bootstrap a new project with a predefined team structure using a squad preset. ```bash mkdir my-new-project cd my-new-project git init squad init --preset backend-team ``` -------------------------------- ### Update CI/CD Workflow for Squad CLI Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/get-started/migration.md Example of updating a GitHub Actions workflow to install and use the Squad CLI globally. ```yaml - uses: actions/setup-node@v4 with: node-version: '20' - name: Install Squad run: npm install -g @bradygaster/squad-cli@latest - name: Run Squad run: squad doctor && squad status env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` -------------------------------- ### Run the Skill Discovery Demo Source: https://github.com/bradygaster/squad/blob/dev/samples/skill-discovery/README.md Commands to execute the skill discovery demonstration from the repository root or the sample directory. ```bash npx tsx samples/skill-discovery/index.ts ``` ```bash npm install npm start ``` -------------------------------- ### Example Sync Script Command (Bash) Source: https://github.com/bradygaster/squad/blob/dev/packages/squad-sdk/templates/skills/distributed-mesh/SKILL.md This command is used to synchronize the mesh configuration. It should be run before agents start to materialize remote state. ```bash bash sync-mesh.sh ``` -------------------------------- ### Create and Navigate to Project Directory Source: https://github.com/bradygaster/squad/blob/dev/README.md Initializes a new project directory and navigates into it. Use `git status` to verify. ```bash mkdir my-project && cd my-project git init ``` -------------------------------- ### Example Sync Script Command (PowerShell) Source: https://github.com/bradygaster/squad/blob/dev/packages/squad-sdk/templates/skills/distributed-mesh/SKILL.md This command is used to synchronize the mesh configuration on Windows. It should be run before agents start to materialize remote state. ```powershell .\sync-mesh.ps1 ``` -------------------------------- ### Initialize Extension Repository Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/guide/building-extensions.md Start building your extension by creating a new directory and initializing it as a Git repository. ```bash mkdir my-extension cd my-extension git init ``` -------------------------------- ### Run Streaming Chat Application Source: https://github.com/bradygaster/squad/blob/dev/samples/streaming-chat/README.md Installs dependencies and starts the streaming chat application. Use `SQUAD_DEMO_MODE=true` for demo mode or set `GITHUB_TOKEN` for live mode. ```bash npm install npm start # or SQUAD_DEMO_MODE=true npm start # or GITHUB_TOKEN= npm start ``` -------------------------------- ### Build Documentation Source: https://github.com/bradygaster/squad/blob/dev/docs/research/jsdoc-api-reference-research.md Execute the build process for the documentation site. ```bash npm run build from docs/ ``` -------------------------------- ### Testing Conventions Markdown Example Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/scenarios/open-source.md A markdown file defining conventions for writing tests, including file naming, structure, and mocking strategies, to guide contributors. ```markdown # Testing Conventions All new features must include tests. Use Jest for unit tests. Test file naming: `{module}.test.ts` Test structure: describe → it blocks Mock external dependencies with `jest.mock()` ``` -------------------------------- ### Validate Squad Setup with Doctor Command Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/019-shaynes-remote-mode.md The `squad doctor` command performs nine checks to validate your Squad setup, including the existence and linking of `.squad/`, reachability of the team root, loadability of charters, and SDK version compatibility. The output is human-readable and intended to guide manual fixes. ```bash squad doctor ``` -------------------------------- ### Clone and Navigate to hello-squad Sample Source: https://github.com/bradygaster/squad/blob/dev/samples/README.md Clone the Squad SDK repository and navigate to the 'hello-squad' sample directory. ```bash git clone cd samples/hello-squad ``` -------------------------------- ### Run the application Source: https://github.com/bradygaster/squad/blob/dev/samples/rock-paper-scissors/README.md Choose between local execution or containerized deployment. ```bash npm start ``` ```bash docker-compose up ``` -------------------------------- ### Initialize New SDK-First Project Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/sdk-first-mode.md Start a new project in SDK-first mode by running `squad init --sdk`. This command generates the `.squad/` markdown files and a `squad.config.ts` at your project root. ```bash squad init --sdk ``` -------------------------------- ### Install and Initialize Squad CLI Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/025-squad-goes-enterprise-azure-devops.md Follow these steps to install the Squad CLI, authenticate with Azure, and initialize a project for an ADO repository. ```bash # 1. Install Squad npm install -g @bradygaster/squad-cli # 2. Clone your ADO repo git clone https://dev.azure.com/your-org/your-project/_git/your-repo cd your-repo # 3. Make sure az CLI is set up az login az extension add --name azure-devops # 4. Init Squad (auto-detects ADO) squad init # 5. Edit .squad/config.json if you need custom work item config # 6. Start working! ``` -------------------------------- ### Define Squad Team with TypeScript SDK Source: https://github.com/bradygaster/squad/blob/dev/README.md Example of defining a Squad team configuration using the TypeScript SDK. This allows for programmatic team setup instead of using markdown files. ```typescript // squad.config.ts import { defineSquad, defineTeam, defineAgent } from '@bradygaster/squad-sdk'; export default defineSquad({ team: defineTeam({ name: 'Platform Squad', members: ['@edie', '@mcmanus'] }), agents: [ defineAgent({ name: 'edie', role: 'TypeScript Engineer', model: 'claude-sonnet-4' }), defineAgent({ name: 'mcmanus', role: 'DevRel', model: 'claude-haiku-4.5' }), ], }); ``` -------------------------------- ### Explicit File Path Workaround Prompt Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/scenarios/large-codebase.md Use explicit file paths in prompts to guide agents to specific files and their immediate dependencies, preventing them from getting lost in large codebases. ```text > Morpheus, refactor src/services/payment/stripe-adapter.ts. > Don't touch anything else. ``` -------------------------------- ### Run Cost-Aware Router Demo and Tests Source: https://github.com/bradygaster/squad/blob/dev/samples/cost-aware-router/docs/PRD.md Commands to install dependencies, execute the routing demonstration, and run the test suite for the cost-aware router. ```bash # Navigate to samples/cost-aware-router npm install # Run routing demo npm start # Expected output: # 📝 Task: Fix typo in README # Tier: lightweight (GPT-4o mini) # Cost: $0.0008 # # 📝 Task: Design API authentication flow # Tier: standard (Claude 3.5 Sonnet) # Cost: $0.0045 # # ... # # 💰 Final Cost Report # Total Cost: $0.0373 # Savings: 83.8% # Run test suite npm test # Expected tests: # PASS: selectResponseTier picks lightweight for simple tasks # PASS: selectResponseTier picks full for complex tasks # PASS: selectResponseTier respects budget constraints # PASS: CostTracker aggregates usage correctly # PASS: Cost report shows savings vs. single-tier baseline ``` -------------------------------- ### Notification Level: Important (Default) Source: https://github.com/bradygaster/squad/blob/dev/docs/features/watch-next-gen.md Example output for the default 'important' notification level, highlighting key events like round start, agent invocation, issue selection, and PR creation. ```text 14:32:01 | Round 42 starting... 14:32:05 | Invoking agent: gh copilot -p /tmp/watch-context.md 14:32:15 | Agent selected issue #42 14:32:46 | Agent created PR #5678 14:32:47 | Round 42 complete (1 issue resolved) 14:32:47 | Next poll at 14:37 ``` -------------------------------- ### Run Azure Blob Storage sample with connection string Source: https://github.com/bradygaster/squad/blob/dev/samples/storage-provider-azure/README.md Configures the storage provider using a direct connection string. ```bash export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=..." cd samples/storage-provider-azure npm install npm run demo ``` -------------------------------- ### Disambiguation Prompt for Squad vs. Ad-hoc Agents Source: https://github.com/bradygaster/squad/blob/dev/packages/squad-cli/templates/skills/cross-squad/SKILL.md When a user's request is ambiguous regarding literal Squad installs or ad-hoc agents, use this prompt to clarify their intent. This ensures the correct setup is chosen, avoiding user rework. ```yaml question: "Should I create separate Squad installs or just dispatch ad-hoc agents?" choices: - "Real squads — separate .squad/ per squad (heavier, persistent, can be re-engaged later)" - "Ad-hoc agents — one-shot `task` dispatch (lighter, ephemeral, no .squad/ created)" ``` -------------------------------- ### Ralph Polling Loop Integration Example Source: https://github.com/bradygaster/squad/blob/dev/packages/squad-cli/templates/ralph-circuit-breaker.md Demonstrates how to integrate the circuit breaker functions within a Ralph polling loop. It shows how to get the current model, invoke a copilot CLI command, and update the circuit breaker state based on the result. ```powershell # At the top of your polling loop $model = Get-CurrentModel # When invoking copilot CLI $result = copilot-cli --model $model ... # After the call if ($result -match "rate.?limit" -or $LASTEXITCODE -eq 429) { Update-CircuitBreakerOnRateLimit } else { Update-CircuitBreakerOnSuccess } ``` -------------------------------- ### Example CLI Status Output Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/guide/github-auth-setup.md Sample output showing active account and token scopes. ```text github.com ✓ Logged in to github.com account your-username (keyring) - Active account: true - Git operations protocol: https - Token: gho_**** - Token scopes: 'delete_repo', 'gist', 'read:org', 'repo', 'workflow' ``` -------------------------------- ### Install Squad CLI Globally Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/022-welcome-to-the-new-squad.md Install the Squad CLI globally to make it accessible from any directory. After installation, you can check the version. ```bash npm install -g @bradygaster/squad-cli squad --version ``` -------------------------------- ### Start Development Server Source: https://github.com/bradygaster/squad/blob/dev/docs/README.md Launches a local development server with hot module reloading at http://localhost:4321/squad/. ```bash npm run dev ``` -------------------------------- ### Install or Upgrade Squad CLI Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/blog/010-v041-patch-release.md Commands to install the latest version of the Squad CLI globally or upgrade an existing installation. ```bash npm install -g @bradygaster/squad-cli@latest ``` ```bash npx @bradygaster/create-squad upgrade ``` -------------------------------- ### Good spawn prompt example Source: https://github.com/bradygaster/squad/blob/dev/packages/squad-cli/templates/skills/iterative-retrieval/SKILL.md Use this structure to provide agents with clear tasks, motivation, success criteria, and escalation paths. ```markdown ## Task Add an "Iterative Retrieval Protocol" section to `.squad/agents/coordinator/charter.md` explaining the 3-cycle rule, WHY format, and validation checklist. ## WHY this matters The coordinator spawns sub-agents on every round. Without a documented protocol, agents run unbounded cycles and outputs go unvalidated — leading to stale issues and silent failures. ## Success criteria - [ ] Section "Iterative Retrieval Protocol" exists in charter.md - [ ] Section documents max-3-cycles rule - [ ] Section documents WHY format requirement - [ ] Section contains validation checklist (at least 4 items) - [ ] No other sections of charter.md are modified ## Escalation path If the charter.md format is unclear, check another agent charter as a reference. If uncertain about content, stop and surface to coordinator. ``` -------------------------------- ### Install KEDA using Helm Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/features/keda-scaling.md Installs KEDA on your Kubernetes cluster using the official Helm chart. Ensure you have Helm installed and configured. ```bash helm repo add kedacore https://kedacore.github.io/charts helm install keda kedacore/keda --namespace keda --create-namespace ``` -------------------------------- ### Install Squad CLI Source: https://github.com/bradygaster/squad/blob/dev/docs/src/content/docs/reference/cli.md Install the Squad CLI globally using npm, or run it one-off with npx. You can also install the latest version directly from GitHub. ```bash # Global install (recommended) npm install -g @bradygaster/squad-cli ``` ```bash # One-off with npx npx @bradygaster/squad-cli init ``` ```bash # Latest from GitHub (bleeding edge) squad init ```