@bradygaster/squad-cli 0.9.1 → 0.9.2-insider.5
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 +329 -329
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +10 -10
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/config.d.ts +12 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +157 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/consult.d.ts.map +1 -1
- package/dist/cli/commands/consult.js +9 -4
- package/dist/cli/commands/consult.js.map +1 -1
- package/dist/cli/commands/copilot.d.ts.map +1 -1
- package/dist/cli/commands/copilot.js +8 -7
- package/dist/cli/commands/copilot.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +50 -17
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/economy.d.ts.map +1 -1
- package/dist/cli/commands/economy.js +3 -2
- package/dist/cli/commands/economy.js.map +1 -1
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +22 -16
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/extract.d.ts.map +1 -1
- package/dist/cli/commands/extract.js +14 -10
- package/dist/cli/commands/extract.js.map +1 -1
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/import.js +21 -18
- package/dist/cli/commands/import.js.map +1 -1
- package/dist/cli/commands/init-remote.d.ts.map +1 -1
- package/dist/cli/commands/init-remote.js +7 -6
- package/dist/cli/commands/init-remote.js.map +1 -1
- package/dist/cli/commands/link.d.ts.map +1 -1
- package/dist/cli/commands/link.js +11 -10
- package/dist/cli/commands/link.js.map +1 -1
- package/dist/cli/commands/migrate.d.ts.map +1 -1
- package/dist/cli/commands/migrate.js +19 -18
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/personal.d.ts.map +1 -1
- package/dist/cli/commands/personal.js +57 -65
- package/dist/cli/commands/personal.js.map +1 -1
- package/dist/cli/commands/plugin.d.ts.map +1 -1
- package/dist/cli/commands/plugin.js +8 -7
- package/dist/cli/commands/plugin.js.map +1 -1
- package/dist/cli/commands/rc.d.ts.map +1 -1
- package/dist/cli/commands/rc.js +19 -12
- package/dist/cli/commands/rc.js.map +1 -1
- package/dist/cli/commands/schedule.d.ts.map +1 -1
- package/dist/cli/commands/schedule.js +6 -5
- package/dist/cli/commands/schedule.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +18 -11
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/streams.d.ts.map +1 -1
- package/dist/cli/commands/streams.js +3 -2
- package/dist/cli/commands/streams.js.map +1 -1
- package/dist/cli/commands/upstream.d.ts.map +1 -1
- package/dist/cli/commands/upstream.js +23 -19
- package/dist/cli/commands/upstream.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/board.d.ts +22 -0
- package/dist/cli/commands/watch/capabilities/board.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/board.js +121 -0
- package/dist/cli/commands/watch/capabilities/board.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.js +72 -0
- package/dist/cli/commands/watch/capabilities/decision-hygiene.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/execute.d.ts +33 -0
- package/dist/cli/commands/watch/capabilities/execute.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/execute.js +119 -0
- package/dist/cli/commands/watch/capabilities/execute.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/index.d.ts +7 -0
- package/dist/cli/commands/watch/capabilities/index.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/index.js +28 -0
- package/dist/cli/commands/watch/capabilities/index.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.js +54 -0
- package/dist/cli/commands/watch/capabilities/monitor-email.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.js +55 -0
- package/dist/cli/commands/watch/capabilities/monitor-teams.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/retro.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/retro.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/retro.js +81 -0
- package/dist/cli/commands/watch/capabilities/retro.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/self-pull.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/self-pull.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/self-pull.js +33 -0
- package/dist/cli/commands/watch/capabilities/self-pull.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/two-pass.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/two-pass.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/two-pass.js +66 -0
- package/dist/cli/commands/watch/capabilities/two-pass.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts +14 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.js +117 -0
- package/dist/cli/commands/watch/capabilities/wave-dispatch.js.map +1 -0
- package/dist/cli/commands/watch/config.d.ts +25 -0
- package/dist/cli/commands/watch/config.d.ts.map +1 -0
- package/dist/cli/commands/watch/config.js +82 -0
- package/dist/cli/commands/watch/config.js.map +1 -0
- package/dist/cli/commands/watch/index.d.ts +95 -0
- package/dist/cli/commands/watch/index.d.ts.map +1 -0
- package/dist/cli/commands/watch/index.js +704 -0
- package/dist/cli/commands/watch/index.js.map +1 -0
- package/dist/cli/commands/watch/registry.d.ts +19 -0
- package/dist/cli/commands/watch/registry.d.ts.map +1 -0
- package/dist/cli/commands/watch/registry.js +28 -0
- package/dist/cli/commands/watch/registry.js.map +1 -0
- package/dist/cli/commands/watch/types.d.ts +57 -0
- package/dist/cli/commands/watch/types.d.ts.map +1 -0
- package/dist/cli/commands/watch/types.js +8 -0
- package/dist/cli/commands/watch/types.js.map +1 -0
- package/dist/cli/core/cast.d.ts.map +1 -1
- package/dist/cli/core/cast.js +15 -19
- package/dist/cli/core/cast.js.map +1 -1
- package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
- package/dist/cli/core/detect-squad-dir.js +12 -10
- package/dist/cli/core/detect-squad-dir.js.map +1 -1
- package/dist/cli/core/email-scrub.d.ts.map +1 -1
- package/dist/cli/core/email-scrub.js +12 -11
- package/dist/cli/core/email-scrub.js.map +1 -1
- package/dist/cli/core/gh-cli.d.ts +13 -0
- package/dist/cli/core/gh-cli.d.ts.map +1 -1
- package/dist/cli/core/gh-cli.js +24 -0
- package/dist/cli/core/gh-cli.js.map +1 -1
- package/dist/cli/core/init.d.ts +2 -0
- package/dist/cli/core/init.d.ts.map +1 -1
- package/dist/cli/core/init.js +22 -5
- package/dist/cli/core/init.js.map +1 -1
- package/dist/cli/core/migrate-directory.d.ts.map +1 -1
- package/dist/cli/core/migrate-directory.js +14 -13
- package/dist/cli/core/migrate-directory.js.map +1 -1
- package/dist/cli/core/migrations.d.ts.map +1 -1
- package/dist/cli/core/migrations.js +22 -8
- package/dist/cli/core/migrations.js.map +1 -1
- package/dist/cli/core/nap.d.ts.map +1 -1
- package/dist/cli/core/nap.js +111 -49
- package/dist/cli/core/nap.js.map +1 -1
- package/dist/cli/core/project-type.d.ts.map +1 -1
- package/dist/cli/core/project-type.js +11 -10
- package/dist/cli/core/project-type.js.map +1 -1
- package/dist/cli/core/team-md.d.ts.map +1 -1
- package/dist/cli/core/team-md.js +43 -38
- package/dist/cli/core/team-md.js.map +1 -1
- package/dist/cli/core/templates.d.ts.map +1 -1
- package/dist/cli/core/templates.js +4 -3
- package/dist/cli/core/templates.js.map +1 -1
- package/dist/cli/core/upgrade.d.ts.map +1 -1
- package/dist/cli/core/upgrade.js +68 -55
- package/dist/cli/core/upgrade.js.map +1 -1
- package/dist/cli/core/version.d.ts.map +1 -1
- package/dist/cli/core/version.js +8 -7
- package/dist/cli/core/version.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/self-update.d.ts.map +1 -1
- package/dist/cli/self-update.js +7 -4
- package/dist/cli/self-update.js.map +1 -1
- package/dist/cli/shell/agent-name-parser.d.ts +16 -0
- package/dist/cli/shell/agent-name-parser.d.ts.map +1 -0
- package/dist/cli/shell/agent-name-parser.js +54 -0
- package/dist/cli/shell/agent-name-parser.js.map +1 -0
- package/dist/cli/shell/commands.d.ts.map +1 -1
- package/dist/cli/shell/commands.js +4 -3
- package/dist/cli/shell/commands.js.map +1 -1
- package/dist/cli/shell/coordinator.d.ts +4 -1
- package/dist/cli/shell/coordinator.d.ts.map +1 -1
- package/dist/cli/shell/coordinator.js +29 -26
- package/dist/cli/shell/coordinator.js.map +1 -1
- package/dist/cli/shell/index.d.ts.map +1 -1
- package/dist/cli/shell/index.js +33 -35
- package/dist/cli/shell/index.js.map +1 -1
- package/dist/cli/shell/lifecycle.d.ts +13 -2
- package/dist/cli/shell/lifecycle.d.ts.map +1 -1
- package/dist/cli/shell/lifecycle.js +26 -13
- package/dist/cli/shell/lifecycle.js.map +1 -1
- package/dist/cli/shell/session-store.d.ts.map +1 -1
- package/dist/cli/shell/session-store.js +16 -12
- package/dist/cli/shell/session-store.js.map +1 -1
- package/dist/cli/shell/spawn.d.ts +4 -1
- package/dist/cli/shell/spawn.d.ts.map +1 -1
- package/dist/cli/shell/spawn.js +28 -10
- package/dist/cli/shell/spawn.js.map +1 -1
- package/dist/cli-entry.js +83 -12
- package/dist/cli-entry.js.map +1 -1
- package/package.json +8 -4
- package/scripts/patch-esm-imports.mjs +105 -105
- package/scripts/patch-ink-rendering.mjs +115 -115
- 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/orchestration-log.md +27 -27
- 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/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/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} +1316 -1287
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +54 -54
- package/templates/workflows/squad-heartbeat.yml +0 -4
- 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
- package/dist/cli/commands/watch.d.ts +0 -18
- package/dist/cli/commands/watch.d.ts.map +0 -1
- package/dist/cli/commands/watch.js +0 -306
- package/dist/cli/commands/watch.js.map +0 -1
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "economy-mode"
|
|
3
|
-
description: "Shifts Layer 3 model selection to cost-optimized alternatives when economy mode is active."
|
|
4
|
-
domain: "model-selection"
|
|
5
|
-
confidence: "low"
|
|
6
|
-
source: "manual"
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## SCOPE
|
|
10
|
-
|
|
11
|
-
✅ THIS SKILL PRODUCES:
|
|
12
|
-
- A modified Layer 3 model selection table applied when economy mode is active
|
|
13
|
-
- `economyMode: true` written to `.squad/config.json` when activated persistently
|
|
14
|
-
- Spawn acknowledgments with `💰` indicator when economy mode is active
|
|
15
|
-
|
|
16
|
-
❌ THIS SKILL DOES NOT PRODUCE:
|
|
17
|
-
- Code, tests, or documentation
|
|
18
|
-
- Cost reports or billing artifacts
|
|
19
|
-
- Changes to Layer 0, Layer 1, or Layer 2 resolution (user intent always wins)
|
|
20
|
-
|
|
21
|
-
## Context
|
|
22
|
-
|
|
23
|
-
Economy mode shifts Layer 3 (Task-Aware Auto-Selection) to lower-cost alternatives. It does NOT override persistent config (`defaultModel`, `agentModelOverrides`) or per-agent charter preferences — those represent explicit user intent and always take priority.
|
|
24
|
-
|
|
25
|
-
Use this skill when the user wants to reduce costs across an entire session or permanently, without manually specifying models for each agent.
|
|
26
|
-
|
|
27
|
-
## Activation Methods
|
|
28
|
-
|
|
29
|
-
| Method | How |
|
|
30
|
-
|--------|-----|
|
|
31
|
-
| Session phrase | "use economy mode", "save costs", "go cheap", "reduce costs" |
|
|
32
|
-
| Persistent config | `"economyMode": true` in `.squad/config.json` |
|
|
33
|
-
| CLI flag | `squad --economy` |
|
|
34
|
-
|
|
35
|
-
**Deactivation:** "turn off economy mode", "disable economy mode", or remove `economyMode` from `config.json`.
|
|
36
|
-
|
|
37
|
-
## Economy Model Selection Table
|
|
38
|
-
|
|
39
|
-
When economy mode is **active**, Layer 3 auto-selection uses this table instead of the normal defaults:
|
|
40
|
-
|
|
41
|
-
| Task Output | Normal Mode | Economy Mode |
|
|
42
|
-
|-------------|-------------|--------------|
|
|
43
|
-
| Writing code (implementation, refactoring, bug fixes) | `claude-sonnet-4.5` | `gpt-4.1` or `gpt-5-mini` |
|
|
44
|
-
| Writing prompts or agent designs | `claude-sonnet-4.5` | `gpt-4.1` or `gpt-5-mini` |
|
|
45
|
-
| Docs, planning, triage, changelogs, mechanical ops | `claude-haiku-4.5` | `gpt-4.1` or `gpt-5-mini` |
|
|
46
|
-
| Architecture, code review, security audits | `claude-opus-4.5` | `claude-sonnet-4.5` |
|
|
47
|
-
| Scribe / logger / mechanical file ops | `claude-haiku-4.5` | `gpt-4.1` |
|
|
48
|
-
|
|
49
|
-
**Prefer `gpt-4.1` over `gpt-5-mini`** when the task involves structured output or agentic tool use. Prefer `gpt-5-mini` for pure text generation tasks where latency matters.
|
|
50
|
-
|
|
51
|
-
## AGENT WORKFLOW
|
|
52
|
-
|
|
53
|
-
### On Session Start
|
|
54
|
-
|
|
55
|
-
1. READ `.squad/config.json`
|
|
56
|
-
2. CHECK for `economyMode: true` — if present, activate economy mode for the session
|
|
57
|
-
3. STORE economy mode state in session context
|
|
58
|
-
|
|
59
|
-
### On User Phrase Trigger
|
|
60
|
-
|
|
61
|
-
**Session-only (no config change):** "use economy mode", "save costs", "go cheap"
|
|
62
|
-
|
|
63
|
-
1. SET economy mode active for this session
|
|
64
|
-
2. ACKNOWLEDGE: `✅ Economy mode active — using cost-optimized models this session. (Layer 0 and Layer 2 preferences still apply)`
|
|
65
|
-
|
|
66
|
-
**Persistent:** "always use economy mode", "save economy mode"
|
|
67
|
-
|
|
68
|
-
1. WRITE `economyMode: true` to `.squad/config.json` (merge, don't overwrite other fields)
|
|
69
|
-
2. ACKNOWLEDGE: `✅ Economy mode saved — cost-optimized models will be used until disabled.`
|
|
70
|
-
|
|
71
|
-
### On Every Agent Spawn (Economy Mode Active)
|
|
72
|
-
|
|
73
|
-
1. CHECK Layer 0a/0b first (agentModelOverrides, defaultModel) — if set, use that. Economy mode does NOT override Layer 0.
|
|
74
|
-
2. CHECK Layer 1 (session directive for a specific model) — if set, use that. Economy mode does NOT override explicit session directives.
|
|
75
|
-
3. CHECK Layer 2 (charter preference) — if set, use that. Economy mode does NOT override charter preferences.
|
|
76
|
-
4. APPLY economy table at Layer 3 instead of normal table.
|
|
77
|
-
5. INCLUDE `💰` in spawn acknowledgment: `🔧 {Name} ({model} · 💰 economy) — {task}`
|
|
78
|
-
|
|
79
|
-
### On Deactivation
|
|
80
|
-
|
|
81
|
-
**Trigger phrases:** "turn off economy mode", "disable economy mode", "use normal models"
|
|
82
|
-
|
|
83
|
-
1. REMOVE `economyMode` from `.squad/config.json` (if it was persisted)
|
|
84
|
-
2. CLEAR session economy mode state
|
|
85
|
-
3. ACKNOWLEDGE: `✅ Economy mode disabled — returning to standard model selection.`
|
|
86
|
-
|
|
87
|
-
### STOP
|
|
88
|
-
|
|
89
|
-
After updating economy mode state and including the `💰` indicator in spawn acknowledgments, this skill is done. Do NOT:
|
|
90
|
-
- Change Layer 0, Layer 1, or Layer 2 model choices
|
|
91
|
-
- Override charter-specified models
|
|
92
|
-
- Generate cost reports or comparisons
|
|
93
|
-
- Fall back to premium models via economy mode (economy mode never bumps UP)
|
|
94
|
-
|
|
95
|
-
## Config Schema
|
|
96
|
-
|
|
97
|
-
`.squad/config.json` economy-related fields:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"version": 1,
|
|
102
|
-
"economyMode": true
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
- `economyMode` — when `true`, Layer 3 uses the economy table. Optional; absent = economy mode off.
|
|
107
|
-
- Combines with `defaultModel` and `agentModelOverrides` — Layer 0 always wins.
|
|
108
|
-
|
|
109
|
-
## Anti-Patterns
|
|
110
|
-
|
|
111
|
-
- **Don't override Layer 0 in economy mode.** If the user set `defaultModel: "claude-opus-4.6"`, they want quality. Economy mode only affects Layer 3 auto-selection.
|
|
112
|
-
- **Don't silently apply economy mode.** Always acknowledge when activated or deactivated.
|
|
113
|
-
- **Don't treat economy mode as permanent by default.** Session phrases activate session-only; only "always" or `config.json` persist it.
|
|
114
|
-
- **Don't bump premium tasks down too far.** Architecture and security reviews shift from opus to sonnet in economy mode — they do NOT go to fast/cheap models.
|
|
1
|
+
---
|
|
2
|
+
name: "economy-mode"
|
|
3
|
+
description: "Shifts Layer 3 model selection to cost-optimized alternatives when economy mode is active."
|
|
4
|
+
domain: "model-selection"
|
|
5
|
+
confidence: "low"
|
|
6
|
+
source: "manual"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## SCOPE
|
|
10
|
+
|
|
11
|
+
✅ THIS SKILL PRODUCES:
|
|
12
|
+
- A modified Layer 3 model selection table applied when economy mode is active
|
|
13
|
+
- `economyMode: true` written to `.squad/config.json` when activated persistently
|
|
14
|
+
- Spawn acknowledgments with `💰` indicator when economy mode is active
|
|
15
|
+
|
|
16
|
+
❌ THIS SKILL DOES NOT PRODUCE:
|
|
17
|
+
- Code, tests, or documentation
|
|
18
|
+
- Cost reports or billing artifacts
|
|
19
|
+
- Changes to Layer 0, Layer 1, or Layer 2 resolution (user intent always wins)
|
|
20
|
+
|
|
21
|
+
## Context
|
|
22
|
+
|
|
23
|
+
Economy mode shifts Layer 3 (Task-Aware Auto-Selection) to lower-cost alternatives. It does NOT override persistent config (`defaultModel`, `agentModelOverrides`) or per-agent charter preferences — those represent explicit user intent and always take priority.
|
|
24
|
+
|
|
25
|
+
Use this skill when the user wants to reduce costs across an entire session or permanently, without manually specifying models for each agent.
|
|
26
|
+
|
|
27
|
+
## Activation Methods
|
|
28
|
+
|
|
29
|
+
| Method | How |
|
|
30
|
+
|--------|-----|
|
|
31
|
+
| Session phrase | "use economy mode", "save costs", "go cheap", "reduce costs" |
|
|
32
|
+
| Persistent config | `"economyMode": true` in `.squad/config.json` |
|
|
33
|
+
| CLI flag | `squad --economy` |
|
|
34
|
+
|
|
35
|
+
**Deactivation:** "turn off economy mode", "disable economy mode", or remove `economyMode` from `config.json`.
|
|
36
|
+
|
|
37
|
+
## Economy Model Selection Table
|
|
38
|
+
|
|
39
|
+
When economy mode is **active**, Layer 3 auto-selection uses this table instead of the normal defaults:
|
|
40
|
+
|
|
41
|
+
| Task Output | Normal Mode | Economy Mode |
|
|
42
|
+
|-------------|-------------|--------------|
|
|
43
|
+
| Writing code (implementation, refactoring, bug fixes) | `claude-sonnet-4.5` | `gpt-4.1` or `gpt-5-mini` |
|
|
44
|
+
| Writing prompts or agent designs | `claude-sonnet-4.5` | `gpt-4.1` or `gpt-5-mini` |
|
|
45
|
+
| Docs, planning, triage, changelogs, mechanical ops | `claude-haiku-4.5` | `gpt-4.1` or `gpt-5-mini` |
|
|
46
|
+
| Architecture, code review, security audits | `claude-opus-4.5` | `claude-sonnet-4.5` |
|
|
47
|
+
| Scribe / logger / mechanical file ops | `claude-haiku-4.5` | `gpt-4.1` |
|
|
48
|
+
|
|
49
|
+
**Prefer `gpt-4.1` over `gpt-5-mini`** when the task involves structured output or agentic tool use. Prefer `gpt-5-mini` for pure text generation tasks where latency matters.
|
|
50
|
+
|
|
51
|
+
## AGENT WORKFLOW
|
|
52
|
+
|
|
53
|
+
### On Session Start
|
|
54
|
+
|
|
55
|
+
1. READ `.squad/config.json`
|
|
56
|
+
2. CHECK for `economyMode: true` — if present, activate economy mode for the session
|
|
57
|
+
3. STORE economy mode state in session context
|
|
58
|
+
|
|
59
|
+
### On User Phrase Trigger
|
|
60
|
+
|
|
61
|
+
**Session-only (no config change):** "use economy mode", "save costs", "go cheap"
|
|
62
|
+
|
|
63
|
+
1. SET economy mode active for this session
|
|
64
|
+
2. ACKNOWLEDGE: `✅ Economy mode active — using cost-optimized models this session. (Layer 0 and Layer 2 preferences still apply)`
|
|
65
|
+
|
|
66
|
+
**Persistent:** "always use economy mode", "save economy mode"
|
|
67
|
+
|
|
68
|
+
1. WRITE `economyMode: true` to `.squad/config.json` (merge, don't overwrite other fields)
|
|
69
|
+
2. ACKNOWLEDGE: `✅ Economy mode saved — cost-optimized models will be used until disabled.`
|
|
70
|
+
|
|
71
|
+
### On Every Agent Spawn (Economy Mode Active)
|
|
72
|
+
|
|
73
|
+
1. CHECK Layer 0a/0b first (agentModelOverrides, defaultModel) — if set, use that. Economy mode does NOT override Layer 0.
|
|
74
|
+
2. CHECK Layer 1 (session directive for a specific model) — if set, use that. Economy mode does NOT override explicit session directives.
|
|
75
|
+
3. CHECK Layer 2 (charter preference) — if set, use that. Economy mode does NOT override charter preferences.
|
|
76
|
+
4. APPLY economy table at Layer 3 instead of normal table.
|
|
77
|
+
5. INCLUDE `💰` in spawn acknowledgment: `🔧 {Name} ({model} · 💰 economy) — {task}`
|
|
78
|
+
|
|
79
|
+
### On Deactivation
|
|
80
|
+
|
|
81
|
+
**Trigger phrases:** "turn off economy mode", "disable economy mode", "use normal models"
|
|
82
|
+
|
|
83
|
+
1. REMOVE `economyMode` from `.squad/config.json` (if it was persisted)
|
|
84
|
+
2. CLEAR session economy mode state
|
|
85
|
+
3. ACKNOWLEDGE: `✅ Economy mode disabled — returning to standard model selection.`
|
|
86
|
+
|
|
87
|
+
### STOP
|
|
88
|
+
|
|
89
|
+
After updating economy mode state and including the `💰` indicator in spawn acknowledgments, this skill is done. Do NOT:
|
|
90
|
+
- Change Layer 0, Layer 1, or Layer 2 model choices
|
|
91
|
+
- Override charter-specified models
|
|
92
|
+
- Generate cost reports or comparisons
|
|
93
|
+
- Fall back to premium models via economy mode (economy mode never bumps UP)
|
|
94
|
+
|
|
95
|
+
## Config Schema
|
|
96
|
+
|
|
97
|
+
`.squad/config.json` economy-related fields:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"version": 1,
|
|
102
|
+
"economyMode": true
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- `economyMode` — when `true`, Layer 3 uses the economy table. Optional; absent = economy mode off.
|
|
107
|
+
- Combines with `defaultModel` and `agentModelOverrides` — Layer 0 always wins.
|
|
108
|
+
|
|
109
|
+
## Anti-Patterns
|
|
110
|
+
|
|
111
|
+
- **Don't override Layer 0 in economy mode.** If the user set `defaultModel: "claude-opus-4.6"`, they want quality. Economy mode only affects Layer 3 auto-selection.
|
|
112
|
+
- **Don't silently apply economy mode.** Always acknowledge when activated or deactivated.
|
|
113
|
+
- **Don't treat economy mode as permanent by default.** Session phrases activate session-only; only "always" or `config.json` persist it.
|
|
114
|
+
- **Don't bump premium tasks down too far.** Architecture and security reviews shift from opus to sonnet in economy mode — they do NOT go to fast/cheap models.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "error-recovery"
|
|
3
|
+
description: "Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure."
|
|
4
|
+
domain: "reliability, agent-coordination"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
license: MIT
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Error Recovery Patterns
|
|
10
|
+
|
|
11
|
+
Standard recovery patterns for all squad agents. When something fails, **adapt** — don't just report the failure.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Retry with Backoff
|
|
16
|
+
|
|
17
|
+
**When:** Transient failures — API timeouts, rate limits, network errors, temporary service unavailability.
|
|
18
|
+
|
|
19
|
+
**Pattern:**
|
|
20
|
+
1. Wait briefly, then retry (start at 2s, double each attempt)
|
|
21
|
+
2. Maximum 3 retries before escalating
|
|
22
|
+
3. Log each attempt with the error received
|
|
23
|
+
|
|
24
|
+
**Example:** API call returns 429 Too Many Requests → wait 2s → retry → wait 4s → retry → wait 8s → retry → escalate if still failing.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Fallback Alternatives
|
|
29
|
+
|
|
30
|
+
**When:** Primary tool or approach fails and an alternative exists.
|
|
31
|
+
|
|
32
|
+
**Pattern:**
|
|
33
|
+
1. Attempt primary approach
|
|
34
|
+
2. On failure, identify alternative tool/method
|
|
35
|
+
3. Try the alternative with the same intent
|
|
36
|
+
4. Document which alternative was used and why
|
|
37
|
+
|
|
38
|
+
**Example:** Primary CLI tool fails → fall back to direct API call for the same operation.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3. Diagnose-and-Fix
|
|
43
|
+
|
|
44
|
+
**When:** Build failures, test failures, linting errors — structured errors with actionable output.
|
|
45
|
+
|
|
46
|
+
**Pattern:**
|
|
47
|
+
1. Read the full error output carefully
|
|
48
|
+
2. Identify the root cause from error messages
|
|
49
|
+
3. Attempt a targeted fix
|
|
50
|
+
4. Re-run to verify the fix
|
|
51
|
+
5. Maximum 3 fix-retry cycles before escalating
|
|
52
|
+
|
|
53
|
+
**Example:** Build fails with a type error → check for missing import → add it → rebuild.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 4. Escalate with Context
|
|
58
|
+
|
|
59
|
+
**When:** Recovery attempts have been exhausted, or the failure requires human judgment.
|
|
60
|
+
|
|
61
|
+
**Pattern:**
|
|
62
|
+
1. Summarize what was attempted and what failed
|
|
63
|
+
2. Include the exact error messages
|
|
64
|
+
3. State what you believe the root cause is
|
|
65
|
+
4. Suggest next steps or who might be able to help
|
|
66
|
+
5. Hand off to the coordinator or the appropriate specialist
|
|
67
|
+
|
|
68
|
+
**Example:** After 3 failed build attempts → "Build fails on line 42 with null reference. Tried X, Y, Z. Likely a design issue in the Foo module. Recommend the code owner review."
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 5. Graceful Degradation
|
|
73
|
+
|
|
74
|
+
**When:** A non-critical step fails but the overall task can still deliver value.
|
|
75
|
+
|
|
76
|
+
**Pattern:**
|
|
77
|
+
1. Determine if the failed step is critical to the task outcome
|
|
78
|
+
2. If non-critical, log the failure and continue
|
|
79
|
+
3. Deliver partial results with a clear note of what was skipped
|
|
80
|
+
4. Offer to retry the skipped step separately
|
|
81
|
+
|
|
82
|
+
**Example:** Generating a report with 5 sections — section 3 data source is unavailable → produce the report with 4 sections, note that section 3 was skipped and why.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Applying These Patterns
|
|
87
|
+
|
|
88
|
+
Each agent should reference these patterns in their charter's `## Error Recovery` section, tailored to their domain. The charter should list the agent's most common failure modes and map each to the appropriate pattern above.
|
|
89
|
+
|
|
90
|
+
**Selection guide:**
|
|
91
|
+
|
|
92
|
+
| Failure Type | Primary Pattern | Fallback Pattern |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Network/API transient | Retry with Backoff | Escalate with Context |
|
|
95
|
+
| Tool/dependency missing | Fallback Alternatives | Escalate with Context |
|
|
96
|
+
| Build/test error | Diagnose-and-Fix | Escalate with Context |
|
|
97
|
+
| Auth/permissions | Retry with Backoff | Escalate with Context |
|
|
98
|
+
| Non-critical data missing | Graceful Degradation | — |
|
|
99
|
+
| Unknown/novel error | Escalate with Context | — |
|