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,155 +1,155 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:migration-fix
|
|
3
|
-
description: Migration — conditional verification-issue resolution with a max-3 fix-then-reverify loop and a data-integrity HALT that is never auto-fixed (issues-resolved).
|
|
4
|
-
argument-hint: "[task-path-or-identifier]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Migration Fix — Conditional Issue Resolution (issues-resolved)
|
|
9
|
-
|
|
10
|
-
Conditional work phase of the migration workflow. Activates only when the verification state fact says fixable issues remain. Runs the shared [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md) — max 3 iterations, re-invoke `implementation-verifier`, `fixes_applied` written immediately per iteration — with the migration deltas (compatibility verdict invalidation, data-integrity HALT). **Data-integrity problems are NEVER auto-fixed.**
|
|
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
|
-
| Fixable issues exist | `verification_context.compatibility_status = failed` **or** (`verification_context.last_status != passed` and no recorded deliberate skip); the verification/compatibility reports list fixable critical/warning issues, **or** a deliberate skip is already recorded with `compatibility_status = passed` (settled — route forward) | `/owflow:migration-verify <task-path>` |
|
|
29
|
-
|
|
30
|
-
### 3. Blocked output
|
|
31
|
-
|
|
32
|
-
1. Steps that must be completed first (in order), each with its command:
|
|
33
|
-
- Verification (`verification-done`) → `/owflow:migration-verify <task-path>`
|
|
34
|
-
- Migration execution (`migration-executed`) → `/owflow:migration-implement <task-path>` (if also missing)
|
|
35
|
-
- Implementation planning (`plan-created`) → `/owflow:migration-plan <task-path>` (if also missing)
|
|
36
|
-
- Strategy specification (`strategy-specified`) → `/owflow:migration-spec <task-path>` (if also missing)
|
|
37
|
-
- Target state planning (`target-planned`) → `/owflow:migration-target <task-path>` (if also missing)
|
|
38
|
-
- Current-state analysis (`state-analysed`) → `/owflow:migration-analyze <task-path>` (if also missing)
|
|
39
|
-
- State initialization → `/owflow:migration <description>` (new task)
|
|
40
|
-
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
41
|
-
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
42
|
-
|
|
43
|
-
Then STOP — never guess or auto-pick a task.
|
|
44
|
-
|
|
45
|
-
### 4. Missing-state bootstrap
|
|
46
|
-
|
|
47
|
-
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 `issues-resolved`?" with **Create task** / **Decline**.
|
|
48
|
-
|
|
49
|
-
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-fix (mid-pipeline bootstrap)"`, `orchestrator.started_phase: issues-resolved`, `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.
|
|
50
|
-
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
51
|
-
|
|
52
|
-
### 5. Skip/resume — artifacts before state
|
|
53
|
-
|
|
54
|
-
- `issues-resolved` is present with **non-empty** `verification_context.fixes_applied` **or a recorded approval in `verification_context.decisions_made`** (its state-resident marker) ⇒ report the existing fixes/decision and route to the Exit Gate — **except** when `compatibility_status != passed`, where part 6 activation keeps the failed check active and routes to `/owflow:migration-verify <task-path>`.
|
|
55
|
-
- `issues-resolved` is present with neither a non-empty `fixes_applied` nor a recorded approval ⇒ **drop** the slug and re-run — never trust a bare slug.
|
|
56
|
-
- A deliberate skip recorded in `phase_summaries.fix.summary` + `decisions_made` ⇒ **settled for verifier issues**: report it and route to `/owflow:migration-finalize <task-path>` **only when `compatibility_status = passed`**; when `compatibility_status = failed`, the skip does not waive the failed check — present the compatibility failure (data-integrity ⇒ HALT/rollback) and route to `/owflow:migration-verify <task-path>`; never re-open verifier issues.
|
|
57
|
-
- `issues-resolved` is absent while `verification/implementation-verification.md` + `verification-done` hold ⇒ normal entry; when `fixes_applied` is already non-empty from an interrupted run, report those fixes and resume the loop without re-applying them.
|
|
58
|
-
- Settled `verification_context.decisions_made` entries are reported, not re-asked.
|
|
59
|
-
|
|
60
|
-
### 6. Conditional activation
|
|
61
|
-
|
|
62
|
-
Read the **state facts** `verification_context.last_status` + `verification_context.compatibility_status` and the verification/compatibility reports. A recorded deliberate skip deactivates with `Fix deliberately skipped — issue resolution settled.` **only when `compatibility_status = passed`**; otherwise, when inactive — `last_status = passed` **and** `compatibility_status = passed`, and the reports list no fixable critical/warning issues — print exactly:
|
|
63
|
-
|
|
64
|
-
`No fixable issues — issue resolution not required.`
|
|
65
|
-
|
|
66
|
-
and route to `/owflow:migration-finalize <task-path>` (required next: operator guide when enabled, then task completion), then STOP. **No flag, no user choice** — the state facts decide activation.
|
|
67
|
-
|
|
68
|
-
### 7. Recovery
|
|
69
|
-
|
|
70
|
-
| Step | Max Attempts | Strategy |
|
|
71
|
-
| -------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
|
|
72
|
-
| Fix loop (`issues-resolved`) | 3 iterations | Contract, not a retry counter: fix-then-reverify; at 3 ask proceed-with-warnings or rollback. **Data integrity: HALT — never auto-fixed** |
|
|
73
|
-
|
|
74
|
-
## Execute
|
|
75
|
-
|
|
76
|
-
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md), the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md), and [Issue Resolution](../orchestrator-framework/references/orchestrator-patterns.md) (Section 6).
|
|
77
|
-
|
|
78
|
-
| Direction | Artifact | Producer |
|
|
79
|
-
| --------- | ----------------------------------------------- | --------------------------------------------------------------------- |
|
|
80
|
-
| Consumed | `verification/implementation-verification.md` | `implementation-verifier` via `migration-verify` |
|
|
81
|
-
| Consumed | `verification/compatibility-test-results.md` | `migration-verify` (data-integrity and rollback evidence) |
|
|
82
|
-
| Produced | migrated code fixes + state `fixes_applied` | direct execution (this skill) |
|
|
83
|
-
| Produced | updated `verification/implementation-verification.md` | re-invoked `implementation-verifier` (**Skill**) |
|
|
84
|
-
|
|
85
|
-
### User-Driven Fix Loop (`issues-resolved`)
|
|
86
|
-
|
|
87
|
-
1. **Display the detailed issue breakdown** grouped by category and severity (location, description, fixability).
|
|
88
|
-
2. **Present critical + warning issues as a numbered list.**
|
|
89
|
-
3. `question` per the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md) — "Which issues should I fix?" with exactly three options: **"Fix all fixable issues"** / **"Let me choose specific issues"** / **"Skip fixes, proceed as-is"**.
|
|
90
|
-
4. **Fix the selected issues directly** (the migrated code is this skill's artifact). **Immediately** after each fix, append it to `verification_context.fixes_applied` in state — never deferred to the end; bump `orchestrator.updated`; re-read + `verify_template`. After fixes set `options.skip_test_suite: false` (code changed — the suite must re-run on re-verification) **and invalidate the stale compatibility verdict: `verification_context.compatibility_status: null`** (field-level fail-closed exception — the 4 checks ran against pre-fix code; only `migration-verify` may set a new verdict).
|
|
91
|
-
5. `question` — "Re-run verification to check fixes?" → **"Yes, re-run verification"** / **"No, proceed to next phase"**. On yes: Skill tool — `implementation-verifier`; then **immediately** update `verification_context.reverify_count` **and refresh `verification_context.last_status` + `issues_found` from the verifier's structured return** (field-level re-verify exception — the fix loop replaces the verification result), then return to step 1 (max 3 iterations). `compatibility_status` stays `null` (invalidated by the fixes) or `failed` and remains owned by `migration-verify`: when it is not `passed`, the loop's required next step is `/owflow:migration-verify <task-path>` (its re-verification re-runs the compatibility checks and settles the verdict) — never route a non-passed compatibility status to finalize. On "No", exit the loop to the Exit Gate, where the same required-next rule applies. Single-writer split: `migration-verify` owns `last_status`/`issues_found`/`compatibility_status`; this skill owns `fixes_applied`, `reverify_count`, `decisions_made`, plus the re-verify refresh of `last_status`/`issues_found` and the fail-closed invalidation of `compatibility_status`.
|
|
92
|
-
6. **Record each user decision** (specific selection, proceed-with-warnings, deliberate skip) in `verification_context.decisions_made`.
|
|
93
|
-
|
|
94
|
-
**Data Safety — HALT**: any data-integrity issue (from the verification report, a compatibility result, or discovered while fixing) → HALT: never auto-fix data problems, never run a destructive data repair. Present the issue with the rollback option. **Rollback happens only on explicit user confirmation — no automatic rollback or revert ever.** A deliberate skip cannot waive a data-integrity failure or any non-passed compatibility check.
|
|
95
|
-
|
|
96
|
-
**Exit conditions (surfaced as results-box glyphs — never Exit-Gate state mutations)**:
|
|
97
|
-
|
|
98
|
-
- ✅ no critical issues remain → append `issues-resolved` and proceed.
|
|
99
|
-
- ⚠ max 3 iterations reached → `question` — "Proceed with known issues?" / "Rollback": proceed ⇒ append `issues-resolved` with the approval recorded in `decisions_made`; rollback ⇒ do NOT append, record the decision, and HALT for user-confirmed rollback.
|
|
100
|
-
- ❌ data integrity → HALT immediately, recommend user-confirmed rollback; do NOT append `issues-resolved`; record `failed_phases` + increment `auto_fix_attempts["issues-resolved"]`.
|
|
101
|
-
- Deliberate skip ("Skip fixes, proceed as-is") → a user-chosen skip, not a failure: no `issues-resolved` slug, no failure entry; record the reason in `phase_summaries.fix.summary` + `decisions_made`. `migration-finalize` accepts this settled skip **only when `compatibility_status = passed`**; `compatibility_status = failed` remains an absolute finalize blocker (re-verify after fixes, or user-confirmed rollback).
|
|
102
|
-
|
|
103
|
-
## State Update Convention (per step)
|
|
104
|
-
|
|
105
|
-
1. **Write immediately** — `fixes_applied` after every fix (never batched); `reverify_count`/`decisions_made` **and the `last_status`/`issues_found` refresh** right after each verifier run or decision; `issues-resolved` only when the loop settles successfully (✅, or an approved ⚠). Never defer and never append on a deliberate skip.
|
|
106
|
-
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
107
|
-
3. **Failures** — a HALT or failed fix iteration is NOT appended to `completed_phases`; append `issues-resolved` to `orchestrator.failed_phases` and increment `auto_fix_attempts["issues-resolved"]`.
|
|
108
|
-
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.
|
|
109
|
-
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
110
|
-
|
|
111
|
-
## Exit Gate
|
|
112
|
-
|
|
113
|
-
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
114
|
-
|
|
115
|
-
### Results box
|
|
116
|
-
|
|
117
|
-
```markdown
|
|
118
|
-
## ✅ MIGRATION FIX COMPLETE — <task name>
|
|
119
|
-
|
|
120
|
-
**Iterations** — [N of max 3]
|
|
121
|
-
**Fixes applied** — [count + 1-line list]
|
|
122
|
-
**Remaining issues** — [by severity / none]
|
|
123
|
-
**Re-verification** — [✅ passed / ⚠ passed_with_issues / ❌ failed — N re-runs]
|
|
124
|
-
**Data integrity** — [✅ no data issues / ❌ HALT — rollback recommended (user confirmation required)]
|
|
125
|
-
**Decisions** — [proceed-with-warnings / deliberate skip / specific selection]
|
|
126
|
-
|
|
127
|
-
**Artifacts**
|
|
128
|
-
|
|
129
|
-
- migrated code fixes
|
|
130
|
-
- `verification/implementation-verification.md` (updated by re-verification runs)
|
|
131
|
-
- state `verification_context.fixes_applied`
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Results-acceptance question
|
|
135
|
-
|
|
136
|
-
Use `question` — "Are these results correct?" with options:
|
|
137
|
-
|
|
138
|
-
- **Accept** — the fixes (or the approved proceed-with-warnings / deliberate skip) are good; continue.
|
|
139
|
-
- **Adjust** — fix additional selected issues and/or run another verification round within the max-3 contract, update state and the report, re-present the results box.
|
|
140
|
-
- **Discuss** — walk through specific fixes, remaining issues, or the data-integrity HALT in more depth; then re-ask.
|
|
141
|
-
- **Stop here** — print the resume command (`/owflow:migration-fix <task-path>`) and end.
|
|
142
|
-
|
|
143
|
-
### Next steps (after Accept)
|
|
144
|
-
|
|
145
|
-
Render ONLY the row whose condition matches the state:
|
|
146
|
-
|
|
147
|
-
- `→ /owflow:migration-verify <task-path>` — `required` — only when `verification_context.compatibility_status != passed` (failed, or invalidated to null by applied fixes — a verifier-only re-run cannot settle compatibility): re-verification re-runs the 4 checks and owns `compatibility_status`. Remaining after: finalize.
|
|
148
|
-
- `→ /owflow:migration-finalize <task-path>` — `required` — only when `compatibility_status = passed` (after a ✅ loop, an approved ⚠, or a deliberate skip): closes the workflow (authors the operator guide when `options.docs_enabled` is true, then completes the task). Remaining after: none — workflow ends.
|
|
149
|
-
|
|
150
|
-
**Other options**:
|
|
151
|
-
|
|
152
|
-
- After a ❌ data-integrity HALT with **user-confirmed rollback only**: restore to the last known-good state per `analysis/rollback-plan.md`, then re-enter `/owflow:migration-verify <task-path>` — `optional`, manual, never automatic.
|
|
153
|
-
- `/owflow:goal-migration <task-path>` — `optional` shortcut: runs the remaining phases in one loop (finalize)
|
|
154
|
-
|
|
155
|
-
Then STOP.
|
|
1
|
+
---
|
|
2
|
+
name: owflow:migration-fix
|
|
3
|
+
description: Migration — conditional verification-issue resolution with a max-3 fix-then-reverify loop and a data-integrity HALT that is never auto-fixed (issues-resolved).
|
|
4
|
+
argument-hint: "[task-path-or-identifier]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Migration Fix — Conditional Issue Resolution (issues-resolved)
|
|
9
|
+
|
|
10
|
+
Conditional work phase of the migration workflow. Activates only when the verification state fact says fixable issues remain. Runs the shared [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md) — max 3 iterations, re-invoke `implementation-verifier`, `fixes_applied` written immediately per iteration — with the migration deltas (compatibility verdict invalidation, data-integrity HALT). **Data-integrity problems are NEVER auto-fixed.**
|
|
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
|
+
| Fixable issues exist | `verification_context.compatibility_status = failed` **or** (`verification_context.last_status != passed` and no recorded deliberate skip); the verification/compatibility reports list fixable critical/warning issues, **or** a deliberate skip is already recorded with `compatibility_status = passed` (settled — route forward) | `/owflow:migration-verify <task-path>` |
|
|
29
|
+
|
|
30
|
+
### 3. Blocked output
|
|
31
|
+
|
|
32
|
+
1. Steps that must be completed first (in order), each with its command:
|
|
33
|
+
- Verification (`verification-done`) → `/owflow:migration-verify <task-path>`
|
|
34
|
+
- Migration execution (`migration-executed`) → `/owflow:migration-implement <task-path>` (if also missing)
|
|
35
|
+
- Implementation planning (`plan-created`) → `/owflow:migration-plan <task-path>` (if also missing)
|
|
36
|
+
- Strategy specification (`strategy-specified`) → `/owflow:migration-spec <task-path>` (if also missing)
|
|
37
|
+
- Target state planning (`target-planned`) → `/owflow:migration-target <task-path>` (if also missing)
|
|
38
|
+
- Current-state analysis (`state-analysed`) → `/owflow:migration-analyze <task-path>` (if also missing)
|
|
39
|
+
- State initialization → `/owflow:migration <description>` (new task)
|
|
40
|
+
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
41
|
+
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
42
|
+
|
|
43
|
+
Then STOP — never guess or auto-pick a task.
|
|
44
|
+
|
|
45
|
+
### 4. Missing-state bootstrap
|
|
46
|
+
|
|
47
|
+
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 `issues-resolved`?" with **Create task** / **Decline**.
|
|
48
|
+
|
|
49
|
+
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-fix (mid-pipeline bootstrap)"`, `orchestrator.started_phase: issues-resolved`, `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.
|
|
50
|
+
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
51
|
+
|
|
52
|
+
### 5. Skip/resume — artifacts before state
|
|
53
|
+
|
|
54
|
+
- `issues-resolved` is present with **non-empty** `verification_context.fixes_applied` **or a recorded approval in `verification_context.decisions_made`** (its state-resident marker) ⇒ report the existing fixes/decision and route to the Exit Gate — **except** when `compatibility_status != passed`, where part 6 activation keeps the failed check active and routes to `/owflow:migration-verify <task-path>`.
|
|
55
|
+
- `issues-resolved` is present with neither a non-empty `fixes_applied` nor a recorded approval ⇒ **drop** the slug and re-run — never trust a bare slug.
|
|
56
|
+
- A deliberate skip recorded in `phase_summaries.fix.summary` + `decisions_made` ⇒ **settled for verifier issues**: report it and route to `/owflow:migration-finalize <task-path>` **only when `compatibility_status = passed`**; when `compatibility_status = failed`, the skip does not waive the failed check — present the compatibility failure (data-integrity ⇒ HALT/rollback) and route to `/owflow:migration-verify <task-path>`; never re-open verifier issues.
|
|
57
|
+
- `issues-resolved` is absent while `verification/implementation-verification.md` + `verification-done` hold ⇒ normal entry; when `fixes_applied` is already non-empty from an interrupted run, report those fixes and resume the loop without re-applying them.
|
|
58
|
+
- Settled `verification_context.decisions_made` entries are reported, not re-asked.
|
|
59
|
+
|
|
60
|
+
### 6. Conditional activation
|
|
61
|
+
|
|
62
|
+
Read the **state facts** `verification_context.last_status` + `verification_context.compatibility_status` and the verification/compatibility reports. A recorded deliberate skip deactivates with `Fix deliberately skipped — issue resolution settled.` **only when `compatibility_status = passed`**; otherwise, when inactive — `last_status = passed` **and** `compatibility_status = passed`, and the reports list no fixable critical/warning issues — print exactly:
|
|
63
|
+
|
|
64
|
+
`No fixable issues — issue resolution not required.`
|
|
65
|
+
|
|
66
|
+
and route to `/owflow:migration-finalize <task-path>` (required next: operator guide when enabled, then task completion), then STOP. **No flag, no user choice** — the state facts decide activation.
|
|
67
|
+
|
|
68
|
+
### 7. Recovery
|
|
69
|
+
|
|
70
|
+
| Step | Max Attempts | Strategy |
|
|
71
|
+
| -------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
|
|
72
|
+
| Fix loop (`issues-resolved`) | 3 iterations | Contract, not a retry counter: fix-then-reverify; at 3 ask proceed-with-warnings or rollback. **Data integrity: HALT — never auto-fixed** |
|
|
73
|
+
|
|
74
|
+
## Execute
|
|
75
|
+
|
|
76
|
+
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md), the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md), and [Issue Resolution](../orchestrator-framework/references/orchestrator-patterns.md) (Section 6).
|
|
77
|
+
|
|
78
|
+
| Direction | Artifact | Producer |
|
|
79
|
+
| --------- | ----------------------------------------------- | --------------------------------------------------------------------- |
|
|
80
|
+
| Consumed | `verification/implementation-verification.md` | `implementation-verifier` via `migration-verify` |
|
|
81
|
+
| Consumed | `verification/compatibility-test-results.md` | `migration-verify` (data-integrity and rollback evidence) |
|
|
82
|
+
| Produced | migrated code fixes + state `fixes_applied` | direct execution (this skill) |
|
|
83
|
+
| Produced | updated `verification/implementation-verification.md` | re-invoked `implementation-verifier` (**Skill**) |
|
|
84
|
+
|
|
85
|
+
### User-Driven Fix Loop (`issues-resolved`)
|
|
86
|
+
|
|
87
|
+
1. **Display the detailed issue breakdown** grouped by category and severity (location, description, fixability).
|
|
88
|
+
2. **Present critical + warning issues as a numbered list.**
|
|
89
|
+
3. `question` per the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md) — "Which issues should I fix?" with exactly three options: **"Fix all fixable issues"** / **"Let me choose specific issues"** / **"Skip fixes, proceed as-is"**.
|
|
90
|
+
4. **Fix the selected issues directly** (the migrated code is this skill's artifact). **Immediately** after each fix, append it to `verification_context.fixes_applied` in state — never deferred to the end; bump `orchestrator.updated`; re-read + `verify_template`. After fixes set `options.skip_test_suite: false` (code changed — the suite must re-run on re-verification) **and invalidate the stale compatibility verdict: `verification_context.compatibility_status: null`** (field-level fail-closed exception — the 4 checks ran against pre-fix code; only `migration-verify` may set a new verdict).
|
|
91
|
+
5. `question` — "Re-run verification to check fixes?" → **"Yes, re-run verification"** / **"No, proceed to next phase"**. On yes: Skill tool — `implementation-verifier`; then **immediately** update `verification_context.reverify_count` **and refresh `verification_context.last_status` + `issues_found` from the verifier's structured return** (field-level re-verify exception — the fix loop replaces the verification result), then return to step 1 (max 3 iterations). `compatibility_status` stays `null` (invalidated by the fixes) or `failed` and remains owned by `migration-verify`: when it is not `passed`, the loop's required next step is `/owflow:migration-verify <task-path>` (its re-verification re-runs the compatibility checks and settles the verdict) — never route a non-passed compatibility status to finalize. On "No", exit the loop to the Exit Gate, where the same required-next rule applies. Single-writer split: `migration-verify` owns `last_status`/`issues_found`/`compatibility_status`; this skill owns `fixes_applied`, `reverify_count`, `decisions_made`, plus the re-verify refresh of `last_status`/`issues_found` and the fail-closed invalidation of `compatibility_status`.
|
|
92
|
+
6. **Record each user decision** (specific selection, proceed-with-warnings, deliberate skip) in `verification_context.decisions_made`.
|
|
93
|
+
|
|
94
|
+
**Data Safety — HALT**: any data-integrity issue (from the verification report, a compatibility result, or discovered while fixing) → HALT: never auto-fix data problems, never run a destructive data repair. Present the issue with the rollback option. **Rollback happens only on explicit user confirmation — no automatic rollback or revert ever.** A deliberate skip cannot waive a data-integrity failure or any non-passed compatibility check.
|
|
95
|
+
|
|
96
|
+
**Exit conditions (surfaced as results-box glyphs — never Exit-Gate state mutations)**:
|
|
97
|
+
|
|
98
|
+
- ✅ no critical issues remain → append `issues-resolved` and proceed.
|
|
99
|
+
- ⚠ max 3 iterations reached → `question` — "Proceed with known issues?" / "Rollback": proceed ⇒ append `issues-resolved` with the approval recorded in `decisions_made`; rollback ⇒ do NOT append, record the decision, and HALT for user-confirmed rollback.
|
|
100
|
+
- ❌ data integrity → HALT immediately, recommend user-confirmed rollback; do NOT append `issues-resolved`; record `failed_phases` + increment `auto_fix_attempts["issues-resolved"]`.
|
|
101
|
+
- Deliberate skip ("Skip fixes, proceed as-is") → a user-chosen skip, not a failure: no `issues-resolved` slug, no failure entry; record the reason in `phase_summaries.fix.summary` + `decisions_made`. `migration-finalize` accepts this settled skip **only when `compatibility_status = passed`**; `compatibility_status = failed` remains an absolute finalize blocker (re-verify after fixes, or user-confirmed rollback).
|
|
102
|
+
|
|
103
|
+
## State Update Convention (per step)
|
|
104
|
+
|
|
105
|
+
1. **Write immediately** — `fixes_applied` after every fix (never batched); `reverify_count`/`decisions_made` **and the `last_status`/`issues_found` refresh** right after each verifier run or decision; `issues-resolved` only when the loop settles successfully (✅, or an approved ⚠). Never defer and never append on a deliberate skip.
|
|
106
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
107
|
+
3. **Failures** — a HALT or failed fix iteration is NOT appended to `completed_phases`; append `issues-resolved` to `orchestrator.failed_phases` and increment `auto_fix_attempts["issues-resolved"]`.
|
|
108
|
+
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.
|
|
109
|
+
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
110
|
+
|
|
111
|
+
## Exit Gate
|
|
112
|
+
|
|
113
|
+
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
114
|
+
|
|
115
|
+
### Results box
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
## ✅ MIGRATION FIX COMPLETE — <task name>
|
|
119
|
+
|
|
120
|
+
**Iterations** — [N of max 3]
|
|
121
|
+
**Fixes applied** — [count + 1-line list]
|
|
122
|
+
**Remaining issues** — [by severity / none]
|
|
123
|
+
**Re-verification** — [✅ passed / ⚠ passed_with_issues / ❌ failed — N re-runs]
|
|
124
|
+
**Data integrity** — [✅ no data issues / ❌ HALT — rollback recommended (user confirmation required)]
|
|
125
|
+
**Decisions** — [proceed-with-warnings / deliberate skip / specific selection]
|
|
126
|
+
|
|
127
|
+
**Artifacts**
|
|
128
|
+
|
|
129
|
+
- migrated code fixes
|
|
130
|
+
- `verification/implementation-verification.md` (updated by re-verification runs)
|
|
131
|
+
- state `verification_context.fixes_applied`
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Results-acceptance question
|
|
135
|
+
|
|
136
|
+
Use `question` — "Are these results correct?" with options:
|
|
137
|
+
|
|
138
|
+
- **Accept** — the fixes (or the approved proceed-with-warnings / deliberate skip) are good; continue.
|
|
139
|
+
- **Adjust** — fix additional selected issues and/or run another verification round within the max-3 contract, update state and the report, re-present the results box.
|
|
140
|
+
- **Discuss** — walk through specific fixes, remaining issues, or the data-integrity HALT in more depth; then re-ask.
|
|
141
|
+
- **Stop here** — print the resume command (`/owflow:migration-fix <task-path>`) and end.
|
|
142
|
+
|
|
143
|
+
### Next steps (after Accept)
|
|
144
|
+
|
|
145
|
+
Render ONLY the row whose condition matches the state:
|
|
146
|
+
|
|
147
|
+
- `→ /owflow:migration-verify <task-path>` — `required` — only when `verification_context.compatibility_status != passed` (failed, or invalidated to null by applied fixes — a verifier-only re-run cannot settle compatibility): re-verification re-runs the 4 checks and owns `compatibility_status`. Remaining after: finalize.
|
|
148
|
+
- `→ /owflow:migration-finalize <task-path>` — `required` — only when `compatibility_status = passed` (after a ✅ loop, an approved ⚠, or a deliberate skip): closes the workflow (authors the operator guide when `options.docs_enabled` is true, then completes the task). Remaining after: none — workflow ends.
|
|
149
|
+
|
|
150
|
+
**Other options**:
|
|
151
|
+
|
|
152
|
+
- After a ❌ data-integrity HALT with **user-confirmed rollback only**: restore to the last known-good state per `analysis/rollback-plan.md`, then re-enter `/owflow:migration-verify <task-path>` — `optional`, manual, never automatic.
|
|
153
|
+
- `/owflow:goal-migration <task-path>` — `optional` shortcut: runs the remaining phases in one loop (finalize)
|
|
154
|
+
|
|
155
|
+
Then STOP.
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:migration-implement
|
|
3
|
-
description: Migration — executes the approved implementation plan via isolated per-group delegation (normal lane only), producing the work log and the migration-executed slug.
|
|
4
|
-
argument-hint: "[task-path-or-identifier]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Migration Implement — Plan Execution & Work Log (migration-executed)
|
|
9
|
-
|
|
10
|
-
Work phase of the migration workflow. Executes `implementation/implementation-plan.md` task group by task group through isolated per-group delegation — **normal lane only, no quick lane** — and records the execution in state. The delegation owns checkboxes, the work log, incremental tests, standards discovery, and its own user-confirmed failure handling; this shell owns the state write.
|
|
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
|
-
| Plan created | `plan-created` in `completed_phases` **and** `implementation/implementation-plan.md` exists | `/owflow:migration-plan <task-path>` |
|
|
28
|
-
| Spec present | `implementation/spec.md` exists (the executor's input contract) | `/owflow:migration-spec <task-path>` |
|
|
29
|
-
|
|
30
|
-
### 3. Blocked output
|
|
31
|
-
|
|
32
|
-
1. Steps that must be completed first (in order), each with its command:
|
|
33
|
-
- Implementation planning (`plan-created`) → `/owflow:migration-plan <task-path>`
|
|
34
|
-
- Strategy specification (`strategy-specified`) → `/owflow:migration-spec <task-path>` (if also missing)
|
|
35
|
-
- Target state planning (`target-planned`) → `/owflow:migration-target <task-path>` (if also missing)
|
|
36
|
-
- Current-state analysis (`state-analysed`) → `/owflow:migration-analyze <task-path>` (if also missing)
|
|
37
|
-
- State initialization → `/owflow:migration <description>` (new task)
|
|
38
|
-
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
39
|
-
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
40
|
-
|
|
41
|
-
Then STOP — never guess or auto-pick a task.
|
|
42
|
-
|
|
43
|
-
### 4. Missing-state bootstrap
|
|
44
|
-
|
|
45
|
-
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 `migration-executed`?" with **Create task** / **Decline**.
|
|
46
|
-
|
|
47
|
-
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-implement (mid-pipeline bootstrap)"`, `orchestrator.started_phase: migration-executed`, `completed_phases: []`, `task.title`/`task.description` from the argument. Run `verify_template` (`orchestrator-state-migration.yml`) immediately. Creates state ONLY — `implementation/implementation-plan.md` still blocks, so bootstrapping never skips upstream work.
|
|
48
|
-
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
49
|
-
|
|
50
|
-
### 5. Skip/resume — artifacts before state
|
|
51
|
-
|
|
52
|
-
- `implementation/work-log.md` exists but `migration-executed` is missing ⇒ **adopt**: append `migration-executed`, backfill `phase_summaries.implement.summary` and `migration_outputs.work_log` where still null.
|
|
53
|
-
- `migration-executed` is present but `implementation/work-log.md` is missing ⇒ **drop** `migration-executed` from `completed_phases` and re-run.
|
|
54
|
-
- Both artifact and slug exist ⇒ report the existing execution summary and route to the Exit Gate.
|
|
55
|
-
- A partially executed plan (unchecked groups remain) is NOT complete: resume with `/owflow:migration-implement <task-path>` so the per-group execution picks up the uncompleted groups.
|
|
56
|
-
|
|
57
|
-
### 6. Conditional activation
|
|
58
|
-
|
|
59
|
-
Not applicable — `migration-implement` has no activation condition; it runs whenever its prerequisites are met.
|
|
60
|
-
|
|
61
|
-
### 7. Recovery
|
|
62
|
-
|
|
63
|
-
| Step | Max Attempts | Strategy |
|
|
64
|
-
| ----------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
65
|
-
| Plan execution (`migration-executed`) | 5 | Fix syntax/import errors and re-run the failed group's tests; prompt the user on repeated failure. **Never auto-rollback — rollback requires explicit user confirmation** |
|
|
66
|
-
|
|
67
|
-
## Execute
|
|
68
|
-
|
|
69
|
-
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md). The per-group execution applies its own test-driven order and continuous standards discovery.
|
|
70
|
-
|
|
71
|
-
| Direction | Artifact | Producer |
|
|
72
|
-
| --------- | ----------------------------------- | -------------------------------------------------------------------- |
|
|
73
|
-
| Consumed | `implementation/implementation-plan.md` | `migration-plan` (approved plan with per-group rollback steps) |
|
|
74
|
-
| Consumed | `implementation/spec.md` | `migration-spec` (approved specification) |
|
|
75
|
-
| Produced | `implementation/work-log.md` | per-group delegation to `task-group-implementer` (**Task tool**, normal lane only) |
|
|
76
|
-
|
|
77
|
-
### Plan Execution (`migration-executed`)
|
|
78
|
-
|
|
79
|
-
> **ANTI-PATTERN — never execute the plan's task groups inline. "The groups are straightforward" is NOT a reason to skip delegation.**
|
|
80
|
-
|
|
81
|
-
1. **Execute the plan — per-group delegation** (normal lane only; migration has no quick lane). For each task group in order: prepare context (task path, task description, the `implementation/spec.md` + `implementation/implementation-plan.md` paths, `migration_context.*` — type, strategy, risk level, breaking changes — and accumulated `phase_summaries` from analyze → plan), delegate the group via the **Task tool** to `task-group-implementer`, then process its report: mark the group's checkboxes in `implementation/implementation-plan.md`, append the work-log entry to `implementation/work-log.md`, and run the group's incremental tests before moving on. Apply lazy standards loading per group; after the last group, run the full test suite once.
|
|
82
|
-
2. **No post-continuation glue block** — the per-group execution's return is not a handoff to be glued: do NOT "re-read state to confirm you are the orchestrator", do NOT add a numbered phase marker, do NOT auto-proceed to verification. The monolith's post-continuation block existed only because the monolith owned the state writes; here the per-step write below is the only continuation.
|
|
83
|
-
3. **State write**: append `migration-executed` to `completed_phases`; set `phase_summaries.implement.summary`, `migration_outputs.work_log: "implementation/work-log.md"`; bump `orchestrator.updated`. On failure (per-group execution fails after its retries, user stops): do NOT append; append `migration-executed` to `failed_phases` and increment `auto_fix_attempts["migration-executed"]`; partial progress stays in `implementation/work-log.md`. Then re-read state + run `verify_template`.
|
|
84
|
-
|
|
85
|
-
## State Update Convention (per step)
|
|
86
|
-
|
|
87
|
-
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`migration-executed`) plus that step's fields. Never batch or defer to the end of the skill.
|
|
88
|
-
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
89
|
-
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>"]`.
|
|
90
|
-
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.
|
|
91
|
-
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
92
|
-
|
|
93
|
-
## Exit Gate
|
|
94
|
-
|
|
95
|
-
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
96
|
-
|
|
97
|
-
### Results box
|
|
98
|
-
|
|
99
|
-
```markdown
|
|
100
|
-
## ✅ MIGRATION IMPLEMENT COMPLETE — <task name>
|
|
101
|
-
|
|
102
|
-
**Task groups** — [completed / total]
|
|
103
|
-
**Files changed** — [count + key files, 1-2 lines]
|
|
104
|
-
**Tests** — [incremental results + full-suite status from the executor]
|
|
105
|
-
**Work log** — ✅ `implementation/work-log.md`
|
|
106
|
-
**Rollback readiness** — [per-group checkpoints completed / deferred items]
|
|
107
|
-
|
|
108
|
-
**Artifacts**
|
|
109
|
-
|
|
110
|
-
- implemented migration changes
|
|
111
|
-
- `implementation/work-log.md`
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Results-acceptance question
|
|
115
|
-
|
|
116
|
-
Use `question` — "Are these results correct?" with options:
|
|
117
|
-
|
|
118
|
-
- **Accept** — the implementation matches the plan; continue.
|
|
119
|
-
- **Adjust** — re-work the affected task groups (fix code, re-run their tests), update state and the work log, re-present the results box.
|
|
120
|
-
- **Discuss** — walk through implementation decisions, files changed, or deferred items in more depth; then re-ask.
|
|
121
|
-
- **Stop here** — print the resume command (`/owflow:migration-implement <task-path>`) and end.
|
|
122
|
-
|
|
123
|
-
### Next steps (after Accept)
|
|
124
|
-
|
|
125
|
-
- `→ /owflow:migration-verify <task-path>` — `required` next: runs the verification options gate, the reused verifier, and the 4 migration compatibility checks. Remaining after: fix (only when verification finds issues) → finalize.
|
|
126
|
-
|
|
127
|
-
**Other options**:
|
|
128
|
-
|
|
129
|
-
- `/owflow:goal-migration <task-path>` — `optional` shortcut: runs all remaining phases in one loop (verify → fix when needed → finalize)
|
|
130
|
-
|
|
131
|
-
Then STOP.
|
|
1
|
+
---
|
|
2
|
+
name: owflow:migration-implement
|
|
3
|
+
description: Migration — executes the approved implementation plan via isolated per-group delegation (normal lane only), producing the work log and the migration-executed slug.
|
|
4
|
+
argument-hint: "[task-path-or-identifier]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Migration Implement — Plan Execution & Work Log (migration-executed)
|
|
9
|
+
|
|
10
|
+
Work phase of the migration workflow. Executes `implementation/implementation-plan.md` task group by task group through isolated per-group delegation — **normal lane only, no quick lane** — and records the execution in state. The delegation owns checkboxes, the work log, incremental tests, standards discovery, and its own user-confirmed failure handling; this shell owns the state write.
|
|
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
|
+
| Plan created | `plan-created` in `completed_phases` **and** `implementation/implementation-plan.md` exists | `/owflow:migration-plan <task-path>` |
|
|
28
|
+
| Spec present | `implementation/spec.md` exists (the executor's input contract) | `/owflow:migration-spec <task-path>` |
|
|
29
|
+
|
|
30
|
+
### 3. Blocked output
|
|
31
|
+
|
|
32
|
+
1. Steps that must be completed first (in order), each with its command:
|
|
33
|
+
- Implementation planning (`plan-created`) → `/owflow:migration-plan <task-path>`
|
|
34
|
+
- Strategy specification (`strategy-specified`) → `/owflow:migration-spec <task-path>` (if also missing)
|
|
35
|
+
- Target state planning (`target-planned`) → `/owflow:migration-target <task-path>` (if also missing)
|
|
36
|
+
- Current-state analysis (`state-analysed`) → `/owflow:migration-analyze <task-path>` (if also missing)
|
|
37
|
+
- State initialization → `/owflow:migration <description>` (new task)
|
|
38
|
+
2. List available migration-task identifiers (directories under `.owflow/tasks/migrations/`) to resume from, if any.
|
|
39
|
+
3. Hint: `Run /owflow:migration <description> to start a migration task from scratch, or pass a task path/identifier to resume.`
|
|
40
|
+
|
|
41
|
+
Then STOP — never guess or auto-pick a task.
|
|
42
|
+
|
|
43
|
+
### 4. Missing-state bootstrap
|
|
44
|
+
|
|
45
|
+
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 `migration-executed`?" with **Create task** / **Decline**.
|
|
46
|
+
|
|
47
|
+
- **On confirm**: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template with `orchestrator.entry_point: "migration-implement (mid-pipeline bootstrap)"`, `orchestrator.started_phase: migration-executed`, `completed_phases: []`, `task.title`/`task.description` from the argument. Run `verify_template` (`orchestrator-state-migration.yml`) immediately. Creates state ONLY — `implementation/implementation-plan.md` still blocks, so bootstrapping never skips upstream work.
|
|
48
|
+
- **On decline**: print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
49
|
+
|
|
50
|
+
### 5. Skip/resume — artifacts before state
|
|
51
|
+
|
|
52
|
+
- `implementation/work-log.md` exists but `migration-executed` is missing ⇒ **adopt**: append `migration-executed`, backfill `phase_summaries.implement.summary` and `migration_outputs.work_log` where still null.
|
|
53
|
+
- `migration-executed` is present but `implementation/work-log.md` is missing ⇒ **drop** `migration-executed` from `completed_phases` and re-run.
|
|
54
|
+
- Both artifact and slug exist ⇒ report the existing execution summary and route to the Exit Gate.
|
|
55
|
+
- A partially executed plan (unchecked groups remain) is NOT complete: resume with `/owflow:migration-implement <task-path>` so the per-group execution picks up the uncompleted groups.
|
|
56
|
+
|
|
57
|
+
### 6. Conditional activation
|
|
58
|
+
|
|
59
|
+
Not applicable — `migration-implement` has no activation condition; it runs whenever its prerequisites are met.
|
|
60
|
+
|
|
61
|
+
### 7. Recovery
|
|
62
|
+
|
|
63
|
+
| Step | Max Attempts | Strategy |
|
|
64
|
+
| ----------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| Plan execution (`migration-executed`) | 5 | Fix syntax/import errors and re-run the failed group's tests; prompt the user on repeated failure. **Never auto-rollback — rollback requires explicit user confirmation** |
|
|
66
|
+
|
|
67
|
+
## Execute
|
|
68
|
+
|
|
69
|
+
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md). The per-group execution applies its own test-driven order and continuous standards discovery.
|
|
70
|
+
|
|
71
|
+
| Direction | Artifact | Producer |
|
|
72
|
+
| --------- | ----------------------------------- | -------------------------------------------------------------------- |
|
|
73
|
+
| Consumed | `implementation/implementation-plan.md` | `migration-plan` (approved plan with per-group rollback steps) |
|
|
74
|
+
| Consumed | `implementation/spec.md` | `migration-spec` (approved specification) |
|
|
75
|
+
| Produced | `implementation/work-log.md` | per-group delegation to `task-group-implementer` (**Task tool**, normal lane only) |
|
|
76
|
+
|
|
77
|
+
### Plan Execution (`migration-executed`)
|
|
78
|
+
|
|
79
|
+
> **ANTI-PATTERN — never execute the plan's task groups inline. "The groups are straightforward" is NOT a reason to skip delegation.**
|
|
80
|
+
|
|
81
|
+
1. **Execute the plan — per-group delegation** (normal lane only; migration has no quick lane). For each task group in order: prepare context (task path, task description, the `implementation/spec.md` + `implementation/implementation-plan.md` paths, `migration_context.*` — type, strategy, risk level, breaking changes — and accumulated `phase_summaries` from analyze → plan), delegate the group via the **Task tool** to `task-group-implementer`, then process its report: mark the group's checkboxes in `implementation/implementation-plan.md`, append the work-log entry to `implementation/work-log.md`, and run the group's incremental tests before moving on. Apply lazy standards loading per group; after the last group, run the full test suite once.
|
|
82
|
+
2. **No post-continuation glue block** — the per-group execution's return is not a handoff to be glued: do NOT "re-read state to confirm you are the orchestrator", do NOT add a numbered phase marker, do NOT auto-proceed to verification. The monolith's post-continuation block existed only because the monolith owned the state writes; here the per-step write below is the only continuation.
|
|
83
|
+
3. **State write**: append `migration-executed` to `completed_phases`; set `phase_summaries.implement.summary`, `migration_outputs.work_log: "implementation/work-log.md"`; bump `orchestrator.updated`. On failure (per-group execution fails after its retries, user stops): do NOT append; append `migration-executed` to `failed_phases` and increment `auto_fix_attempts["migration-executed"]`; partial progress stays in `implementation/work-log.md`. Then re-read state + run `verify_template`.
|
|
84
|
+
|
|
85
|
+
## State Update Convention (per step)
|
|
86
|
+
|
|
87
|
+
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`migration-executed`) plus that step's fields. Never batch or defer to the end of the skill.
|
|
88
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
89
|
+
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>"]`.
|
|
90
|
+
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.
|
|
91
|
+
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run.
|
|
92
|
+
|
|
93
|
+
## Exit Gate
|
|
94
|
+
|
|
95
|
+
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
96
|
+
|
|
97
|
+
### Results box
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
## ✅ MIGRATION IMPLEMENT COMPLETE — <task name>
|
|
101
|
+
|
|
102
|
+
**Task groups** — [completed / total]
|
|
103
|
+
**Files changed** — [count + key files, 1-2 lines]
|
|
104
|
+
**Tests** — [incremental results + full-suite status from the executor]
|
|
105
|
+
**Work log** — ✅ `implementation/work-log.md`
|
|
106
|
+
**Rollback readiness** — [per-group checkpoints completed / deferred items]
|
|
107
|
+
|
|
108
|
+
**Artifacts**
|
|
109
|
+
|
|
110
|
+
- implemented migration changes
|
|
111
|
+
- `implementation/work-log.md`
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Results-acceptance question
|
|
115
|
+
|
|
116
|
+
Use `question` — "Are these results correct?" with options:
|
|
117
|
+
|
|
118
|
+
- **Accept** — the implementation matches the plan; continue.
|
|
119
|
+
- **Adjust** — re-work the affected task groups (fix code, re-run their tests), update state and the work log, re-present the results box.
|
|
120
|
+
- **Discuss** — walk through implementation decisions, files changed, or deferred items in more depth; then re-ask.
|
|
121
|
+
- **Stop here** — print the resume command (`/owflow:migration-implement <task-path>`) and end.
|
|
122
|
+
|
|
123
|
+
### Next steps (after Accept)
|
|
124
|
+
|
|
125
|
+
- `→ /owflow:migration-verify <task-path>` — `required` next: runs the verification options gate, the reused verifier, and the 4 migration compatibility checks. Remaining after: fix (only when verification finds issues) → finalize.
|
|
126
|
+
|
|
127
|
+
**Other options**:
|
|
128
|
+
|
|
129
|
+
- `/owflow:goal-migration <task-path>` — `optional` shortcut: runs all remaining phases in one loop (verify → fix when needed → finalize)
|
|
130
|
+
|
|
131
|
+
Then STOP.
|