Problem
Squad has no single source of truth for file layout across versions. Five separate code paths each make independent assumptions about where files live:
init.ts — creates directories at init time
migrations.ts — moves files between locations on upgrade
upgrade.ts — syncs template files to target directories
squad.agent.md — tells agents where to read/write (skills, decisions, etc.)
skill-source.ts, resolver.ts — runtime reads from hardcoded paths
When a file location changes between versions (e.g., skills moving from .squad/skills/ to .copilot/skills/), every path must be updated independently. Issue #77 (skills discovery bug) is a direct result of this gap — the migration moved files, but the runtime, agent instructions, and spawn templates weren't all updated consistently.
Proposed Solution: File Layout Manifest
A single schema/registry that defines:
- Every directory Squad manages and its purpose
- Canonical location per version (e.g., v0.8:
.squad/skills/, v0.9+: .copilot/skills/)
- Read priority order (which locations to check, in what order)
- Write target (where new content goes)
- Migration path (what moves where on upgrade)
All five code paths would reference this manifest instead of hardcoding paths independently.
Benefits
- Version-to-version changes tracked in ONE place
- Migrations auto-derived from manifest diffs
- Runtime read logic generated from manifest (no more either/or bugs)
- Agent instructions can reference manifest for correct write paths
squad doctor can validate layout against manifest
Related
Problem
Squad has no single source of truth for file layout across versions. Five separate code paths each make independent assumptions about where files live:
init.ts— creates directories at init timemigrations.ts— moves files between locations on upgradeupgrade.ts— syncs template files to target directoriessquad.agent.md— tells agents where to read/write (skills, decisions, etc.)skill-source.ts,resolver.ts— runtime reads from hardcoded pathsWhen a file location changes between versions (e.g., skills moving from
.squad/skills/to.copilot/skills/), every path must be updated independently. Issue #77 (skills discovery bug) is a direct result of this gap — the migration moved files, but the runtime, agent instructions, and spawn templates weren't all updated consistently.Proposed Solution: File Layout Manifest
A single schema/registry that defines:
.squad/skills/, v0.9+:.copilot/skills/)All five code paths would reference this manifest instead of hardcoding paths independently.
Benefits
squad doctorcan validate layout against manifestRelated
skill-source.tseither/or patternresolver.ts.find()pattern