From haiku
Migrates legacy AI-DLC intent directories to H·AI·K·U format: transforms frontmatter (passes→stages), maps units, creates backups/symlinks/gap analysis. For upgrading intent projects.
npx claudepluginhub gigsmart/haiku-method --plugin haikuThis skill is limited to using the following tools:
`haiku:migrate` - Migrate legacy AI-DLC intents to H·AI·K·U format.
Starts new H·AI·K·U intents via /haiku:new with studio detection, workspace init, git repo checks, and --template support for parameter-substituted unit creation.
Migrates existing projects to AgenticDev structure using AI analysis to discover, categorize docs, generate frontmatter, update links, and preserve git history. For brownfield projects with ad-hoc documentation.
Migrates AI-DLC environment from v1 to v2, running preflight verification (uncommitted changes, v1 detection), data migration, and post-migration checks. Triggers on 'start migrate', 'aidlc migrate', 'マイグレーション'.
Share bugs, ideas, or general feedback.
haiku:migrate - Migrate legacy AI-DLC intents to H·AI·K·U format.
/haiku:migrate [intent-slug]
User-facing command - Detects legacy .ai-dlc/{slug}/ intent directories and migrates them to .haiku/intents/{slug}/ with frontmatter transformation, unit-to-stage mapping, gap analysis, and optional gap-stage planning.
What it does:
.ai-dlc/{slug}/ to .haiku/intents/{slug}/pass: fieldMIGRATION-PLAN.md gap analysisScan .ai-dlc/ for directories containing intent.md with status: active:
# No shell lib needed — git provides the project root
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
Find all .ai-dlc/*/intent.md files where:
status: activeIf none found, report "No legacy intents to migrate" and exit.
Present the list of detected intents to the user.
.ai-dlc/{slug}/intent.md.For each selected intent, run the migration via the haiku binary:
# Migration is now handled by the haiku binary
# Run: haiku migrate "$slug"
haiku migrate "$slug"
This function:
.haiku/intents/{slug}/ with knowledge/, stages/, state/ subdirectoriesintent.md with transformed frontmatter:
passes: and workflow: fieldsactive_pass: → active_stage: (design→design, product→product, dev/backend/frontend→development)studio: software, mode: continuous, migrated_from:, migration_date:unit-*.md to stages/{inferred-stage}/units/ based on its pass: fieldstages/{stage}/state.json with initial execution state.ai-dlc/{slug}.pre-haiku-backup.ai-dlc/{slug} → .haiku/intents/{slug}Report what was moved and the pass→stage mapping decisions.
The software studio has 6 stages: inception, design, product, development, operations, security.
For the migrated intent, analyze which stages have units and which are gaps:
MIGRATION-PLAN.md to .haiku/intents/{slug}/knowledge/:---
type: migration-plan
migration_date: {runtime date via $(date +%Y-%m-%d)}
source: .ai-dlc/{slug}/
---
# Migration Plan: {slug}
## Migrated Stages
{List stages with unit counts}
## Gap Stages
{List stages with no units and brief description of what they typically cover}
## Recommendations
{Brief guidance on whether gap stages need attention based on the intent's scope}
Ask the user whether to plan gap stages now using AskUserQuestion:
Gap stages detected: {list} Would you like to plan these stages now? This runs the plan phase only (no build).
- Yes - plan gap stages
- No - skip for now (you can run /haiku:resume later)
If yes:
haiku_run_next MCP tool to run the plan phase for the stage, parameterized by the migrated intent contextIf no, skip to summary.
Report the migration results:
Migration complete: {slug}
Location: .haiku/intents/{slug}/
Studio: software | Mode: continuous
Stages:
- inception: {N units | planned | gap}
- design: {N units | planned | gap}
- product: {N units | planned | gap}
- development: {N units | planned | gap}
- operations: {N units | planned | gap}
- security: {N units | planned | gap}
Backup: .ai-dlc/{slug}.pre-haiku-backup
Symlink: .ai-dlc/{slug} → .haiku/intents/{slug}
Next: /haiku:resume {slug}
| Scenario | Behavior |
|---|---|
| No legacy intents found | "No legacy intents to migrate." Exit. |
| Slug not found | "No legacy intent found at .ai-dlc/{slug}/" Error. |
| Already migrated (symlink) | Skip with notice |
| New dir already exists | Skip with notice (idempotent) |
| haiku binary not available | Error: "haiku binary required for frontmatter migration" |
| No active intents | "No active legacy intents found." Exit. |