owflow 0.4.2 → 0.5.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/README.md +6 -2
- package/dist/agents/implementation-planner.md +1 -1
- package/dist/agents/information-gatherer.md +691 -691
- package/dist/agents/research-planner.md +450 -450
- package/dist/agents/research-synthesizer.md +403 -403
- package/dist/agents/solution-brainstormer.md +257 -257
- package/dist/agents/solution-designer.md +372 -372
- package/dist/agents/specification-creator.md +1 -1
- package/dist/commands/work.md +9 -9
- package/dist/configuration/commands-config.js +57 -0
- package/dist/skills/codebase-analyzer/SKILL.md +4 -4
- package/dist/skills/dev-verify/SKILL.md +3 -10
- package/dist/skills/diagrams-mermaid/SKILL.md +1 -0
- package/dist/skills/diagrams-mermaid/references/reference.md +4 -4
- package/dist/skills/flow-init/SKILL.md +1 -1
- package/dist/skills/goal-migration/SKILL.md +114 -0
- package/dist/skills/goal-research/SKILL.md +118 -118
- package/dist/skills/html-renderer/SKILL.md +1 -0
- package/dist/skills/migration/SKILL.md +157 -295
- package/dist/skills/migration-analyze/SKILL.md +126 -0
- package/dist/skills/migration-finalize/SKILL.md +161 -0
- package/dist/skills/migration-fix/SKILL.md +155 -0
- package/dist/skills/migration-implement/SKILL.md +131 -0
- package/dist/skills/migration-plan/SKILL.md +131 -0
- package/dist/skills/migration-spec/SKILL.md +135 -0
- package/dist/skills/{migration → migration-spec}/references/migration-strategies.md +9 -9
- package/dist/skills/migration-target/SKILL.md +134 -0
- package/dist/skills/{migration → migration-target}/references/migration-types.md +22 -23
- package/dist/skills/migration-verify/SKILL.md +184 -0
- package/dist/skills/orchestrator-framework/references/command-namespacing.md +1 -1
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +1 -1
- package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -0
- package/dist/skills/orchestrator-framework/references/gate-contract.md +117 -112
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +4 -1
- package/dist/skills/performance/SKILL.md +1 -0
- package/dist/skills/research/SKILL.md +249 -249
- package/dist/skills/research-brainstorm/SKILL.md +120 -120
- package/dist/skills/research-converge/SKILL.md +130 -130
- package/dist/skills/research-design/SKILL.md +146 -146
- 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-quick/SKILL.md +139 -139
- package/dist/skills/research-synthesize/SKILL.md +127 -127
- package/dist/skills/rule-reviewer/SKILL.md +1 -1
- package/dist/skills/standards-discover/SKILL.md +1 -0
- package/dist/templates/orchestrator-state-migration.yml +49 -9
- package/package.json +1 -1
- package/dist/commands/agents-md-generator.md +0 -36
- package/dist/commands/dev-analyze.md +0 -33
- package/dist/commands/dev-bugfix.md +0 -37
- package/dist/commands/dev-finalize.md +0 -33
- package/dist/commands/dev-implement.md +0 -34
- package/dist/commands/dev-plan.md +0 -37
- package/dist/commands/dev-spec.md +0 -37
- package/dist/commands/dev-tdd-red.md +0 -33
- package/dist/commands/dev-verify.md +0 -33
- package/dist/commands/development.md +0 -36
- package/dist/commands/diagrams-mermaid.md +0 -36
- package/dist/commands/flow-init.md +0 -36
- package/dist/commands/goal-development.md +0 -32
- package/dist/commands/goal-research.md +0 -33
- package/dist/commands/html-renderer.md +0 -36
- package/dist/commands/migration.md +0 -36
- package/dist/commands/performance.md +0 -36
- package/dist/commands/research-brainstorm.md +0 -33
- package/dist/commands/research-converge.md +0 -33
- package/dist/commands/research-design.md +0 -33
- package/dist/commands/research-finalize.md +0 -33
- package/dist/commands/research-fork.md +0 -40
- package/dist/commands/research-gather.md +0 -33
- package/dist/commands/research-plan.md +0 -37
- package/dist/commands/research-quick.md +0 -37
- package/dist/commands/research-synthesize.md +0 -33
- package/dist/commands/research.md +0 -55
- package/dist/commands/rule-reviewer.md +0 -38
- package/dist/commands/standards-discover.md +0 -36
- package/dist/commands/standards-update.md +0 -36
|
@@ -1,59 +1,98 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: owflow:migration
|
|
3
|
-
description:
|
|
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]"
|
|
4
5
|
user-invocable: true
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
# Migration
|
|
8
|
+
# Migration Dispatcher
|
|
8
9
|
|
|
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.
|
|
10
11
|
|
|
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.
|
|
12
28
|
|
|
13
29
|
## Entry Gate
|
|
14
30
|
|
|
15
|
-
**BEFORE
|
|
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:**
|
|
16
36
|
|
|
17
|
-
|
|
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.
|
|
18
40
|
|
|
19
|
-
|
|
20
|
-
- **Task path / identifier** (directory under `.owflow/tasks/migrations/`) → resume mode: read `orchestrator-state.yml`, find the first incomplete phase (`--from=PHASE` overrides), validate existing artifacts, then continue from there.
|
|
21
|
-
- **Nothing provided** → ask via `question`: "What technology, platform, or architecture should be migrated, and to what?" — capture source and target state before proceeding.
|
|
41
|
+
### Step 2: Resolve the Argument
|
|
22
42
|
|
|
23
|
-
|
|
43
|
+
**If the argument is a task path or identifier** (a directory, or a directory name under `.owflow/tasks/migrations/`) → **resume mode**:
|
|
24
44
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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.
|
|
28
48
|
|
|
29
|
-
|
|
49
|
+
**If the argument is a migration description** (any other free text) → new task.
|
|
30
50
|
|
|
31
|
-
|
|
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.
|
|
32
52
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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).
|
|
40
80
|
|
|
41
81
|
**Output**:
|
|
42
82
|
|
|
43
83
|
```
|
|
44
|
-
🚀 Migration
|
|
84
|
+
🚀 Migration Dispatcher
|
|
45
85
|
|
|
46
86
|
Task: [migration description]
|
|
47
87
|
Directory: [task-path]
|
|
48
|
-
|
|
49
|
-
Starting Phase 1: Analyze current state...
|
|
88
|
+
Next step: [step name]
|
|
50
89
|
```
|
|
51
90
|
|
|
52
91
|
---
|
|
53
92
|
|
|
54
93
|
## When to Use
|
|
55
94
|
|
|
56
|
-
Use
|
|
95
|
+
Use when:
|
|
57
96
|
|
|
58
97
|
- Migrating from one framework/library to another (e.g., Vue 2 → Vue 3, Express → Fastify)
|
|
59
98
|
- Changing database platforms (e.g., MySQL → PostgreSQL, MongoDB → DynamoDB)
|
|
@@ -82,279 +121,78 @@ Use for:
|
|
|
82
121
|
| **Data** | database, schema, data migration | Dual-run (zero downtime) | Data integrity, checksums |
|
|
83
122
|
| **Architecture** | REST→GraphQL, monolith→microservices | Dual-run or phased | Compatibility, rollback |
|
|
84
123
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## Phase Configuration
|
|
88
|
-
|
|
89
|
-
| Phase | content | activeForm | Agent/Skill |
|
|
90
|
-
| ----- | ------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------- |
|
|
91
|
-
| 1 | "Analyze current state" | "Analyzing current state" | codebase-analyzer |
|
|
92
|
-
| 2 | "Plan target state and gaps" | "Planning target state and gaps" | gap-analyzer |
|
|
93
|
-
| 3 | "Gather requirements & create migration strategy" | "Gathering requirements & creating migration strategy" | Direct + specification-creator (subagent) |
|
|
94
|
-
| 4 | "Plan implementation" | "Planning implementation" | implementation-planner (subagent) |
|
|
95
|
-
| 5 | "Execute migration" | "Executing migration" | implementation-plan-executor |
|
|
96
|
-
| 6 | "Verify and test compatibility" | "Verifying and testing compatibility" | implementation-verifier |
|
|
97
|
-
| 7 | "Resolve verification issues" | "Resolving verification issues" | Direct (conditional) |
|
|
98
|
-
| 8 | "Generate documentation" | "Generating documentation" | user-docs-generator (optional) |
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Workflow Phases
|
|
103
|
-
|
|
104
|
-
### Phase 1: Current State Analysis & Clarifications
|
|
105
|
-
|
|
106
|
-
**Purpose**: Comprehensive analysis of current system before migration, followed by scope/requirements clarification
|
|
107
|
-
**Execute**:
|
|
108
|
-
|
|
109
|
-
1. Skill tool - `codebase-analyzer`
|
|
110
|
-
2. Update state with analysis results
|
|
111
|
-
3. Direct - use question for max 5 critical clarifying questions about migration scope, target system, and constraints
|
|
112
|
-
4. Save clarifications to `analysis/clarifications.md`
|
|
113
|
-
**Output**: `analysis/current-state-analysis.md`, `analysis/clarifications.md`
|
|
114
|
-
**State**: Update task_context with current system info, `task_context.clarifications_resolved`
|
|
115
|
-
|
|
116
|
-
→ **AUTO-CONTINUE** — Do NOT end turn, do NOT prompt user. Proceed immediately to Phase 2.
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
### Phase 2: Target State Planning & Gap Analysis
|
|
121
|
-
|
|
122
|
-
**Purpose**: Define target system and identify migration gaps
|
|
123
|
-
**Execute**: Task tool - `gap-analyzer` subagent
|
|
124
|
-
**Output**: `analysis/target-state-plan.md`
|
|
125
|
-
**State**: Update `migration_context.migration_type`, `target_system`, `risk_level`, `breaking_changes`
|
|
126
|
-
|
|
127
|
-
**Gap Analyzer Tasks**:
|
|
128
|
-
|
|
129
|
-
1. Define target system from migration description
|
|
130
|
-
2. Identify gaps (features to migrate, APIs to adapt, data to transform)
|
|
131
|
-
3. Classify migration type (code/data/architecture)
|
|
132
|
-
4. Recommend migration strategy (incremental/big-bang/dual-run/phased)
|
|
133
|
-
5. External research via WebSearch for version upgrades
|
|
134
|
-
|
|
135
|
-
→ Pause
|
|
136
|
-
|
|
137
|
-
question - Display executive summary before asking. Extract from gap analysis: current system overview, target system, migration type classified, number of gaps identified, recommended strategy, risk level. Format as brief overview then "Continue to migration strategy?"
|
|
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.
|
|
138
125
|
|
|
139
126
|
---
|
|
140
127
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
> **Phase gate**: Requires `question` confirmation from Phase 2 before executing.
|
|
144
|
-
|
|
145
|
-
**Purpose**: Gather migration requirements, then create detailed migration specification with rollback procedures
|
|
146
|
-
**Execute**:
|
|
147
|
-
|
|
148
|
-
**Part A — Migration Requirements Gathering (inline)**:
|
|
149
|
-
|
|
150
|
-
1. Direct - use question for migration-specific requirements (3-5 questions):
|
|
151
|
-
- Migration scope and boundaries (what's in/out of migration)
|
|
152
|
-
- Rollback expectations and downtime tolerance
|
|
153
|
-
- Data migration specifics (if data migration type)
|
|
154
|
-
- Dual-run requirements (if applicable)
|
|
155
|
-
- Existing code/config to preserve
|
|
156
|
-
- Frame as confirmable assumptions: "I assume X, is that correct?"
|
|
157
|
-
2. Save gathered requirements to `analysis/requirements.md`
|
|
128
|
+
## Routing Table (completed_phases → next subskill)
|
|
158
129
|
|
|
159
|
-
|
|
130
|
+
Derive the FIRST step slug not in `completed_phases` whose condition holds, then print the matching command:
|
|
160
131
|
|
|
161
|
-
|
|
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` |
|
|
162
142
|
|
|
163
|
-
|
|
164
|
-
**State**: Update `rollback_plan_created`, `dual_run_configured`
|
|
143
|
+
Notes:
|
|
165
144
|
|
|
166
|
-
**
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
6. If minimum context is missing, record open gaps instead of inventing systems, protocols, or migration paths.
|
|
171
|
-
|
|
172
|
-
→ Pause
|
|
173
|
-
|
|
174
|
-
question - Display executive summary before asking. Read `implementation/spec.md` and extract: migration strategy chosen, scope boundaries, rollback approach, breaking changes identified, key constraints. Format as brief overview then "Continue to implementation planning?"
|
|
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.
|
|
175
149
|
|
|
176
150
|
---
|
|
177
151
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
> **Phase gate**: Requires `question` confirmation from Phase 3 before executing.
|
|
181
|
-
|
|
182
|
-
**Purpose**: Break migration into task groups with rollback steps
|
|
183
|
-
**Execute**: Task tool - `implementation-planner` subagent
|
|
184
|
-
**Output**: `implementation/implementation-plan.md` with rollback procedures
|
|
185
|
-
**State**: Update task groups and dependencies
|
|
186
|
-
|
|
187
|
-
**Context to pass to subagent**: task_path, task_type (migration), migration_type, task_description, phase_summaries (current_state_analysis, gap_analysis, specification)
|
|
188
|
-
|
|
189
|
-
**Post-plan diagram refinement (Skill, content-preserving)**:
|
|
190
|
-
|
|
191
|
-
- Invoke Skill tool: `diagrams-mermaid` for `implementation/implementation-plan.md`
|
|
192
|
-
- Add one migration execution/state flow with rollback checkpoints.
|
|
193
|
-
- Preserve written task steps and rollback details as source of truth.
|
|
194
|
-
|
|
195
|
-
→ Pause
|
|
196
|
-
|
|
197
|
-
question - Display executive summary before asking. Read `implementation/implementation-plan.md` and extract: number of task groups, total steps, rollback steps included, key dependencies, execution sequence. Format as brief overview then "Continue to execute migration?"
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
### Phase 5: Migration Execution
|
|
202
|
-
|
|
203
|
-
> **Phase gate**: Requires `question` confirmation from Phase 4 before executing.
|
|
204
|
-
|
|
205
|
-
**Purpose**: Execute migration steps with incremental verification
|
|
206
|
-
|
|
207
|
-
**ANTI-PATTERN — DO NOT DO THIS:**
|
|
208
|
-
|
|
209
|
-
- ❌ "Let me implement this directly..." — STOP. Delegate to implementation-plan-executor.
|
|
210
|
-
- ❌ "This migration is simple enough to code inline..." — STOP. Simplicity is NOT a reason to skip delegation.
|
|
211
|
-
|
|
212
|
-
**INVOKE NOW** — Skill tool call:
|
|
213
|
-
|
|
214
|
-
**Execute**: Skill tool - `implementation-plan-executor`
|
|
215
|
-
**Output**: Implemented migration changes, `implementation/work-log.md`
|
|
216
|
-
**State**: Update implementation progress, extract phase_summaries.implementation
|
|
217
|
-
|
|
218
|
-
📋 **Standards Reminder**: Review `.owflow/docs/INDEX.md` before implementing.
|
|
152
|
+
## Exit Gate (adapted for dispatch mode)
|
|
219
153
|
|
|
220
|
-
|
|
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.
|
|
221
155
|
|
|
222
|
-
|
|
156
|
+
### Results box
|
|
223
157
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
3. Proceed to Phase 6
|
|
227
|
-
|
|
228
|
-
→ Pause
|
|
229
|
-
|
|
230
|
-
question - Display executive summary before asking. Extract from `phase_summaries.implementation` and `implementation/work-log.md`: migration steps completed, files changed, test results, rollback readiness status. Format as brief overview then "Continue to verification?"
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Phase 6: Verification + Compatibility Testing
|
|
235
|
-
|
|
236
|
-
> **Phase gate**: Requires `question` confirmation from Phase 5 before executing.
|
|
237
|
-
|
|
238
|
-
**Purpose**: Verify migration success with compatibility and rollback testing
|
|
239
|
-
**Execute**: Skill tool - `implementation-verifier`
|
|
240
|
-
**Output**: `verification/implementation-verification.md`, `verification/compatibility-test-results.md`
|
|
241
|
-
**State**: Update verification results
|
|
242
|
-
|
|
243
|
-
**Migration-Specific Checks**:
|
|
244
|
-
|
|
245
|
-
- Verify old system still works (if dual-run)
|
|
246
|
-
- Test rollback procedures (non-destructive)
|
|
247
|
-
- Validate data integrity (for data migrations)
|
|
248
|
-
- Check performance benchmarks (before/after)
|
|
249
|
-
|
|
250
|
-
**⚠️ POST-VERIFICATION CONTINUATION** — After the skill completes and returns control:
|
|
251
|
-
|
|
252
|
-
1. Read `orchestrator-state.yml` to confirm you are the orchestrator
|
|
253
|
-
2. Update state: add Phase 6 to `completed_phases`
|
|
254
|
-
3. Evaluate verdict: if PASS → Phase 8, if fixable issues → Phase 7, otherwise stop workflow
|
|
255
|
-
|
|
256
|
-
→ Pause
|
|
257
|
-
|
|
258
|
-
question - Display executive summary before asking. Extract from verification results: overall verdict, issue counts by severity, compatibility test results, data integrity status, rollback test results. Format as detailed overview then "Continue to Phase [7 or 8]?"
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
### Phase 7: Migration Issue Resolution (Conditional)
|
|
263
|
-
|
|
264
|
-
> **Phase gate**: Requires `question` confirmation from Phase 6 before executing.
|
|
265
|
-
|
|
266
|
-
**Purpose**: Fix verification issues through direct editing and re-verification
|
|
267
|
-
**Execute**: Direct - apply fixes, re-verify
|
|
268
|
-
**Output**: Updated code, `verification_context.fixes_applied`
|
|
269
|
-
**State**: Update `reverify_count`, `decisions_made`
|
|
270
|
-
|
|
271
|
-
**Skip if**: verdict = PASS
|
|
272
|
-
|
|
273
|
-
**Process**:
|
|
274
|
-
|
|
275
|
-
1. Display detailed issue breakdown grouped by category and severity, listing location, description, and fixability
|
|
276
|
-
2. Present all critical + warning issues as a numbered list
|
|
277
|
-
3. question — "Which issues should I fix?" with options: "Fix all fixable issues" / "Let me choose specific issues" / "Skip fixes, proceed as-is"
|
|
278
|
-
4. Fix selected issues
|
|
279
|
-
5. question — "Re-run verification to check fixes?" with options: "Yes, re-run verification" / "No, proceed to next phase"
|
|
280
|
-
6. If re-run → re-invoke `implementation-verifier` → return to Step 1
|
|
281
|
-
7. Max 3 iterations
|
|
282
|
-
|
|
283
|
-
**Data Safety Critical**: HALT on any data integrity issue - never auto-fix data problems. Always present data issues to user with rollback option.
|
|
284
|
-
|
|
285
|
-
**Exit Conditions**:
|
|
286
|
-
|
|
287
|
-
- ✅ No critical issues remain → Proceed to Phase 8
|
|
288
|
-
- ⚠️ Max iterations (3) reached → Ask user: proceed with warnings or rollback
|
|
289
|
-
- ❌ Data integrity issues → HALT immediately, recommend rollback
|
|
290
|
-
|
|
291
|
-
→ Pause
|
|
292
|
-
|
|
293
|
-
question - Display executive summary: total issues found, issues fixed, issues remaining by severity. Then "Continue to documentation?"
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
### Phase 8: Documentation → Exit Gate (Optional)
|
|
298
|
-
|
|
299
|
-
> **Phase gate**: Requires `question` confirmation from the preceding phase before executing.
|
|
158
|
+
```markdown
|
|
159
|
+
## ✅ MIGRATION TASK READY — <task name>
|
|
300
160
|
|
|
301
|
-
**
|
|
302
|
-
**
|
|
303
|
-
**
|
|
304
|
-
|
|
161
|
+
**Task** — [migration description]
|
|
162
|
+
**Directory** — `<task-path>`
|
|
163
|
+
**Next step** — [step name]
|
|
164
|
+
[Resume note: completed steps / fresh task]
|
|
305
165
|
|
|
306
|
-
**
|
|
166
|
+
**Next ▸** `/owflow:migration-<subskill> <task-path>`
|
|
167
|
+
```
|
|
307
168
|
|
|
308
|
-
**
|
|
169
|
+
For a terminal task (`task-completed` recorded), the results box reports the workflow as complete and carries no **Next ▸** handoff line.
|
|
309
170
|
|
|
310
|
-
|
|
311
|
-
- Prerequisites and preparation steps
|
|
312
|
-
- Step-by-step migration procedure
|
|
313
|
-
- Rollback procedures
|
|
314
|
-
- Troubleshooting common issues
|
|
171
|
+
### Acceptance question
|
|
315
172
|
|
|
316
|
-
|
|
173
|
+
Use `question` — "Task ready. How would you like to proceed?" with options:
|
|
317
174
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
**Migration type** — [code / data / architecture]
|
|
322
|
-
**Strategy** — [incremental / big-bang / dual-run / phased]
|
|
323
|
-
**Verification** — [final verdict]
|
|
324
|
-
**Rollback plan** — [path / status]
|
|
325
|
-
**Migration guide** — [path] / not generated
|
|
326
|
-
|
|
327
|
-
**Artifacts**
|
|
328
|
-
- `analysis/current-state-analysis.md`
|
|
329
|
-
- `analysis/target-state-plan.md`
|
|
330
|
-
- `analysis/rollback-plan.md`
|
|
331
|
-
- `implementation/work-log.md`
|
|
332
|
-
- `verification/implementation-verification.md`
|
|
333
|
-
- `documentation/migration-guide.md` [conditional]
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
**Results-acceptance question** — use `question` — "Are these results correct?" with options:
|
|
337
|
-
|
|
338
|
-
- **Accept** — migration is complete; print next steps below.
|
|
339
|
-
- **Adjust** — re-run the affected phase (fixes, re-verification, docs) with the user's corrections, then re-present the results box.
|
|
340
|
-
- **Discuss** — walk through specific results (verification verdicts, rollback readiness, guide contents) in more depth; then re-ask.
|
|
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.
|
|
341
178
|
- **Stop here** — print the resume command (`/owflow:migration <task-path>`) and end.
|
|
342
179
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
- `/owflow:reviews-pragmatic <task-path>` — post-migration over-engineering check
|
|
346
|
-
- `/owflow:standards-update "<lesson learned>"` — capture migration learnings as standards
|
|
347
|
-
- Commit the changes and open a PR using the migration guide's procedures
|
|
180
|
+
For a terminal task, omit the first option (there is nothing to hand off) and report the completed workflow.
|
|
348
181
|
|
|
349
|
-
|
|
182
|
+
### Handoff message
|
|
350
183
|
|
|
351
|
-
|
|
184
|
+
On Accept (hand off choice), print, then STOP:
|
|
352
185
|
|
|
353
|
-
|
|
186
|
+
```
|
|
187
|
+
✓ Migration task ready at <task-path>
|
|
354
188
|
|
|
355
|
-
|
|
189
|
+
Next step:
|
|
190
|
+
→ /owflow:migration-<subskill> <task-path>
|
|
356
191
|
|
|
357
|
-
|
|
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
|
+
```
|
|
358
196
|
|
|
359
197
|
---
|
|
360
198
|
|
|
@@ -364,35 +202,57 @@ Refer to the template [src/templates/orchestrator-state-migration.yml](../../tem
|
|
|
364
202
|
.owflow/tasks/migrations/YYYY-MM-DD-migration-name/
|
|
365
203
|
├── orchestrator-state.yml
|
|
366
204
|
├── analysis/
|
|
367
|
-
│ ├── current-state-analysis.md #
|
|
368
|
-
│ ├──
|
|
369
|
-
│ ├──
|
|
370
|
-
│ ├──
|
|
371
|
-
│
|
|
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)
|
|
372
211
|
├── implementation/
|
|
373
|
-
│ ├── spec.md #
|
|
374
|
-
│ ├── implementation-plan.md #
|
|
375
|
-
│ └── work-log.md #
|
|
212
|
+
│ ├── spec.md # migration-spec
|
|
213
|
+
│ ├── implementation-plan.md # migration-plan
|
|
214
|
+
│ └── work-log.md # migration-implement
|
|
376
215
|
├── verification/
|
|
377
|
-
│ ├── implementation-verification.md #
|
|
378
|
-
│ └── compatibility-test-results.md #
|
|
216
|
+
│ ├── implementation-verification.md # migration-verify
|
|
217
|
+
│ └── compatibility-test-results.md # migration-verify
|
|
379
218
|
└── documentation/
|
|
380
|
-
└── migration-guide.md #
|
|
219
|
+
└── migration-guide.md # migration-finalize (optional)
|
|
381
220
|
```
|
|
382
221
|
|
|
383
222
|
---
|
|
384
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
|
+
|
|
385
230
|
## Auto-Recovery
|
|
386
231
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
|
390
|
-
|
|
|
391
|
-
|
|
|
392
|
-
|
|
|
393
|
-
|
|
|
394
|
-
|
|
|
395
|
-
|
|
|
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) |
|
|
396
256
|
|
|
397
257
|
---
|
|
398
258
|
|
|
@@ -400,7 +260,9 @@ Refer to the template [src/templates/orchestrator-state-migration.yml](../../tem
|
|
|
400
260
|
|
|
401
261
|
Invoked via:
|
|
402
262
|
|
|
403
|
-
- `/owflow:migration [description] [--type=TYPE]` (new)
|
|
404
|
-
- `/owflow:migration [task-path] [--from
|
|
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.
|
|
405
267
|
|
|
406
268
|
Task directory: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`
|