feat: economy mode for cost-conscious model selection (#500)#504
Merged
bradygaster merged 2 commits intodevfrom Mar 22, 2026
Merged
feat: economy mode for cost-conscious model selection (#500)#504bradygaster merged 2 commits intodevfrom
bradygaster merged 2 commits intodevfrom
Conversation
- Add .squad/skills/economy-mode/SKILL.md: Layer 3 cost modifier
- Economy table shifts code tasks to gpt-4.1/gpt-5-mini, arch to sonnet
- Activation: session phrase, config.json economyMode:true, or --economy flag
- Layer 0/1/2 (user intent) always overrides economy mode
- 💰 indicator in spawn acknowledgments
- Confidence: low (first implementation)
- Add .squad/decisions/inbox/procedures-economy-mode-governance.md
- Draft additions to squad.agent.md for Flight review
- Economy mode paragraph after Layer 0, updated table, 💰 convention
- Valid models catalog audit findings (claude-sonnet-4.6 missing, etc.)
- Add .squad/decisions/inbox/procedures-personal-squad-governance.md
- Five gap analysis: Init Mode, consult mode detection, TEAM_ROOT semantics,
charter templates, missing consult-mode skill
- Proposed CONSULT_MODE spawn signal and 🧳 acknowledgment format
- Proposed new consult-mode skill (post-governance-approval)
- Update procedures history.md with learnings
Closes #500
References #344
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add economy mode that shifts model selection to cheaper alternatives at Layer 3 (task-aware auto) and Layer 4 (default). Explicit user preferences at Layers 0-2 are never overridden. SDK changes: - Add ECONOMY_MODEL_MAP and applyEconomyMode() to config/models.ts - Add readEconomyMode() / writeEconomyMode() for config.json persistence - Update resolveModel() in config/models.ts with economyMode option - Update resolveModel() in agents/model-selector.ts with economyMode option CLI changes: - Add 'squad economy [on|off]' command for persistent toggle - Add --economy global flag for session-level activation (SQUAD_ECONOMY_MODE=1) Tests: - 34 new tests in test/economy-mode.test.ts (all passing) Economy model table: claude-opus-4.6 -> claude-sonnet-4.5 (architecture/review) claude-sonnet-4.6 -> gpt-4.1 (code writing) claude-haiku-4.5 -> gpt-4.1 (docs/mechanical) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster
added a commit
that referenced
this pull request
Mar 22, 2026
- Merged 9 inbox decisions → decisions.md (personal squad impl plan, economy mode design/governance, persistent model preference, user directives, template sync, ESM fix) - Deleted inbox files (merge complete) - Updated agent histories: Flight (personal squad plan), EECOM (economy mode), Procedures (governance proposals) - Appended team updates to agent contexts Fleet Status: - Flight: Personal squad design validated, 19-task plan across 4 PRs (MVP = PR #1+3) - EECOM: Economy mode complete (34 tests), PR #504 open - Procedures: Economy + consult-mode governance drafted, PR #503 open - Directives: #464 rate limit UX (soft dep #500), #502 bug P1 next-up, triage includes discussions Ready for execution: EECOM Phase 1, Procedures Phase 3 (concurrent). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster
added a commit
that referenced
this pull request
Mar 22, 2026
* feat: economy mode skill, governance proposals for #500 and #344 - Add .squad/skills/economy-mode/SKILL.md: Layer 3 cost modifier - Economy table shifts code tasks to gpt-4.1/gpt-5-mini, arch to sonnet - Activation: session phrase, config.json economyMode:true, or --economy flag - Layer 0/1/2 (user intent) always overrides economy mode - 💰 indicator in spawn acknowledgments - Confidence: low (first implementation) - Add .squad/decisions/inbox/procedures-economy-mode-governance.md - Draft additions to squad.agent.md for Flight review - Economy mode paragraph after Layer 0, updated table, 💰 convention - Valid models catalog audit findings (claude-sonnet-4.6 missing, etc.) - Add .squad/decisions/inbox/procedures-personal-squad-governance.md - Five gap analysis: Init Mode, consult mode detection, TEAM_ROOT semantics, charter templates, missing consult-mode skill - Proposed CONSULT_MODE spawn signal and 🧳 acknowledgment format - Proposed new consult-mode skill (post-governance-approval) - Update procedures history.md with learnings Closes #500 References #344 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: economy mode for cost-conscious model selection (#500) Add economy mode that shifts model selection to cheaper alternatives at Layer 3 (task-aware auto) and Layer 4 (default). Explicit user preferences at Layers 0-2 are never overridden. SDK changes: - Add ECONOMY_MODEL_MAP and applyEconomyMode() to config/models.ts - Add readEconomyMode() / writeEconomyMode() for config.json persistence - Update resolveModel() in config/models.ts with economyMode option - Update resolveModel() in agents/model-selector.ts with economyMode option CLI changes: - Add 'squad economy [on|off]' command for persistent toggle - Add --economy global flag for session-level activation (SQUAD_ECONOMY_MODE=1) Tests: - 34 new tests in test/economy-mode.test.ts (all passing) Economy model table: claude-opus-4.6 -> claude-sonnet-4.5 (architecture/review) claude-sonnet-4.6 -> gpt-4.1 (code writing) claude-haiku-4.5 -> gpt-4.1 (docs/mechanical) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Scribe: Wave 1 decisions merged (#329/#344/#500) - Merged 9 inbox decisions → decisions.md (personal squad impl plan, economy mode design/governance, persistent model preference, user directives, template sync, ESM fix) - Deleted inbox files (merge complete) - Updated agent histories: Flight (personal squad plan), EECOM (economy mode), Procedures (governance proposals) - Appended team updates to agent contexts Fleet Status: - Flight: Personal squad design validated, 19-task plan across 4 PRs (MVP = PR #1+3) - EECOM: Economy mode complete (34 tests), PR #504 open - Procedures: Economy + consult-mode governance drafted, PR #503 open - Directives: #464 rate limit UX (soft dep #500), #502 bug P1 next-up, triage includes discussions Ready for execution: EECOM Phase 1, Procedures Phase 3 (concurrent). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: hard-fail on Node <22.5.0 with clear message (#502) node:sqlite (required by the Copilot SDK for session storage) was added in Node 22.5.0. Previously Squad only warned and continued, leading to cryptic ERR_UNKNOWN_BUILTIN_MODULE crashes later. Changes: - cli-entry.ts: replace soft warn+continue with hard process.exit(1) and a clear upgrade message when Node <22.5.0 is detected at startup. Remove now-redundant checkNodeSqlite() function and its call site. - doctor.ts: add checkNodeVersion() check to squad doctor diagnostics so users can detect the version gap proactively. - package.json (root, squad-cli, squad-sdk): correct engines field from >=20 to >=22.5.0, enabling npm/npx to warn at install time. - test/cli/doctor.test.ts: add 5 tests for checkNodeVersion pass/fail paths; update check-count assertion. Closes #502 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
…radygaster#540) Wires 5 ghost commands: hire→init, heartbeat→doctor, shell→REPL, loop→triage, run→stub with redirect. Closes bradygaster#501, Closes bradygaster#503, Closes bradygaster#504, Closes bradygaster#507, Closes bradygaster#509 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements economy mode per issue #500 — a cost-conscious model selection modifier.
Working as EECOM (Core Dev)
Closes #500
What changed
SDK (packages/squad-sdk)
eadEconomyMode(), \writeEconomyMode(). Updated
esolveModel()\ with \�conomyMode?\ option that reads from config.json when not explicitly provided.
esolveModel()\ and \selectModelForTask()\ with \�conomyMode?\ support.
CLI (\packages/squad-cli)
Tests
Economy model table
Design
Economy mode only affects Layers 3–4 (auto-selection). Layers 0–2 (explicit config.json overrides, session directives, charter preferences) are never modified — user intent is always respected.