@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.
- package/README.md +340 -296
- package/dist/agents/history-shadow.d.ts +7 -5
- package/dist/agents/history-shadow.d.ts.map +1 -1
- package/dist/agents/history-shadow.js +69 -78
- package/dist/agents/history-shadow.js.map +1 -1
- package/dist/agents/index.d.ts +12 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +62 -9
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lifecycle.d.ts +4 -0
- package/dist/agents/lifecycle.d.ts.map +1 -1
- package/dist/agents/lifecycle.js +6 -7
- package/dist/agents/lifecycle.js.map +1 -1
- package/dist/agents/onboarding.d.ts +4 -2
- package/dist/agents/onboarding.d.ts.map +1 -1
- package/dist/agents/onboarding.js +26 -16
- package/dist/agents/onboarding.js.map +1 -1
- package/dist/agents/personal.d.ts +2 -1
- package/dist/agents/personal.d.ts.map +1 -1
- package/dist/agents/personal.js +11 -12
- package/dist/agents/personal.js.map +1 -1
- package/dist/build/bundle.d.ts.map +1 -1
- package/dist/build/bundle.js +6 -6
- package/dist/build/bundle.js.map +1 -1
- package/dist/build/github-dist.js +42 -42
- package/dist/build/release.d.ts.map +1 -1
- package/dist/build/release.js +7 -5
- package/dist/build/release.js.map +1 -1
- package/dist/casting/index.d.ts.map +1 -1
- package/dist/casting/index.js +4 -3
- package/dist/casting/index.js.map +1 -1
- package/dist/config/agent-source.d.ts +5 -1
- package/dist/config/agent-source.d.ts.map +1 -1
- package/dist/config/agent-source.js +85 -41
- package/dist/config/agent-source.js.map +1 -1
- package/dist/config/init.d.ts +4 -3
- package/dist/config/init.d.ts.map +1 -1
- package/dist/config/init.js +257 -236
- package/dist/config/init.js.map +1 -1
- package/dist/config/legacy-fallback.d.ts +3 -2
- package/dist/config/legacy-fallback.d.ts.map +1 -1
- package/dist/config/legacy-fallback.js +16 -14
- package/dist/config/legacy-fallback.js.map +1 -1
- package/dist/config/models.d.ts +9 -6
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +35 -25
- package/dist/config/models.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/marketplace/packaging.d.ts.map +1 -1
- package/dist/marketplace/packaging.js +18 -16
- package/dist/marketplace/packaging.js.map +1 -1
- package/dist/multi-squad.d.ts.map +1 -1
- package/dist/multi-squad.js +10 -9
- package/dist/multi-squad.js.map +1 -1
- package/dist/platform/comms-file-log.d.ts.map +1 -1
- package/dist/platform/comms-file-log.js +7 -6
- package/dist/platform/comms-file-log.js.map +1 -1
- package/dist/platform/comms.d.ts.map +1 -1
- package/dist/platform/comms.js +6 -5
- package/dist/platform/comms.js.map +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +4 -3
- package/dist/platform/index.js.map +1 -1
- package/dist/ralph/capabilities.d.ts +30 -1
- package/dist/ralph/capabilities.d.ts.map +1 -1
- package/dist/ralph/capabilities.js +51 -6
- package/dist/ralph/capabilities.js.map +1 -1
- package/dist/ralph/index.d.ts +1 -1
- package/dist/ralph/index.d.ts.map +1 -1
- package/dist/ralph/index.js +4 -3
- package/dist/ralph/index.js.map +1 -1
- package/dist/ralph/rate-limiting.d.ts.map +1 -1
- package/dist/ralph/rate-limiting.js +4 -4
- package/dist/ralph/rate-limiting.js.map +1 -1
- package/dist/remote/bridge.d.ts.map +1 -1
- package/dist/remote/bridge.js +2 -2
- package/dist/remote/bridge.js.map +1 -1
- package/dist/resolution.d.ts +9 -0
- package/dist/resolution.d.ts.map +1 -1
- package/dist/resolution.js +39 -16
- package/dist/resolution.js.map +1 -1
- package/dist/roles/catalog.d.ts +1 -1
- package/dist/runtime/config.d.ts.map +1 -1
- package/dist/runtime/config.js +8 -7
- package/dist/runtime/config.js.map +1 -1
- package/dist/runtime/cross-squad.d.ts.map +1 -1
- package/dist/runtime/cross-squad.js +8 -7
- package/dist/runtime/cross-squad.js.map +1 -1
- package/dist/runtime/scheduler.d.ts.map +1 -1
- package/dist/runtime/scheduler.js +8 -8
- package/dist/runtime/scheduler.js.map +1 -1
- package/dist/runtime/squad-observer.d.ts.map +1 -1
- package/dist/runtime/squad-observer.js +7 -4
- package/dist/runtime/squad-observer.js.map +1 -1
- package/dist/sharing/consult.d.ts +1 -1
- package/dist/sharing/consult.d.ts.map +1 -1
- package/dist/sharing/consult.js +144 -142
- package/dist/sharing/consult.js.map +1 -1
- package/dist/sharing/export.d.ts.map +1 -1
- package/dist/sharing/export.js +16 -16
- package/dist/sharing/export.js.map +1 -1
- package/dist/sharing/import.d.ts.map +1 -1
- package/dist/sharing/import.js +13 -12
- package/dist/sharing/import.js.map +1 -1
- package/dist/skills/skill-loader.d.ts.map +1 -1
- package/dist/skills/skill-loader.js +10 -9
- package/dist/skills/skill-loader.js.map +1 -1
- package/dist/skills/skill-script-loader.d.ts.map +1 -1
- package/dist/skills/skill-script-loader.js +6 -4
- package/dist/skills/skill-script-loader.js.map +1 -1
- package/dist/skills/skill-source.d.ts +3 -1
- package/dist/skills/skill-source.d.ts.map +1 -1
- package/dist/skills/skill-source.js +18 -16
- package/dist/skills/skill-source.js.map +1 -1
- package/dist/state/collection-map.d.ts +43 -0
- package/dist/state/collection-map.d.ts.map +1 -0
- package/dist/state/collection-map.js +9 -0
- package/dist/state/collection-map.js.map +1 -0
- package/dist/state/collections.d.ts +102 -0
- package/dist/state/collections.d.ts.map +1 -0
- package/dist/state/collections.js +317 -0
- package/dist/state/collections.js.map +1 -0
- package/dist/state/domain-types.d.ts +122 -0
- package/dist/state/domain-types.d.ts.map +1 -0
- package/dist/state/domain-types.js +54 -0
- package/dist/state/domain-types.js.map +1 -0
- package/dist/state/handles.d.ts +16 -0
- package/dist/state/handles.d.ts.map +1 -0
- package/dist/state/handles.js +161 -0
- package/dist/state/handles.js.map +1 -0
- package/dist/state/index.d.ts +17 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +15 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/io/charter-io.d.ts +28 -0
- package/dist/state/io/charter-io.d.ts.map +1 -0
- package/dist/state/io/charter-io.js +94 -0
- package/dist/state/io/charter-io.js.map +1 -0
- package/dist/state/io/decisions-io.d.ts +42 -0
- package/dist/state/io/decisions-io.d.ts.map +1 -0
- package/dist/state/io/decisions-io.js +66 -0
- package/dist/state/io/decisions-io.js.map +1 -0
- package/dist/state/io/history-io.d.ts +37 -0
- package/dist/state/io/history-io.d.ts.map +1 -0
- package/dist/state/io/history-io.js +102 -0
- package/dist/state/io/history-io.js.map +1 -0
- package/dist/state/io/index.d.ts +19 -0
- package/dist/state/io/index.d.ts.map +1 -0
- package/dist/state/io/index.js +19 -0
- package/dist/state/io/index.js.map +1 -0
- package/dist/state/io/routing-io.d.ts +37 -0
- package/dist/state/io/routing-io.d.ts.map +1 -0
- package/dist/state/io/routing-io.js +99 -0
- package/dist/state/io/routing-io.js.map +1 -0
- package/dist/state/io/team-io.d.ts +46 -0
- package/dist/state/io/team-io.d.ts.map +1 -0
- package/dist/state/io/team-io.js +82 -0
- package/dist/state/io/team-io.js.map +1 -0
- package/dist/state/schema.d.ts +24 -0
- package/dist/state/schema.d.ts.map +1 -0
- package/dist/state/schema.js +41 -0
- package/dist/state/schema.js.map +1 -0
- package/dist/state/squad-state.d.ts +42 -0
- package/dist/state/squad-state.d.ts.map +1 -0
- package/dist/state/squad-state.js +68 -0
- package/dist/state/squad-state.js.map +1 -0
- package/dist/storage/fs-storage-provider.d.ts +60 -0
- package/dist/storage/fs-storage-provider.d.ts.map +1 -0
- package/dist/storage/fs-storage-provider.js +377 -0
- package/dist/storage/fs-storage-provider.js.map +1 -0
- package/dist/storage/in-memory-storage-provider.d.ts +46 -0
- package/dist/storage/in-memory-storage-provider.d.ts.map +1 -0
- package/dist/storage/in-memory-storage-provider.js +264 -0
- package/dist/storage/in-memory-storage-provider.js.map +1 -0
- package/dist/storage/index.d.ts +6 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +5 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/sqlite-storage-provider.d.ts +95 -0
- package/dist/storage/sqlite-storage-provider.d.ts.map +1 -0
- package/dist/storage/sqlite-storage-provider.js +383 -0
- package/dist/storage/sqlite-storage-provider.js.map +1 -0
- package/dist/storage/storage-error.d.ts +28 -0
- package/dist/storage/storage-error.d.ts.map +1 -0
- package/dist/storage/storage-error.js +35 -0
- package/dist/storage/storage-error.js.map +1 -0
- package/dist/storage/storage-provider.d.ts +161 -0
- package/dist/storage/storage-provider.d.ts.map +1 -0
- package/dist/storage/storage-provider.js +18 -0
- package/dist/storage/storage-provider.js.map +1 -0
- package/dist/streams/resolver.d.ts.map +1 -1
- package/dist/streams/resolver.js +6 -5
- package/dist/streams/resolver.js.map +1 -1
- package/dist/tools/index.d.ts +5 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +54 -15
- package/dist/tools/index.js.map +1 -1
- package/dist/upstream/resolver.d.ts +3 -2
- package/dist/upstream/resolver.d.ts.map +1 -1
- package/dist/upstream/resolver.js +33 -32
- package/dist/upstream/resolver.js.map +1 -1
- package/package.json +33 -1
- package/templates/casting/Futurama.json +9 -9
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +37 -37
- package/templates/casting-reference.md +104 -104
- package/templates/casting-registry.json +3 -3
- package/templates/ceremonies.md +41 -41
- package/templates/charter.md +53 -53
- package/templates/constraint-tracking.md +38 -38
- package/templates/cooperative-rate-limiting.md +229 -229
- package/templates/copilot-instructions.md +46 -46
- package/templates/history.md +10 -10
- package/templates/identity/now.md +9 -9
- package/templates/identity/wisdom.md +15 -15
- package/templates/issue-lifecycle.md +412 -412
- package/templates/keda-scaler.md +164 -164
- package/templates/machine-capabilities.md +74 -74
- package/templates/mcp-config.md +90 -90
- package/templates/multi-agent-format.md +28 -28
- package/templates/plugin-marketplace.md +49 -49
- package/templates/ralph-circuit-breaker.md +313 -313
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +39 -39
- package/templates/run-output.md +50 -50
- package/templates/schedule.json +19 -19
- package/templates/scribe-charter.md +123 -119
- package/templates/skill.md +24 -24
- package/templates/skills/agent-collaboration/SKILL.md +42 -42
- package/templates/skills/agent-conduct/SKILL.md +24 -24
- package/templates/skills/architectural-proposals/SKILL.md +151 -151
- package/templates/skills/ci-validation-gates/SKILL.md +84 -84
- package/templates/skills/cli-wiring/SKILL.md +47 -47
- package/templates/skills/client-compatibility/SKILL.md +89 -89
- package/templates/skills/cross-machine-coordination/SKILL.md +434 -0
- package/templates/skills/cross-squad/SKILL.md +114 -114
- package/templates/skills/distributed-mesh/SKILL.md +287 -287
- package/templates/skills/distributed-mesh/mesh.json.example +30 -30
- package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
- package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
- package/templates/skills/docs-standards/SKILL.md +71 -71
- package/templates/skills/economy-mode/SKILL.md +114 -114
- package/templates/skills/error-recovery/SKILL.md +99 -0
- package/templates/skills/external-comms/SKILL.md +329 -329
- package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
- package/templates/skills/git-workflow/SKILL.md +204 -204
- package/templates/skills/github-multi-account/SKILL.md +95 -95
- package/templates/skills/history-hygiene/SKILL.md +36 -36
- package/templates/skills/humanizer/SKILL.md +105 -105
- package/templates/skills/init-mode/SKILL.md +102 -102
- package/templates/skills/iterative-retrieval/SKILL.md +165 -0
- package/templates/skills/model-selection/SKILL.md +117 -117
- package/templates/skills/nap/SKILL.md +24 -24
- package/templates/skills/notification-routing/SKILL.md +105 -0
- package/templates/skills/personal-squad/SKILL.md +57 -57
- package/templates/skills/pr-screenshots/SKILL.md +149 -0
- package/templates/skills/project-conventions/SKILL.md +56 -56
- package/templates/skills/ralph-two-pass-scan/SKILL.md +35 -0
- package/templates/skills/reflect/SKILL.md +229 -0
- package/templates/skills/release-process/SKILL.md +131 -423
- package/templates/skills/reskill/SKILL.md +92 -92
- package/templates/skills/retro-enforcement/SKILL.md +148 -0
- package/templates/skills/reviewer-protocol/SKILL.md +79 -79
- package/templates/skills/secret-handling/SKILL.md +200 -200
- package/templates/skills/session-recovery/SKILL.md +155 -155
- package/templates/skills/squad-conventions/SKILL.md +69 -69
- package/templates/skills/test-discipline/SKILL.md +37 -37
- package/templates/skills/tiered-memory/SKILL.md +234 -0
- package/templates/skills/windows-compatibility/SKILL.md +98 -74
- package/templates/{squad.agent.md → squad.agent.md.template} +57 -28
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +54 -54
- package/templates/workflows/squad-heartbeat.yml +167 -171
- package/templates/workflows/squad-insider-release.yml +61 -61
- package/templates/workflows/squad-issue-assign.yml +161 -161
- package/templates/workflows/squad-label-enforce.yml +181 -181
- package/templates/workflows/squad-preview.yml +55 -55
- package/templates/workflows/squad-promote.yml +120 -120
- package/templates/workflows/squad-release.yml +77 -77
- package/templates/workflows/squad-triage.yml +260 -260
- 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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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:
|
|
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
|
|
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.
|
|
360
|
-
| Writing prompts or agent designs (structured text that functions like code) | `claude-sonnet-4.
|
|
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.
|
|
369
|
-
| Tester / QA | `claude-sonnet-4.
|
|
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.
|
|
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.
|
|
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.
|
|
392
|
-
Standard: claude-sonnet-4.5 → gpt-5.
|
|
393
|
-
Fast: claude-haiku-4.5 → gpt-5.
|
|
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.
|
|
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.
|
|
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-
|
|
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`, `
|
|
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
|
|
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
|
-
|
|
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
|
|
820
|
-
2. **Never simulate agent output.** Don't generate what you think an agent would say.
|
|
821
|
-
3. **Never skip
|
|
822
|
-
4. **Never use a generic `description`.** The `description` parameter MUST include the agent's name. `"General purpose task"` is wrong
|
|
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
|
|
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.
|