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,126 +1,126 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:migration-analyze
|
|
3
|
-
description: Migration — analyzes the current system and resolves migration-scoped clarifications. First work phase of the migration workflow (state-analysed).
|
|
4
|
-
argument-hint: "[task-path-or-identifier]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Migration Analyze — Current State & Clarifications (state-analysed)
|
|
9
|
-
|
|
10
|
-
Work phase of the migration workflow. Runs current-system analysis via the reused `codebase-analyzer` engine, then resolves migration-scoped clarifications. State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
-
|
|
12
|
-
Assisted entry point: `/owflow:migration` (dispatcher). Autonomous: `/owflow:goal-migration` (wrapper). Both produce the same state; the modes can be mixed freely.
|
|
13
|
-
|
|
14
|
-
## Entry Gate
|
|
15
|
-
|
|
16
|
-
### 1. Argument resolution
|
|
17
|
-
|
|
18
|
-
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
19
|
-
|
|
20
|
-
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
21
|
-
- **Identifier** — exact directory name inside `.owflow/tasks/migrations/` (e.g., `2026-01-12-framework-upgrade`); resolve to its path.
|
|
22
|
-
- Missing argument, a path that does **not exist**, or no identifier match → print the blocked block (part 3), then STOP. Never guess or auto-pick a task.
|
|
23
|
-
|
|
24
|
-
### 2. Prerequisites
|
|
25
|
-
|
|
26
|
-
| Required for this skill | Where verified | Produced by |
|
|
27
|
-
| ----------------------- | ---------------------------------- | ------------------------------------------------------------ |
|
|
28
|
-
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:migration <description>` (dispatcher init) or mid-pipeline bootstrap |
|
|
29
|
-
|
|
30
|
-
No upstream migration slug is required — this is the pipeline's first work phase.
|
|
31
|
-
|
|
32
|
-
### 3. Blocked output
|
|
33
|
-
|
|
34
|
-
1. Steps that must be completed first (in order): **none** — `migration-analyze` is the first work phase. If no task exists yet, initialize one with `/owflow:migration <description>`.
|
|
35
|
-
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
36
|
-
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
37
|
-
|
|
38
|
-
Then STOP — never guess or auto-pick a task.
|
|
39
|
-
|
|
40
|
-
### 4. Missing-state bootstrap
|
|
41
|
-
|
|
42
|
-
When the only unmet prerequisite is the state file, use `question` — "No task exists at this path. Create a fresh standard migration task and start at `state-analysed`?" with **Create task** / **Decline**.
|
|
43
|
-
|
|
44
|
-
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-analyze (mid-pipeline bootstrap)"`, `orchestrator.started_phase: state-analysed`, `completed_phases: []`, `task.title`/`task.description` from the argument. Run `verify_template` (`orchestrator-state-migration.yml`) immediately. Creates state ONLY — never upstream artifacts.
|
|
45
|
-
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
46
|
-
|
|
47
|
-
### 5. Skip/resume — artifacts before state
|
|
48
|
-
|
|
49
|
-
- `analysis/current-state-analysis.md` exists but `state-analysed` is missing ⇒ **adopt**: append `state-analysed`, backfill `migration_context.current_system`, `migration_context.clarifications_resolved`, `phase_summaries.analyze.summary`, and both `migration_outputs` paths where still null; run only the missing clarifications part.
|
|
50
|
-
- `state-analysed` is present but `analysis/current-state-analysis.md` **or** `analysis/clarifications.md` is missing ⇒ **drop** `state-analysed` from `completed_phases` and re-run only the missing part (re-adopt the existing analysis when it is present; never redo the analysis needlessly).
|
|
51
|
-
- Both artifacts exist and the slug is present ⇒ report the existing results and route to the Exit Gate.
|
|
52
|
-
- `migration_context.clarifications_resolved` is already non-null ⇒ report the existing clarifications instead of re-asking.
|
|
53
|
-
|
|
54
|
-
### 6. Conditional activation
|
|
55
|
-
|
|
56
|
-
Not applicable — `migration-analyze` has no activation condition; it runs whenever its state-file prerequisite is met.
|
|
57
|
-
|
|
58
|
-
### 7. Recovery
|
|
59
|
-
|
|
60
|
-
| Step | Max Attempts | Strategy |
|
|
61
|
-
| ------------------------ | ------------ | ------------------------------------------------------------------------------------------------- |
|
|
62
|
-
| Analysis (`state-analysed`) | 2 | Expand search patterns across the repository; prompt the user for specific file paths |
|
|
63
|
-
| Clarifications | 1 | Ask remaining questions in one consolidated round; record unresolved points as explicit assumptions |
|
|
64
|
-
|
|
65
|
-
## Execute
|
|
66
|
-
|
|
67
|
-
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) and the [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md).
|
|
68
|
-
|
|
69
|
-
| Direction | Artifact | Producer |
|
|
70
|
-
| --------- | ----------------------------------- | --------------------------------------------------------------- |
|
|
71
|
-
| Consumed | `orchestrator-state.yml` | dispatcher init / mid-pipeline bootstrap |
|
|
72
|
-
| Produced | `analysis/current-state-analysis.md` | `codebase-analyzer` (**Skill**, reused 0 changes) — pass `artifact_name` |
|
|
73
|
-
| Produced | `analysis/clarifications.md` | inline `question` round (≤5 questions) |
|
|
74
|
-
|
|
75
|
-
### Current-State Analysis & Clarifications (`state-analysed`)
|
|
76
|
-
|
|
77
|
-
1. **Skill tool — `codebase-analyzer`** (never inline). Pass: `task_path`, `task_description`, and `artifact_name: "current-state-analysis.md"` (the engine derives the `analysis/` prefix — do not pass a path). The engine's migration-target role is documented in its own mapping — do not restate it here.
|
|
78
|
-
2. **Inline clarifications** — use `question` for up to 5 migration-scoped questions: migration scope/boundaries, current vs target system, constraints, data involvement, downtime tolerance. Frame as confirmable assumptions ("I assume X — is that correct?"). Save to `analysis/clarifications.md`.
|
|
79
|
-
3. **State write**: append `state-analysed` to `completed_phases`; set `migration_context.current_system.description`, `migration_context.current_system.technologies` (**corrected write** — the monolith wrote the undeclared `task_context`), `migration_context.clarifications_resolved: true`, `phase_summaries.analyze.summary`, `migration_outputs.current_state_analysis`, `migration_outputs.clarifications`; bump `orchestrator.updated`. On failure: append `state-analysed` to `failed_phases`, increment `auto_fix_attempts["state-analysed"]`. Then re-read state + run `verify_template`.
|
|
80
|
-
|
|
81
|
-
## State Update Convention (per step)
|
|
82
|
-
|
|
83
|
-
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`state-analysed`) plus that step's fields. Never batch multiple steps into one end-of-skill write.
|
|
84
|
-
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
85
|
-
3. **Failures** — a failed or abandoned step is NOT appended to `completed_phases`; append its slug to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`.
|
|
86
|
-
4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-migration.yml`. Fix any reported issue immediately.
|
|
87
|
-
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
88
|
-
|
|
89
|
-
## Exit Gate
|
|
90
|
-
|
|
91
|
-
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
92
|
-
|
|
93
|
-
### Results box
|
|
94
|
-
|
|
95
|
-
```markdown
|
|
96
|
-
## ✅ MIGRATION ANALYZE COMPLETE — <task name>
|
|
97
|
-
|
|
98
|
-
**Current system** — [1-line summary from state]
|
|
99
|
-
**Migration scope** — [included / excluded summary]
|
|
100
|
-
**Clarifications** — [N resolved / open assumptions]
|
|
101
|
-
**Analysis confidence** — ✅ solid / ⚠ open gaps recorded
|
|
102
|
-
|
|
103
|
-
**Artifacts**
|
|
104
|
-
|
|
105
|
-
- `analysis/current-state-analysis.md`
|
|
106
|
-
- `analysis/clarifications.md`
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Results-acceptance question
|
|
110
|
-
|
|
111
|
-
Use `question` — "Are these results correct?" with options:
|
|
112
|
-
|
|
113
|
-
- **Accept** — the analysis is good; continue.
|
|
114
|
-
- **Adjust** — re-run only the affected part (analysis or clarifications), update state and artifacts, re-present the results box.
|
|
115
|
-
- **Discuss** — walk through the current-system findings or scope assumptions in more depth; then re-ask.
|
|
116
|
-
- **Stop here** — print the resume command (`/owflow:migration-analyze <task-path>`) and end.
|
|
117
|
-
|
|
118
|
-
### Next steps (after Accept)
|
|
119
|
-
|
|
120
|
-
- `→ /owflow:migration-target <task-path>` — `required` next: locks the target state, classifies the migration type, recommends a strategy, and produces the risk-locked target-state plan. Remaining after: spec → plan → implement → verify (→ fix when needed) → finalize.
|
|
121
|
-
|
|
122
|
-
**Other options**:
|
|
123
|
-
|
|
124
|
-
- `/owflow:goal-migration <task-path>` — `optional` shortcut: runs all remaining phases in one loop (target → spec → plan → implement → verify → fix when needed → finalize)
|
|
125
|
-
|
|
126
|
-
Then STOP.
|
|
1
|
+
---
|
|
2
|
+
name: owflow:migration-analyze
|
|
3
|
+
description: Migration — analyzes the current system and resolves migration-scoped clarifications. First work phase of the migration workflow (state-analysed).
|
|
4
|
+
argument-hint: "[task-path-or-identifier]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Migration Analyze — Current State & Clarifications (state-analysed)
|
|
9
|
+
|
|
10
|
+
Work phase of the migration workflow. Runs current-system analysis via the reused `codebase-analyzer` engine, then resolves migration-scoped clarifications. State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
+
|
|
12
|
+
Assisted entry point: `/owflow:migration` (dispatcher). Autonomous: `/owflow:goal-migration` (wrapper). Both produce the same state; the modes can be mixed freely.
|
|
13
|
+
|
|
14
|
+
## Entry Gate
|
|
15
|
+
|
|
16
|
+
### 1. Argument resolution
|
|
17
|
+
|
|
18
|
+
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
19
|
+
|
|
20
|
+
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
21
|
+
- **Identifier** — exact directory name inside `.owflow/tasks/migrations/` (e.g., `2026-01-12-framework-upgrade`); resolve to its path.
|
|
22
|
+
- Missing argument, a path that does **not exist**, or no identifier match → print the blocked block (part 3), then STOP. Never guess or auto-pick a task.
|
|
23
|
+
|
|
24
|
+
### 2. Prerequisites
|
|
25
|
+
|
|
26
|
+
| Required for this skill | Where verified | Produced by |
|
|
27
|
+
| ----------------------- | ---------------------------------- | ------------------------------------------------------------ |
|
|
28
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:migration <description>` (dispatcher init) or mid-pipeline bootstrap |
|
|
29
|
+
|
|
30
|
+
No upstream migration slug is required — this is the pipeline's first work phase.
|
|
31
|
+
|
|
32
|
+
### 3. Blocked output
|
|
33
|
+
|
|
34
|
+
1. Steps that must be completed first (in order): **none** — `migration-analyze` is the first work phase. If no task exists yet, initialize one with `/owflow:migration <description>`.
|
|
35
|
+
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
36
|
+
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
37
|
+
|
|
38
|
+
Then STOP — never guess or auto-pick a task.
|
|
39
|
+
|
|
40
|
+
### 4. Missing-state bootstrap
|
|
41
|
+
|
|
42
|
+
When the only unmet prerequisite is the state file, use `question` — "No task exists at this path. Create a fresh standard migration task and start at `state-analysed`?" with **Create task** / **Decline**.
|
|
43
|
+
|
|
44
|
+
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-analyze (mid-pipeline bootstrap)"`, `orchestrator.started_phase: state-analysed`, `completed_phases: []`, `task.title`/`task.description` from the argument. Run `verify_template` (`orchestrator-state-migration.yml`) immediately. Creates state ONLY — never upstream artifacts.
|
|
45
|
+
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
46
|
+
|
|
47
|
+
### 5. Skip/resume — artifacts before state
|
|
48
|
+
|
|
49
|
+
- `analysis/current-state-analysis.md` exists but `state-analysed` is missing ⇒ **adopt**: append `state-analysed`, backfill `migration_context.current_system`, `migration_context.clarifications_resolved`, `phase_summaries.analyze.summary`, and both `migration_outputs` paths where still null; run only the missing clarifications part.
|
|
50
|
+
- `state-analysed` is present but `analysis/current-state-analysis.md` **or** `analysis/clarifications.md` is missing ⇒ **drop** `state-analysed` from `completed_phases` and re-run only the missing part (re-adopt the existing analysis when it is present; never redo the analysis needlessly).
|
|
51
|
+
- Both artifacts exist and the slug is present ⇒ report the existing results and route to the Exit Gate.
|
|
52
|
+
- `migration_context.clarifications_resolved` is already non-null ⇒ report the existing clarifications instead of re-asking.
|
|
53
|
+
|
|
54
|
+
### 6. Conditional activation
|
|
55
|
+
|
|
56
|
+
Not applicable — `migration-analyze` has no activation condition; it runs whenever its state-file prerequisite is met.
|
|
57
|
+
|
|
58
|
+
### 7. Recovery
|
|
59
|
+
|
|
60
|
+
| Step | Max Attempts | Strategy |
|
|
61
|
+
| ------------------------ | ------------ | ------------------------------------------------------------------------------------------------- |
|
|
62
|
+
| Analysis (`state-analysed`) | 2 | Expand search patterns across the repository; prompt the user for specific file paths |
|
|
63
|
+
| Clarifications | 1 | Ask remaining questions in one consolidated round; record unresolved points as explicit assumptions |
|
|
64
|
+
|
|
65
|
+
## Execute
|
|
66
|
+
|
|
67
|
+
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) and the [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md).
|
|
68
|
+
|
|
69
|
+
| Direction | Artifact | Producer |
|
|
70
|
+
| --------- | ----------------------------------- | --------------------------------------------------------------- |
|
|
71
|
+
| Consumed | `orchestrator-state.yml` | dispatcher init / mid-pipeline bootstrap |
|
|
72
|
+
| Produced | `analysis/current-state-analysis.md` | `codebase-analyzer` (**Skill**, reused 0 changes) — pass `artifact_name` |
|
|
73
|
+
| Produced | `analysis/clarifications.md` | inline `question` round (≤5 questions) |
|
|
74
|
+
|
|
75
|
+
### Current-State Analysis & Clarifications (`state-analysed`)
|
|
76
|
+
|
|
77
|
+
1. **Skill tool — `codebase-analyzer`** (never inline). Pass: `task_path`, `task_description`, and `artifact_name: "current-state-analysis.md"` (the engine derives the `analysis/` prefix — do not pass a path). The engine's migration-target role is documented in its own mapping — do not restate it here.
|
|
78
|
+
2. **Inline clarifications** — use `question` for up to 5 migration-scoped questions: migration scope/boundaries, current vs target system, constraints, data involvement, downtime tolerance. Frame as confirmable assumptions ("I assume X — is that correct?"). Save to `analysis/clarifications.md`.
|
|
79
|
+
3. **State write**: append `state-analysed` to `completed_phases`; set `migration_context.current_system.description`, `migration_context.current_system.technologies` (**corrected write** — the monolith wrote the undeclared `task_context`), `migration_context.clarifications_resolved: true`, `phase_summaries.analyze.summary`, `migration_outputs.current_state_analysis`, `migration_outputs.clarifications`; bump `orchestrator.updated`. On failure: append `state-analysed` to `failed_phases`, increment `auto_fix_attempts["state-analysed"]`. Then re-read state + run `verify_template`.
|
|
80
|
+
|
|
81
|
+
## State Update Convention (per step)
|
|
82
|
+
|
|
83
|
+
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`state-analysed`) plus that step's fields. Never batch multiple steps into one end-of-skill write.
|
|
84
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
85
|
+
3. **Failures** — a failed or abandoned step is NOT appended to `completed_phases`; append its slug to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`.
|
|
86
|
+
4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-migration.yml`. Fix any reported issue immediately.
|
|
87
|
+
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
88
|
+
|
|
89
|
+
## Exit Gate
|
|
90
|
+
|
|
91
|
+
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
92
|
+
|
|
93
|
+
### Results box
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
## ✅ MIGRATION ANALYZE COMPLETE — <task name>
|
|
97
|
+
|
|
98
|
+
**Current system** — [1-line summary from state]
|
|
99
|
+
**Migration scope** — [included / excluded summary]
|
|
100
|
+
**Clarifications** — [N resolved / open assumptions]
|
|
101
|
+
**Analysis confidence** — ✅ solid / ⚠ open gaps recorded
|
|
102
|
+
|
|
103
|
+
**Artifacts**
|
|
104
|
+
|
|
105
|
+
- `analysis/current-state-analysis.md`
|
|
106
|
+
- `analysis/clarifications.md`
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Results-acceptance question
|
|
110
|
+
|
|
111
|
+
Use `question` — "Are these results correct?" with options:
|
|
112
|
+
|
|
113
|
+
- **Accept** — the analysis is good; continue.
|
|
114
|
+
- **Adjust** — re-run only the affected part (analysis or clarifications), update state and artifacts, re-present the results box.
|
|
115
|
+
- **Discuss** — walk through the current-system findings or scope assumptions in more depth; then re-ask.
|
|
116
|
+
- **Stop here** — print the resume command (`/owflow:migration-analyze <task-path>`) and end.
|
|
117
|
+
|
|
118
|
+
### Next steps (after Accept)
|
|
119
|
+
|
|
120
|
+
- `→ /owflow:migration-target <task-path>` — `required` next: locks the target state, classifies the migration type, recommends a strategy, and produces the risk-locked target-state plan. Remaining after: spec → plan → implement → verify (→ fix when needed) → finalize.
|
|
121
|
+
|
|
122
|
+
**Other options**:
|
|
123
|
+
|
|
124
|
+
- `/owflow:goal-migration <task-path>` — `optional` shortcut: runs all remaining phases in one loop (target → spec → plan → implement → verify → fix when needed → finalize)
|
|
125
|
+
|
|
126
|
+
Then STOP.
|
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:migration-finalize
|
|
3
|
-
description: Migration — authors the operator migration guide inline when enabled, then completes the task. Workflow-terminal (docs-generated optional, task-completed always).
|
|
4
|
-
argument-hint: "[task-path-or-identifier]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Migration Finalize — Operator Guide & Task Completion (docs-generated, task-completed)
|
|
9
|
-
|
|
10
|
-
Terminal work phase of the migration workflow. When `options.docs_enabled` resolves true it authors `documentation/migration-guide.md` **inline** (operator audience, text-first — no `user-docs-generator`, no Playwright, no agent edits); then it always finalizes: workflow summary, `task.status: completed`, and the `task-completed` slug.
|
|
11
|
-
|
|
12
|
-
## Entry Gate
|
|
13
|
-
|
|
14
|
-
### 1. Argument resolution
|
|
15
|
-
|
|
16
|
-
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
17
|
-
|
|
18
|
-
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
19
|
-
- **Identifier** — exact directory name inside `.owflow/tasks/migrations/` (e.g., `2026-01-12-framework-upgrade`); resolve to its path.
|
|
20
|
-
- Missing argument, a path that does **not exist**, or no identifier match → print the blocked block (part 3), then STOP. Never guess or auto-pick a task.
|
|
21
|
-
|
|
22
|
-
### 2. Prerequisites
|
|
23
|
-
|
|
24
|
-
| Required for this skill | Where verified | Produced by |
|
|
25
|
-
| ----------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
|
|
26
|
-
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:migration <description>` (dispatcher init) or mid-pipeline bootstrap |
|
|
27
|
-
| Verification done | `verification-done` in `completed_phases` **and** `verification/implementation-verification.md` exists | `/owflow:migration-verify <task-path>` |
|
|
28
|
-
| Fix phase settled | `verification_context.compatibility_status = passed` **and** (`issues-resolved` present with non-empty `fixes_applied` or a recorded approval, **or** `verification_context.last_status = passed`, **or** `phase_summaries.fix.summary` records a deliberate skip) | `/owflow:migration-fix`, `/owflow:migration-verify` |
|
|
29
|
-
| Docs toggle known (conditional step) | `options.docs_enabled` in state (`true`/`false`; `null` ⇒ the options gate never ran — treated as not enabled) | `/owflow:migration-verify` (options step) |
|
|
30
|
-
|
|
31
|
-
### 3. Blocked output
|
|
32
|
-
|
|
33
|
-
1. Steps that must be completed first (in order), each with its command:
|
|
34
|
-
- Issue resolution (`issues-resolved`) → `/owflow:migration-fix <task-path>` (only when verification left fixable issues)
|
|
35
|
-
- Verification (`verification-done`) → `/owflow:migration-verify <task-path>`
|
|
36
|
-
- Migration execution (`migration-executed`) → `/owflow:migration-implement <task-path>` (if also missing)
|
|
37
|
-
- Implementation planning (`plan-created`) → `/owflow:migration-plan <task-path>` (if also missing)
|
|
38
|
-
- Strategy specification (`strategy-specified`) → `/owflow:migration-spec <task-path>` (if also missing)
|
|
39
|
-
- Target state planning (`target-planned`) → `/owflow:migration-target <task-path>` (if also missing)
|
|
40
|
-
- Current-state analysis (`state-analysed`) → `/owflow:migration-analyze <task-path>` (if also missing)
|
|
41
|
-
- State initialization → `/owflow:migration <description>` (new task)
|
|
42
|
-
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
43
|
-
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
44
|
-
|
|
45
|
-
Then STOP — never guess or auto-pick a task.
|
|
46
|
-
|
|
47
|
-
### 4. Missing-state bootstrap
|
|
48
|
-
|
|
49
|
-
When the only unmet prerequisite is the state file, use `question` — "No task exists at this path. Create a fresh standard migration task and start at `task-completed`?" with **Create task** / **Decline**.
|
|
50
|
-
|
|
51
|
-
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-finalize (mid-pipeline bootstrap)"`, `orchestrator.started_phase: task-completed`, `completed_phases: []`, `task.title`/`task.description` from the argument. Run `verify_template` (`orchestrator-state-migration.yml`) immediately. Creates state ONLY — `verification/implementation-verification.md` still blocks, so bootstrapping never skips upstream work.
|
|
52
|
-
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
53
|
-
|
|
54
|
-
### 5. Skip/resume — artifacts before state
|
|
55
|
-
|
|
56
|
-
- `task.status: completed` or `task-completed` in `completed_phases` ⇒ report the existing finalization and STOP — the workflow is terminal; never re-run it.
|
|
57
|
-
- `documentation/migration-guide.md` exists but `docs-generated` is missing ⇒ **adopt**: append `docs-generated`, backfill `migration_outputs.migration_guide`, continue to finalization.
|
|
58
|
-
- `docs-generated` is present but the guide is missing ⇒ **drop** `docs-generated` and re-author (only when enabled).
|
|
59
|
-
- Fix phase unsettled (`compatibility_status != passed` — failed or never written — **or** no `issues-resolved`/approval/skip **and** `last_status != passed`) ⇒ route back to `/owflow:migration-verify <task-path>` (or `/owflow:migration-fix <task-path>` when issues remain) — never finalize unfinished verification. A failed compatibility check is **never waived by a deliberate skip or approval**: re-verify after fixes, or use user-confirmed rollback.
|
|
60
|
-
- A settled `options.docs_enabled` is reported, not re-asked.
|
|
61
|
-
|
|
62
|
-
### 6. Conditional activation
|
|
63
|
-
|
|
64
|
-
Read `options.docs_enabled` (tri-state). `true` ⇒ run the Documentation step below. `false` **or** `null` (the options gate never settled it) ⇒ report `Operator guide disabled — skipping documentation.` and skip straight to Finalization: **no `docs-generated` slug, no failure entry** — a docs skip is an option value, not a failure. Do not prompt for the toggle here; its setter is `migration-verify`'s options step.
|
|
65
|
-
|
|
66
|
-
### 7. Recovery
|
|
67
|
-
|
|
68
|
-
| Step | Max Attempts | Strategy |
|
|
69
|
-
| ------------------------------- | ------------ | ------------------------------------------------------------------------------ |
|
|
70
|
-
| Documentation (`docs-generated`) | 1 | Generate text-only — inline markdown, no screenshots or tooling |
|
|
71
|
-
| Finalization (`task-completed`) | 1 | Compose the summary and set `task.status: completed`; state-only — repeat once, then report |
|
|
72
|
-
|
|
73
|
-
## Execute
|
|
74
|
-
|
|
75
|
-
**Read first**: no delegation is used in this skill. **Inline authoring by design**: `user-docs-generator` (hard-codes `documentation/user-guide.md` + Playwright) is explicitly out of scope — never invoke it, Playwright, or any agent for the guide.
|
|
76
|
-
|
|
77
|
-
| Direction | Artifact | Producer |
|
|
78
|
-
| --------- | ------------------------------------- | ----------------------------------------------------------- |
|
|
79
|
-
| Consumed | all `migration_outputs.*` paths | upstream phases (analysis → verification) |
|
|
80
|
-
| Consumed | `verification_context.last_status`, `verification_context.compatibility_status` | `migration-verify` (ownership), `migration-fix` (re-verify refresh) |
|
|
81
|
-
| Consumed | `options.docs_enabled` | `migration-verify` options step |
|
|
82
|
-
| Produced | `documentation/migration-guide.md` (conditional) | inline authoring (this skill) |
|
|
83
|
-
| Produced | workflow summary + `task.status: completed` | inline authoring (this skill) |
|
|
84
|
-
|
|
85
|
-
### Operator Migration Guide (`docs-generated`, conditional)
|
|
86
|
-
|
|
87
|
-
**Skip if** `options.docs_enabled` is not `true` (see part 6 — report and skip; no slug, no failure entry).
|
|
88
|
-
|
|
89
|
-
Author `documentation/migration-guide.md` directly in the main agent — **operator audience, text-first**. Cover exactly:
|
|
90
|
-
|
|
91
|
-
1. **Migration overview and goals** — what changed, why, current → target.
|
|
92
|
-
2. **Prerequisites and preparation** — access, backups, environment readiness.
|
|
93
|
-
3. **Step-by-step procedure** — ordered operator steps from the implementation plan / work log, with the per-group checkpoints.
|
|
94
|
-
4. **Rollback procedures** — from `analysis/rollback-plan.md` (authoritative) and `analysis/dual-run-plan.md` when present.
|
|
95
|
-
5. **Troubleshooting** — known issues from verification, the compatibility checks, and fix decisions.
|
|
96
|
-
|
|
97
|
-
**State write**: append `docs-generated`; set `migration_outputs.migration_guide: "documentation/migration-guide.md"`; bump `orchestrator.updated`; re-read + `verify_template`.
|
|
98
|
-
|
|
99
|
-
### Finalization (`task-completed`, always)
|
|
100
|
-
|
|
101
|
-
1. **Compose the workflow summary** from state + artifacts: migration type/strategy, steps completed, verification + compatibility outcomes, fixes, guide status. There is no `finalize` key in `phase_summaries` — the omission is deliberate (state-only terminal step); do not add one.
|
|
102
|
-
2. **State write**: set `task.status: completed`; append `task-completed`; bump `orchestrator.updated`; re-read + `verify_template`.
|
|
103
|
-
3. **Workflow-end handoff**: no further owflow phase is required; list the artifacts for the user's own review and commit (the workflow performs no commits).
|
|
104
|
-
|
|
105
|
-
## State Update Convention (per step)
|
|
106
|
-
|
|
107
|
-
1. **Write immediately** — append `docs-generated` only when documentation actually ran, then `task-completed` at finalization; never batch and never append `docs-generated` on a skip or failure.
|
|
108
|
-
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
109
|
-
3. **Failures** — if the guide ultimately fails after the one text-only retry, do NOT append `docs-generated`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["docs-generated"]`; ask the user whether to continue to finalization without docs. A disabled guide is NOT a failure (no entry at all).
|
|
110
|
-
4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-migration.yml`. Fix any reported issue immediately.
|
|
111
|
-
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
112
|
-
|
|
113
|
-
## Exit Gate
|
|
114
|
-
|
|
115
|
-
Present results, get user confirmation, then close the workflow (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
116
|
-
|
|
117
|
-
### Results box
|
|
118
|
-
|
|
119
|
-
```markdown
|
|
120
|
-
## ✅ MIGRATION WORKFLOW COMPLETE — <task name>
|
|
121
|
-
|
|
122
|
-
**Migration** — [current → target, type]
|
|
123
|
-
**Strategy** — [incremental / big-bang / dual-run / phased]
|
|
124
|
-
**Verification** — [final verifier verdict + overall compatibility verdict]
|
|
125
|
-
**Fixes** — [N applied / none required / deliberately skipped]
|
|
126
|
-
**Operator guide** — [✅ `documentation/migration-guide.md` / skipped (`docs_enabled` not enabled)]
|
|
127
|
-
**Rollback plan** — ✅ `analysis/rollback-plan.md` (user-confirmed rollback only)
|
|
128
|
-
|
|
129
|
-
**Artifacts**
|
|
130
|
-
|
|
131
|
-
- `analysis/current-state-analysis.md`
|
|
132
|
-
- `analysis/target-state-plan.md`
|
|
133
|
-
- `analysis/requirements.md`
|
|
134
|
-
- `analysis/rollback-plan.md`
|
|
135
|
-
- `analysis/dual-run-plan.md` [conditional]
|
|
136
|
-
- `implementation/spec.md`
|
|
137
|
-
- `implementation/implementation-plan.md`
|
|
138
|
-
- `implementation/work-log.md`
|
|
139
|
-
- `verification/implementation-verification.md`
|
|
140
|
-
- `verification/compatibility-test-results.md`
|
|
141
|
-
- `documentation/migration-guide.md` [conditional]
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Results-acceptance question
|
|
145
|
-
|
|
146
|
-
Use `question` — "Are these results correct?" with options:
|
|
147
|
-
|
|
148
|
-
- **Accept** — the migration is complete; show the workflow-end handoff.
|
|
149
|
-
- **Adjust** — re-run the affected part (operator guide and/or finalization) with the user's corrections, update state, re-present the results box.
|
|
150
|
-
- **Discuss** — walk through the workflow summary, verification outcome, guide contents, or rollback readiness in more depth; then re-ask.
|
|
151
|
-
- **Stop here** — print the resume command (`/owflow:migration-finalize <task-path>`) and end.
|
|
152
|
-
|
|
153
|
-
### Next steps (after Accept)
|
|
154
|
-
|
|
155
|
-
**Workflow-end handoff (terminal)** — the migration workflow is finished; no further owflow phase command is required and this skill advances nothing. Remaining: none.
|
|
156
|
-
|
|
157
|
-
- Review the artifacts above, then commit and open a PR using the operator guide's rollback procedures as the safety reference — `optional` manual step outside owflow (the workflow performs no commits).
|
|
158
|
-
- `/owflow:reviews-pragmatic <task-path>` — `optional` — post-migration over-engineering check; does not advance phases.
|
|
159
|
-
- `/owflow:standards-update "<lesson learned>"` — `optional` — captures migration learnings as project standards; does not advance phases.
|
|
160
|
-
|
|
161
|
-
Then STOP.
|
|
1
|
+
---
|
|
2
|
+
name: owflow:migration-finalize
|
|
3
|
+
description: Migration — authors the operator migration guide inline when enabled, then completes the task. Workflow-terminal (docs-generated optional, task-completed always).
|
|
4
|
+
argument-hint: "[task-path-or-identifier]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Migration Finalize — Operator Guide & Task Completion (docs-generated, task-completed)
|
|
9
|
+
|
|
10
|
+
Terminal work phase of the migration workflow. When `options.docs_enabled` resolves true it authors `documentation/migration-guide.md` **inline** (operator audience, text-first — no `user-docs-generator`, no Playwright, no agent edits); then it always finalizes: workflow summary, `task.status: completed`, and the `task-completed` slug.
|
|
11
|
+
|
|
12
|
+
## Entry Gate
|
|
13
|
+
|
|
14
|
+
### 1. Argument resolution
|
|
15
|
+
|
|
16
|
+
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
17
|
+
|
|
18
|
+
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
19
|
+
- **Identifier** — exact directory name inside `.owflow/tasks/migrations/` (e.g., `2026-01-12-framework-upgrade`); resolve to its path.
|
|
20
|
+
- Missing argument, a path that does **not exist**, or no identifier match → print the blocked block (part 3), then STOP. Never guess or auto-pick a task.
|
|
21
|
+
|
|
22
|
+
### 2. Prerequisites
|
|
23
|
+
|
|
24
|
+
| Required for this skill | Where verified | Produced by |
|
|
25
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
|
|
26
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:migration <description>` (dispatcher init) or mid-pipeline bootstrap |
|
|
27
|
+
| Verification done | `verification-done` in `completed_phases` **and** `verification/implementation-verification.md` exists | `/owflow:migration-verify <task-path>` |
|
|
28
|
+
| Fix phase settled | `verification_context.compatibility_status = passed` **and** (`issues-resolved` present with non-empty `fixes_applied` or a recorded approval, **or** `verification_context.last_status = passed`, **or** `phase_summaries.fix.summary` records a deliberate skip) | `/owflow:migration-fix`, `/owflow:migration-verify` |
|
|
29
|
+
| Docs toggle known (conditional step) | `options.docs_enabled` in state (`true`/`false`; `null` ⇒ the options gate never ran — treated as not enabled) | `/owflow:migration-verify` (options step) |
|
|
30
|
+
|
|
31
|
+
### 3. Blocked output
|
|
32
|
+
|
|
33
|
+
1. Steps that must be completed first (in order), each with its command:
|
|
34
|
+
- Issue resolution (`issues-resolved`) → `/owflow:migration-fix <task-path>` (only when verification left fixable issues)
|
|
35
|
+
- Verification (`verification-done`) → `/owflow:migration-verify <task-path>`
|
|
36
|
+
- Migration execution (`migration-executed`) → `/owflow:migration-implement <task-path>` (if also missing)
|
|
37
|
+
- Implementation planning (`plan-created`) → `/owflow:migration-plan <task-path>` (if also missing)
|
|
38
|
+
- Strategy specification (`strategy-specified`) → `/owflow:migration-spec <task-path>` (if also missing)
|
|
39
|
+
- Target state planning (`target-planned`) → `/owflow:migration-target <task-path>` (if also missing)
|
|
40
|
+
- Current-state analysis (`state-analysed`) → `/owflow:migration-analyze <task-path>` (if also missing)
|
|
41
|
+
- State initialization → `/owflow:migration <description>` (new task)
|
|
42
|
+
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
43
|
+
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
44
|
+
|
|
45
|
+
Then STOP — never guess or auto-pick a task.
|
|
46
|
+
|
|
47
|
+
### 4. Missing-state bootstrap
|
|
48
|
+
|
|
49
|
+
When the only unmet prerequisite is the state file, use `question` — "No task exists at this path. Create a fresh standard migration task and start at `task-completed`?" with **Create task** / **Decline**.
|
|
50
|
+
|
|
51
|
+
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-finalize (mid-pipeline bootstrap)"`, `orchestrator.started_phase: task-completed`, `completed_phases: []`, `task.title`/`task.description` from the argument. Run `verify_template` (`orchestrator-state-migration.yml`) immediately. Creates state ONLY — `verification/implementation-verification.md` still blocks, so bootstrapping never skips upstream work.
|
|
52
|
+
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
53
|
+
|
|
54
|
+
### 5. Skip/resume — artifacts before state
|
|
55
|
+
|
|
56
|
+
- `task.status: completed` or `task-completed` in `completed_phases` ⇒ report the existing finalization and STOP — the workflow is terminal; never re-run it.
|
|
57
|
+
- `documentation/migration-guide.md` exists but `docs-generated` is missing ⇒ **adopt**: append `docs-generated`, backfill `migration_outputs.migration_guide`, continue to finalization.
|
|
58
|
+
- `docs-generated` is present but the guide is missing ⇒ **drop** `docs-generated` and re-author (only when enabled).
|
|
59
|
+
- Fix phase unsettled (`compatibility_status != passed` — failed or never written — **or** no `issues-resolved`/approval/skip **and** `last_status != passed`) ⇒ route back to `/owflow:migration-verify <task-path>` (or `/owflow:migration-fix <task-path>` when issues remain) — never finalize unfinished verification. A failed compatibility check is **never waived by a deliberate skip or approval**: re-verify after fixes, or use user-confirmed rollback.
|
|
60
|
+
- A settled `options.docs_enabled` is reported, not re-asked.
|
|
61
|
+
|
|
62
|
+
### 6. Conditional activation
|
|
63
|
+
|
|
64
|
+
Read `options.docs_enabled` (tri-state). `true` ⇒ run the Documentation step below. `false` **or** `null` (the options gate never settled it) ⇒ report `Operator guide disabled — skipping documentation.` and skip straight to Finalization: **no `docs-generated` slug, no failure entry** — a docs skip is an option value, not a failure. Do not prompt for the toggle here; its setter is `migration-verify`'s options step.
|
|
65
|
+
|
|
66
|
+
### 7. Recovery
|
|
67
|
+
|
|
68
|
+
| Step | Max Attempts | Strategy |
|
|
69
|
+
| ------------------------------- | ------------ | ------------------------------------------------------------------------------ |
|
|
70
|
+
| Documentation (`docs-generated`) | 1 | Generate text-only — inline markdown, no screenshots or tooling |
|
|
71
|
+
| Finalization (`task-completed`) | 1 | Compose the summary and set `task.status: completed`; state-only — repeat once, then report |
|
|
72
|
+
|
|
73
|
+
## Execute
|
|
74
|
+
|
|
75
|
+
**Read first**: no delegation is used in this skill. **Inline authoring by design**: `user-docs-generator` (hard-codes `documentation/user-guide.md` + Playwright) is explicitly out of scope — never invoke it, Playwright, or any agent for the guide.
|
|
76
|
+
|
|
77
|
+
| Direction | Artifact | Producer |
|
|
78
|
+
| --------- | ------------------------------------- | ----------------------------------------------------------- |
|
|
79
|
+
| Consumed | all `migration_outputs.*` paths | upstream phases (analysis → verification) |
|
|
80
|
+
| Consumed | `verification_context.last_status`, `verification_context.compatibility_status` | `migration-verify` (ownership), `migration-fix` (re-verify refresh) |
|
|
81
|
+
| Consumed | `options.docs_enabled` | `migration-verify` options step |
|
|
82
|
+
| Produced | `documentation/migration-guide.md` (conditional) | inline authoring (this skill) |
|
|
83
|
+
| Produced | workflow summary + `task.status: completed` | inline authoring (this skill) |
|
|
84
|
+
|
|
85
|
+
### Operator Migration Guide (`docs-generated`, conditional)
|
|
86
|
+
|
|
87
|
+
**Skip if** `options.docs_enabled` is not `true` (see part 6 — report and skip; no slug, no failure entry).
|
|
88
|
+
|
|
89
|
+
Author `documentation/migration-guide.md` directly in the main agent — **operator audience, text-first**. Cover exactly:
|
|
90
|
+
|
|
91
|
+
1. **Migration overview and goals** — what changed, why, current → target.
|
|
92
|
+
2. **Prerequisites and preparation** — access, backups, environment readiness.
|
|
93
|
+
3. **Step-by-step procedure** — ordered operator steps from the implementation plan / work log, with the per-group checkpoints.
|
|
94
|
+
4. **Rollback procedures** — from `analysis/rollback-plan.md` (authoritative) and `analysis/dual-run-plan.md` when present.
|
|
95
|
+
5. **Troubleshooting** — known issues from verification, the compatibility checks, and fix decisions.
|
|
96
|
+
|
|
97
|
+
**State write**: append `docs-generated`; set `migration_outputs.migration_guide: "documentation/migration-guide.md"`; bump `orchestrator.updated`; re-read + `verify_template`.
|
|
98
|
+
|
|
99
|
+
### Finalization (`task-completed`, always)
|
|
100
|
+
|
|
101
|
+
1. **Compose the workflow summary** from state + artifacts: migration type/strategy, steps completed, verification + compatibility outcomes, fixes, guide status. There is no `finalize` key in `phase_summaries` — the omission is deliberate (state-only terminal step); do not add one.
|
|
102
|
+
2. **State write**: set `task.status: completed`; append `task-completed`; bump `orchestrator.updated`; re-read + `verify_template`.
|
|
103
|
+
3. **Workflow-end handoff**: no further owflow phase is required; list the artifacts for the user's own review and commit (the workflow performs no commits).
|
|
104
|
+
|
|
105
|
+
## State Update Convention (per step)
|
|
106
|
+
|
|
107
|
+
1. **Write immediately** — append `docs-generated` only when documentation actually ran, then `task-completed` at finalization; never batch and never append `docs-generated` on a skip or failure.
|
|
108
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
109
|
+
3. **Failures** — if the guide ultimately fails after the one text-only retry, do NOT append `docs-generated`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["docs-generated"]`; ask the user whether to continue to finalization without docs. A disabled guide is NOT a failure (no entry at all).
|
|
110
|
+
4. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-migration.yml`. Fix any reported issue immediately.
|
|
111
|
+
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
112
|
+
|
|
113
|
+
## Exit Gate
|
|
114
|
+
|
|
115
|
+
Present results, get user confirmation, then close the workflow (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
116
|
+
|
|
117
|
+
### Results box
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
## ✅ MIGRATION WORKFLOW COMPLETE — <task name>
|
|
121
|
+
|
|
122
|
+
**Migration** — [current → target, type]
|
|
123
|
+
**Strategy** — [incremental / big-bang / dual-run / phased]
|
|
124
|
+
**Verification** — [final verifier verdict + overall compatibility verdict]
|
|
125
|
+
**Fixes** — [N applied / none required / deliberately skipped]
|
|
126
|
+
**Operator guide** — [✅ `documentation/migration-guide.md` / skipped (`docs_enabled` not enabled)]
|
|
127
|
+
**Rollback plan** — ✅ `analysis/rollback-plan.md` (user-confirmed rollback only)
|
|
128
|
+
|
|
129
|
+
**Artifacts**
|
|
130
|
+
|
|
131
|
+
- `analysis/current-state-analysis.md`
|
|
132
|
+
- `analysis/target-state-plan.md`
|
|
133
|
+
- `analysis/requirements.md`
|
|
134
|
+
- `analysis/rollback-plan.md`
|
|
135
|
+
- `analysis/dual-run-plan.md` [conditional]
|
|
136
|
+
- `implementation/spec.md`
|
|
137
|
+
- `implementation/implementation-plan.md`
|
|
138
|
+
- `implementation/work-log.md`
|
|
139
|
+
- `verification/implementation-verification.md`
|
|
140
|
+
- `verification/compatibility-test-results.md`
|
|
141
|
+
- `documentation/migration-guide.md` [conditional]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Results-acceptance question
|
|
145
|
+
|
|
146
|
+
Use `question` — "Are these results correct?" with options:
|
|
147
|
+
|
|
148
|
+
- **Accept** — the migration is complete; show the workflow-end handoff.
|
|
149
|
+
- **Adjust** — re-run the affected part (operator guide and/or finalization) with the user's corrections, update state, re-present the results box.
|
|
150
|
+
- **Discuss** — walk through the workflow summary, verification outcome, guide contents, or rollback readiness in more depth; then re-ask.
|
|
151
|
+
- **Stop here** — print the resume command (`/owflow:migration-finalize <task-path>`) and end.
|
|
152
|
+
|
|
153
|
+
### Next steps (after Accept)
|
|
154
|
+
|
|
155
|
+
**Workflow-end handoff (terminal)** — the migration workflow is finished; no further owflow phase command is required and this skill advances nothing. Remaining: none.
|
|
156
|
+
|
|
157
|
+
- Review the artifacts above, then commit and open a PR using the operator guide's rollback procedures as the safety reference — `optional` manual step outside owflow (the workflow performs no commits).
|
|
158
|
+
- `/owflow:reviews-pragmatic <task-path>` — `optional` — post-migration over-engineering check; does not advance phases.
|
|
159
|
+
- `/owflow:standards-update "<lesson learned>"` — `optional` — captures migration learnings as project standards; does not advance phases.
|
|
160
|
+
|
|
161
|
+
Then STOP.
|