Skip to content

SDK init: Adding team members doesn't update squad.config.ts #337

Closed

Description

@bradygaster

Bug

When a squad is initialized with --sdk (creating squad.config.ts with defineAgent/defineSquad from @bradygaster/squad-sdk), the initial Scribe agent is added to the .ts file. However, when new team members are added during Phase 2 (or later via "add someone"), they are added to:

  • .squad/team.md ✅
  • .squad/routing.md ✅
  • .squad/casting/registry.json ✅
  • squad.config.ts ❌ not updated

Expected Behavior

When a new agent is added to an SDK-initialized squad, squad.config.ts should also get a new defineAgent() call added, keeping the TypeScript config in sync with the markdown roster.

Steps to Reproduce

  1. Run squad init --sdk — creates squad.config.ts with Scribe
  2. Add team members (e.g., during Phase 2 casting)
  3. Observe that .squad/team.md has all members but squad.config.ts only has Scribe (or whatever was there at init)

Root Cause

The coordinator's "Adding Team Members" flow (in squad.agent.md) updates team.md, routing.md, and registry.json but has no step for updating squad.config.ts. The .ts file is an SDK-specific artifact that the coordinator instructions don't know about.

Suggested Fix

Add a step to the "Adding Team Members" section in squad.agent.md: after updating registry.json, check if squad.config.ts exists at the repo root. If so, add a defineAgent() entry for the new member.

Alternatively, the SDK could generate the config dynamically from registry.json at runtime, making squad.config.ts a derived artifact rather than a manually-maintained one.

Context

Discovered during an SDK Squad session building a Snake game. All 5 agents (Neo, Tank, Switch, Dozer, Scribe) were added to the markdown files correctly, but squad.config.ts required manual/separate updating.

Activity

  1. bradygaster commented on Mar 10, 2026

    @bradygaster
    CollaboratorAuthor

    Test Confirmation — Add-Member Flow (SdkSquad repo)

    Tested the add-member flow end-to-end in the SdkSquad test bed. Results confirm this gap.

    What we did

    Added Cypher (DevOps) to the team from The Matrix universe using the standard add-member flow (the coordinator's documented "Adding Team Members" steps 1-7).

    Results

    Location Updated? Status
    .squad/agents/cypher/charter.md ✅ Created Full charter with role, boundaries, collaboration
    .squad/agents/cypher/history.md ✅ Created Seeded with project context
    .squad/casting/registry.json ✅ Updated Entry #5, status: active
    .squad/team.md ✅ Updated 7 members total (was 6)
    .squad/routing.md ✅ Updated CI/CD & DevOps routing added
    squad.config.ts ❌ Not updated No defineAgent call, not in members array, not in agents array

    Verification

    • Spawned Cypher after adding — agent is fully operational and responds correctly
    • The agent works fine because spawning reads from .squad/ markdown files, not from squad.config.ts
    • But the .ts file is now out of sync: 5 agents defined vs 7 in team.md

    Root cause

    The coordinator's "Adding Team Members" instructions (steps 1-7 in squad.agent.md) have no step for updating squad.config.ts. The .ts file is only created during squad init --sdk and never touched again.

    Impact

    • squad.config.ts drifts from team.md immediately after the first add/remove
    • Any tooling that reads squad.config.ts as source of truth will have a stale roster
    • Same gap applies to removing team members (step would need to remove the defineAgent call and update the members/agents arrays)

    Commit: 0e0b5ff in bradygaster/SdkSquad

  2. bradygaster commented on Mar 10, 2026

    @bradygaster
    CollaboratorAuthor

    Update from SDK-First Parity Testing (2026-03-10)

    Systematic testing in the SdkSquad test bed confirmed this is the root cause for multiple downstream gaps:

    Direct impact:

    Evidence:

    • squad.config.ts has 5 agents: neo, tank, switch, dozer, scribe
    • team.md has 6 members: Neo, Tank, Switch, Dozer, Scribe, Ralph
    • routing.md references @copilot but no roster or config entry exists

    Scope of fix needed:

    1. squad init --sdk should include Ralph in generated config
    2. squad add-member should add defineAgent to config
    3. squad remove-member should remove defineAgent from config
    4. Special members (@copilot) need config representation when added

    Full test results: #341

  3. added a commit that references this issue on Mar 11, 2026
    b0c3a7b
  4. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #337 — SDK init: Adding team members doesn't update squad.config.ts
    Assigned to: FIDO (Quality Owner)
    Reason: Issue relates to testing/quality work

    @copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  5. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    ⚠️ No squad member found matching label squad:kujan. Check .squad/team.md (or .ai-team/team.md) for valid member names.

  6. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    ⚠️ No squad member found matching label squad:fenster. Check .squad/team.md (or .ai-team/team.md) for valid member names.

  7. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    📋 Assigned to CAPCOM (SDK Expert)

    Issue: #337 — SDK init: Adding team members doesn't update squad.config.ts

    CAPCOM will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    CAPCOM, work on issue #337

  8. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    📋 Assigned to EECOM (Core Dev)

    Issue: #337 — SDK init: Adding team members doesn't update squad.config.ts

    EECOM will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    EECOM, work on issue #337

  9. bradygaster commented on Mar 15, 2026

    @bradygaster
    CollaboratorAuthor

    Fixed and merged to dev in the irritating bugs sprint.

  10. added
    stalled-initiativeWork area that was started but never completed — cut, close, finish, or reprioritize
    on Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationpriority:p1This sprintsquadSquad triage inbox — Lead will assign to a memberstalled-initiativeWork area that was started but never completed — cut, close, finish, or reprioritizetype:bugSomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions