Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Confidence: medium Discovered by: repository investigation Date: 2026-05-26 Validated in: Issue #1173 recon (bradygaster/squad)
Reusable knowledge about how @bradygaster/squad-cli stamps its version into squad.agent.md, how squad upgrade works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt.
@bradygaster/squad-clisquad (registered via package.json#bin.squad)Source file: dist/cli/core/version.js
Three functions:
getPackageVersion()Walks up from the compiled JS file to find package.json. Returns pkg.version. Works from both dist/cli/core/version.js and a bundled root cli.js. Returns '0.0.0' as fallback if not found.
stampVersion(filePath, version)Mutates squad.agent.md in three places:
<!-- version: {version} --> (must be on the line immediately after frontmatter ---)- **Version:** {version}`Squad v{version}`Called by: both init and upgrade — after copying the template to the destination.
readInstalledVersion(filePath)Reads the stamped version back from squad.agent.md:
/<!-- version: ([0-9.]+(?:-[a-z]+(?:\.\d+)?)?) -->//^version:\s*"([^"]+)"/m'0.0.0' on any errorsquad upgrade BehaviorSource file: dist/cli/core/upgrade.js
squad.agent.md — full overwrite from template, then stampVersion()overwriteOnUpgrade: true in TEMPLATE_MANIFEST: casting JSON files, template .md files, copilot-instructions.md (if @copilot enabled)templates/workflows/; non-npm projects get type-aware stubsrunMigrations() after file copyteam.md, routing.md, decisions.md, ceremonies.md (user-owned)agents/*/history.md (individual agent memory).squad/config.json — never touched; stateBackend survives intactselfUpgradeCli()):Detects npm/pnpm/yarn via npm_execpath and npm_config_user_agent. Runs:
npm install -g @bradygaster/squad-cli@latestpnpm add -g @bradygaster/squad-cli@latestyarn global add @bradygaster/squad-cli@latest
Use @insider tag for insider builds.compareSemver(a, b) utility (in upgrade.js):Returns -1/0/1. Handles pre-release: strips pre-release for base comparison, then treats pre-release as less than release (e.g., 0.9.5-insider.1 < 0.9.5). Can be ported directly if needed in prompt logic.
.squad/config.json — What It Holds{
"version": 1,
"stateBackend": "worktree"
}
Other optional fields added by the coordinator at runtime:
defaultModel — global model override for all agent spawnsagentModelOverrides.{agentName} — per-agent model overrideThe file is read-only from the upgrade path's perspective. Only the coordinator writes to it (for model preferences).
Use this one-liner from inside a coordinator prompt to fetch dist-tags:
npm view @bradygaster/squad-cli dist-tags --json
dist-tags[channel] (e.g., dist-tags["insider"]).The CLI (self-update.ts) writes latest version info to an OS-specific path with a 24h TTL.
One-liner to read the upstream cache:
node -e "const p=require('path'),o=require('os');const b=process.env.APPDATA||(process.platform==='darwin'?p.join(o.homedir(),'Library','Application Support'):p.join(o.homedir(),'.config'));const f=p.join(b,'squad-cli','update-check.json');try{const d=JSON.parse(require('fs').readFileSync(f,'utf8'));const age=Date.now()-d.checkedAt;if(age<86400000)console.log(JSON.stringify(d));else console.log('STALE')}catch{console.log('MISS')}"
Output semantics:
{"latestVersion":"X.Y.Z","checkedAt":N} → cache hit; use latestVersionSTALE → cache expired (older than 24h); treat as no dataMISS → cache missing or corrupt; treat as no dataOS-specific cache path:
%APPDATA%\squad-cli\update-check.json~/.config/squad-cli/update-check.json~/Library/Application Support/squad-cli/update-check.json.squad/.cache/version-check.jsonUsed by coordinator for insider/preview channels (the upstream cache only stores latest).
Schema:
{
"checkedAt": "2026-05-26T14:13:28.492Z",
"currentVersion": "0.9.6-insider.2",
"channel": "insider",
"channelVersion": "0.9.7-insider.1"
}
TTL: 24 hours from checkedAt.
Gitignore: .squad/.cache/ is listed in .gitignore — cache files are never committed.
| Purpose | Path |
|---|---|
| Version utilities | dist/cli/core/version.js |
| Upgrade logic | dist/cli/core/upgrade.js |
| Init logic | dist/cli/core/init.js |
| Template manifest | dist/cli/core/templates.js |
| Copilot install helper | dist/cli/copilot-install.js |
| squad.agent.md template | templates/squad.agent.md.template |
| Session init reference | templates/session-init-reference.md |
| All templates | templates/ |
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Prepare and publish a new version of the waza azd extension. USE FOR: "publish extension", "release new version", "bump version", "prepare release", "update changelog", "azd publish", "new release", "version bump", "cut a release". DO NOT USE FOR: running evals (use waza), writing skills (use skill-authoring), CI/CD pipeline changes (edit workflow files directly).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
**UTILITY SKILL** - Explain code snippets, functions, and algorithms in plain language. USE FOR: explain code, what does this code do, break down this function, help me understand this, walk through this algorithm, clarify this logic, explain this snippet, describe what happens here. DO NOT USE FOR: writing new code (use code generation), fixing bugs (use debugging), refactoring (use refactoring skills), code review with action items. INVOKES: file reading tools to access code, language detection for tailored explanations. FOR SINGLE OPERATIONS: If the user just needs to see file contents, use file reading tools directly.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Explains code snippets in plain English, breaking down what the code does step by step. Perfect for learning, code reviews, or documentation.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
The complete two-phase Init Mode protocol the Squad coordinator runs when no team exists yet in the current repo. Phase 1 = propose the team (no files created, wait for user confirm). Phase 2 = create .squad/ scaffolding, casting state, .gitattributes for merge drivers, and the always-on built-ins (Scribe, Ralph, Rai, Fact Checker). Loaded on demand when the coordinator detects no .squad/team.md exists.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Selecting WHO handles work is the Routing table; selecting HOW they handle it (Direct, Lightweight, Standard, Full) is Response Mode. This skill contains the complete decision table, exemplar prompts for each mode, the Lightweight spawn template, and the upgrade rules. Squad coordinator loads this on demand once routing has identified the agent — to pick the right ceremony level for the task.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.