migrate-workspace
Migrate the .aiwg/ directory from single-framework layout to the multi-framework layout with an automatic backup
Best use case
migrate-workspace is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
It is a strong fit for teams already working in Codex.
Migrate the .aiwg/ directory from single-framework layout to the multi-framework layout with an automatic backup
Teams using migrate-workspace should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/migrate-workspace/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How migrate-workspace Compares
| Feature / Agent | migrate-workspace | Standard Approach |
|---|---|---|
| Platform Support | Codex | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Migrate the .aiwg/ directory from single-framework layout to the multi-framework layout with an automatic backup
Which AI agents support this skill?
This skill is designed for Codex.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# Migrate Workspace You upgrade the `.aiwg/` directory from the old single-framework layout to the new multi-framework layout, moving artifacts into framework-scoped subdirectories. A backup is always created before any changes are applied. ## Triggers Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description): - "upgrade my aiwg structure" → run migration - "move to multi-framework layout" → run migration - "preview workspace migration" → dry-run only - "what would migrate?" → dry-run only ## Trigger Patterns Reference | Pattern | Example | Action | |---------|---------|--------| | Full migration | "migrate my workspace" | Run `aiwg migrate-workspace` | | Dry run | "preview the workspace migration" | Run `aiwg migrate-workspace --dry-run` | | Forced | "migrate workspace, skip confirmation" | Run `aiwg migrate-workspace --yes` | | Check needed | "do I need to migrate?" | Run `aiwg migrate-workspace --dry-run` | ## Behavior When triggered: 1. **Always dry-run first** unless the user explicitly confirms or passes `--yes`: - Run `aiwg migrate-workspace --dry-run` to show what would move. - Report the planned changes to the user. - Ask for confirmation before proceeding. 2. **Extract arguments**: - Is `--dry-run` requested? Report only, no changes. - Has the user already confirmed? Use `--yes` to skip the interactive prompt. - Is there a specific backup path? (optional) 3. **Run the appropriate command**: ```bash # Preview only — no changes aiwg migrate-workspace --dry-run # Full migration (prompts for confirmation) aiwg migrate-workspace # Full migration, skip prompt aiwg migrate-workspace --yes ``` 4. **What the migration does**: - Creates a timestamped backup at `.aiwg/.backup-<timestamp>/` - Creates framework-scoped subdirectories under `.aiwg/frameworks/<name>/` - Moves existing flat artifacts into the appropriate scoped location - Updates `.aiwg/frameworks/registry.json` - Leaves a `MIGRATION.md` log at `.aiwg/` root 5. **Safety guarantee**: The backup is created before any file is moved. If migration fails partway through, `aiwg rollback-workspace` can restore from the backup. 6. **Report the result** — show what was moved, backup location, and how to rollback if needed. ## Examples ### Example 1: Dry run first (default approach) **User**: "Migrate my workspace" **Extraction**: Migration requested — dry-run before applying **Action** (step 1): ```bash aiwg migrate-workspace --dry-run ``` **Response**: ``` Workspace Migration Preview ━━━━━━━━━━━━━━━━━━━━━━━━━━━ Would move: .aiwg/requirements/ → .aiwg/frameworks/sdlc-complete/requirements/ .aiwg/architecture/ → .aiwg/frameworks/sdlc-complete/architecture/ .aiwg/testing/ → .aiwg/frameworks/sdlc-complete/testing/ (+ 5 more directories) Would create backup: .aiwg/.backup-20260401-1423/ No files would be deleted. Proceed with migration? [y/N] ``` After user confirms → run `aiwg migrate-workspace --yes`. ### Example 2: Dry run only **User**: "What would the workspace migration do?" **Extraction**: Preview-only, no confirmation needed **Action**: ```bash aiwg migrate-workspace --dry-run ``` **Response**: Shows the planned moves table (as above) and stops. Does not prompt for confirmation. ### Example 3: Already on new layout **User**: "Do I need to migrate my workspace?" **Extraction**: Check whether migration is needed **Action**: ```bash aiwg migrate-workspace --dry-run ``` **Response**: "Your workspace is already on the multi-framework layout. No migration needed." ### Example 4: Migration with confirmation **User**: "Go ahead and migrate the workspace" **Extraction**: User has already seen dry-run output and is confirming **Action**: ```bash aiwg migrate-workspace --yes ``` **Response**: ``` Backup created: .aiwg/.backup-20260401-1423/ Migrating 8 directories... requirements/ moved architecture/ moved testing/ moved (+ 5 more) registry.json updated. Migration complete. To undo: aiwg rollback-workspace ``` ## Clarification Prompts If the user's intent is ambiguous: - "Would you like me to preview the migration first, or go ahead and apply it?" - "Have you already reviewed the dry-run output, or should I run it first?" ## References - @$AIWG_ROOT/src/cli/handlers/workspace.ts — `migrate-workspace` command handler - @$AIWG_ROOT/docs/cli-reference.md — CLI reference - @$AIWG_ROOT/agentic/code/addons/aiwg-utils/skills/rollback-workspace/SKILL.md — Undoing a migration
Related Skills
workspace-reset
Wipe .aiwg/ directory and optionally restart with fresh intake
workspace-realign
Reorganize and update .aiwg/ documentation to reflect current project reality
workspace-prune-working
Clean up .aiwg/working/ by promoting, archiving, or deleting temporary files
workspace-health
Assess workspace alignment and recommend cleanup or realignment actions at key lifecycle transition points
rollback-workspace
Restore the .aiwg/ directory from a migrate-workspace backup, listing available backups when none is specified
migrate-hook
Migrate existing CLAUDE.md full-injection to the AIWG.md hook file architecture
aiwg-orchestrate
Route structured artifact work to AIWG workflows via MCP with zero parent context cost
venv-manager
Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.
pytest-runner
Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.
vitest-runner
Execute JavaScript/TypeScript tests with Vitest, supporting coverage, watch mode, and parallel execution. Use for JS/TS test automation.
eslint-checker
Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.
repo-analyzer
Analyze GitHub repositories for structure, documentation, dependencies, and contribution patterns. Use for codebase understanding and health assessment.