Skip to content

Wire CastingEngine into CLI init flow#417

Merged
bradygaster merged 3 commits intodevfrom
squad/342-casting-engine-wiring
Mar 15, 2026
Merged

Wire CastingEngine into CLI init flow#417
bradygaster merged 3 commits intodevfrom
squad/342-casting-engine-wiring

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Closes #342

Summary

Integrates the CastingEngine class (from #138) into the CLI squad init flow. Now when users initialize a Squad, the LLM proposes roles and the CastingEngine allocates curated character names and personalities from the universe templates.

Changes

  • cast.ts: Add �ugmentWithCastingEngine() to map LLM-proposed universes (e.g., 'The Usual Suspects') to engine universe IDs and replace arbitrary names with curated characters
  • coordinator.ts: Update init prompt to guide LLM toward preferred universes (The Usual Suspects, Ocean's Eleven)
  • shell/index.ts: Call �ugmentWithCastingEngine() after parsing team proposal
  • generateCharter(): Use CastingEngine personalities and backstories when available
  • Tests: Add integration test suite to verify augmentation logic

Behavior

  • Before: LLM picks arbitrary names (e.g., 'Ripley', 'Dallas', 'Kane') from any universe
  • After: If LLM picks a recognized universe, CastingEngine replaces names with curated pool (e.g., Keyser, McManus, Fenster for Usual Suspects)
  • Fallback: If universe not recognized, preserves LLM's original names

Testing

  • All existing tests pass (45 casting/parser tests)
  • New integration tests validate augmentation logic for both universes
  • Build successful with strict TypeScript checks

Next Steps

This is the foundational wiring. Future work can expand universe selection scoring (size_fit + shape_fit + resonance_fit) in the LLM prompt.

bradygaster and others added 3 commits March 15, 2026 11:20
- Import CastingEngine from @bradygaster/squad-sdk/casting
- Add augmentWithCastingEngine() to replace LLM names with curated character names when universe is recognized
- Update coordinator init prompt to suggest The Usual Suspects and Ocean's Eleven
- Augment generateCharter() to use CastingEngine personalities/backstories when available
- Add integration tests for augmentation logic
- LLM still proposes roles/team composition, engine handles name allocation

Closes #342

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit 69dc856 into dev Mar 15, 2026
2 checks passed
@bradygaster bradygaster deleted the squad/342-casting-engine-wiring branch March 15, 2026 18:52
tamirdresher pushed a commit to tamirdresher/squad that referenced this pull request Mar 16, 2026
…x chars

Fixes bradygaster#400 - /clear now sends ANSI escape codes to actually clear terminal screen
Fixes bradygaster#389 - Recognize 'quit' and 'q' as exit words (not just 'exit')
Fixes bradygaster#417 - Root CLI detects .squad/ existence and auto-launches shell or suggests init
Fixes bradygaster#391 - Use proper Unicode box-drawing characters (─) with graceful ASCII fallback

Changes:
- commands.ts: Send \x1B[2J\x1B[H on /clear to truly clear the terminal
- App.tsx: Expand EXIT_WORDS to include 'quit' and 'q'
- cli-entry.ts: Check for .squad/ before defaulting to shell, show helpful init prompt if missing
- AgentPanel.tsx + MessageStream.tsx: Use boxChars() for separators instead of hardcoded '─'

All changes preserve cross-platform compatibility and respect NO_COLOR/terminal capabilities.

Co-authored-by: bradygaster <brady@github.com>
tamirdresher pushed a commit to tamirdresher/squad that referenced this pull request Mar 16, 2026
tamirdresher pushed a commit to tamirdresher/squad that referenced this pull request Mar 16, 2026
Session: 2026-02-24T0430-prs-merged
Requested by: Brady

Changes:
- Merged 6 decision inbox files into decisions.md (Cheritto, Fenster, Kovash, Marquez, McManus, Waingro)
- Deleted all inbox files (now empty)
- Created .squad/identity/prd-next-waves.md (4-wave execution plan: A=Polish, B=Reliability, C=Testing, D=Delight)
- Updated .squad/identity/now.md to reflect Wave A focus
- Created session log: .squad/log/2026-02-24T0430-prs-merged.md

PRs merged this session: bradygaster#444, bradygaster#445, bradygaster#446, bradygaster#447
Issues closed: bradygaster#400, bradygaster#389, bradygaster#417, bradygaster#391, bradygaster#402, bradygaster#405, bradygaster#404, bradygaster#407, bradygaster#431, bradygaster#429
Issues filed: bradygaster#448-bradygaster#459 (Wave A Polish items)

Process directive: All work through PRs with squad member review before merge

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry pushed a commit to diberry/squad that referenced this pull request Mar 19, 2026
…er#429, bradygaster#424, bradygaster#417, bradygaster#415, bradygaster#412, bradygaster#411)

Documents features and changes from recent PRs that shipped without
corresponding docs updates:

- bradygaster#429: Update model catalog with Sonnet 4.6, Opus 4.6, GPT-5.4 defaults
- bradygaster#424: Document --sdk switch for TypeScript config generation
- bradygaster#412: Document --roles flag for opt-in base roles
- bradygaster#411: Note Ralph in init + @copilot routing template removal
- bradygaster#442: Add Session Recovery skill documentation
- bradygaster#417: Document CastingEngine character casting
- bradygaster#415: Add rework rate OTEL metrics reference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry pushed a commit to diberry/squad that referenced this pull request Mar 19, 2026
…er#429, bradygaster#424, bradygaster#417, bradygaster#415, bradygaster#412, bradygaster#411)

Documents features and changes from recent PRs that shipped without
corresponding docs updates:

- bradygaster#429: Update model catalog with Sonnet 4.6, Opus 4.6, GPT-5.4 defaults
- bradygaster#424: Document --sdk switch for TypeScript config generation
- bradygaster#412: Document --roles flag for opt-in base roles
- bradygaster#411: Note Ralph in init + @copilot routing template removal
- bradygaster#442: Add Session Recovery skill documentation
- bradygaster#417: Document CastingEngine character casting
- bradygaster#415: Add rework rate OTEL metrics reference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster pushed a commit that referenced this pull request Mar 20, 2026
* docs: fill content gaps from 7 recent PRs (#442, #429, #424, #417, #415, #412, #411)

Documents features and changes from recent PRs that shipped without
corresponding docs updates:

- #429: Update model catalog with Sonnet 4.6, Opus 4.6, GPT-5.4 defaults
- #424: Document --sdk switch for TypeScript config generation
- #412: Document --roles flag for opt-in base roles
- #411: Note Ralph in init + @copilot routing template removal
- #442: Add Session Recovery skill documentation
- #417: Document CastingEngine character casting
- #415: Add rework rate OTEL metrics reference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: remove duplicate gpt-5.1-codex-mini from Fast/Cheap tier

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant