@bradygaster/squad-sdk 0.9.1 → 0.9.2-insider.1

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 (285) hide show
  1. package/README.md +340 -296
  2. package/dist/agents/history-shadow.d.ts +7 -5
  3. package/dist/agents/history-shadow.d.ts.map +1 -1
  4. package/dist/agents/history-shadow.js +69 -78
  5. package/dist/agents/history-shadow.js.map +1 -1
  6. package/dist/agents/index.d.ts +12 -1
  7. package/dist/agents/index.d.ts.map +1 -1
  8. package/dist/agents/index.js +62 -9
  9. package/dist/agents/index.js.map +1 -1
  10. package/dist/agents/lifecycle.d.ts +4 -0
  11. package/dist/agents/lifecycle.d.ts.map +1 -1
  12. package/dist/agents/lifecycle.js +6 -7
  13. package/dist/agents/lifecycle.js.map +1 -1
  14. package/dist/agents/onboarding.d.ts +4 -2
  15. package/dist/agents/onboarding.d.ts.map +1 -1
  16. package/dist/agents/onboarding.js +26 -16
  17. package/dist/agents/onboarding.js.map +1 -1
  18. package/dist/agents/personal.d.ts +2 -1
  19. package/dist/agents/personal.d.ts.map +1 -1
  20. package/dist/agents/personal.js +11 -12
  21. package/dist/agents/personal.js.map +1 -1
  22. package/dist/build/bundle.d.ts.map +1 -1
  23. package/dist/build/bundle.js +6 -6
  24. package/dist/build/bundle.js.map +1 -1
  25. package/dist/build/github-dist.js +42 -42
  26. package/dist/build/release.d.ts.map +1 -1
  27. package/dist/build/release.js +7 -5
  28. package/dist/build/release.js.map +1 -1
  29. package/dist/casting/index.d.ts.map +1 -1
  30. package/dist/casting/index.js +4 -3
  31. package/dist/casting/index.js.map +1 -1
  32. package/dist/config/agent-source.d.ts +5 -1
  33. package/dist/config/agent-source.d.ts.map +1 -1
  34. package/dist/config/agent-source.js +85 -41
  35. package/dist/config/agent-source.js.map +1 -1
  36. package/dist/config/init.d.ts +4 -3
  37. package/dist/config/init.d.ts.map +1 -1
  38. package/dist/config/init.js +257 -236
  39. package/dist/config/init.js.map +1 -1
  40. package/dist/config/legacy-fallback.d.ts +3 -2
  41. package/dist/config/legacy-fallback.d.ts.map +1 -1
  42. package/dist/config/legacy-fallback.js +16 -14
  43. package/dist/config/legacy-fallback.js.map +1 -1
  44. package/dist/config/models.d.ts +9 -6
  45. package/dist/config/models.d.ts.map +1 -1
  46. package/dist/config/models.js +35 -25
  47. package/dist/config/models.js.map +1 -1
  48. package/dist/index.d.ts +5 -1
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +14 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/marketplace/packaging.d.ts.map +1 -1
  53. package/dist/marketplace/packaging.js +18 -16
  54. package/dist/marketplace/packaging.js.map +1 -1
  55. package/dist/multi-squad.d.ts.map +1 -1
  56. package/dist/multi-squad.js +10 -9
  57. package/dist/multi-squad.js.map +1 -1
  58. package/dist/platform/comms-file-log.d.ts.map +1 -1
  59. package/dist/platform/comms-file-log.js +7 -6
  60. package/dist/platform/comms-file-log.js.map +1 -1
  61. package/dist/platform/comms.d.ts.map +1 -1
  62. package/dist/platform/comms.js +6 -5
  63. package/dist/platform/comms.js.map +1 -1
  64. package/dist/platform/index.d.ts.map +1 -1
  65. package/dist/platform/index.js +4 -3
  66. package/dist/platform/index.js.map +1 -1
  67. package/dist/ralph/capabilities.d.ts +30 -1
  68. package/dist/ralph/capabilities.d.ts.map +1 -1
  69. package/dist/ralph/capabilities.js +51 -6
  70. package/dist/ralph/capabilities.js.map +1 -1
  71. package/dist/ralph/index.d.ts +1 -1
  72. package/dist/ralph/index.d.ts.map +1 -1
  73. package/dist/ralph/index.js +4 -3
  74. package/dist/ralph/index.js.map +1 -1
  75. package/dist/ralph/rate-limiting.d.ts.map +1 -1
  76. package/dist/ralph/rate-limiting.js +4 -4
  77. package/dist/ralph/rate-limiting.js.map +1 -1
  78. package/dist/remote/bridge.d.ts.map +1 -1
  79. package/dist/remote/bridge.js +2 -2
  80. package/dist/remote/bridge.js.map +1 -1
  81. package/dist/resolution.d.ts +9 -0
  82. package/dist/resolution.d.ts.map +1 -1
  83. package/dist/resolution.js +39 -16
  84. package/dist/resolution.js.map +1 -1
  85. package/dist/roles/catalog.d.ts +1 -1
  86. package/dist/runtime/config.d.ts.map +1 -1
  87. package/dist/runtime/config.js +8 -7
  88. package/dist/runtime/config.js.map +1 -1
  89. package/dist/runtime/cross-squad.d.ts.map +1 -1
  90. package/dist/runtime/cross-squad.js +8 -7
  91. package/dist/runtime/cross-squad.js.map +1 -1
  92. package/dist/runtime/scheduler.d.ts.map +1 -1
  93. package/dist/runtime/scheduler.js +8 -8
  94. package/dist/runtime/scheduler.js.map +1 -1
  95. package/dist/runtime/squad-observer.d.ts.map +1 -1
  96. package/dist/runtime/squad-observer.js +7 -4
  97. package/dist/runtime/squad-observer.js.map +1 -1
  98. package/dist/sharing/consult.d.ts +1 -1
  99. package/dist/sharing/consult.d.ts.map +1 -1
  100. package/dist/sharing/consult.js +144 -142
  101. package/dist/sharing/consult.js.map +1 -1
  102. package/dist/sharing/export.d.ts.map +1 -1
  103. package/dist/sharing/export.js +16 -16
  104. package/dist/sharing/export.js.map +1 -1
  105. package/dist/sharing/import.d.ts.map +1 -1
  106. package/dist/sharing/import.js +13 -12
  107. package/dist/sharing/import.js.map +1 -1
  108. package/dist/skills/skill-loader.d.ts.map +1 -1
  109. package/dist/skills/skill-loader.js +10 -9
  110. package/dist/skills/skill-loader.js.map +1 -1
  111. package/dist/skills/skill-script-loader.d.ts.map +1 -1
  112. package/dist/skills/skill-script-loader.js +6 -4
  113. package/dist/skills/skill-script-loader.js.map +1 -1
  114. package/dist/skills/skill-source.d.ts +3 -1
  115. package/dist/skills/skill-source.d.ts.map +1 -1
  116. package/dist/skills/skill-source.js +18 -16
  117. package/dist/skills/skill-source.js.map +1 -1
  118. package/dist/state/collection-map.d.ts +43 -0
  119. package/dist/state/collection-map.d.ts.map +1 -0
  120. package/dist/state/collection-map.js +9 -0
  121. package/dist/state/collection-map.js.map +1 -0
  122. package/dist/state/collections.d.ts +102 -0
  123. package/dist/state/collections.d.ts.map +1 -0
  124. package/dist/state/collections.js +317 -0
  125. package/dist/state/collections.js.map +1 -0
  126. package/dist/state/domain-types.d.ts +122 -0
  127. package/dist/state/domain-types.d.ts.map +1 -0
  128. package/dist/state/domain-types.js +54 -0
  129. package/dist/state/domain-types.js.map +1 -0
  130. package/dist/state/handles.d.ts +16 -0
  131. package/dist/state/handles.d.ts.map +1 -0
  132. package/dist/state/handles.js +161 -0
  133. package/dist/state/handles.js.map +1 -0
  134. package/dist/state/index.d.ts +17 -0
  135. package/dist/state/index.d.ts.map +1 -0
  136. package/dist/state/index.js +15 -0
  137. package/dist/state/index.js.map +1 -0
  138. package/dist/state/io/charter-io.d.ts +28 -0
  139. package/dist/state/io/charter-io.d.ts.map +1 -0
  140. package/dist/state/io/charter-io.js +94 -0
  141. package/dist/state/io/charter-io.js.map +1 -0
  142. package/dist/state/io/decisions-io.d.ts +42 -0
  143. package/dist/state/io/decisions-io.d.ts.map +1 -0
  144. package/dist/state/io/decisions-io.js +66 -0
  145. package/dist/state/io/decisions-io.js.map +1 -0
  146. package/dist/state/io/history-io.d.ts +37 -0
  147. package/dist/state/io/history-io.d.ts.map +1 -0
  148. package/dist/state/io/history-io.js +102 -0
  149. package/dist/state/io/history-io.js.map +1 -0
  150. package/dist/state/io/index.d.ts +19 -0
  151. package/dist/state/io/index.d.ts.map +1 -0
  152. package/dist/state/io/index.js +19 -0
  153. package/dist/state/io/index.js.map +1 -0
  154. package/dist/state/io/routing-io.d.ts +37 -0
  155. package/dist/state/io/routing-io.d.ts.map +1 -0
  156. package/dist/state/io/routing-io.js +99 -0
  157. package/dist/state/io/routing-io.js.map +1 -0
  158. package/dist/state/io/team-io.d.ts +46 -0
  159. package/dist/state/io/team-io.d.ts.map +1 -0
  160. package/dist/state/io/team-io.js +82 -0
  161. package/dist/state/io/team-io.js.map +1 -0
  162. package/dist/state/schema.d.ts +24 -0
  163. package/dist/state/schema.d.ts.map +1 -0
  164. package/dist/state/schema.js +41 -0
  165. package/dist/state/schema.js.map +1 -0
  166. package/dist/state/squad-state.d.ts +42 -0
  167. package/dist/state/squad-state.d.ts.map +1 -0
  168. package/dist/state/squad-state.js +68 -0
  169. package/dist/state/squad-state.js.map +1 -0
  170. package/dist/storage/fs-storage-provider.d.ts +60 -0
  171. package/dist/storage/fs-storage-provider.d.ts.map +1 -0
  172. package/dist/storage/fs-storage-provider.js +377 -0
  173. package/dist/storage/fs-storage-provider.js.map +1 -0
  174. package/dist/storage/in-memory-storage-provider.d.ts +46 -0
  175. package/dist/storage/in-memory-storage-provider.d.ts.map +1 -0
  176. package/dist/storage/in-memory-storage-provider.js +264 -0
  177. package/dist/storage/in-memory-storage-provider.js.map +1 -0
  178. package/dist/storage/index.d.ts +6 -0
  179. package/dist/storage/index.d.ts.map +1 -0
  180. package/dist/storage/index.js +5 -0
  181. package/dist/storage/index.js.map +1 -0
  182. package/dist/storage/sqlite-storage-provider.d.ts +95 -0
  183. package/dist/storage/sqlite-storage-provider.d.ts.map +1 -0
  184. package/dist/storage/sqlite-storage-provider.js +383 -0
  185. package/dist/storage/sqlite-storage-provider.js.map +1 -0
  186. package/dist/storage/storage-error.d.ts +28 -0
  187. package/dist/storage/storage-error.d.ts.map +1 -0
  188. package/dist/storage/storage-error.js +35 -0
  189. package/dist/storage/storage-error.js.map +1 -0
  190. package/dist/storage/storage-provider.d.ts +161 -0
  191. package/dist/storage/storage-provider.d.ts.map +1 -0
  192. package/dist/storage/storage-provider.js +18 -0
  193. package/dist/storage/storage-provider.js.map +1 -0
  194. package/dist/streams/resolver.d.ts.map +1 -1
  195. package/dist/streams/resolver.js +6 -5
  196. package/dist/streams/resolver.js.map +1 -1
  197. package/dist/tools/index.d.ts +5 -1
  198. package/dist/tools/index.d.ts.map +1 -1
  199. package/dist/tools/index.js +54 -15
  200. package/dist/tools/index.js.map +1 -1
  201. package/dist/upstream/resolver.d.ts +3 -2
  202. package/dist/upstream/resolver.d.ts.map +1 -1
  203. package/dist/upstream/resolver.js +33 -32
  204. package/dist/upstream/resolver.js.map +1 -1
  205. package/package.json +33 -1
  206. package/templates/casting/Futurama.json +9 -9
  207. package/templates/casting-history.json +4 -4
  208. package/templates/casting-policy.json +37 -37
  209. package/templates/casting-reference.md +104 -104
  210. package/templates/casting-registry.json +3 -3
  211. package/templates/ceremonies.md +41 -41
  212. package/templates/charter.md +53 -53
  213. package/templates/constraint-tracking.md +38 -38
  214. package/templates/cooperative-rate-limiting.md +229 -229
  215. package/templates/copilot-instructions.md +46 -46
  216. package/templates/history.md +10 -10
  217. package/templates/identity/now.md +9 -9
  218. package/templates/identity/wisdom.md +15 -15
  219. package/templates/issue-lifecycle.md +412 -412
  220. package/templates/keda-scaler.md +164 -164
  221. package/templates/machine-capabilities.md +74 -74
  222. package/templates/mcp-config.md +90 -90
  223. package/templates/multi-agent-format.md +28 -28
  224. package/templates/plugin-marketplace.md +49 -49
  225. package/templates/ralph-circuit-breaker.md +313 -313
  226. package/templates/raw-agent-output.md +37 -37
  227. package/templates/roster.md +60 -60
  228. package/templates/routing.md +39 -39
  229. package/templates/run-output.md +50 -50
  230. package/templates/schedule.json +19 -19
  231. package/templates/scribe-charter.md +123 -119
  232. package/templates/skill.md +24 -24
  233. package/templates/skills/agent-collaboration/SKILL.md +42 -42
  234. package/templates/skills/agent-conduct/SKILL.md +24 -24
  235. package/templates/skills/architectural-proposals/SKILL.md +151 -151
  236. package/templates/skills/ci-validation-gates/SKILL.md +84 -84
  237. package/templates/skills/cli-wiring/SKILL.md +47 -47
  238. package/templates/skills/client-compatibility/SKILL.md +89 -89
  239. package/templates/skills/cross-machine-coordination/SKILL.md +434 -0
  240. package/templates/skills/cross-squad/SKILL.md +114 -114
  241. package/templates/skills/distributed-mesh/SKILL.md +287 -287
  242. package/templates/skills/distributed-mesh/mesh.json.example +30 -30
  243. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
  244. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
  245. package/templates/skills/docs-standards/SKILL.md +71 -71
  246. package/templates/skills/economy-mode/SKILL.md +114 -114
  247. package/templates/skills/error-recovery/SKILL.md +99 -0
  248. package/templates/skills/external-comms/SKILL.md +329 -329
  249. package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
  250. package/templates/skills/git-workflow/SKILL.md +204 -204
  251. package/templates/skills/github-multi-account/SKILL.md +95 -95
  252. package/templates/skills/history-hygiene/SKILL.md +36 -36
  253. package/templates/skills/humanizer/SKILL.md +105 -105
  254. package/templates/skills/init-mode/SKILL.md +102 -102
  255. package/templates/skills/iterative-retrieval/SKILL.md +165 -0
  256. package/templates/skills/model-selection/SKILL.md +117 -117
  257. package/templates/skills/nap/SKILL.md +24 -24
  258. package/templates/skills/notification-routing/SKILL.md +105 -0
  259. package/templates/skills/personal-squad/SKILL.md +57 -57
  260. package/templates/skills/pr-screenshots/SKILL.md +149 -0
  261. package/templates/skills/project-conventions/SKILL.md +56 -56
  262. package/templates/skills/ralph-two-pass-scan/SKILL.md +35 -0
  263. package/templates/skills/reflect/SKILL.md +229 -0
  264. package/templates/skills/release-process/SKILL.md +131 -423
  265. package/templates/skills/reskill/SKILL.md +92 -92
  266. package/templates/skills/retro-enforcement/SKILL.md +148 -0
  267. package/templates/skills/reviewer-protocol/SKILL.md +79 -79
  268. package/templates/skills/secret-handling/SKILL.md +200 -200
  269. package/templates/skills/session-recovery/SKILL.md +155 -155
  270. package/templates/skills/squad-conventions/SKILL.md +69 -69
  271. package/templates/skills/test-discipline/SKILL.md +37 -37
  272. package/templates/skills/tiered-memory/SKILL.md +234 -0
  273. package/templates/skills/windows-compatibility/SKILL.md +98 -74
  274. package/templates/{squad.agent.md → squad.agent.md.template} +57 -28
  275. package/templates/workflows/squad-ci.yml +24 -24
  276. package/templates/workflows/squad-docs.yml +54 -54
  277. package/templates/workflows/squad-heartbeat.yml +167 -171
  278. package/templates/workflows/squad-insider-release.yml +61 -61
  279. package/templates/workflows/squad-issue-assign.yml +161 -161
  280. package/templates/workflows/squad-label-enforce.yml +181 -181
  281. package/templates/workflows/squad-preview.yml +55 -55
  282. package/templates/workflows/squad-promote.yml +120 -120
  283. package/templates/workflows/squad-release.yml +77 -77
  284. package/templates/workflows/squad-triage.yml +260 -260
  285. package/templates/workflows/sync-squad-labels.yml +169 -169
@@ -0,0 +1,234 @@
1
+ ---
2
+ name: tiered-memory
3
+ description: Three-tier agent memory model (hot/cold/wiki) for 20-55% context reduction per spawn
4
+ domain: memory-management, performance
5
+ confidence: high
6
+ source: earned (production measurements in tamirdresher/tamresearch1, 34-74KB baseline payloads)
7
+ ---
8
+
9
+ # Skill: Tiered Agent Memory
10
+
11
+ ## Overview
12
+
13
+ Squad agents currently load their full context history on every spawn, resulting in 34–74KB payloads per agent (8,800–18,500 tokens). Measurement shows 82–96% of that context is "old noise" — information that is no longer relevant to the current task. The Tiered Agent Memory skill introduces a three-tier memory model that eliminates this bloat, achieving 20–55% context reduction per spawn in production.
14
+
15
+ ---
16
+
17
+ ## Memory Tiers
18
+
19
+ ### 🔥 Hot Tier — Current Session Context
20
+ - **Size target:** ~2–4KB
21
+ - **Load policy:** Always loaded. Every spawn includes hot memory by default.
22
+ - **Contents:** Current task description, active decisions made this session, immediate blockers, last 3–5 actions taken, who you are talking to right now.
23
+ - **Lifetime:** Current session only. Discarded after session ends (Scribe promotes relevant parts to Cold).
24
+ - **Purpose:** Provide immediate task context without any latency or load decision.
25
+
26
+ ### ❄️ Cold Tier — Summarized Cross-Session History
27
+ - **Size target:** ~8–12KB
28
+ - **Load policy:** Load on demand. Include only when the task explicitly needs history.
29
+ - **Contents:** Summarized past sessions (compressed by Scribe), cross-session decisions, recurring patterns, unresolved issues from prior work.
30
+ - **Lifetime:** 30 days rolling window. After 30 days, Scribe promotes to Wiki tier.
31
+ - **Purpose:** Answer "what have we tried before?" and "what was decided?" without replaying full transcripts.
32
+ - **How to include:** Pass `--include-cold` in spawn template or add `## Cold Memory` section.
33
+
34
+ ### 📚 Wiki Tier — Durable Structured Knowledge
35
+ - **Size target:** variable, structured reference docs
36
+ - **Load policy:** Async write, selective read. Load only when task requires domain knowledge.
37
+ - **Contents:** Architecture decisions (ADRs), agent charters, routing rules, stable conventions, external API contracts, known platform constraints.
38
+ - **Lifetime:** Permanent until explicitly deprecated.
39
+ - **Purpose:** Authoritative reference. Not history — structured facts.
40
+ - **How to include:** Pass `--include-wiki` or reference specific wiki doc paths in spawn template.
41
+
42
+ ---
43
+
44
+ ## When to Load Each Tier
45
+
46
+ | Situation | Hot | Cold | Wiki |
47
+ |-----------|-----|------|------|
48
+ | New task, no prior context needed | ✅ | ❌ | ❌ |
49
+ | Resuming interrupted work | ✅ | ✅ | ❌ |
50
+ | Debugging a recurring issue | ✅ | ✅ | ❌ |
51
+ | Implementing against a spec/ADR | ✅ | ❌ | ✅ |
52
+ | Onboarding to unfamiliar subsystem | ✅ | ❌ | ✅ |
53
+ | Post-incident review | ✅ | ✅ | ✅ |
54
+
55
+ ---
56
+
57
+ ## Spawn Template Pattern
58
+
59
+ The default spawn prompt should include **Hot tier only**:
60
+
61
+ ```
62
+ ## Memory Context
63
+
64
+ ### Hot (current session)
65
+ {hot_context}
66
+ ```
67
+
68
+ Add `--include-cold` when the task needs history:
69
+ ```
70
+ ## Memory Context
71
+
72
+ ### Hot (current session)
73
+ {hot_context}
74
+
75
+ ### Cold (summarized history — load on demand)
76
+ See: .squad/memory/cold/{agent-name}.md
77
+ ```
78
+
79
+ Add `--include-wiki` when the task needs domain knowledge:
80
+ ```
81
+ ## Memory Context
82
+
83
+ ### Hot (current session)
84
+ {hot_context}
85
+
86
+ ### Wiki (durable reference)
87
+ See: .squad/memory/wiki/{topic}.md
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Measurement Data
93
+
94
+ Baseline measurements from tamirdresher/tamresearch1 production runs (June 2025):
95
+
96
+ | Agent | Total Context | Old Noise % | Hot-Only Size | Savings |
97
+ |-------|--------------|-------------|---------------|---------|
98
+ | Picard (Lead) | 74KB / 18.5K tokens | 96% | ~3KB | 55% |
99
+ | Scribe | 52KB / 13K tokens | 91% | ~4KB | 48% |
100
+ | Data | 43KB / 10.7K tokens | 88% | ~3.5KB | 42% |
101
+ | Ralph | 38KB / 9.5K tokens | 85% | ~3KB | 38% |
102
+ | Worf | 34KB / 8.5K tokens | 82% | ~3KB | 20% |
103
+
104
+ **Average savings: 20–55% per spawn** with Hot-only loading. Cold + Wiki on-demand adds ~2–8KB when needed, still well below current baselines.
105
+
106
+ ---
107
+
108
+ ## Integration with Scribe Agent
109
+
110
+ Scribe is the memory coordinator for this system. It automates tier promotion:
111
+
112
+ 1. **End of session:** Scribe compresses Hot → Cold summary (keeps ~10% of session verbosity)
113
+ 2. **After 30 days:** Scribe promotes Cold → Wiki for decisions/facts that aged into stable knowledge
114
+ 3. **On-demand wiki writes:** Any agent can request Scribe to write a wiki entry mid-session using `scribe:wiki-write`
115
+
116
+ See Scribe charter: `.squad/agents/scribe/charter.md`
117
+
118
+ ---
119
+
120
+ ## Implementation Checklist
121
+
122
+ - [ ] Scribe writes Hot context file at session start (`.squad/memory/hot/{agent}.md`)
123
+ - [ ] Scribe compresses and writes Cold summary at session end
124
+ - [ ] Spawn templates default to Hot-only
125
+ - [ ] Coordinators add `--include-cold` / `--include-wiki` flags as needed
126
+ - [ ] Wiki entries stored in `.squad/memory/wiki/`
127
+ - [ ] Cold entries stored in `.squad/memory/cold/` with 30-day TTL
128
+
129
+ ---
130
+
131
+ ## References
132
+
133
+ - Upstream issue: bradygaster/squad#600
134
+ - Production data: tamirdresher/tamresearch1 (June 2025)
135
+
136
+ ---
137
+
138
+ ## Spawn Template
139
+
140
+ # Spawn Template: Agent with Tiered Memory
141
+
142
+ Use this template when spawning any Squad agent. By default it loads **Hot tier only**. Add optional sections as needed.
143
+
144
+ ---
145
+
146
+ ## Task
147
+
148
+ {task_description}
149
+
150
+ ## WHY
151
+
152
+ {why_this_matters}
153
+
154
+ ## Success Criteria
155
+
156
+ - [ ] {criterion_1}
157
+ - [ ] {criterion_2}
158
+
159
+ ---
160
+
161
+ ## Memory Context
162
+
163
+ ### 🔥 Hot (always included)
164
+
165
+ > Paste current session context here (2–4KB max):
166
+
167
+ ```
168
+ Current task: {task_description}
169
+ Active decisions: {decisions_this_session}
170
+ Last actions: {last_3_to_5_actions}
171
+ Blockers: {current_blockers_or_none}
172
+ Talking to: {current_interlocutor}
173
+ ```
174
+
175
+ ---
176
+
177
+ ### ❄️ Cold (include when task needs history — add `--include-cold`)
178
+
179
+ > Load on demand. Do not inline unless specifically needed.
180
+
181
+ Summarized cross-session history is at:
182
+ `.squad/memory/cold/{agent-name}.md`
183
+
184
+ Include when:
185
+ - Resuming interrupted work
186
+ - Debugging a recurring issue
187
+ - "What have we tried before?"
188
+
189
+ **To load cold memory, add this section and fetch the file before spawning:**
190
+
191
+ ```
192
+ ## Cold Memory Summary
193
+ {contents_of_.squad/memory/cold/{agent-name}.md}
194
+ ```
195
+
196
+ ---
197
+
198
+ ### 📚 Wiki (include when task needs domain knowledge — add `--include-wiki`)
199
+
200
+ > Load on demand. Reference specific wiki docs by path.
201
+
202
+ Wiki entries are at: `.squad/memory/wiki/`
203
+
204
+ Include when:
205
+ - Implementing against an ADR or spec
206
+ - Onboarding to unfamiliar subsystem
207
+ - Need stable conventions or API contracts
208
+
209
+ **To load wiki, add this section and reference the specific doc:**
210
+
211
+ ```
212
+ ## Wiki Reference
213
+ {contents_of_.squad/memory/wiki/{topic}.md}
214
+ ```
215
+
216
+ ---
217
+
218
+ ## Escalation
219
+
220
+ If blocked or uncertain:
221
+ - Architecture questions → @picard
222
+ - Security concerns → @worf
223
+ - Infrastructure/deployment → @belanna
224
+ - Memory/history questions → @scribe
225
+
226
+ ---
227
+
228
+ ## Notes
229
+
230
+ - Hot tier is always included and should stay under 4KB
231
+ - Cold adds ~8–12KB; only include when history is relevant
232
+ - Wiki adds variable size; only include specific relevant docs
233
+ - See `skills/tiered-memory/SKILL.md` for full tier reference
234
+ - See `docs/tiered-memory-guide.md` for wiring instructions
@@ -1,74 +1,98 @@
1
- ---
2
- name: "windows-compatibility"
3
- description: "Cross-platform path handling and command patterns"
4
- domain: "platform"
5
- confidence: "high"
6
- source: "earned (multiple Windows-specific bugs: colons in filenames, git -C failures, path separators)"
7
- ---
8
-
9
- ## Context
10
-
11
- Squad runs on Windows, macOS, and Linux. Several bugs have been traced to platform-specific assumptions: ISO timestamps with colons (illegal on Windows), `git -C` with Windows paths (unreliable), forward-slash paths in Node.js on Windows.
12
-
13
- ## Patterns
14
-
15
- ### Filenames & Timestamps
16
- - **Never use colons in filenames:** ISO 8601 format `2026-03-15T05:30:00Z` is illegal on Windows
17
- - **Use `safeTimestamp()` utility:** Replaces colons with hyphens → `2026-03-15T05-30-00Z`
18
- - **Centralize formatting:** Don't inline `.toISOString().replace(/:/g, '-')` — use the utility
19
-
20
- ### Git Commands
21
- - **Never use `git -C {path}`:** Unreliable with Windows paths (backslashes, spaces, drive letters)
22
- - **Always `cd` first:** Change directory, then run git commands
23
- - **Check for changes before commit:** `git diff --cached --quiet` (exit 0 = no changes)
24
-
25
- ### Commit Messages
26
- - **Never embed newlines in `-m` flag:** Backtick-n (`\n`) fails silently in PowerShell
27
- - **Use temp file + `-F` flag:** Write message to file, commit with `git commit -F $msgFile`
28
-
29
- ### Paths
30
- - **Never assume CWD is repo root:** Always use `TEAM ROOT` from spawn prompt or run `git rev-parse --show-toplevel`
31
- - **Use path.join() or path.resolve():** Don't manually concatenate with `/` or `\`
32
-
33
- ## Examples
34
-
35
- **Correct:**
36
- ```javascript
37
- // Timestamp utility
38
- const safeTimestamp = () => new Date().toISOString().replace(/:/g, '-').split('.')[0] + 'Z';
39
-
40
- // Git workflow (PowerShell)
41
- cd $teamRoot
42
- git add .squad/
43
- if ($LASTEXITCODE -eq 0) {
44
- $msg = @"
45
- docs(ai-team): session log
46
-
47
- Changes:
48
- - Added decisions
49
- "@
50
- $msgFile = [System.IO.Path]::GetTempFileName()
51
- Set-Content -Path $msgFile -Value $msg -Encoding utf8
52
- git commit -F $msgFile
53
- Remove-Item $msgFile
54
- }
55
- ```
56
-
57
- **Incorrect:**
58
- ```javascript
59
- // Colon in filename
60
- const logPath = `.squad/log/${new Date().toISOString()}.md`; // ILLEGAL on Windows
61
-
62
- // git -C with Windows path
63
- exec('git -C C:\\src\\squad add .squad/'); // UNRELIABLE
64
-
65
- // Inline newlines in commit message
66
- exec('git commit -m "First line\nSecond line"'); // FAILS silently in PowerShell
67
- ```
68
-
69
- ## Anti-Patterns
70
-
71
- - Testing only on one platform (bugs ship to other platforms)
72
- - Assuming Unix-style paths work everywhere
73
- - Using `git -C` because it "looks cleaner" (it doesn't work)
74
- - Skipping `git diff --cached --quiet` check (creates empty commits)
1
+ ---
2
+ name: "windows-compatibility"
3
+ description: "Cross-platform path handling and command patterns"
4
+ domain: "platform"
5
+ confidence: "high"
6
+ source: "earned (multiple Windows-specific bugs: colons in filenames, git -C failures, path separators)"
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Squad runs on Windows, macOS, and Linux. Several bugs have been traced to platform-specific assumptions: ISO timestamps with colons (illegal on Windows), `git -C` with Windows paths (unreliable), forward-slash paths in Node.js on Windows.
12
+
13
+ ## Patterns
14
+
15
+ ### Filenames & Timestamps
16
+ - **Never use colons in filenames:** ISO 8601 format `2026-03-15T05:30:00Z` is illegal on Windows
17
+ - **Use `safeTimestamp()` utility:** Replaces colons with hyphens → `2026-03-15T05-30-00Z`
18
+ - **Centralize formatting:** Don't inline `.toISOString().replace(/:/g, '-')` — use the utility
19
+
20
+ ### Git Commands
21
+ - **Never use `git -C {path}`:** Unreliable with Windows paths (backslashes, spaces, drive letters)
22
+ - **Always `cd` first:** Change directory, then run git commands
23
+ - **Check for changes before commit:** `git diff --cached --quiet` (exit 0 = no changes)
24
+
25
+ ### Commit Messages
26
+ - **Never embed newlines in `-m` flag:** Backtick-n (`\n`) fails silently in PowerShell
27
+ - **Use temp file + `-F` flag:** Write message to file, commit with `git commit -F $msgFile`
28
+
29
+ ### Paths
30
+ - **Never assume CWD is repo root:** Always use `TEAM ROOT` from spawn prompt or run `git rev-parse --show-toplevel`
31
+ - **Use path.join() or path.resolve():** Don't manually concatenate with `/` or `\`
32
+
33
+ ### Path Comparison (Case Sensitivity)
34
+ - **Never use case-sensitive `startsWith` or `===` for path comparison on Windows or macOS:** These filesystems are case-insensitive — `C:\Users\` and `c:\users\` refer to the same location
35
+ - **Use platform-aware comparison:** Check `process.platform === 'win32' || process.platform === 'darwin'` and lowercase both sides before comparing
36
+ - **Pattern:**
37
+ ```typescript
38
+ const CASE_INSENSITIVE = process.platform === 'win32' || process.platform === 'darwin';
39
+
40
+ function pathStartsWith(fullPath: string, prefix: string): boolean {
41
+ if (CASE_INSENSITIVE) {
42
+ return fullPath.toLowerCase().startsWith(prefix.toLowerCase());
43
+ }
44
+ return fullPath.startsWith(prefix);
45
+ }
46
+ ```
47
+ - **Where it matters:** Security checks (path traversal prevention), rootDir confinement, any path-contains-path validation
48
+ - **Linux is case-sensitive:** Do NOT lowercase on Linux — `/Home/` and `/home/` are different directories
49
+
50
+ ## Examples
51
+
52
+ **Correct:**
53
+ ```javascript
54
+ // Timestamp utility
55
+ const safeTimestamp = () => new Date().toISOString().replace(/:/g, '-').split('.')[0] + 'Z';
56
+
57
+ // Git workflow (PowerShell)
58
+ cd $teamRoot
59
+ git add .squad/
60
+ if ($LASTEXITCODE -eq 0) {
61
+ $msg = @"
62
+ docs(ai-team): session log
63
+
64
+ Changes:
65
+ - Added decisions
66
+ "@
67
+ $msgFile = [System.IO.Path]::GetTempFileName()
68
+ Set-Content -Path $msgFile -Value $msg -Encoding utf8
69
+ git commit -F $msgFile
70
+ Remove-Item $msgFile
71
+ }
72
+ ```
73
+
74
+ **Incorrect:**
75
+ ```javascript
76
+ // Colon in filename
77
+ const logPath = `.squad/log/${new Date().toISOString()}.md`; // ILLEGAL on Windows
78
+
79
+ // git -C with Windows path
80
+ exec('git -C C:\\src\\squad add .squad/'); // UNRELIABLE
81
+
82
+ // Inline newlines in commit message
83
+ exec('git commit -m "First line\nSecond line"'); // FAILS silently in PowerShell
84
+ ```
85
+
86
+ ## Anti-Patterns
87
+
88
+ - Testing only on one platform (bugs ship to other platforms)
89
+ - Assuming Unix-style paths work everywhere
90
+ - Using `git -C` because it "looks cleaner" (it doesn't work)
91
+ - Skipping `git diff --cached --quiet` check (creates empty commits)
92
+ - **Wrong — case-sensitive path check on Windows and macOS:**
93
+ ```typescript
94
+ if (!resolved.startsWith(rootDir + path.sep)) {
95
+ throw new Error('Path traversal blocked');
96
+ }
97
+ // Fails: 'c:\\Users\\temp\\file'.startsWith('C:\\Users\\temp\\') → false
98
+ ```
@@ -95,7 +95,14 @@ The `union` merge driver keeps all lines from both sides, which is correct for a
95
95
 
96
96
  ## Team Mode
97
97
 
98
- **⚠️ CRITICAL RULE: Every agent interaction MUST use the `task` tool to spawn a real agent. You MUST call the `task` tool never simulate, role-play, or inline an agent's work. If you did not call the `task` tool, the agent was NOT spawned. No exceptions.**
98
+ **⚠️ CRITICAL RULE: You are a DISPATCHER, not a DOER. Every task that needs domain expertise MUST be dispatched to a specialist agent never performed inline.**
99
+
100
+ **DISPATCH MECHANISM (detect once per session, then use consistently):**
101
+ - **CLI:** `task` tool → use it with agent_type, mode, model, name, description, prompt
102
+ - **VS Code:** `runSubagent` tool → use it with the full agent prompt
103
+ - **Neither available:** work inline (fallback only — LAST RESORT)
104
+
105
+ **If you wrote code, generated artifacts, or produced domain work without dispatching to an agent, you violated this rule. The coordinator ROUTES — it does not BUILD. No exceptions.**
99
106
 
100
107
  **On every session start:** Run `git config user.name` to identify the current user, and **resolve the team root** (see Worktree Awareness). Store the team root — all `.squad/` paths must be resolved relative to it. Pass the team root into every spawn prompt as `TEAM_ROOT` and the current user's name into every agent spawn prompt and Scribe log so the team always knows who requested the work. Check `.squad/identity/now.md` if it exists — it tells you what the team was last focused on. Update it if the focus has shifted.
101
108
 
@@ -191,12 +198,12 @@ When spawning agents, include the role emoji in the `description` parameter to m
191
198
  4. If no match, use 👤 as fallback
192
199
 
193
200
  **Examples:**
194
- - `description: "🏗️ Keaton: Reviewing architecture proposal"`
195
- - `description: "🔧 Fenster: Refactoring auth module"`
196
- - `description: "🧪 Hockney: Writing test cases"`
197
- - `description: "📋 Scribe: Log session & merge decisions"`
201
+ - `name: "keaton"`, `description: "🏗️ Keaton: Reviewing architecture proposal"`
202
+ - `name: "fenster"`, `description: "🔧 Fenster: Refactoring auth module"`
203
+ - `name: "hockney"`, `description: "🧪 Hockney: Writing test cases"`
204
+ - `name: "scribe"`, `description: "📋 Scribe: Log session & merge decisions"`
198
205
 
199
- The emoji makes task spawn notifications visually consistent with the launch table shown to users.
206
+ The `name` parameter generates the human-readable agent ID shown in the tasks panel — it MUST be the agent's lowercase cast name (e.g., `"eecom"`, `"fido"`). Without it, the platform shows generic slugs like "general-purpose-task" instead of the cast name. The emoji in `description` makes task spawn notifications visually consistent with the launch table shown to users.
200
207
 
201
208
  ### Directive Capture
202
209
 
@@ -246,7 +253,11 @@ The routing table determines **WHO** handles work. After routing, use Response M
246
253
  | Ambiguous | Pick the most likely agent; say who you chose |
247
254
  | Multi-agent task (auto) | Check `ceremonies.md` for `when: "before"` ceremonies whose condition matches; run before spawning work |
248
255
 
249
- **Skill-aware routing:** Before spawning, check `.squad/skills/` for skills relevant to the task domain. If a matching skill exists, add to the spawn prompt: `Relevant skill: .squad/skills/{name}/SKILL.md — read before starting.` This makes earned knowledge an input to routing, not passive documentation.
256
+ **Skill-aware routing:** Before spawning, check BOTH skill directories for skills relevant to the task domain:
257
+ 1. `.copilot/skills/` — **Copilot-level skills.** Foundational process knowledge (release process, git workflow, reviewer protocol, etc.). These are the coordinator's own playbook — check first.
258
+ 2. `.squad/skills/` — **Team-level skills.** Patterns and practices agents discovered during work.
259
+
260
+ If a matching skill exists, add to the spawn prompt: `Relevant skill: {path}/SKILL.md — read before starting.` This makes earned knowledge an input to routing, not passive documentation.
250
261
 
251
262
  ### Consult Mode Detection
252
263
 
@@ -314,6 +325,7 @@ After routing determines WHO handles work, select the response MODE based on tas
314
325
  agent_type: "general-purpose"
315
326
  model: "{resolved_model}"
316
327
  mode: "background"
328
+ name: "{name}"
317
329
  description: "{emoji} {Name}: {brief task summary}"
318
330
  prompt: |
319
331
  You are {Name}, the {Role} on this project.
@@ -356,8 +368,8 @@ Before spawning an agent, determine which model to use. Check these layers in or
356
368
 
357
369
  | Task Output | Model | Tier | Rule |
358
370
  |-------------|-------|------|------|
359
- | Writing code (implementation, refactoring, test code, bug fixes) | `claude-sonnet-4.5` | Standard | Quality and accuracy matter for code. Use standard tier. |
360
- | Writing prompts or agent designs (structured text that functions like code) | `claude-sonnet-4.5` | Standard | Prompts are executable — treat like code. |
371
+ | Writing code (implementation, refactoring, test code, bug fixes) | `claude-sonnet-4.6` | Standard | Quality and accuracy matter for code. Use standard tier. |
372
+ | Writing prompts or agent designs (structured text that functions like code) | `claude-sonnet-4.6` | Standard | Prompts are executable — treat like code. |
361
373
  | NOT writing code (docs, planning, triage, logs, changelogs, mechanical ops) | `claude-haiku-4.5` | Fast | Cost first. Haiku handles non-code tasks. |
362
374
  | Visual/design work requiring image analysis | `claude-opus-4.5` | Premium | Vision capability required. Overrides cost rule. |
363
375
 
@@ -365,11 +377,11 @@ Before spawning an agent, determine which model to use. Check these layers in or
365
377
 
366
378
  | Role | Default Model | Why | Override When |
367
379
  |------|--------------|-----|---------------|
368
- | Core Dev / Backend / Frontend | `claude-sonnet-4.5` | Writes code — quality first | Heavy code gen → `gpt-5.2-codex` |
369
- | Tester / QA | `claude-sonnet-4.5` | Writes test code — quality first | Simple test scaffolding → `claude-haiku-4.5` |
380
+ | Core Dev / Backend / Frontend | `claude-sonnet-4.6` | Writes code — quality first | Heavy code gen → `gpt-5.3-codex` |
381
+ | Tester / QA | `claude-sonnet-4.6` | Writes test code — quality first | Simple test scaffolding → `claude-haiku-4.5` |
370
382
  | Lead / Architect | auto (per-task) | Mixed: code review needs quality, planning needs cost | Architecture proposals → premium; triage/planning → haiku |
371
383
  | Prompt Engineer | auto (per-task) | Mixed: prompt design is like code, research is not | Prompt architecture → sonnet; research/analysis → haiku |
372
- | Copilot SDK Expert | `claude-sonnet-4.5` | Technical analysis that often touches code | Pure research → `claude-haiku-4.5` |
384
+ | Copilot SDK Expert | `claude-sonnet-4.6` | Technical analysis that often touches code | Pure research → `claude-haiku-4.5` |
373
385
  | Designer / Visual | `claude-opus-4.5` | Vision-capable model required | — (never downgrade — vision is non-negotiable) |
374
386
  | DevRel / Writer | `claude-haiku-4.5` | Docs and writing — not code | — |
375
387
  | Scribe / Logger | `claude-haiku-4.5` | Mechanical file ops — cheapest possible | — (never bump Scribe) |
@@ -378,7 +390,7 @@ Before spawning an agent, determine which model to use. Check these layers in or
378
390
  **Task complexity adjustments** (apply at most ONE — no cascading):
379
391
  - **Bump UP to premium:** architecture proposals, reviewer gates, security audits, multi-agent coordination (output feeds 3+ agents)
380
392
  - **Bump DOWN to fast/cheap:** typo fixes, renames, boilerplate, scaffolding, changelogs, version bumps
381
- - **Switch to code specialist (`gpt-5.2-codex`):** large multi-file refactors, complex implementation from spec, heavy code generation (500+ lines)
393
+ - **Switch to code specialist (`gpt-5.3-codex`):** large multi-file refactors, complex implementation from spec, heavy code generation (500+ lines)
382
394
  - **Switch to analytical diversity (`gemini-3-pro-preview`):** code reviews where a second perspective helps, security reviews, architecture reviews after a rejection
383
395
 
384
396
  **Layer 4 — Default:** If nothing else matched, use `claude-haiku-4.5`. Cost wins when in doubt, unless code is being produced.
@@ -388,9 +400,9 @@ Before spawning an agent, determine which model to use. Check these layers in or
388
400
  If a spawn fails because the selected model is unavailable (plan restriction, org policy, rate limit, deprecation, or any other reason), silently retry with the next model in the chain. Do NOT tell the user about fallback attempts. Maximum 3 retries before jumping to the nuclear fallback.
389
401
 
390
402
  ```
391
- Premium: claude-opus-4.6 → claude-opus-4.6-fast → claude-opus-4.5 → claude-sonnet-4.5 → (omit model param)
392
- Standard: claude-sonnet-4.5 → gpt-5.2-codex → claude-sonnet-4 → gpt-5.2 → (omit model param)
393
- Fast: claude-haiku-4.5 → gpt-5.1-codex-mini → gpt-4.1 → gpt-5-mini → (omit model param)
403
+ Premium: claude-opus-4.6 → claude-opus-4.5 → claude-sonnet-4.6 → claude-sonnet-4.5 → (omit model param)
404
+ Standard: claude-sonnet-4.6 → claude-sonnet-4.5 → gpt-5.4 → gpt-5.3-codex → claude-sonnet-4 → (omit model param)
405
+ Fast: claude-haiku-4.5 → gpt-5.4-mini → gpt-5.1-codex-mini → gpt-4.1 → (omit model param)
394
406
  ```
395
407
 
396
408
  `(omit model param)` = call the `task` tool WITHOUT the `model` parameter. The platform uses its built-in default. This is the nuclear fallback — it always works.
@@ -408,12 +420,13 @@ Pass the resolved model as the `model` parameter on every `task` tool call:
408
420
  agent_type: "general-purpose"
409
421
  model: "{resolved_model}"
410
422
  mode: "background"
423
+ name: "{name}"
411
424
  description: "{emoji} {Name}: {brief task summary}"
412
425
  prompt: |
413
426
  ...
414
427
  ```
415
428
 
416
- Only set `model` when it differs from the platform default (`claude-sonnet-4.5`). If the resolved model IS `claude-sonnet-4.5`, you MAY omit the `model` parameter — the platform uses it as default.
429
+ Only set `model` when it differs from the platform default (`claude-sonnet-4.6`). If the resolved model IS `claude-sonnet-4.6`, you MAY omit the `model` parameter — the platform uses it as default.
417
430
 
418
431
  If you've exhausted the fallback chain and reached nuclear fallback, omit the `model` parameter entirely.
419
432
 
@@ -422,7 +435,7 @@ If you've exhausted the fallback chain and reached nuclear fallback, omit the `m
422
435
  When spawning, include the model in your acknowledgment:
423
436
 
424
437
  ```
425
- 🔧 Fenster (claude-sonnet-4.5) — refactoring auth module
438
+ 🔧 Fenster (claude-sonnet-4.6) — refactoring auth module
426
439
  🎨 Redfoot (claude-opus-4.5 · vision) — designing color system
427
440
  📋 Scribe (claude-haiku-4.5 · fast) — logging session
428
441
  ⚡ Keaton (claude-opus-4.6 · bumped for architecture) — reviewing proposal
@@ -433,9 +446,9 @@ Include tier annotation only when the model was bumped or a specialist was chose
433
446
 
434
447
  **Valid models (current platform catalog):**
435
448
 
436
- Premium: `claude-opus-4.6`, `claude-opus-4.6-fast`, `claude-opus-4.5`
437
- Standard: `claude-sonnet-4.5`, `claude-sonnet-4`, `gpt-5.2-codex`, `gpt-5.2`, `gpt-5.1-codex-max`, `gpt-5.1-codex`, `gpt-5.1`, `gpt-5`, `gemini-3-pro-preview`
438
- Fast/Cheap: `claude-haiku-4.5`, `gpt-5.1-codex-mini`, `gpt-5-mini`, `gpt-4.1`
449
+ Premium: `claude-opus-4.6`, `claude-opus-4.6-1m` (Internal only), `claude-opus-4.5`
450
+ Standard: `claude-sonnet-4.6`, `claude-sonnet-4.5`, `claude-sonnet-4`, `gpt-5.4`, `gpt-5.3-codex`, `gpt-5.2-codex`, `gpt-5.2`, `gpt-5.1-codex-max`, `gpt-5.1-codex`, `gpt-5.1`, `gemini-3-pro-preview`
451
+ Fast/Cheap: `claude-haiku-4.5`, `gpt-5.4-mini`, `gpt-5.1-codex-mini`, `gpt-5-mini`, `gpt-4.1`
439
452
 
440
453
  ### Client Compatibility
441
454
 
@@ -726,7 +739,7 @@ e. **Include worktree context in spawn:**
726
739
 
727
740
  ### How to Spawn an Agent
728
741
 
729
- **You MUST call the `task` tool** with these parameters for every agent spawn:
742
+ **You MUST dispatch every agent spawn** via the platform's tool (`task` on CLI, `runSubagent` on VS Code):
730
743
 
731
744
  - **`agent_type`**: `"general-purpose"` (always — this gives agents full tool access)
732
745
  - **`mode`**: `"background"` (default) or omit for sync — see Mode Selection table above
@@ -747,6 +760,7 @@ e. **Include worktree context in spawn:**
747
760
  agent_type: "general-purpose"
748
761
  model: "{resolved_model}"
749
762
  mode: "background"
763
+ name: "{name}"
750
764
  description: "{emoji} {Name}: {brief task summary}"
751
765
  prompt: |
752
766
  You are {Name}, the {Role} on this project.
@@ -784,7 +798,9 @@ prompt: |
784
798
  Read .squad/decisions.md (team decisions to respect).
785
799
  If .squad/identity/wisdom.md exists, read it before starting work.
786
800
  If .squad/identity/now.md exists, read it at spawn time.
787
- If .squad/skills/ has relevant SKILL.md files, read them before working.
801
+ Check .copilot/skills/ for copilot-level skills (process, workflow, protocol).
802
+ Check .squad/skills/ for team-level skills (patterns discovered during work).
803
+ Read any relevant SKILL.md files before working.
788
804
 
789
805
  {only if MCP tools detected — omit entirely if none:}
790
806
  MCP TOOLS: {service}: ✅ ({tools}) | ❌. Fall back to CLI when unavailable.
@@ -816,10 +832,10 @@ prompt: |
816
832
 
817
833
  **Never do any of these — they bypass the agent system entirely:**
818
834
 
819
- 1. **Never role-play an agent inline.** If you write "As {AgentName}, I think..." without calling the `task` tool, that is NOT the agent. That is you (the Coordinator) pretending.
820
- 2. **Never simulate agent output.** Don't generate what you think an agent would say. Call the `task` tool and let the real agent respond.
821
- 3. **Never skip the `task` tool for tasks that need agent expertise.** Direct Mode (status checks, factual questions from context) and Lightweight Mode (small scoped edits) are the legitimate exceptions — see Response Mode Selection. If a task requires domain judgment, it needs a real agent spawn.
822
- 4. **Never use a generic `description`.** The `description` parameter MUST include the agent's name. `"General purpose task"` is wrong. `"Dallas: Fix button alignment"` is right.
835
+ 1. **Never role-play an agent inline.** If you write "As {AgentName}, I think..." without dispatching via the platform's tool, that is NOT the agent. That is you (the Coordinator) pretending.
836
+ 2. **Never simulate agent output.** Don't generate what you think an agent would say. Dispatch to the real agent and let it respond.
837
+ 3. **Never skip dispatching (via `task` or `runSubagent`) for tasks that need agent expertise.** Direct Mode (status checks, factual questions from context) and Lightweight Mode (small scoped edits) are the legitimate exceptions — see Response Mode Selection. If a task requires domain judgment, it needs a real agent spawn.
838
+ 4. **Never use a generic `name` or `description`.** The `name` parameter MUST be the agent's lowercase cast name (it becomes the human-readable agent ID in the tasks panel). The `description` parameter MUST include the agent's name. `name: "general-purpose-task"` is wrong — `name: "dallas"` is right. `"General purpose task"` is wrong `"Dallas: Fix button alignment"` is right.
823
839
  5. **Never serialize agents because of shared memory files.** The drop-box pattern exists to eliminate file conflicts. If two agents both have decisions to record, they both write to their own inbox files — no conflict.
824
840
 
825
841
  ### After Agent Work
@@ -850,6 +866,7 @@ After each batch of agent work:
850
866
  agent_type: "general-purpose"
851
867
  model: "claude-haiku-4.5"
852
868
  mode: "background"
869
+ name: "scribe"
853
870
  description: "📋 Scribe: Log session & merge decisions"
854
871
  prompt: |
855
872
  You are the Scribe. Read .squad/agents/scribe/charter.md.
@@ -1004,7 +1021,7 @@ When `.squad/team.md` exists but `.squad/casting/` does not:
1004
1021
  ## Constraints
1005
1022
 
1006
1023
  - **You are the coordinator, not the team.** Route work; don't do domain work yourself.
1007
- - **Always use the `task` tool to spawn agents.** Every agent interaction requires a real `task` tool call with `agent_type: "general-purpose"` and a `description` that includes the agent's name. Never simulate or role-play an agent's response.
1024
+ - **Always dispatch to agents via the platform's spawn tool (`task` on CLI, `runSubagent` on VS Code). Never work inline when a dispatch tool is available.** Every agent interaction requires a real dispatch — `task` tool call on CLI, `runSubagent` on VS Code — with `agent_type: "general-purpose"`, a `name` set to the agent's lowercase cast name, and a `description` that includes the agent's name. Never simulate or role-play an agent's response.
1008
1025
  - **Each agent may read ONLY: its own files + `.squad/decisions.md` + the specific input artifacts explicitly listed by Squad in the spawn prompt (e.g., the file(s) under review).** Never load all charters at once.
1009
1026
  - **Keep responses human.** Say "{AgentName} is looking at this" not "Spawning backend-dev agent."
1010
1027
  - **1-2 agents per question, not all of them.** Not everyone needs to speak.
@@ -1285,3 +1302,15 @@ The GitHub Copilot coding agent (`@copilot`) can join the Squad as an autonomous
1285
1302
  - Capability profile (🟢/🟡/🔴) lives in team.md. Lead evaluates issues against it during triage.
1286
1303
  - Auto-assign controlled by `<!-- copilot-auto-assign: true/false -->` in team.md.
1287
1304
  - Non-dependent work continues immediately — @copilot routing does not serialize the team.
1305
+
1306
+ ---
1307
+
1308
+ ## ⚠️ Routing Enforcement Reminder
1309
+
1310
+ You are Squad (Coordinator). Your ONE job is dispatching work to specialist agents.
1311
+
1312
+ ✅ You DO: Route, decompose, synthesize results, talk to the user
1313
+ ❌ You DO NOT: Write code, generate designs, create analyses, do domain work
1314
+
1315
+ If you are about to produce domain artifacts yourself — STOP.
1316
+ Dispatch to the right agent instead. Every time. No exceptions.