@bradygaster/squad-cli 0.8.25 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +284 -32
  2. package/dist/cli/commands/aspire.d.ts.map +1 -1
  3. package/dist/cli/commands/aspire.js +3 -0
  4. package/dist/cli/commands/aspire.js.map +1 -1
  5. package/dist/cli/commands/build.js +3 -3
  6. package/dist/cli/commands/build.js.map +1 -1
  7. package/dist/cli/commands/cast.d.ts +13 -0
  8. package/dist/cli/commands/cast.d.ts.map +1 -0
  9. package/dist/cli/commands/cast.js +77 -0
  10. package/dist/cli/commands/cast.js.map +1 -0
  11. package/dist/cli/commands/cost.d.ts +2 -0
  12. package/dist/cli/commands/cost.d.ts.map +1 -0
  13. package/dist/cli/commands/cost.js +170 -0
  14. package/dist/cli/commands/cost.js.map +1 -0
  15. package/dist/cli/commands/cross-squad.d.ts +12 -0
  16. package/dist/cli/commands/cross-squad.d.ts.map +1 -0
  17. package/dist/cli/commands/cross-squad.js +80 -0
  18. package/dist/cli/commands/cross-squad.js.map +1 -0
  19. package/dist/cli/commands/doctor.d.ts +5 -0
  20. package/dist/cli/commands/doctor.d.ts.map +1 -1
  21. package/dist/cli/commands/doctor.js +156 -0
  22. package/dist/cli/commands/doctor.js.map +1 -1
  23. package/dist/cli/commands/economy.d.ts +10 -0
  24. package/dist/cli/commands/economy.d.ts.map +1 -0
  25. package/dist/cli/commands/economy.js +64 -0
  26. package/dist/cli/commands/economy.js.map +1 -0
  27. package/dist/cli/commands/export.d.ts.map +1 -1
  28. package/dist/cli/commands/export.js +11 -4
  29. package/dist/cli/commands/export.js.map +1 -1
  30. package/dist/cli/commands/import.js +2 -2
  31. package/dist/cli/commands/import.js.map +1 -1
  32. package/dist/cli/commands/personal.d.ts +16 -0
  33. package/dist/cli/commands/personal.d.ts.map +1 -0
  34. package/dist/cli/commands/personal.js +213 -0
  35. package/dist/cli/commands/personal.js.map +1 -0
  36. package/dist/cli/commands/roles.d.ts +2 -0
  37. package/dist/cli/commands/roles.d.ts.map +1 -0
  38. package/dist/cli/commands/roles.js +54 -0
  39. package/dist/cli/commands/roles.js.map +1 -0
  40. package/dist/cli/commands/schedule.d.ts +14 -0
  41. package/dist/cli/commands/schedule.d.ts.map +1 -0
  42. package/dist/cli/commands/schedule.js +208 -0
  43. package/dist/cli/commands/schedule.js.map +1 -0
  44. package/dist/cli/commands/watch.d.ts.map +1 -1
  45. package/dist/cli/commands/watch.js +17 -5
  46. package/dist/cli/commands/watch.js.map +1 -1
  47. package/dist/cli/core/cast.d.ts +9 -0
  48. package/dist/cli/core/cast.d.ts.map +1 -1
  49. package/dist/cli/core/cast.js +170 -60
  50. package/dist/cli/core/cast.js.map +1 -1
  51. package/dist/cli/core/detect-squad-dir.d.ts +10 -0
  52. package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
  53. package/dist/cli/core/detect-squad-dir.js +47 -0
  54. package/dist/cli/core/detect-squad-dir.js.map +1 -1
  55. package/dist/cli/core/init.d.ts +8 -0
  56. package/dist/cli/core/init.d.ts.map +1 -1
  57. package/dist/cli/core/init.js +115 -2
  58. package/dist/cli/core/init.js.map +1 -1
  59. package/dist/cli/core/migrations.d.ts.map +1 -1
  60. package/dist/cli/core/migrations.js +21 -0
  61. package/dist/cli/core/migrations.js.map +1 -1
  62. package/dist/cli/core/templates.d.ts.map +1 -1
  63. package/dist/cli/core/templates.js +8 -1
  64. package/dist/cli/core/templates.js.map +1 -1
  65. package/dist/cli/core/upgrade.d.ts +14 -0
  66. package/dist/cli/core/upgrade.d.ts.map +1 -1
  67. package/dist/cli/core/upgrade.js +182 -48
  68. package/dist/cli/core/upgrade.js.map +1 -1
  69. package/dist/cli/core/version.js +2 -2
  70. package/dist/cli/core/version.js.map +1 -1
  71. package/dist/cli/index.d.ts +2 -0
  72. package/dist/cli/index.d.ts.map +1 -1
  73. package/dist/cli/index.js +2 -0
  74. package/dist/cli/index.js.map +1 -1
  75. package/dist/cli/self-update.d.ts +21 -0
  76. package/dist/cli/self-update.d.ts.map +1 -0
  77. package/dist/cli/self-update.js +113 -0
  78. package/dist/cli/self-update.js.map +1 -0
  79. package/dist/cli/shell/autocomplete.d.ts.map +1 -1
  80. package/dist/cli/shell/autocomplete.js +5 -0
  81. package/dist/cli/shell/autocomplete.js.map +1 -1
  82. package/dist/cli/shell/commands.d.ts.map +1 -1
  83. package/dist/cli/shell/commands.js +55 -24
  84. package/dist/cli/shell/commands.js.map +1 -1
  85. package/dist/cli/shell/components/AgentPanel.d.ts.map +1 -1
  86. package/dist/cli/shell/components/AgentPanel.js +21 -6
  87. package/dist/cli/shell/components/AgentPanel.js.map +1 -1
  88. package/dist/cli/shell/components/App.d.ts.map +1 -1
  89. package/dist/cli/shell/components/App.js +33 -15
  90. package/dist/cli/shell/components/App.js.map +1 -1
  91. package/dist/cli/shell/components/InputPrompt.js +1 -1
  92. package/dist/cli/shell/components/InputPrompt.js.map +1 -1
  93. package/dist/cli/shell/components/MessageStream.d.ts +2 -0
  94. package/dist/cli/shell/components/MessageStream.d.ts.map +1 -1
  95. package/dist/cli/shell/components/MessageStream.js +20 -20
  96. package/dist/cli/shell/components/MessageStream.js.map +1 -1
  97. package/dist/cli/shell/components/ThinkingIndicator.d.ts +4 -0
  98. package/dist/cli/shell/components/ThinkingIndicator.d.ts.map +1 -1
  99. package/dist/cli/shell/components/ThinkingIndicator.js +23 -4
  100. package/dist/cli/shell/components/ThinkingIndicator.js.map +1 -1
  101. package/dist/cli/shell/coordinator.d.ts +7 -0
  102. package/dist/cli/shell/coordinator.d.ts.map +1 -1
  103. package/dist/cli/shell/coordinator.js +206 -88
  104. package/dist/cli/shell/coordinator.js.map +1 -1
  105. package/dist/cli/shell/error-messages.d.ts +14 -0
  106. package/dist/cli/shell/error-messages.d.ts.map +1 -1
  107. package/dist/cli/shell/error-messages.js +65 -1
  108. package/dist/cli/shell/error-messages.js.map +1 -1
  109. package/dist/cli/shell/index.d.ts +1 -1
  110. package/dist/cli/shell/index.d.ts.map +1 -1
  111. package/dist/cli/shell/index.js +83 -12
  112. package/dist/cli/shell/index.js.map +1 -1
  113. package/dist/cli/shell/router.d.ts.map +1 -1
  114. package/dist/cli/shell/router.js +21 -2
  115. package/dist/cli/shell/router.js.map +1 -1
  116. package/dist/cli/shell/stream-bridge.d.ts +2 -0
  117. package/dist/cli/shell/stream-bridge.d.ts.map +1 -1
  118. package/dist/cli/shell/stream-bridge.js +11 -2
  119. package/dist/cli/shell/stream-bridge.js.map +1 -1
  120. package/dist/cli/shell/terminal.d.ts +5 -5
  121. package/dist/cli/shell/terminal.d.ts.map +1 -1
  122. package/dist/cli/shell/terminal.js +35 -26
  123. package/dist/cli/shell/terminal.js.map +1 -1
  124. package/dist/cli-entry.js +124 -42
  125. package/dist/cli-entry.js.map +1 -1
  126. package/package.json +20 -4
  127. package/scripts/patch-esm-imports.mjs +84 -55
  128. package/scripts/patch-ink-rendering.mjs +115 -0
  129. package/templates/casting/Futurama.json +10 -0
  130. package/templates/casting-policy.json +4 -2
  131. package/templates/casting-reference.md +104 -0
  132. package/templates/cooperative-rate-limiting.md +229 -0
  133. package/templates/issue-lifecycle.md +412 -0
  134. package/templates/keda-scaler.md +164 -0
  135. package/templates/machine-capabilities.md +75 -0
  136. package/templates/orchestration-log.md +1 -1
  137. package/templates/ralph-circuit-breaker.md +313 -0
  138. package/templates/routing.md +5 -20
  139. package/templates/scribe-charter.md +1 -1
  140. package/templates/skills/agent-collaboration/SKILL.md +42 -0
  141. package/templates/skills/agent-conduct/SKILL.md +24 -0
  142. package/templates/skills/architectural-proposals/SKILL.md +151 -0
  143. package/templates/skills/ci-validation-gates/SKILL.md +84 -0
  144. package/templates/skills/cli-wiring/SKILL.md +47 -0
  145. package/templates/skills/client-compatibility/SKILL.md +89 -0
  146. package/templates/skills/cross-squad/SKILL.md +114 -0
  147. package/templates/skills/distributed-mesh/SKILL.md +287 -0
  148. package/templates/skills/distributed-mesh/mesh.json.example +30 -0
  149. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -0
  150. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -0
  151. package/templates/skills/docs-standards/SKILL.md +71 -0
  152. package/templates/skills/economy-mode/SKILL.md +114 -0
  153. package/templates/skills/external-comms/SKILL.md +329 -0
  154. package/templates/skills/gh-auth-isolation/SKILL.md +183 -0
  155. package/templates/skills/git-workflow/SKILL.md +204 -0
  156. package/templates/skills/github-multi-account/SKILL.md +95 -0
  157. package/templates/skills/history-hygiene/SKILL.md +36 -0
  158. package/templates/skills/humanizer/SKILL.md +105 -0
  159. package/templates/skills/init-mode/SKILL.md +102 -0
  160. package/templates/skills/model-selection/SKILL.md +117 -0
  161. package/templates/skills/nap/SKILL.md +24 -0
  162. package/templates/skills/personal-squad/SKILL.md +57 -0
  163. package/templates/skills/release-process/SKILL.md +423 -0
  164. package/templates/skills/reskill/SKILL.md +92 -0
  165. package/templates/skills/reviewer-protocol/SKILL.md +79 -0
  166. package/templates/skills/secret-handling/SKILL.md +200 -0
  167. package/templates/skills/session-recovery/SKILL.md +155 -0
  168. package/templates/skills/test-discipline/SKILL.md +37 -0
  169. package/templates/skills/windows-compatibility/SKILL.md +74 -0
  170. package/templates/squad.agent.md +1287 -1146
  171. package/templates/workflows/squad-docs.yml +8 -4
  172. package/templates/workflows/squad-heartbeat.yml +3 -4
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: "init-mode"
3
+ description: "Team initialization flow (Phase 1 proposal + Phase 2 creation)"
4
+ domain: "orchestration"
5
+ confidence: "high"
6
+ source: "extracted"
7
+ tools:
8
+ - name: "ask_user"
9
+ description: "Confirm team roster with selectable menu"
10
+ when: "Phase 1 proposal — requires explicit user confirmation"
11
+ ---
12
+
13
+ ## Context
14
+
15
+ Init Mode activates when `.squad/team.md` does not exist, or exists but has zero roster entries under `## Members`. The coordinator proposes a team (Phase 1), waits for user confirmation, then creates the team structure (Phase 2).
16
+
17
+ ## Patterns
18
+
19
+ ### Phase 1: Propose the Team
20
+
21
+ No team exists yet. Propose one — but **DO NOT create any files until the user confirms.**
22
+
23
+ 1. **Identify the user.** Run `git config user.name` to learn who you're working with. Use their name in conversation (e.g., *"Hey Brady, what are you building?"*). Store their name (NOT email) in `team.md` under Project Context. **Never read or store `git config user.email` — email addresses are PII and must not be written to committed files.**
24
+ 2. Ask: *"What are you building? (language, stack, what it does)"*
25
+ 3. **Cast the team.** Before proposing names, run the Casting & Persistent Naming algorithm (see that section):
26
+ - Determine team size (typically 4–5 + Scribe).
27
+ - Determine assignment shape from the user's project description.
28
+ - Derive resonance signals from the session and repo context.
29
+ - Select a universe. If the universe is custom, allocate character names from that universe based on the related list found in the `.squad/templates/casting/` directory. Prefer custom universes when available.
30
+ - Scribe is always "Scribe" — exempt from casting.
31
+ - Ralph is always "Ralph" — exempt from casting.
32
+ 4. Propose the team with their cast names. Example (names will vary per cast):
33
+
34
+ ```
35
+ 🏗️ {CastName1} — Lead Scope, decisions, code review
36
+ ⚛️ {CastName2} — Frontend Dev React, UI, components
37
+ 🔧 {CastName3} — Backend Dev APIs, database, services
38
+ 🧪 {CastName4} — Tester Tests, quality, edge cases
39
+ 📋 Scribe — (silent) Memory, decisions, session logs
40
+ 🔄 Ralph — (monitor) Work queue, backlog, keep-alive
41
+ ```
42
+
43
+ 5. Use the `ask_user` tool to confirm the roster. Provide choices so the user sees a selectable menu:
44
+ - **question:** *"Look right?"*
45
+ - **choices:** `["Yes, hire this team", "Add someone", "Change a role"]`
46
+
47
+ **⚠️ STOP. Your response ENDS here. Do NOT proceed to Phase 2. Do NOT create any files or directories. Wait for the user's reply.**
48
+
49
+ ### Phase 2: Create the Team
50
+
51
+ **Trigger:** The user replied to Phase 1 with confirmation ("yes", "looks good", or similar affirmative), OR the user's reply to Phase 1 is a task (treat as implicit "yes").
52
+
53
+ > If the user said "add someone" or "change a role," go back to Phase 1 step 3 and re-propose. Do NOT enter Phase 2 until the user confirms.
54
+
55
+ 6. Create the `.squad/` directory structure (see `.squad/templates/` for format guides or use the standard structure: team.md, routing.md, ceremonies.md, decisions.md, decisions/inbox/, casting/, agents/, orchestration-log/, skills/, log/).
56
+
57
+ **Casting state initialization:** Copy `.squad/templates/casting-policy.json` to `.squad/casting/policy.json` (or create from defaults). Create `registry.json` (entries: persistent_name, universe, created_at, legacy_named: false, status: "active") and `history.json` (first assignment snapshot with unique assignment_id).
58
+
59
+ **Seeding:** Each agent's `history.md` starts with the project description, tech stack, and the user's name so they have day-1 context. Agent folder names are the cast name in lowercase (e.g., `.squad/agents/ripley/`). The Scribe's charter includes maintaining `decisions.md` and cross-agent context sharing.
60
+
61
+ **Team.md structure:** `team.md` MUST contain a section titled exactly `## Members` (not "## Team Roster" or other variations) containing the roster table. This header is hard-coded in GitHub workflows (`squad-heartbeat.yml`, `squad-issue-assign.yml`, `squad-triage.yml`, `sync-squad-labels.yml`) for label automation. If the header is missing or titled differently, label routing breaks.
62
+
63
+ **Merge driver for append-only files:** Create or update `.gitattributes` at the repo root to enable conflict-free merging of `.squad/` state across branches:
64
+ ```
65
+ .squad/decisions.md merge=union
66
+ .squad/agents/*/history.md merge=union
67
+ .squad/log/** merge=union
68
+ .squad/orchestration-log/** merge=union
69
+ ```
70
+ The `union` merge driver keeps all lines from both sides, which is correct for append-only files. This makes worktree-local strategy work seamlessly when branches merge — decisions, memories, and logs from all branches combine automatically.
71
+
72
+ 7. Say: *"✅ Team hired. Try: '{FirstCastName}, set up the project structure'"*
73
+
74
+ 8. **Post-setup input sources** (optional — ask after team is created, not during casting):
75
+ - PRD/spec: *"Do you have a PRD or spec document? (file path, paste it, or skip)"* → If provided, follow PRD Mode flow
76
+ - GitHub issues: *"Is there a GitHub repo with issues I should pull from? (owner/repo, or skip)"* → If provided, follow GitHub Issues Mode flow
77
+ - Human members: *"Are any humans joining the team? (names and roles, or just AI for now)"* → If provided, add per Human Team Members section
78
+ - Copilot agent: *"Want to include @copilot? It can pick up issues autonomously. (yes/no)"* → If yes, follow Copilot Coding Agent Member section and ask about auto-assignment
79
+ - These are additive. Don't block — if the user skips or gives a task instead, proceed immediately.
80
+
81
+ ## Examples
82
+
83
+ **Example flow:**
84
+ 1. Coordinator detects no team.md → Init Mode
85
+ 2. Runs `git config user.name` → "Brady"
86
+ 3. Asks: *"Hey Brady, what are you building?"*
87
+ 4. User: *"TypeScript CLI tool with GitHub API integration"*
88
+ 5. Coordinator runs casting algorithm → selects "The Usual Suspects" universe
89
+ 6. Proposes: Keaton (Lead), Verbal (Prompt), Fenster (Backend), Hockney (Tester), Scribe, Ralph
90
+ 7. Uses `ask_user` with choices → user selects "Yes, hire this team"
91
+ 8. Coordinator creates `.squad/` structure, initializes casting state, seeds agents
92
+ 9. Says: *"✅ Team hired. Try: 'Keaton, set up the project structure'"*
93
+
94
+ ## Anti-Patterns
95
+
96
+ - ❌ Creating files before user confirms Phase 1
97
+ - ❌ Mixing agents from different universes in the same cast
98
+ - ❌ Skipping the `ask_user` tool and assuming confirmation
99
+ - ❌ Proceeding to Phase 2 when user said "add someone" or "change a role"
100
+ - ❌ Using `## Team Roster` instead of `## Members` as the header (breaks GitHub workflows)
101
+ - ❌ Forgetting to initialize `.squad/casting/` state files
102
+ - ❌ Reading or storing `git config user.email` (PII violation)
@@ -0,0 +1,117 @@
1
+ # Model Selection
2
+
3
+ > Determines which LLM model to use for each agent spawn.
4
+
5
+ ## SCOPE
6
+
7
+ ✅ THIS SKILL PRODUCES:
8
+ - A resolved `model` parameter for every `task` tool call
9
+ - Persistent model preferences in `.squad/config.json`
10
+ - Spawn acknowledgments that include the resolved model
11
+
12
+ ❌ THIS SKILL DOES NOT PRODUCE:
13
+ - Code, tests, or documentation
14
+ - Model performance benchmarks
15
+ - Cost reports or billing artifacts
16
+
17
+ ## Context
18
+
19
+ Squad supports 18+ models across three tiers (premium, standard, fast). The coordinator must select the right model for each agent spawn. Users can set persistent preferences that survive across sessions.
20
+
21
+ ## 5-Layer Model Resolution Hierarchy
22
+
23
+ Resolution is **first-match-wins** — the highest layer with a value wins.
24
+
25
+ | Layer | Name | Source | Persistence |
26
+ |-------|------|--------|-------------|
27
+ | **0a** | Per-Agent Config | `.squad/config.json` → `agentModelOverrides.{name}` | Persistent (survives sessions) |
28
+ | **0b** | Global Config | `.squad/config.json` → `defaultModel` | Persistent (survives sessions) |
29
+ | **1** | Session Directive | User said "use X" in current session | Session-only |
30
+ | **2** | Charter Preference | Agent's `charter.md` → `## Model` section | Persistent (in charter) |
31
+ | **3** | Task-Aware Auto | Code → sonnet, docs → haiku, visual → opus | Computed per-spawn |
32
+ | **4** | Default | `claude-haiku-4.5` | Hardcoded fallback |
33
+
34
+ **Key principle:** Layer 0 (persistent config) beats everything. If the user said "always use opus" and it was saved to config.json, every agent gets opus regardless of role or task type. This is intentional — the user explicitly chose quality over cost.
35
+
36
+ ## AGENT WORKFLOW
37
+
38
+ ### On Session Start
39
+
40
+ 1. READ `.squad/config.json`
41
+ 2. CHECK for `defaultModel` field — if present, this is the Layer 0 override for all spawns
42
+ 3. CHECK for `agentModelOverrides` field — if present, these are per-agent Layer 0a overrides
43
+ 4. STORE both values in session context for the duration
44
+
45
+ ### On Every Agent Spawn
46
+
47
+ 1. CHECK Layer 0a: Is there an `agentModelOverrides.{agentName}` in config.json? → Use it.
48
+ 2. CHECK Layer 0b: Is there a `defaultModel` in config.json? → Use it.
49
+ 3. CHECK Layer 1: Did the user give a session directive? → Use it.
50
+ 4. CHECK Layer 2: Does the agent's charter have a `## Model` section? → Use it.
51
+ 5. CHECK Layer 3: Determine task type:
52
+ - Code (implementation, tests, refactoring, bug fixes) → `claude-sonnet-4.6`
53
+ - Prompts, agent designs → `claude-sonnet-4.6`
54
+ - Visual/design with image analysis → `claude-opus-4.6`
55
+ - Non-code (docs, planning, triage, changelogs) → `claude-haiku-4.5`
56
+ 6. FALLBACK Layer 4: `claude-haiku-4.5`
57
+ 7. INCLUDE model in spawn acknowledgment: `🔧 {Name} ({resolved_model}) — {task}`
58
+
59
+ ### When User Sets a Preference
60
+
61
+ **Trigger phrases:** "always use X", "use X for everything", "switch to X", "default to X"
62
+
63
+ 1. VALIDATE the model ID against the catalog (18+ models)
64
+ 2. WRITE `defaultModel` to `.squad/config.json` (merge, don't overwrite)
65
+ 3. ACKNOWLEDGE: `✅ Model preference saved: {model} — all future sessions will use this until changed.`
66
+
67
+ **Per-agent trigger:** "use X for {agent}"
68
+
69
+ 1. VALIDATE model ID
70
+ 2. WRITE to `agentModelOverrides.{agent}` in `.squad/config.json`
71
+ 3. ACKNOWLEDGE: `✅ {Agent} will always use {model} — saved to config.`
72
+
73
+ ### When User Clears a Preference
74
+
75
+ **Trigger phrases:** "switch back to automatic", "clear model preference", "use default models"
76
+
77
+ 1. REMOVE `defaultModel` from `.squad/config.json`
78
+ 2. ACKNOWLEDGE: `✅ Model preference cleared — returning to automatic selection.`
79
+
80
+ ### STOP
81
+
82
+ After resolving the model and including it in the spawn template, this skill is done. Do NOT:
83
+ - Generate model comparison reports
84
+ - Run benchmarks or speed tests
85
+ - Create new config files (only modify existing `.squad/config.json`)
86
+ - Change the model after spawn (fallback chains handle runtime failures)
87
+
88
+ ## Config Schema
89
+
90
+ `.squad/config.json` model-related fields:
91
+
92
+ ```json
93
+ {
94
+ "version": 1,
95
+ "defaultModel": "claude-opus-4.6",
96
+ "agentModelOverrides": {
97
+ "fenster": "claude-sonnet-4.6",
98
+ "mcmanus": "claude-haiku-4.5"
99
+ }
100
+ }
101
+ ```
102
+
103
+ - `defaultModel` — applies to ALL agents unless overridden by `agentModelOverrides`
104
+ - `agentModelOverrides` — per-agent overrides that take priority over `defaultModel`
105
+ - Both fields are optional. When absent, Layers 1-4 apply normally.
106
+
107
+ ## Fallback Chains
108
+
109
+ If a model is unavailable (rate limit, plan restriction), retry within the same tier:
110
+
111
+ ```
112
+ Premium: claude-opus-4.6 → claude-opus-4.6-fast → claude-opus-4.5 → claude-sonnet-4.6
113
+ Standard: claude-sonnet-4.6 → gpt-5.4 → claude-sonnet-4.5 → gpt-5.3-codex → claude-sonnet-4
114
+ Fast: claude-haiku-4.5 → gpt-5.1-codex-mini → gpt-4.1 → gpt-5-mini
115
+ ```
116
+
117
+ **Never fall UP in tier.** A fast task won't land on a premium model via fallback.
@@ -0,0 +1,24 @@
1
+ # Skill: nap
2
+
3
+ > Context hygiene — compress, prune, archive .squad/ state
4
+
5
+ ## What It Does
6
+
7
+ Reclaims context window budget by compressing agent histories, pruning old logs,
8
+ archiving stale decisions, and cleaning orphaned inbox files.
9
+
10
+ ## When To Use
11
+
12
+ - Before heavy fan-out work (many agents will spawn)
13
+ - When history.md files exceed 15KB
14
+ - When .squad/ total size exceeds 1MB
15
+ - After long-running sessions or sprints
16
+
17
+ ## Invocation
18
+
19
+ - CLI: `squad nap` / `squad nap --deep` / `squad nap --dry-run`
20
+ - REPL: `/nap` / `/nap --dry-run` / `/nap --deep`
21
+
22
+ ## Confidence
23
+
24
+ medium — Confirmed by team vote (4-1) and initial implementation
@@ -0,0 +1,57 @@
1
+ # Personal Squad — Skill Document
2
+
3
+ ## What is a Personal Squad?
4
+
5
+ A personal squad is a user-level collection of AI agents that travel with you across projects. Unlike project agents (defined in a project's `.squad/` directory), personal agents live in your global config directory and are automatically discovered when you start a squad session.
6
+
7
+ ## Directory Structure
8
+
9
+ ```
10
+ ~/.config/squad/personal-squad/ # Linux/macOS
11
+ %APPDATA%/squad/personal-squad/ # Windows
12
+ ├── agents/
13
+ │ ├── {agent-name}/
14
+ │ │ ├── charter.md
15
+ │ │ └── history.md
16
+ │ └── ...
17
+ └── config.json # Optional: personal squad config
18
+ ```
19
+
20
+ ## How It Works
21
+
22
+ 1. **Ambient Discovery:** When Squad starts a session, it checks for a personal squad directory
23
+ 2. **Merge:** Personal agents are merged into the session cast alongside project agents
24
+ 3. **Ghost Protocol:** Personal agents can read project state but not write to it
25
+ 4. **Kill Switch:** Set `SQUAD_NO_PERSONAL=1` to disable ambient discovery
26
+
27
+ ## Commands
28
+
29
+ - `squad personal init` — Bootstrap a personal squad directory
30
+ - `squad personal list` — List your personal agents
31
+ - `squad personal add {name} --role {role}` — Add a personal agent
32
+ - `squad personal remove {name}` — Remove a personal agent
33
+ - `squad cast` — Show the current session cast (project + personal)
34
+
35
+ ## Ghost Protocol
36
+
37
+ See `templates/ghost-protocol.md` for the full rules. Key points:
38
+ - Personal agents advise; project agents execute
39
+ - No writes to project `.squad/` state
40
+ - Transparent origin tagging in logs
41
+ - Project agents take precedence on conflicts
42
+
43
+ ## Configuration
44
+
45
+ Optional `config.json` in the personal squad directory:
46
+ ```json
47
+ {
48
+ "defaultModel": "auto",
49
+ "ghostProtocol": true,
50
+ "agents": {}
51
+ }
52
+ ```
53
+
54
+ ## Environment Variables
55
+
56
+ - `SQUAD_NO_PERSONAL` — Set to any value to disable personal squad discovery
57
+ - `SQUAD_PERSONAL_DIR` — Override the default personal squad directory path