owflow 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +448 -283
- package/dist/agents/bottleneck-analyzer.md +332 -333
- package/dist/agents/code-quality-pragmatist.md +353 -354
- package/dist/agents/code-reviewer.md +238 -239
- package/dist/agents/codebase-analysis-reporter.md +245 -246
- package/dist/agents/docs-operator.md +22 -23
- package/dist/agents/e2e-test-verifier.md +447 -448
- package/dist/agents/gap-analyzer.md +501 -502
- package/dist/agents/implementation-completeness-checker.md +219 -220
- package/dist/agents/implementation-planner.md +308 -309
- package/dist/agents/information-gatherer.md +690 -691
- package/dist/agents/production-readiness-checker.md +278 -279
- package/dist/agents/project-analyzer.md +403 -403
- package/dist/agents/reality-assessor.md +365 -366
- package/dist/agents/research-planner.md +449 -450
- package/dist/agents/research-synthesizer.md +402 -403
- package/dist/agents/solution-brainstormer.md +256 -257
- package/dist/agents/solution-designer.md +371 -372
- package/dist/agents/spec-auditor.md +297 -298
- package/dist/agents/specification-creator.md +333 -334
- package/dist/agents/task-classifier.md +449 -450
- package/dist/agents/task-group-implementer.md +283 -284
- package/dist/agents/test-suite-runner.md +194 -195
- package/dist/agents/user-docs-generator.md +508 -509
- package/dist/commands/reviews-code.md +90 -90
- package/dist/commands/reviews-pragmatic.md +99 -99
- package/dist/commands/reviews-production-readiness.md +113 -113
- package/dist/commands/reviews-reality-check.md +110 -110
- package/dist/commands/reviews-spec-audit.md +114 -114
- package/dist/commands/work.md +280 -280
- package/dist/configuration/agents-config.d.ts +2 -0
- package/dist/configuration/agents-config.js +8 -44
- package/dist/configuration/commands-config.d.ts +23 -0
- package/dist/configuration/commands-config.js +17 -17
- package/dist/configuration/skills-config.d.ts +2 -0
- package/dist/configuration/skills-config.js +3 -3
- package/dist/hooks/hooks-diagnostics.d.ts +3 -0
- package/dist/hooks/hooks-diagnostics.js +21 -0
- package/dist/hooks/hooks-persistence.d.ts +17 -0
- package/dist/hooks/hooks-persistence.js +207 -0
- package/dist/hooks/hooks-registry.d.ts +6 -0
- package/dist/hooks/hooks-registry.js +104 -0
- package/dist/hooks/hooks-wrapper.d.ts +25 -0
- package/dist/hooks/hooks-wrapper.js +318 -0
- package/dist/hooks/internal/before-tool.d.ts +6 -0
- package/dist/hooks/internal/before-tool.js +13 -0
- package/dist/hooks/internal/session-compaction.d.ts +9 -0
- package/dist/hooks/{session-compaction.js → internal/session-compaction.js} +9 -7
- package/dist/hooks/runtime/circuit-breaker.d.ts +23 -0
- package/dist/hooks/runtime/circuit-breaker.js +39 -0
- package/dist/hooks/runtime/failure-policy.d.ts +15 -0
- package/dist/hooks/runtime/failure-policy.js +49 -0
- package/dist/hooks/runtime/process-executor.d.ts +33 -0
- package/dist/hooks/runtime/process-executor.js +147 -0
- package/dist/hooks/runtime/status-recorder.d.ts +27 -0
- package/dist/hooks/runtime/status-recorder.js +111 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +111 -40
- package/dist/skills/agents-md-generator/SKILL.md +223 -223
- package/dist/skills/codebase-analyzer/SKILL.md +162 -162
- package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -63
- package/dist/skills/codebase-analyzer/references/combined.md +31 -31
- package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -63
- package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -51
- package/dist/skills/codebase-analyzer/references/migration-target.md +23 -23
- package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -22
- package/dist/skills/dev-analyze/SKILL.md +115 -115
- package/dist/skills/dev-bugfix/SKILL.md +452 -452
- package/dist/skills/dev-finalize/SKILL.md +118 -118
- package/dist/skills/dev-implement/SKILL.md +167 -167
- package/dist/skills/dev-plan/SKILL.md +147 -147
- package/dist/skills/dev-spec/SKILL.md +182 -182
- package/dist/skills/dev-tdd-red/SKILL.md +94 -94
- package/dist/skills/dev-verify/SKILL.md +153 -153
- package/dist/skills/development/SKILL.md +260 -260
- package/dist/skills/diagrams-mermaid/SKILL.md +183 -159
- package/dist/skills/diagrams-mermaid/references/reference.md +220 -148
- package/dist/skills/docs-manager/SKILL.md +379 -379
- package/dist/skills/docs-manager/docs/INDEX.md +199 -199
- package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -25
- package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -22
- package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -25
- package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -22
- package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -25
- package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -28
- package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -16
- package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -28
- package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -25
- package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -10
- package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -31
- package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -22
- package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -22
- package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -28
- package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -25
- package/dist/skills/docs-manager/references/agents-md-template.md +29 -29
- package/dist/skills/docs-manager/references/index-md-template.md +73 -73
- package/dist/skills/flow-init/SKILL.md +234 -234
- package/dist/skills/flow-init/references/architecture-template.md +45 -45
- package/dist/skills/flow-init/references/roadmap-templates.md +93 -93
- package/dist/skills/flow-init/references/tech-stack-template.md +70 -70
- package/dist/skills/flow-init/references/vision-templates.md +75 -75
- package/dist/skills/goal-development/SKILL.md +96 -96
- package/dist/skills/goal-migration/SKILL.md +114 -114
- package/dist/skills/goal-performance/SKILL.md +126 -126
- package/dist/skills/goal-research/SKILL.md +118 -118
- package/dist/skills/html-renderer/SKILL.md +173 -173
- package/dist/skills/html-renderer/references/index.html +318 -318
- package/dist/skills/html-renderer/references/styles.css +388 -388
- package/dist/skills/html-renderer/references/tokens.json +104 -104
- package/dist/skills/implementation-plan-executor/SKILL.md +378 -378
- package/dist/skills/implementation-verifier/SKILL.md +307 -307
- package/dist/skills/migration/SKILL.md +268 -268
- package/dist/skills/migration-analyze/SKILL.md +126 -126
- package/dist/skills/migration-finalize/SKILL.md +161 -161
- package/dist/skills/migration-fix/SKILL.md +155 -155
- package/dist/skills/migration-implement/SKILL.md +131 -131
- package/dist/skills/migration-plan/SKILL.md +131 -131
- package/dist/skills/migration-spec/SKILL.md +135 -135
- package/dist/skills/migration-spec/references/migration-strategies.md +430 -430
- package/dist/skills/migration-target/SKILL.md +134 -134
- package/dist/skills/migration-target/references/migration-types.md +489 -489
- package/dist/skills/migration-verify/SKILL.md +184 -184
- package/dist/skills/orchestrator-framework/SKILL.md +65 -65
- package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -7
- package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -20
- package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -54
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +27 -27
- package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -65
- package/dist/skills/orchestrator-framework/references/gate-contract.md +122 -122
- package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +51 -51
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +235 -235
- package/dist/skills/performance/SKILL.md +267 -267
- package/dist/skills/performance-analyze/SKILL.md +129 -129
- package/dist/skills/performance-analyze/references/performance-optimization-guide.md +271 -271
- package/dist/skills/performance-finalize/SKILL.md +117 -117
- package/dist/skills/performance-implement/SKILL.md +114 -114
- package/dist/skills/performance-plan/SKILL.md +112 -112
- package/dist/skills/performance-spec/SKILL.md +145 -145
- package/dist/skills/performance-verify/SKILL.md +164 -164
- package/dist/skills/research/SKILL.md +249 -249
- package/dist/skills/research-brainstorm/SKILL.md +120 -120
- package/dist/skills/research-brainstorm/references/brainstorming-techniques.md +84 -84
- package/dist/skills/research-converge/SKILL.md +130 -130
- package/dist/skills/research-design/SKILL.md +146 -146
- package/dist/skills/research-design/references/design-techniques.md +40 -40
- package/dist/skills/research-finalize/SKILL.md +125 -125
- package/dist/skills/research-fork/SKILL.md +190 -190
- package/dist/skills/research-gather/SKILL.md +133 -133
- package/dist/skills/research-plan/SKILL.md +141 -141
- package/dist/skills/research-plan/references/research-methodologies.md +710 -710
- package/dist/skills/research-quick/SKILL.md +139 -139
- package/dist/skills/research-synthesize/SKILL.md +127 -127
- package/dist/skills/rule-reviewer/SKILL.md +334 -334
- package/dist/skills/standards-discover/SKILL.md +260 -260
- package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -76
- package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -68
- package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -67
- package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -65
- package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -75
- package/dist/skills/standards-update/SKILL.md +207 -207
- package/dist/templates/orchestrator-state-base.yml +17 -17
- package/dist/templates/orchestrator-state-development.yml +95 -95
- package/dist/templates/orchestrator-state-migration.yml +95 -95
- package/dist/templates/orchestrator-state-performance.yml +64 -64
- package/dist/templates/orchestrator-state-research.yml +67 -67
- package/dist/tools/fork_task.d.ts +17 -0
- package/dist/tools/fork_task.js +21 -11
- package/dist/tools/verify_template.d.ts +11 -0
- package/dist/tools/verify_template.js +32 -17
- package/dist/tui/hooks-dialogs.d.ts +20 -0
- package/dist/tui/hooks-dialogs.js +181 -0
- package/dist/tui/hooks-presenter.d.ts +15 -0
- package/dist/tui/hooks-presenter.js +70 -0
- package/dist/tui/hooks-sidebar.d.ts +10 -0
- package/dist/tui/hooks-sidebar.js +104 -0
- package/dist/tui/primitives.d.ts +21 -0
- package/dist/tui/primitives.js +47 -0
- package/dist/tui.d.ts +12 -0
- package/dist/tui.js +129 -0
- package/dist/types/hook-types.d.ts +125 -0
- package/dist/types/hook-types.js +76 -0
- package/dist/types/opencode-types.d.ts +13 -0
- package/dist/utils/file-util.d.ts +2 -0
- package/dist/utils/file-util.js +6 -6
- package/dist/utils/fork-task.d.ts +27 -0
- package/dist/utils/fork-task.js +18 -23
- package/dist/utils/plugin-info.d.ts +3 -0
- package/dist/utils/plugin-info.js +8 -10
- package/dist/utils/workflow-paths.d.ts +17 -0
- package/dist/utils/workflow-paths.js +18 -0
- package/dist/utils/yaml-structure.d.ts +7 -0
- package/dist/utils/yaml-structure.js +7 -11
- package/package.json +68 -48
- package/dist/hooks/before-tool.js +0 -19
|
@@ -1,268 +1,268 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:migration
|
|
3
|
-
description: Migration workflow dispatcher. Initializes/resumes migration tasks, derives the next step from state, and hands off to the matching /owflow:migration-* subskill. Handles technology migrations, platform changes, and architecture pattern transitions with adaptive risk assessment, incremental execution, rollback planning, dual-run support, and compatibility verification.
|
|
4
|
-
argument-hint: "[task description | task-path] [--from=<slug>] [--type=TYPE] [--no-web-research]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Migration Dispatcher
|
|
9
|
-
|
|
10
|
-
Entry point for migration tasks in **assisted mode**: initialize (or resume) the task, derive the next pending step from `orchestrator-state.yml`, print the matching subskill command, and STOP. Each `/owflow:migration-*` subskill runs its steps with fresh context — the explicit invocation IS the step gate.
|
|
11
|
-
|
|
12
|
-
Migration state uses descriptive step slugs in `completed_phases` / `failed_phases` / `auto_fix_attempts`: `state-analysed`, `target-planned`, `strategy-specified`, `plan-created`, `migration-executed`, `options-chosen`, `verification-done`, `issues-resolved`, `docs-generated`, `task-completed`. The routing table below maps slugs to subskills.
|
|
13
|
-
|
|
14
|
-
For the all-in-one loop with in-session `question` gates, use `/owflow:goal-migration`.
|
|
15
|
-
|
|
16
|
-
Gates follow the shared contract in the [Gate Contract](../orchestrator-framework/references/gate-contract.md), with the [dispatcher exception](../orchestrator-framework/references/gate-contract.md).
|
|
17
|
-
|
|
18
|
-
## Input / Output Artifacts
|
|
19
|
-
|
|
20
|
-
| Artifact | Behavior |
|
|
21
|
-
| ------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
22
|
-
| Argument (description / task path) | migration description (new task) or task path/identifier (resume); nothing provided → ask |
|
|
23
|
-
| `orchestrator-state.yml` | read on resume — artifact-validated against the marker table below |
|
|
24
|
-
| Task directory + state initialization | written once (Step 3, new task) — `entry_point: "migration"`, flags recorded |
|
|
25
|
-
| Slugs, artifacts, and step bodies | none — every task artifact is produced by the subskills (see [Task Structure](#task-structure)) |
|
|
26
|
-
|
|
27
|
-
The dispatcher writes nothing else — it owns 0 slugs and contains no step bodies.
|
|
28
|
-
|
|
29
|
-
## Entry Gate
|
|
30
|
-
|
|
31
|
-
**BEFORE deriving the handoff, complete these steps:**
|
|
32
|
-
|
|
33
|
-
### Step 1: Load Framework Patterns
|
|
34
|
-
|
|
35
|
-
**Read the framework reference files NOW using the Read tool:**
|
|
36
|
-
|
|
37
|
-
1. The [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md) governs this skill.
|
|
38
|
-
2. The [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) bound what subskills delegate.
|
|
39
|
-
3. The [Orchestrator Patterns](../orchestrator-framework/references/orchestrator-patterns.md) define state schema, initialization, and context passing.
|
|
40
|
-
|
|
41
|
-
### Step 2: Resolve the Argument
|
|
42
|
-
|
|
43
|
-
**If the argument is a task path or identifier** (a directory, or a directory name under `.owflow/tasks/migrations/`) → **resume mode**:
|
|
44
|
-
|
|
45
|
-
1. Read `orchestrator-state.yml`; artifact-validate `completed_phases` against the marker table below — **drop** any slug whose marker is missing, **adopt** any marker whose slug is missing (append the slug, backfill still-null fields it proves were produced).
|
|
46
|
-
2. Find the resume point: the FIRST step slug not in `completed_phases` whose routing-table condition holds. **Compatibility re-verification fallback**: if **no routing-table step applies** and `verification-done` is complete and `verification_context.compatibility_status != passed` (failed or null/invalidated), the resume point is `/owflow:migration-verify <task-path>` (re-verification — the 4 checks re-run and the verdict is settled), overriding slug completeness; a recorded data-integrity HALT keeps the user-confirmed rollback path dominant. `--from=<slug>` overrides, but only after validating that slug's prerequisites (the upstream slug **and** marker artifacts) exist **and** its row's state facts hold (e.g. no Finalize jump while `compatibility_status != passed`) — otherwise use `question`, never a silent jump.
|
|
47
|
-
3. Missing state file → print: `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
48
|
-
|
|
49
|
-
**If the argument is a migration description** (any other free text) → new task.
|
|
50
|
-
|
|
51
|
-
**If nothing is provided** → ask via `question`: "What technology, platform, or architecture should be migrated, and to what?" — capture source and target state, then WAIT. Never guess or auto-pick a task.
|
|
52
|
-
|
|
53
|
-
#### Marker table (artifact-validated resume)
|
|
54
|
-
|
|
55
|
-
| Slug | Marker artifact / state fact |
|
|
56
|
-
| -------------------- | ------------------------------------------------------------ |
|
|
57
|
-
| `state-analysed` | `analysis/current-state-analysis.md` **and** `analysis/clarifications.md` |
|
|
58
|
-
| `target-planned` | `analysis/target-state-plan.md` |
|
|
59
|
-
| `strategy-specified` | `implementation/spec.md` |
|
|
60
|
-
| `plan-created` | `implementation/implementation-plan.md` |
|
|
61
|
-
| `migration-executed` | `implementation/work-log.md` |
|
|
62
|
-
| `options-chosen` | settled `options.*` values (state-resident — no artifact) |
|
|
63
|
-
| `verification-done` | `verification/implementation-verification.md` + `verification/compatibility-test-results.md` **and** non-null `verification_context.compatibility_status` |
|
|
64
|
-
| `issues-resolved` | non-empty `verification_context.fixes_applied` **or** a recorded approval in `verification_context.decisions_made` (state-resident — no artifact) |
|
|
65
|
-
| `docs-generated` | `documentation/migration-guide.md` |
|
|
66
|
-
| `task-completed` | `task.status: completed` (state-resident — no artifact) |
|
|
67
|
-
|
|
68
|
-
A settled options value, a completed fix phase (non-empty `fixes_applied` or a recorded approval/deliberate skip), or a `--from` decision is not re-asked on resume: report the existing decision and route from it.
|
|
69
|
-
|
|
70
|
-
### Step 3: Initialize (new task)
|
|
71
|
-
|
|
72
|
-
1. **Create Task Directory**: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` (3–5 kebab-case words from the description)
|
|
73
|
-
2. **Initialize State**: create `orchestrator-state.yml` from the migration template.
|
|
74
|
-
- `task.title` / `task.description` from the description; `task.status: in_progress`; `task.tags: []`; `task.priority: null` (template defaults)
|
|
75
|
-
- `orchestrator.started_phase: state-analysed`; `orchestrator.entry_point: "migration"`; `orchestrator.task_path`; `orchestrator.created` / `orchestrator.updated`
|
|
76
|
-
- Flags: `--type=code|data|architecture|general` → `migration_context.migration_type` (a **default, not an override** — `migration-target` still confirms on low confidence); `--no-web-research` is a per-subskill flag forwarded to `migration-target` (skips external research; `migration-target` records `external_research.performed: false`) — nothing is persisted for it at init
|
|
77
|
-
- **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-migration.yml`.
|
|
78
|
-
3. **Create Task Items**: use `TaskCreate` for the migration steps (one item per subskill handoff: analyze → target → spec → plan → implement → verify → fix → finalize), then set the execution order with `TaskUpdate addBlockedBy`. Record the ids in `orchestrator.task_ids`. On resume, refresh the already-evidenced items instead of re-creating them.
|
|
79
|
-
4. No project-documentation discovery at this layer — `migration-spec` reads `.owflow/docs/INDEX.md` when it gathers requirements (nothing is persisted to a `project_context` key).
|
|
80
|
-
|
|
81
|
-
**Output**:
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
🚀 Migration Dispatcher
|
|
85
|
-
|
|
86
|
-
Task: [migration description]
|
|
87
|
-
Directory: [task-path]
|
|
88
|
-
Next step: [step name]
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## When to Use
|
|
94
|
-
|
|
95
|
-
Use when:
|
|
96
|
-
|
|
97
|
-
- Migrating from one framework/library to another (e.g., Vue 2 → Vue 3, Express → Fastify)
|
|
98
|
-
- Changing database platforms (e.g., MySQL → PostgreSQL, MongoDB → DynamoDB)
|
|
99
|
-
- Refactoring architecture patterns (e.g., REST → GraphQL, Monolith → Microservices)
|
|
100
|
-
- Upgrading major versions with breaking changes
|
|
101
|
-
|
|
102
|
-
**DO NOT use for**: New features, bug fixes, pure refactoring without technology change.
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Core Principles
|
|
107
|
-
|
|
108
|
-
1. **Analyze Before Migrating**: Understand current system before planning target state
|
|
109
|
-
2. **Risk Assessment**: Classify migration type (code/data/architecture) and assess complexity
|
|
110
|
-
3. **Incremental Execution**: Support phased migration with rollback points
|
|
111
|
-
4. **Rollback Planning**: Document undo procedures for each migration phase
|
|
112
|
-
5. **Dual-Run Support**: Enable running old and new systems in parallel during transition
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Migration Types
|
|
117
|
-
|
|
118
|
-
| Type | Keywords | Strategy | Risk Focus |
|
|
119
|
-
| ---------------- | ------------------------------------ | ------------------------ | --------------------------------- |
|
|
120
|
-
| **Code** | framework, library, upgrade | Incremental or phased | Breaking changes, API differences |
|
|
121
|
-
| **Data** | database, schema, data migration | Dual-run (zero downtime) | Data integrity, checksums |
|
|
122
|
-
| **Architecture** | REST→GraphQL, monolith→microservices | Dual-run or phased | Compatibility, rollback |
|
|
123
|
-
|
|
124
|
-
The type-detection algorithm (with confidence scoring), per-type adaptations, and the external-research requirement table live in `migration-target/references/migration-types.md` — read there, not here.
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Routing Table (completed_phases → next subskill)
|
|
129
|
-
|
|
130
|
-
Derive the FIRST step slug not in `completed_phases` whose condition holds, then print the matching command:
|
|
131
|
-
|
|
132
|
-
| Next step (slugs) | Condition (from state) | Handoff command | Produces |
|
|
133
|
-
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
134
|
-
| Analyze (`state-analysed`) | Always (new task or partial foundation) | `/owflow:migration-analyze <task-path>` | `analysis/current-state-analysis.md`, `analysis/clarifications.md` |
|
|
135
|
-
| Target (`target-planned`) | `state-analysed` completed | `/owflow:migration-target <task-path>` | `analysis/target-state-plan.md` (type/strategy locked by the risk gate) |
|
|
136
|
-
| Spec (`strategy-specified`) | `target-planned` completed | `/owflow:migration-spec <task-path>` | `analysis/requirements.md`, `implementation/spec.md`, `analysis/rollback-plan.md` (+ `analysis/dual-run-plan.md` when dual-run applies) |
|
|
137
|
-
| Plan (`plan-created`) | `strategy-specified` completed | `/owflow:migration-plan <task-path>` | `implementation/implementation-plan.md` with per-group rollback/checkpoint steps |
|
|
138
|
-
| Implement (`migration-executed`) | `plan-created` completed | `/owflow:migration-implement <task-path>` | implemented migration changes, `implementation/work-log.md` |
|
|
139
|
-
| Verify (`options-chosen`, `verification-done`) | `migration-executed` completed | `/owflow:migration-verify <task-path>` | `verification/implementation-verification.md`, `verification/compatibility-test-results.md` |
|
|
140
|
-
| Fix (`issues-resolved`) | `verification-done` completed **and** (`verification_context.compatibility_status = failed` **or** (`verification_context.last_status != passed` **and** no recorded deliberate skip)) | `/owflow:migration-fix <task-path>` | fixes + updated `verification/implementation-verification.md`; data-integrity HALT stays with the user |
|
|
141
|
-
| Finalize (`docs-generated`, `task-completed`) | `verification-done` completed **and** `verification_context.compatibility_status = passed` **and** the fix phase is settled (`issues-resolved` present, or `last_status = passed`, or a recorded deliberate skip) | `/owflow:migration-finalize <task-path>` | `documentation/migration-guide.md` (when `options.docs_enabled` is true), `task.status: completed` |
|
|
142
|
-
|
|
143
|
-
Notes:
|
|
144
|
-
|
|
145
|
-
- Each row's condition is re-read from state, never inferred: the Fix row activates on a failed compatibility check unconditionally, or on verifier issues without a recorded deliberate skip; the Finalize row requires `compatibility_status = passed` **and** a settled fix phase — a failed compatibility check is never waived by a skip or approval, so `task-completed` cannot be reached over one.
|
|
146
|
-
- **Compatibility re-verification fallback**: when no routing-table row applies **and** `verification-done` ∈ `completed_phases` **and** `compatibility_status != passed`, hand off to `/owflow:migration-verify <task-path>` (the re-verification re-runs the 4 checks and settles the verdict). The Fix row stays primary whenever its condition holds — an ordinary pre-fix failure routes to `/owflow:migration-fix`, never to a redundant check re-run; a recorded data-integrity HALT keeps the user-confirmed rollback path dominant.
|
|
147
|
-
- `task-completed` already in `completed_phases` → the task is TERMINAL: no handoff.
|
|
148
|
-
- Slugs that are already in `completed_phases` but whose marker artifact is missing are dropped during Step 2 — never trust a bare slug.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Exit Gate (adapted for dispatch mode)
|
|
153
|
-
|
|
154
|
-
After deriving the handoff, present the results box, ask how to proceed, then hand off accordingly (see the [dispatcher exception](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the subskill.
|
|
155
|
-
|
|
156
|
-
### Results box
|
|
157
|
-
|
|
158
|
-
```markdown
|
|
159
|
-
## ✅ MIGRATION TASK READY — <task name>
|
|
160
|
-
|
|
161
|
-
**Task** — [migration description]
|
|
162
|
-
**Directory** — `<task-path>`
|
|
163
|
-
**Next step** — [step name]
|
|
164
|
-
[Resume note: completed steps / fresh task]
|
|
165
|
-
|
|
166
|
-
**Next ▸** `/owflow:migration-<subskill> <task-path>`
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
For a terminal task (`task-completed` recorded), the results box reports the workflow as complete and carries no **Next ▸** handoff line.
|
|
170
|
-
|
|
171
|
-
### Acceptance question
|
|
172
|
-
|
|
173
|
-
Use `question` — "Task ready. How would you like to proceed?" with options:
|
|
174
|
-
|
|
175
|
-
- **Hand off to /owflow:migration-<subskill>** — the user invokes the suggested command (the dispatcher copies it to chat for convenience). Execution starts in a fresh context.
|
|
176
|
-
- **Switch to autonomous mode** — illustrate with `/owflow:goal-migration <task-path>` to run remaining steps in one session with gates.
|
|
177
|
-
- **Adjust** — task set-up is wrong (wrong flags, wrong description, wrong task); re-run the affected initialization step, re-present the results box.
|
|
178
|
-
- **Stop here** — print the resume command (`/owflow:migration <task-path>`) and end.
|
|
179
|
-
|
|
180
|
-
For a terminal task, omit the first option (there is nothing to hand off) and report the completed workflow.
|
|
181
|
-
|
|
182
|
-
### Handoff message
|
|
183
|
-
|
|
184
|
-
On Accept (hand off choice), print, then STOP:
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
✓ Migration task ready at <task-path>
|
|
188
|
-
|
|
189
|
-
Next step:
|
|
190
|
-
→ /owflow:migration-<subskill> <task-path>
|
|
191
|
-
|
|
192
|
-
Other options:
|
|
193
|
-
/owflow:goal-migration <task-path> — run remaining steps in one loop
|
|
194
|
-
/owflow:migration --from=<slug> <task-path> — jump to a specific step
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
## Task Structure
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
.owflow/tasks/migrations/YYYY-MM-DD-migration-name/
|
|
203
|
-
├── orchestrator-state.yml
|
|
204
|
-
├── analysis/
|
|
205
|
-
│ ├── current-state-analysis.md # migration-analyze
|
|
206
|
-
│ ├── clarifications.md # migration-analyze
|
|
207
|
-
│ ├── target-state-plan.md # migration-target
|
|
208
|
-
│ ├── requirements.md # migration-spec
|
|
209
|
-
│ ├── rollback-plan.md # migration-spec
|
|
210
|
-
│ └── dual-run-plan.md # migration-spec (if dual-run)
|
|
211
|
-
├── implementation/
|
|
212
|
-
│ ├── spec.md # migration-spec
|
|
213
|
-
│ ├── implementation-plan.md # migration-plan
|
|
214
|
-
│ └── work-log.md # migration-implement
|
|
215
|
-
├── verification/
|
|
216
|
-
│ ├── implementation-verification.md # migration-verify
|
|
217
|
-
│ └── compatibility-test-results.md # migration-verify
|
|
218
|
-
└── documentation/
|
|
219
|
-
└── migration-guide.md # migration-finalize (optional)
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Domain Context (State Extensions)
|
|
225
|
-
|
|
226
|
-
Migration-specific fields in `orchestrator-state.yml`: refer to the template [src/templates/orchestrator-state-migration.yml](../../templates/orchestrator-state-migration.yml).
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## Auto-Recovery
|
|
231
|
-
|
|
232
|
-
Retries are owned by each subskill (max attempts per step):
|
|
233
|
-
|
|
234
|
-
| Subskill | Max Attempts | Strategy |
|
|
235
|
-
| ------------------- | ------------ | --------------------------------------------------------------------------------- |
|
|
236
|
-
| migration-analyze | 2 | Expand search patterns, prompt the user for file paths |
|
|
237
|
-
| migration-target | 2 | Re-prompt for target details |
|
|
238
|
-
| migration-spec | 2 | Re-gather requirements, re-invoke spec-creator, regenerate rollback plan |
|
|
239
|
-
| migration-plan | 2 | Regenerate with migration constraints |
|
|
240
|
-
| migration-implement | 5 | Fix syntax errors, prompt user on repeated failure |
|
|
241
|
-
| migration-verify | 3 | Fix-then-reverify. **HALT on data integrity issues** |
|
|
242
|
-
| migration-fix | 3 iterations | Contract, not a retry counter; data-integrity HALT is never auto-fixed |
|
|
243
|
-
| migration-finalize | 1 | Generate the operator guide text-only; state-only completion |
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Command Flags
|
|
248
|
-
|
|
249
|
-
Flags are restated here because `argument-hint` is not registered in the command object.
|
|
250
|
-
|
|
251
|
-
| Flag | Effect |
|
|
252
|
-
| --------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
253
|
-
| `--from=<slug>` | Hand off (resume mode) from a specific step slug; prerequisites are validated, otherwise `question` |
|
|
254
|
-
| `--type=code\|data\|architecture\|general` | Default classification → `migration_context.migration_type` (not an override — low confidence still confirms) |
|
|
255
|
-
| `--no-web-research` | Forwarded to `migration-target`: skips external research and records `external_research.performed: false` (no state key is written at init — the flag is per-invocation) |
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Command Integration
|
|
260
|
-
|
|
261
|
-
Invoked via:
|
|
262
|
-
|
|
263
|
-
- `/owflow:migration [description] [--type=TYPE] [--no-web-research]` (new)
|
|
264
|
-
- `/owflow:migration [task-path] [--from=<slug>]` (resume)
|
|
265
|
-
|
|
266
|
-
Alternative: `/owflow:goal-migration` — same task lifecycle, all subskills invoked in one session with `question` gates.
|
|
267
|
-
|
|
268
|
-
Task directory: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`
|
|
1
|
+
---
|
|
2
|
+
name: owflow:migration
|
|
3
|
+
description: Migration workflow dispatcher. Initializes/resumes migration tasks, derives the next step from state, and hands off to the matching /owflow:migration-* subskill. Handles technology migrations, platform changes, and architecture pattern transitions with adaptive risk assessment, incremental execution, rollback planning, dual-run support, and compatibility verification.
|
|
4
|
+
argument-hint: "[task description | task-path] [--from=<slug>] [--type=TYPE] [--no-web-research]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Migration Dispatcher
|
|
9
|
+
|
|
10
|
+
Entry point for migration tasks in **assisted mode**: initialize (or resume) the task, derive the next pending step from `orchestrator-state.yml`, print the matching subskill command, and STOP. Each `/owflow:migration-*` subskill runs its steps with fresh context — the explicit invocation IS the step gate.
|
|
11
|
+
|
|
12
|
+
Migration state uses descriptive step slugs in `completed_phases` / `failed_phases` / `auto_fix_attempts`: `state-analysed`, `target-planned`, `strategy-specified`, `plan-created`, `migration-executed`, `options-chosen`, `verification-done`, `issues-resolved`, `docs-generated`, `task-completed`. The routing table below maps slugs to subskills.
|
|
13
|
+
|
|
14
|
+
For the all-in-one loop with in-session `question` gates, use `/owflow:goal-migration`.
|
|
15
|
+
|
|
16
|
+
Gates follow the shared contract in the [Gate Contract](../orchestrator-framework/references/gate-contract.md), with the [dispatcher exception](../orchestrator-framework/references/gate-contract.md).
|
|
17
|
+
|
|
18
|
+
## Input / Output Artifacts
|
|
19
|
+
|
|
20
|
+
| Artifact | Behavior |
|
|
21
|
+
| ------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
22
|
+
| Argument (description / task path) | migration description (new task) or task path/identifier (resume); nothing provided → ask |
|
|
23
|
+
| `orchestrator-state.yml` | read on resume — artifact-validated against the marker table below |
|
|
24
|
+
| Task directory + state initialization | written once (Step 3, new task) — `entry_point: "migration"`, flags recorded |
|
|
25
|
+
| Slugs, artifacts, and step bodies | none — every task artifact is produced by the subskills (see [Task Structure](#task-structure)) |
|
|
26
|
+
|
|
27
|
+
The dispatcher writes nothing else — it owns 0 slugs and contains no step bodies.
|
|
28
|
+
|
|
29
|
+
## Entry Gate
|
|
30
|
+
|
|
31
|
+
**BEFORE deriving the handoff, complete these steps:**
|
|
32
|
+
|
|
33
|
+
### Step 1: Load Framework Patterns
|
|
34
|
+
|
|
35
|
+
**Read the framework reference files NOW using the Read tool:**
|
|
36
|
+
|
|
37
|
+
1. The [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md) governs this skill.
|
|
38
|
+
2. The [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) bound what subskills delegate.
|
|
39
|
+
3. The [Orchestrator Patterns](../orchestrator-framework/references/orchestrator-patterns.md) define state schema, initialization, and context passing.
|
|
40
|
+
|
|
41
|
+
### Step 2: Resolve the Argument
|
|
42
|
+
|
|
43
|
+
**If the argument is a task path or identifier** (a directory, or a directory name under `.owflow/tasks/migrations/`) → **resume mode**:
|
|
44
|
+
|
|
45
|
+
1. Read `orchestrator-state.yml`; artifact-validate `completed_phases` against the marker table below — **drop** any slug whose marker is missing, **adopt** any marker whose slug is missing (append the slug, backfill still-null fields it proves were produced).
|
|
46
|
+
2. Find the resume point: the FIRST step slug not in `completed_phases` whose routing-table condition holds. **Compatibility re-verification fallback**: if **no routing-table step applies** and `verification-done` is complete and `verification_context.compatibility_status != passed` (failed or null/invalidated), the resume point is `/owflow:migration-verify <task-path>` (re-verification — the 4 checks re-run and the verdict is settled), overriding slug completeness; a recorded data-integrity HALT keeps the user-confirmed rollback path dominant. `--from=<slug>` overrides, but only after validating that slug's prerequisites (the upstream slug **and** marker artifacts) exist **and** its row's state facts hold (e.g. no Finalize jump while `compatibility_status != passed`) — otherwise use `question`, never a silent jump.
|
|
47
|
+
3. Missing state file → print: `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
48
|
+
|
|
49
|
+
**If the argument is a migration description** (any other free text) → new task.
|
|
50
|
+
|
|
51
|
+
**If nothing is provided** → ask via `question`: "What technology, platform, or architecture should be migrated, and to what?" — capture source and target state, then WAIT. Never guess or auto-pick a task.
|
|
52
|
+
|
|
53
|
+
#### Marker table (artifact-validated resume)
|
|
54
|
+
|
|
55
|
+
| Slug | Marker artifact / state fact |
|
|
56
|
+
| -------------------- | ------------------------------------------------------------ |
|
|
57
|
+
| `state-analysed` | `analysis/current-state-analysis.md` **and** `analysis/clarifications.md` |
|
|
58
|
+
| `target-planned` | `analysis/target-state-plan.md` |
|
|
59
|
+
| `strategy-specified` | `implementation/spec.md` |
|
|
60
|
+
| `plan-created` | `implementation/implementation-plan.md` |
|
|
61
|
+
| `migration-executed` | `implementation/work-log.md` |
|
|
62
|
+
| `options-chosen` | settled `options.*` values (state-resident — no artifact) |
|
|
63
|
+
| `verification-done` | `verification/implementation-verification.md` + `verification/compatibility-test-results.md` **and** non-null `verification_context.compatibility_status` |
|
|
64
|
+
| `issues-resolved` | non-empty `verification_context.fixes_applied` **or** a recorded approval in `verification_context.decisions_made` (state-resident — no artifact) |
|
|
65
|
+
| `docs-generated` | `documentation/migration-guide.md` |
|
|
66
|
+
| `task-completed` | `task.status: completed` (state-resident — no artifact) |
|
|
67
|
+
|
|
68
|
+
A settled options value, a completed fix phase (non-empty `fixes_applied` or a recorded approval/deliberate skip), or a `--from` decision is not re-asked on resume: report the existing decision and route from it.
|
|
69
|
+
|
|
70
|
+
### Step 3: Initialize (new task)
|
|
71
|
+
|
|
72
|
+
1. **Create Task Directory**: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` (3–5 kebab-case words from the description)
|
|
73
|
+
2. **Initialize State**: create `orchestrator-state.yml` from the migration template.
|
|
74
|
+
- `task.title` / `task.description` from the description; `task.status: in_progress`; `task.tags: []`; `task.priority: null` (template defaults)
|
|
75
|
+
- `orchestrator.started_phase: state-analysed`; `orchestrator.entry_point: "migration"`; `orchestrator.task_path`; `orchestrator.created` / `orchestrator.updated`
|
|
76
|
+
- Flags: `--type=code|data|architecture|general` → `migration_context.migration_type` (a **default, not an override** — `migration-target` still confirms on low confidence); `--no-web-research` is a per-subskill flag forwarded to `migration-target` (skips external research; `migration-target` records `external_research.performed: false`) — nothing is persisted for it at init
|
|
77
|
+
- **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-migration.yml`.
|
|
78
|
+
3. **Create Task Items**: use `TaskCreate` for the migration steps (one item per subskill handoff: analyze → target → spec → plan → implement → verify → fix → finalize), then set the execution order with `TaskUpdate addBlockedBy`. Record the ids in `orchestrator.task_ids`. On resume, refresh the already-evidenced items instead of re-creating them.
|
|
79
|
+
4. No project-documentation discovery at this layer — `migration-spec` reads `.owflow/docs/INDEX.md` when it gathers requirements (nothing is persisted to a `project_context` key).
|
|
80
|
+
|
|
81
|
+
**Output**:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
🚀 Migration Dispatcher
|
|
85
|
+
|
|
86
|
+
Task: [migration description]
|
|
87
|
+
Directory: [task-path]
|
|
88
|
+
Next step: [step name]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## When to Use
|
|
94
|
+
|
|
95
|
+
Use when:
|
|
96
|
+
|
|
97
|
+
- Migrating from one framework/library to another (e.g., Vue 2 → Vue 3, Express → Fastify)
|
|
98
|
+
- Changing database platforms (e.g., MySQL → PostgreSQL, MongoDB → DynamoDB)
|
|
99
|
+
- Refactoring architecture patterns (e.g., REST → GraphQL, Monolith → Microservices)
|
|
100
|
+
- Upgrading major versions with breaking changes
|
|
101
|
+
|
|
102
|
+
**DO NOT use for**: New features, bug fixes, pure refactoring without technology change.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Core Principles
|
|
107
|
+
|
|
108
|
+
1. **Analyze Before Migrating**: Understand current system before planning target state
|
|
109
|
+
2. **Risk Assessment**: Classify migration type (code/data/architecture) and assess complexity
|
|
110
|
+
3. **Incremental Execution**: Support phased migration with rollback points
|
|
111
|
+
4. **Rollback Planning**: Document undo procedures for each migration phase
|
|
112
|
+
5. **Dual-Run Support**: Enable running old and new systems in parallel during transition
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Migration Types
|
|
117
|
+
|
|
118
|
+
| Type | Keywords | Strategy | Risk Focus |
|
|
119
|
+
| ---------------- | ------------------------------------ | ------------------------ | --------------------------------- |
|
|
120
|
+
| **Code** | framework, library, upgrade | Incremental or phased | Breaking changes, API differences |
|
|
121
|
+
| **Data** | database, schema, data migration | Dual-run (zero downtime) | Data integrity, checksums |
|
|
122
|
+
| **Architecture** | REST→GraphQL, monolith→microservices | Dual-run or phased | Compatibility, rollback |
|
|
123
|
+
|
|
124
|
+
The type-detection algorithm (with confidence scoring), per-type adaptations, and the external-research requirement table live in `migration-target/references/migration-types.md` — read there, not here.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Routing Table (completed_phases → next subskill)
|
|
129
|
+
|
|
130
|
+
Derive the FIRST step slug not in `completed_phases` whose condition holds, then print the matching command:
|
|
131
|
+
|
|
132
|
+
| Next step (slugs) | Condition (from state) | Handoff command | Produces |
|
|
133
|
+
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
134
|
+
| Analyze (`state-analysed`) | Always (new task or partial foundation) | `/owflow:migration-analyze <task-path>` | `analysis/current-state-analysis.md`, `analysis/clarifications.md` |
|
|
135
|
+
| Target (`target-planned`) | `state-analysed` completed | `/owflow:migration-target <task-path>` | `analysis/target-state-plan.md` (type/strategy locked by the risk gate) |
|
|
136
|
+
| Spec (`strategy-specified`) | `target-planned` completed | `/owflow:migration-spec <task-path>` | `analysis/requirements.md`, `implementation/spec.md`, `analysis/rollback-plan.md` (+ `analysis/dual-run-plan.md` when dual-run applies) |
|
|
137
|
+
| Plan (`plan-created`) | `strategy-specified` completed | `/owflow:migration-plan <task-path>` | `implementation/implementation-plan.md` with per-group rollback/checkpoint steps |
|
|
138
|
+
| Implement (`migration-executed`) | `plan-created` completed | `/owflow:migration-implement <task-path>` | implemented migration changes, `implementation/work-log.md` |
|
|
139
|
+
| Verify (`options-chosen`, `verification-done`) | `migration-executed` completed | `/owflow:migration-verify <task-path>` | `verification/implementation-verification.md`, `verification/compatibility-test-results.md` |
|
|
140
|
+
| Fix (`issues-resolved`) | `verification-done` completed **and** (`verification_context.compatibility_status = failed` **or** (`verification_context.last_status != passed` **and** no recorded deliberate skip)) | `/owflow:migration-fix <task-path>` | fixes + updated `verification/implementation-verification.md`; data-integrity HALT stays with the user |
|
|
141
|
+
| Finalize (`docs-generated`, `task-completed`) | `verification-done` completed **and** `verification_context.compatibility_status = passed` **and** the fix phase is settled (`issues-resolved` present, or `last_status = passed`, or a recorded deliberate skip) | `/owflow:migration-finalize <task-path>` | `documentation/migration-guide.md` (when `options.docs_enabled` is true), `task.status: completed` |
|
|
142
|
+
|
|
143
|
+
Notes:
|
|
144
|
+
|
|
145
|
+
- Each row's condition is re-read from state, never inferred: the Fix row activates on a failed compatibility check unconditionally, or on verifier issues without a recorded deliberate skip; the Finalize row requires `compatibility_status = passed` **and** a settled fix phase — a failed compatibility check is never waived by a skip or approval, so `task-completed` cannot be reached over one.
|
|
146
|
+
- **Compatibility re-verification fallback**: when no routing-table row applies **and** `verification-done` ∈ `completed_phases` **and** `compatibility_status != passed`, hand off to `/owflow:migration-verify <task-path>` (the re-verification re-runs the 4 checks and settles the verdict). The Fix row stays primary whenever its condition holds — an ordinary pre-fix failure routes to `/owflow:migration-fix`, never to a redundant check re-run; a recorded data-integrity HALT keeps the user-confirmed rollback path dominant.
|
|
147
|
+
- `task-completed` already in `completed_phases` → the task is TERMINAL: no handoff.
|
|
148
|
+
- Slugs that are already in `completed_phases` but whose marker artifact is missing are dropped during Step 2 — never trust a bare slug.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Exit Gate (adapted for dispatch mode)
|
|
153
|
+
|
|
154
|
+
After deriving the handoff, present the results box, ask how to proceed, then hand off accordingly (see the [dispatcher exception](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the subskill.
|
|
155
|
+
|
|
156
|
+
### Results box
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
## ✅ MIGRATION TASK READY — <task name>
|
|
160
|
+
|
|
161
|
+
**Task** — [migration description]
|
|
162
|
+
**Directory** — `<task-path>`
|
|
163
|
+
**Next step** — [step name]
|
|
164
|
+
[Resume note: completed steps / fresh task]
|
|
165
|
+
|
|
166
|
+
**Next ▸** `/owflow:migration-<subskill> <task-path>`
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
For a terminal task (`task-completed` recorded), the results box reports the workflow as complete and carries no **Next ▸** handoff line.
|
|
170
|
+
|
|
171
|
+
### Acceptance question
|
|
172
|
+
|
|
173
|
+
Use `question` — "Task ready. How would you like to proceed?" with options:
|
|
174
|
+
|
|
175
|
+
- **Hand off to /owflow:migration-<subskill>** — the user invokes the suggested command (the dispatcher copies it to chat for convenience). Execution starts in a fresh context.
|
|
176
|
+
- **Switch to autonomous mode** — illustrate with `/owflow:goal-migration <task-path>` to run remaining steps in one session with gates.
|
|
177
|
+
- **Adjust** — task set-up is wrong (wrong flags, wrong description, wrong task); re-run the affected initialization step, re-present the results box.
|
|
178
|
+
- **Stop here** — print the resume command (`/owflow:migration <task-path>`) and end.
|
|
179
|
+
|
|
180
|
+
For a terminal task, omit the first option (there is nothing to hand off) and report the completed workflow.
|
|
181
|
+
|
|
182
|
+
### Handoff message
|
|
183
|
+
|
|
184
|
+
On Accept (hand off choice), print, then STOP:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
✓ Migration task ready at <task-path>
|
|
188
|
+
|
|
189
|
+
Next step:
|
|
190
|
+
→ /owflow:migration-<subskill> <task-path>
|
|
191
|
+
|
|
192
|
+
Other options:
|
|
193
|
+
/owflow:goal-migration <task-path> — run remaining steps in one loop
|
|
194
|
+
/owflow:migration --from=<slug> <task-path> — jump to a specific step
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Task Structure
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
.owflow/tasks/migrations/YYYY-MM-DD-migration-name/
|
|
203
|
+
├── orchestrator-state.yml
|
|
204
|
+
├── analysis/
|
|
205
|
+
│ ├── current-state-analysis.md # migration-analyze
|
|
206
|
+
│ ├── clarifications.md # migration-analyze
|
|
207
|
+
│ ├── target-state-plan.md # migration-target
|
|
208
|
+
│ ├── requirements.md # migration-spec
|
|
209
|
+
│ ├── rollback-plan.md # migration-spec
|
|
210
|
+
│ └── dual-run-plan.md # migration-spec (if dual-run)
|
|
211
|
+
├── implementation/
|
|
212
|
+
│ ├── spec.md # migration-spec
|
|
213
|
+
│ ├── implementation-plan.md # migration-plan
|
|
214
|
+
│ └── work-log.md # migration-implement
|
|
215
|
+
├── verification/
|
|
216
|
+
│ ├── implementation-verification.md # migration-verify
|
|
217
|
+
│ └── compatibility-test-results.md # migration-verify
|
|
218
|
+
└── documentation/
|
|
219
|
+
└── migration-guide.md # migration-finalize (optional)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Domain Context (State Extensions)
|
|
225
|
+
|
|
226
|
+
Migration-specific fields in `orchestrator-state.yml`: refer to the template [src/templates/orchestrator-state-migration.yml](../../templates/orchestrator-state-migration.yml).
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Auto-Recovery
|
|
231
|
+
|
|
232
|
+
Retries are owned by each subskill (max attempts per step):
|
|
233
|
+
|
|
234
|
+
| Subskill | Max Attempts | Strategy |
|
|
235
|
+
| ------------------- | ------------ | --------------------------------------------------------------------------------- |
|
|
236
|
+
| migration-analyze | 2 | Expand search patterns, prompt the user for file paths |
|
|
237
|
+
| migration-target | 2 | Re-prompt for target details |
|
|
238
|
+
| migration-spec | 2 | Re-gather requirements, re-invoke spec-creator, regenerate rollback plan |
|
|
239
|
+
| migration-plan | 2 | Regenerate with migration constraints |
|
|
240
|
+
| migration-implement | 5 | Fix syntax errors, prompt user on repeated failure |
|
|
241
|
+
| migration-verify | 3 | Fix-then-reverify. **HALT on data integrity issues** |
|
|
242
|
+
| migration-fix | 3 iterations | Contract, not a retry counter; data-integrity HALT is never auto-fixed |
|
|
243
|
+
| migration-finalize | 1 | Generate the operator guide text-only; state-only completion |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Command Flags
|
|
248
|
+
|
|
249
|
+
Flags are restated here because `argument-hint` is not registered in the command object.
|
|
250
|
+
|
|
251
|
+
| Flag | Effect |
|
|
252
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
253
|
+
| `--from=<slug>` | Hand off (resume mode) from a specific step slug; prerequisites are validated, otherwise `question` |
|
|
254
|
+
| `--type=code\|data\|architecture\|general` | Default classification → `migration_context.migration_type` (not an override — low confidence still confirms) |
|
|
255
|
+
| `--no-web-research` | Forwarded to `migration-target`: skips external research and records `external_research.performed: false` (no state key is written at init — the flag is per-invocation) |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Command Integration
|
|
260
|
+
|
|
261
|
+
Invoked via:
|
|
262
|
+
|
|
263
|
+
- `/owflow:migration [description] [--type=TYPE] [--no-web-research]` (new)
|
|
264
|
+
- `/owflow:migration [task-path] [--from=<slug>]` (resume)
|
|
265
|
+
|
|
266
|
+
Alternative: `/owflow:goal-migration` — same task lifecycle, all subskills invoked in one session with `question` gates.
|
|
267
|
+
|
|
268
|
+
Task directory: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`
|