Skip to content

[MEDIUM] health rejects legacy charters and routing tables while missing built-in roster drift #2298

Closed

Description

@tamirdresher

Summary

After upgrading existing teams to 2.0.0-preview.1, squad health produces false failures for legacy charter and routing formats, while also missing a real roster migration inconsistency:

  • Legacy charters with a # Name — Role heading and ## Identity / **Role:** metadata are rejected as missing identity name/role.
  • The routing validator parses unrelated Markdown table headers/example cells as agent names.
  • Upgrade creates agents/rai/ and agents/fact-checker/, but does not add Rai or Fact Checker to team.md, despite the 2.0 built-ins contract saying they are always on the roster.

Environment

  • Squad CLI 2.0.0-preview.1, installed from the exact published release tarball
  • Windows 11
  • Node.js 22
  • CFS-only npm host (https://packagefeedproxy.microsoft.io/npm/)

Repro

squad upgrade
squad health --json
Get-Content .squad\team.md
Get-ChildItem .squad\agents -Directory | Select-Object -ExpandProperty Name

Run this against an existing 0.11-style team whose charters use the previously shipped heading/Identity format and whose routing.md contains multiple Markdown tables.

Observed

Health returned exit 1 with:

registry-charters: 6 charters "must declare identity name and role"
belanna, data, neelix, picard, seven, worf

It also reported 17 false unknown routing agents, including literal headers/example cells:

Route To
Examples
{Name}
Write tests

In a second upgraded team, health passed with nine roster members even though both directories existed:

.squad/agents/rai/
.squad/agents/fact-checker/

Neither Rai nor Fact Checker appeared in team.md.

Expected

  • Health accepts legacy charter formats that prior Squad releases generated, or upgrade migrates them before validation.
  • Routing validation parses only the designated routing table and ignores headers, examples, and unrelated tables.
  • Upgrade adds the always-on Rai and Fact Checker built-ins to team.md when it creates their agent directories.
  • Health flags folder/roster divergence rather than passing it.

Impact / Severity

MEDIUM. Healthy upgraded teams are reported as broken, while a genuine roster inconsistency is missed. This reduces trust in the health command and leaves built-in agents undiscoverable through roster-based routing.

Proposed fix

  1. Accept both legacy and 2.0 charter identity schemas, with migration to the canonical form where safe.
  2. Parse routing sections structurally instead of scanning every pipe-delimited row.
  3. Add a roster migration for Rai and Fact Checker and a health invariant that roster and active built-in directories agree.
  4. Add fixtures from 0.11 and 0.13 teams to upgrade/health regression tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions