Repository navigation
Description
Summary
Two independent inputs today converge on the same underlying gap: Squad has no formal specification for what a "Squad" actually is, in terms of the on-disk artifacts (.squad/, charter.md, team.md, routing.md, skills, decisions, casting registry, etc.) that constitute one.
- @dfberry (Dina Berry) — Charter parsing relies on an implicit exact-Markdown schema that is not formally declared or validated #1522 — "Charter parsing relies on an implicit exact-Markdown schema that is not formally declared or validated". Dina's issue is the seed of this effort and should be credited as the origin:
charter.mdis authoritative, behavior-affecting input (model preference, fallback, reasoning effort, context tier), but its structure is defined only by parser implementation details inpackages/squad-sdk/src/agents/charter-compiler.ts, not by any declared contract. She proposed either (a) formalizing the current Markdown structure as a documented, validated schema, or (b) introducing structured metadata with legacy fallback. - A broader argument raised separately today — that Squad needs a canonical reference site (proposed name:
squad-spec.io) that clearly and durably articulates "what a Squad is" purely in terms of on-disk artifacts, independent of any single runtime/parser implementation — analogous to how other ecosystems (e.g.editorconfig.org,spdx.org, OpenAPI) publish a spec independent of any one tool.
Why now
Charter drift is already an admitted, lived problem — see comments on #1522 where the repo owner notes charters have "evolved" while working on shrinking/"single-fying" squad.agent.md, and a related open gap on differentiating standard charter.md from the "roles" alternative. This is not hypothetical: it is actively making behavior harder to reason about today.
Proposed scope (starting point, not final)
- Inventory the artifact surface — enumerate every on-disk artifact Squad's runtime currently treats as structured/behaviorally significant (charter.md sections/labels, team.md, routing.md, casting registry.json, skills SKILL.md frontmatter, decisions/history markdown, squad.config.ts, etc.) and where each is parsed today.
- Formalize the charter contract first (directly resolves Charter parsing relies on an implicit exact-Markdown schema that is not formally declared or validated #1522) — declare required sections/fields, valid values, and legacy-compatibility rules; add validation with user-facing errors for malformed charters.
- Draft a versioned specification document (e.g.
SPEC.mdor a docs section) describing the artifact contracts independent of implementation, suitable for eventual publication as a standalone reference (thesquad-spec.ioidea) once mature enough to stand alone. - Backfill validators against the declared spec so drift is caught mechanically instead of discovered by users.
Non-goals (for this tracking issue)
- Standing up the actual
squad-spec.iosite/domain — that's a follow-on once the spec content exists and is stable. - Rewriting the charter format — direction (schema-first vs. metadata-first) is still open per Charter parsing relies on an implicit exact-Markdown schema that is not formally declared or validated #1522 and needs a design decision.
Acceptance Criteria
- A documented, versioned specification exists for the charter contract at minimum (satisfies Charter parsing relies on an implicit exact-Markdown schema that is not formally declared or validated #1522's acceptance criteria).
- The spec is implementation-independent prose/schema, not just inferred from
charter-compiler.ts. - A clear path/plan exists for extending the same treatment to the other on-disk artifacts listed above.
Credits
- Origin issue: Charter parsing relies on an implicit exact-Markdown schema that is not formally declared or validated #1522 (@dfberry)
- Related: Squad file/name best practices #1997 (Squad file/name best practices)
Routing per .squad/routing.md: this is cross-package architecture and unmatched-work territory — assigning to architect (Lead Architect) for ownership and design-direction.
Activity
github-actions commentedon Sep 23, 2026
📋 Assigned to architect (Lead Architect)
Issue: #2069 — RFC: Formalize a Squad specification — on-disk artifact contracts, starting with charter.md (credits #1522)
architect will pick this up in the next Copilot session.
bradygaster commentedon Sep 24, 2026
Team review: proposed structure and depth for the Squad specification
The Architect, Docs & DevRel, and Fact Checker independently converged on the same recommendation:
This follows the strongest patterns from EditorConfig, OCI, SPDX 3.0, OpenTelemetry, JSON Schema vocabularies, and Keep a Changelog. It avoids the failure modes seen in WS-* sprawl, WADL/RAML governance and tooling gaps, and ActivityPub-style under-specified extension points.
What the specification must promise
A conforming producer should be able to create an artifact that any conforming consumer can interpret consistently. Validators should return deterministic diagnostics. Editors must preserve unknown namespaced extensions during round trips. Conformance must be capability-specific; v0.1 should not claim that an entire Squad is conformant when only charters are specified.
Primary audiences:
Recommended specification architecture
1. Small normative core
Keep this short and stable. It should define:
2. Separately versioned artifact profiles
Each profile should define its own schema, lifecycle, authority, diagnostics, fixtures, and compatibility rules. Proposed order:
team.md,routing.md, identity joins, ownership, and precedenceOther runtime protocols, prompts, CLI commands, storage algorithms, telemetry, GitHub workflows, and website publication should remain implementation profiles or informative guidance—not core conformance requirements.
Recommended Charter Profile v0.1 outline
How deep should the guidance go?
Use MUST only where divergence breaks portability, safety, reference integrity, deterministic interpretation, or round-trip fidelity. Use SHOULD for ecosystem consistency where a documented exception can exist. Use MAY for optional capabilities and extensions.
Normative:
Informative:
The normative overview should be brief enough to understand quickly, but the profile must be precise enough to implement without reading Squad's source. “One page” is a design constraint for the conceptual core, not a reason to omit validation rules or fixtures.
Verified starting problem
The current repository already contains incompatible charter shapes:
What I Own,Boundaries, andCollaboration;Accountable Responsibilities,Non-Responsibilities, andCollaboration and Review Authority;Modelsection;This confirms the issue's premise, but it also means the spec must not simply freeze today's parser behavior. We need an explicit semantic decision about canonical fields, presentation headings/aliases, support-role profiles, and legacy compatibility.
Evidence from other specifications
Strong structural models:
Cautionary patterns:
Success should not be measured by fame or GitHub stars. Require evidence from at least three of these signals: independent implementations, validation tooling, durable governance, third-party compatibility layers, and real authored-to adoption.
Principal risks
Proposed next action and dates
Accountable owner:
architect.The validator and fixtures should ship with the first normative profile. A spec document alone will not prevent the drift this issue is intended to solve.
feat: formalize Squad charter profile
feat: formalize Squad charter profile
fix: enforce portable charter conformance
fix: complete charter conformance gate
fix: enforce charter manifest schema
fix: revise specification suite publication claims
fix: close specification suite contracts
2 remaining items
fix: enforce portable charter conformance
fix: complete charter conformance gate
fix: enforce charter manifest schema
docs: draft Squad specification suite
fix: revise specification suite publication claims
fix: close specification suite contracts
docs: align specification claim boundaries
fix: bind Charter claims to immutable revisions
docs: clarify specification scope and execution boundaries
Merge latest dev for specification validation
Merge latest dev before Charter digest repair
fix: bind Charter digest to portable checkout bytes
Merge canonical Vitest and public registry integration from dev
feat: establish Squad Core, Charter, and draft specification suite (#…