feat: support --sdk switch with built-in base roles (#378)#424
Merged
bradygaster merged 1 commit intodevfrom Mar 16, 2026
Merged
feat: support --sdk switch with built-in base roles (#378)#424bradygaster merged 1 commit intodevfrom
bradygaster merged 1 commit intodevfrom
Conversation
When `squad init --roles --sdk` is used, generates TypeScript source files under squad/ using defineAgent()/defineSquad() API with base role definitions via useRole(). - Added `roles` option to SDK InitOptions interface - Created generateSDKBuilderConfigWithRoles() that emits useRole() calls for base role agents and defineAgent() for non-role system agents (scribe, ralph) - Default starter team (lead, backend, frontend, tester) generated when no base-role agents are explicitly provided - CLI passes --roles flag through to SDK init - 8 new tests covering sdk+roles, sdk-only, and roles-only paths Closes #378 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3 tasks
tamirdresher
pushed a commit
to tamirdresher/squad
that referenced
this pull request
Mar 16, 2026
…r#438) * chore(squad): quality review findings — 7 issues filed Quality audit complete: 5 agents assessed CLI across testing, coverage, stability, accessibility, UX. Results: 4 P0 blockers (bradygaster#365–bradygaster#368), 3 P1 items (bradygaster#369–bradygaster#371). Blocking: Waingro dead sessions, ErrorBoundary, dropped input; Marquez help text consistency. Changes: - Logged session summary to .squad/log/2026-02-24T0205-quality-review-complete.md - Updated .squad/identity/now.md with quality review findings and new issue numbers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): merge decision — Marquez UX audit findings Quality assessment merged from inbox (Grade B): 11 improvements (3 P0, 4 P1, 4 P2). help text, stub commands, vocabulary, separators, roster. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix bradygaster#419/bradygaster#424: Restructure /help for scannability Show 3-5 most essential commands by default, with clear pointer to /help full for complete reference. Default /help now fits in ~5 lines: - Commands: /status, /history, /agents, /quit - Type /help full for complete docs /help full shows the complete list with descriptions, matching previous behavior. Closes bradygaster#419, bradygaster#424 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix bradygaster#421: Lead with default behavior in --help The CLI help now leads with 'Just type — squad routes your message to the right agent automatically' before listing commands. This makes it clear that the primary way to use squad is to run it with no args and talk naturally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 16, 2026
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>
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
When
squad init --roles --sdkis used, generates TypeScript config files usinguseRole()from the SDK's role catalog instead of plaindefineAgent()calls.What changed
SDK (
packages/squad-sdk/src/config/init.ts):roles?: booleantoInitOptionsgenerateSDKBuilderConfigWithRoles()function emitsuseRole()calls for base role agents anddefineAgent()for system agents (scribe, ralph)CLI (
packages/squad-cli/src/cli/core/init.ts):--rolesflag through to SDKInitOptionsTests (
test/init-sdk.test.ts):How it works
squad init --sdk --rolesgenerates asquad.config.tslike:\\ ypescript
import {
defineSquad,
defineTeam,
defineAgent,
useRole,
} from '@bradygaster/squad-sdk';
const lead = useRole('lead', { name: 'lead' });
const backend = useRole('backend', { name: 'backend' });
const frontend = useRole('frontend', { name: 'frontend' });
const tester = useRole('tester', { name: 'tester' });
const scribe = defineAgent({ name: 'scribe', ... });
const ralph = defineAgent({ name: 'ralph', ... });
export default defineSquad({ ... });
\\
Test results
Working as EECOM (Core Dev).
Closes #378