一键导入
squad-conventions
DEPRECATED: These conventions apply to the Squad CLI tool (create-squad), which is a separate project. Rally uses a different dependency stack.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
DEPRECATED: These conventions apply to the Squad CLI tool (create-squad), which is a separate project. Rally uses a different dependency stack.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | squad-conventions |
| description | DEPRECATED: These conventions apply to the Squad CLI tool (create-squad), which is a separate project. Rally uses a different dependency stack. |
| domain | project-conventions |
| confidence | low |
| source | manual |
⚠️ DEPRECATED: This skill documents conventions from the Squad project (create-squad), which uses zero-dependency Node.js patterns. Rally is a different project with its own conventions (see .squad/agents/*/charter.md for Rally-specific guidance).
For Rally, refer to:
.squad/decisions.md → "Decision: Dependency Pivot" for the actual npm stack (Ink, Chalk, Ora, Commander, js-yaml, @inquirer/prompts).squad/agents/kaylee/charter.md for CLI development patterns.squad/agents/jayne/charter.md for testing patternsThis file should be replaced with Rally-specific conventions. Keeping as historical reference only.
Squad has zero runtime dependencies. Everything uses Node.js built-ins (fs, path, os, child_process). Do not add packages to dependencies in package.json. This is a hard constraint, not a preference.
Tests use node:test and node:assert/strict — no test frameworks. Run with npm test. Test files live in test/. The test command is node --test test/.
fatal() PatternAll user-facing errors use the fatal(msg) function which prints a red ✗ prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global uncaughtException handler calls fatal() as a safety net.
Colors are defined as constants at the top of index.js: GREEN, RED, DIM, BOLD, RESET. Use these constants — do not inline ANSI escape codes.
.squad/ — Team state (user-owned, never overwritten by upgrades).squad/templates/ — Template files copied from templates/ (Squad-owned, overwritten on upgrade).github/agents/squad.agent.md — Coordinator prompt (Squad-owned, overwritten on upgrade)templates/ — Source templates shipped with the npm package.squad/skills/ — Team skills in SKILL.md format (user-owned).squad/decisions/inbox/ — Drop-box for parallel decision writesAlways use path.join() for file paths — never hardcode / or \ separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.
The init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report "already exists." Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.
copyRecursive(src, target) handles both files and directories. It creates parent directories with { recursive: true } and uses fs.copyFileSync for files.
// Error handling
function fatal(msg) {
console.error(`${RED}✗${RESET} ${msg}`);
process.exit(1);
}
// File path construction (Windows-safe)
const agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');
// Skip-if-exists pattern
if (!fs.existsSync(ceremoniesDest)) {
fs.copyFileSync(ceremoniesSrc, ceremoniesDest);
console.log(`${GREEN}✓${RESET} .squad/ceremonies.md`);
} else {
console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);
}
/ or \ directly. Always path.join().fatal(). Users see clean messages, not stack traces.GREEN, RED, DIM, BOLD, RESET).{what this skill teaches agents}
Guide for using the Rally CLI tool to dispatch AI agents to GitHub issues and PR reviews via git worktrees. Use this when working with Rally dispatches, the dashboard, or managing worktrees.
Workaround for installing Squad SDK from GitHub branches that don't have dist/ committed
Hard-won patterns for building fullscreen terminal UIs with Ink 5 + React. Covers useInput race conditions, fullscreen rendering, sub-view switching, and testing with ink-testing-library.
Pattern for running multiple sub-agents in parallel using git worktrees. Use this when working on multiple issues/PRs simultaneously.
Dual-review PR workflow: Copilot automated code review + Mal manual team review. All comments must be addressed (fix or explain). Out-of-scope work opens GitHub issues with @copilot assignment.