musketeer migrate
The migrate command converts legacy Musketeer workspaces to the SMALL-native two-namespace layout.
Usage
musketeer migrate # convert in place
musketeer migrate --dry-run # preview without changes
musketeer migrate --force # skip confirmation promptsWorkspace states
Migrate detects the current workspace state:
| State | Description |
|---|---|
| Legacy | All artifacts under .musketeer/runs/<uuid>/. No .small/ directory. |
| SmallNative | Canonical state in .small/, execution state in .musketeer/. Already migrated. |
| Mixed | Some artifacts in both locations. Partially migrated or manually edited. |
| Empty | No workspace detected. Nothing to migrate. |
What migrate does
- Detects the current workspace state
- Archives legacy artifacts to
.musketeer/legacy/<timestamp>/ - Creates
.small/directory if it does not exist - Converts legacy YAML files to SMALL-owned schemas (
intent.ymlbecomesintent.small.yml, etc.) - Preserves Musketeer-specific artifacts (verdicts, packets, config) in
.musketeer/ - Writes a migration report
Options
| Option | Description |
|---|---|
--dry-run | Show what would be migrated without making changes |
--force | Skip confirmation prompts |
What gets archived
Legacy artifacts are moved to .musketeer/legacy/<timestamp>/ before conversion. The original files are preserved there for reference. The archive includes:
- Legacy run directories with their YAML files
- Any Musketeer-schema base artifacts
Ambiguous field handling
When legacy files contain fields that could belong to either namespace, migrate follows a conservative approach: SMALL-defined fields go to .small/, everything else stays in .musketeer/.
Migration report
After migration, a report is written showing:
- Files moved to archive
- Files created in
.small/ - Files preserved in
.musketeer/ - Any warnings or ambiguities encountered
Verifying success
After migration:
musketeer check # validates SMALL state + Musketeer execution state
ls .small/ # should contain workspace.small.yml and other SMALL artifacts
ls .musketeer/ # should contain musketeer.yml, packets/, verdicts/, runs/Example
$ musketeer migrate --dry-run
Workspace state: Legacy
Would archive: .musketeer/runs/a1b2c3d4-.../intent.yml -> .musketeer/legacy/20260315T100000/...
Would create: .small/intent.small.yml
Would create: .small/constraints.small.yml
Would create: .small/plan.small.yml
Would create: .small/progress.small.yml
Would create: .small/handoff.small.yml
Would create: .small/workspace.small.yml
Dry run complete. No changes made.
$ musketeer migrate
Workspace state: Legacy
Archiving legacy artifacts...
Creating .small/ workspace...
Migration complete. Run 'musketeer check' to verify.