Title: CLI casting bypasses CastingEngine template system · Issue #342 · github/squad · GitHub
Open Graph Title: CLI casting bypasses CastingEngine template system · Issue #342 · github/squad
X Title: CLI casting bypasses CastingEngine template system · Issue #342 · github/squad
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 cap...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/github/squad/issues/342
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CLI casting bypasses CastingEngine template system","articleBody":"## Problem\n\nThe `CastingEngine` class (`packages/squad-sdk/src/casting/casting-engine.ts`) defines curated universe templates with:\n- Character pools with specific names\n- Personality backstories per character\n- Preferred role assignments\n- Universe capacity limits\n\nHowever, when casting a team via Copilot CLI (`squad init`), the engine is **completely bypassed**:\n\n1. **`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 to `CastingEngine`, no universe allowlist enforcement.\n\n2. **`packages/squad-cli/src/cli/core/cast.ts` (lines 218-280)** — `generateCharter()` uses regex-based `personalityForRole()` to assign generic personalities by role type, ignoring the detailed per-character backstories in the template system.\n\n3. **`CastingEngine.castTeam()` is never called** during the init flow.\n\n## Impact\n\n- The `CastingEngine` class is effectively dead code when using Copilot CLI\n- No enforcement of universe allowlist — the LLM can suggest universes that don't exist in the template system\n- No character name pool — names are generated arbitrarily instead of selected from curated characters\n- Charter personalities are generic (regex-matched by role) instead of universe-specific\n\n## Expected Behavior\n\nThe CLI init flow should use `CastingEngine` to:\n1. Select a universe from the allowlist (scored by size_fit + shape_fit + resonance_fit)\n2. Allocate character names from that universe's character pool\n3. Use the template's personality backstories when generating charters\n\n## Files\n\n- **Template system (unused):** `packages/squad-sdk/src/casting/casting-engine.ts`\n- **Hardcoded init prompt:** `packages/squad-cli/src/cli/shell/coordinator.ts:42-86`\n- **Hardcoded charter gen:** `packages/squad-cli/src/cli/core/cast.ts:218-280`\n- **Init flow entry:** `packages/squad-cli/src/cli/shell/index.ts:890-962`\n","author":{"url":"https://github.com/jsturtevant","@type":"Person","name":"jsturtevant"},"datePublished":"2026-03-10T23:35:41Z","url":"https://github.com/github/squad/issues/342"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f13cb504-8b49-05a6-db3a-3b9d197ddf1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9F4:1C6C3E:1C1C2F0:2502D7F:6B01539C |
| html-safe-nonce | 1f536f32d6fe44f5a36e7a8c280be28ecce282ebc0cfcce91a981bc95af19717 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUY0OjFDNkMzRToxQzFDMkYwOjI1MDJEN0Y6NkIwMTUzOUMiLCJ2aXNpdG9yX2lkIjoiMjI1OTMzNjQ5NTI0MjQ5ODk3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d997534eb6db1c4b1068fdc683b1349e895a2e0a5211c3236cd531a89ff8fba2 |
| hovercard-subject-tag | issue:4054779270 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/squad/342/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e747bbee335f3b8aa27f332a293a415098a7cdd193b88fcd0ee77d8149971cd6/github/squad/issues/342 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e747bbee335f3b8aa27f332a293a415098a7cdd193b88fcd0ee77d8149971cd6/github/squad/issues/342 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jsturtevant |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/github/squad git https://github.com/github/squad.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 1151205052 |
| octolytics-dimension-repository_nwo | github/squad |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1151205052 |
| octolytics-dimension-repository_network_root_nwo | github/squad |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width