Repository navigation
Description
Problem
The CastingEngine class (packages/squad-sdk/src/casting/casting-engine.ts) defines curated universe templates with:
- Character pools with specific names
- Personality backstories per character
- Preferred role assignments
- Universe capacity limits
However, when casting a team via Copilot CLI (squad init), the engine is completely bypassed:
-
packages/squad-cli/src/cli/shell/coordinator.ts(lines 42-86) —buildInitModePrompt()hardcodes a prompt that lets the LLM pick any universe (e.g., "Alien, The Usual Suspects, Blade Runner, The Matrix, Heat, Star Wars"). No reference toCastingEngine, no universe allowlist enforcement. -
packages/squad-cli/src/cli/core/cast.ts(lines 218-280) —generateCharter()uses regex-basedpersonalityForRole()to assign generic personalities by role type, ignoring the detailed per-character backstories in the template system. -
CastingEngine.castTeam()is never called during the init flow.
Impact
- The
CastingEngineclass is effectively dead code when using Copilot CLI - No enforcement of universe allowlist — the LLM can suggest universes that don't exist in the template system
- No character name pool — names are generated arbitrarily instead of selected from curated characters
- Charter personalities are generic (regex-matched by role) instead of universe-specific
Expected Behavior
The CLI init flow should use CastingEngine to:
- Select a universe from the allowlist (scored by size_fit + shape_fit + resonance_fit)
- Allocate character names from that universe's character pool
- Use the template's personality backstories when generating charters
Files
- Template system (unused):
packages/squad-sdk/src/casting/casting-engine.ts - Hardcoded init prompt:
packages/squad-cli/src/cli/shell/coordinator.ts:42-86 - Hardcoded charter gen:
packages/squad-cli/src/cli/core/cast.ts:218-280 - Init flow entry:
packages/squad-cli/src/cli/shell/index.ts:890-962
Activity
feat: smarter work division with multi-agent dispatch (github#342) (g…
github-actions commentedon Mar 13, 2026
🏗️ Squad Triage — Flight (Lead)
Issue: #342 — CLI casting bypasses CastingEngine template system
Assigned to: DSKY (TUI Engineer)
Reason: Issue relates to frontend/UI work
@copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.
Team roster:
squad:flightsquad:proceduressquad:eecomsquad:fidosquad:paosquad:capcomsquad:controlsquad:surgeonsquad:boostersquad:gncsquad:networksquad:retrosquad:incosquad:guidosquad:telemetrysquad:voxsquad:dskysquad:simssquad:handbooksquad:ralphsquad:copilotgithub-actions commentedon Mar 13, 2026
squad:fenster. Check.squad/team.md(or.ai-team/team.md) for valid member names.github-actions commentedon Mar 13, 2026
📋 Assigned to EECOM (Core Dev)
Issue: #342 — CLI casting bypasses CastingEngine template system
EECOM will pick this up in the next Copilot session.
Wire CastingEngine into CLI init flow
Wire CastingEngine into CLI init flow (#417)
williamhallatt commentedon Mar 16, 2026
This issue appears to be functionally resolved by PR #417 (merged 2026-03-15), which wired
augmentWithCastingEngine()intocast.ts. The PR includes 5 integration tests incasting-engine-integration.test.tscovering Usual Suspects, Ocean's Eleven, unrecognized universe, case-insensitive matching, and failure handling.The core changes in PR #417:
CastingEngineis now called during the CLI init flowConsider closing this issue if the PR #417 resolution is satisfactory.
bradygaster commentedon Mar 16, 2026
Already shipped via PR #417 (CastingEngine wiring). Closing.