owflow 0.1.1 → 0.1.3

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.
Files changed (104) hide show
  1. package/README.md +8 -1
  2. package/dist/agents/bottleneck-analyzer.md +329 -0
  3. package/dist/agents/code-quality-pragmatist.md +354 -0
  4. package/dist/agents/code-reviewer.md +239 -0
  5. package/dist/agents/codebase-analysis-reporter.md +246 -0
  6. package/dist/agents/docs-operator.md +23 -0
  7. package/dist/agents/e2e-test-verifier.md +448 -0
  8. package/dist/agents/gap-analyzer.md +502 -0
  9. package/dist/agents/implementation-completeness-checker.md +220 -0
  10. package/dist/agents/implementation-planner.md +309 -0
  11. package/dist/agents/information-gatherer.md +691 -0
  12. package/dist/agents/production-readiness-checker.md +279 -0
  13. package/dist/agents/project-analyzer.md +404 -0
  14. package/dist/agents/reality-assessor.md +366 -0
  15. package/dist/agents/research-planner.md +447 -0
  16. package/dist/agents/research-synthesizer.md +401 -0
  17. package/dist/agents/solution-brainstormer.md +257 -0
  18. package/dist/agents/solution-designer.md +372 -0
  19. package/dist/agents/spec-auditor.md +298 -0
  20. package/dist/agents/specification-creator.md +334 -0
  21. package/dist/agents/task-classifier.md +462 -0
  22. package/dist/agents/task-group-implementer.md +284 -0
  23. package/dist/agents/test-suite-runner.md +195 -0
  24. package/dist/agents/ui-mockup-generator.md +369 -0
  25. package/dist/agents/user-docs-generator.md +509 -0
  26. package/dist/commands/development.md +37 -0
  27. package/dist/commands/flow-init.md +37 -0
  28. package/dist/commands/migration.md +37 -0
  29. package/dist/commands/performance.md +37 -0
  30. package/dist/commands/product-design.md +37 -0
  31. package/dist/commands/quick-bugfix.md +37 -0
  32. package/dist/commands/quick-dev.md +140 -0
  33. package/dist/commands/quick-plan.md +132 -0
  34. package/dist/commands/research.md +37 -0
  35. package/dist/commands/reviews-code.md +90 -0
  36. package/dist/commands/reviews-pragmatic.md +99 -0
  37. package/dist/commands/reviews-production-readiness.md +113 -0
  38. package/dist/commands/reviews-reality-check.md +110 -0
  39. package/dist/commands/reviews-spec-audit.md +114 -0
  40. package/dist/commands/standards-discover.md +37 -0
  41. package/dist/commands/standards-update.md +37 -0
  42. package/dist/commands/work.md +284 -0
  43. package/dist/index.js +3 -2
  44. package/dist/skills/codebase-analyzer/SKILL.md +162 -0
  45. package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -0
  46. package/dist/skills/codebase-analyzer/references/combined.md +31 -0
  47. package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -0
  48. package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -0
  49. package/dist/skills/codebase-analyzer/references/migration-target.md +23 -0
  50. package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -0
  51. package/dist/skills/development/SKILL.md +669 -0
  52. package/dist/skills/docs-manager/SKILL.md +379 -0
  53. package/dist/skills/docs-manager/docs/INDEX.md +199 -0
  54. package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -0
  55. package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -0
  56. package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -0
  57. package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -0
  58. package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -0
  59. package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -0
  60. package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -0
  61. package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -0
  62. package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -0
  63. package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -0
  64. package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -0
  65. package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -0
  66. package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -0
  67. package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -0
  68. package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -0
  69. package/dist/skills/docs-manager/references/claude-md-template.md +29 -0
  70. package/dist/skills/docs-manager/references/index-md-template.md +73 -0
  71. package/dist/skills/flow-init/SKILL.md +198 -0
  72. package/dist/skills/flow-init/references/architecture-template.md +45 -0
  73. package/dist/skills/flow-init/references/roadmap-templates.md +93 -0
  74. package/dist/skills/flow-init/references/tech-stack-template.md +70 -0
  75. package/dist/skills/flow-init/references/vision-templates.md +75 -0
  76. package/dist/skills/implementation-plan-executor/SKILL.md +378 -0
  77. package/dist/skills/implementation-verifier/SKILL.md +307 -0
  78. package/dist/skills/migration/SKILL.md +380 -0
  79. package/dist/skills/migration/references/migration-strategies.md +397 -0
  80. package/dist/skills/migration/references/migration-types.md +437 -0
  81. package/dist/skills/orchestrator-framework/SKILL.md +65 -0
  82. package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +47 -0
  83. package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +329 -0
  84. package/dist/skills/performance/SKILL.md +418 -0
  85. package/dist/skills/performance/references/performance-optimization-guide.md +365 -0
  86. package/dist/skills/product-design/SKILL.md +843 -0
  87. package/dist/skills/product-design/references/characteristic-detection.md +92 -0
  88. package/dist/skills/product-design/references/interaction-patterns.md +206 -0
  89. package/dist/skills/product-design/references/visual-companion.md +190 -0
  90. package/dist/skills/product-design/server/index.ts +359 -0
  91. package/dist/skills/product-design/server/template.html +256 -0
  92. package/dist/skills/quick-bugfix/SKILL.md +241 -0
  93. package/dist/skills/research/SKILL.md +493 -0
  94. package/dist/skills/research/references/brainstorming-techniques.md +84 -0
  95. package/dist/skills/research/references/design-techniques.md +40 -0
  96. package/dist/skills/research/references/research-methodologies.md +710 -0
  97. package/dist/skills/standards-discover/SKILL.md +236 -0
  98. package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -0
  99. package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -0
  100. package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -0
  101. package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -0
  102. package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -0
  103. package/dist/skills/standards-update/SKILL.md +159 -0
  104. package/package.json +44 -43
@@ -0,0 +1,307 @@
1
+ ---
2
+ name: implementation-verifier
3
+ description: Verify completed implementations for quality assurance. Delegates all verification work to specialized subagents - completeness checking, test execution, code review, pragmatic review, production readiness, and reality assessment. Compiles results into comprehensive verification report. Read-only verification - reports issues but does not fix them. Use after implementation is complete and before code review/commit.
4
+ user-invocable: false
5
+ ---
6
+
7
+ You are an implementation verifier that orchestrates comprehensive quality assurance on completed implementations by delegating to specialized subagents.
8
+
9
+ ## Core Principle
10
+
11
+ **Read-only verification via delegation**: Delegate all analysis to subagents. Compile results. Never fix, modify, or re-implement.
12
+
13
+ ## Responsibilities
14
+
15
+ 1. Validate prerequisites exist
16
+ 2. Delegate ALL verifications to subagents in parallel (core + optional)
17
+ 3. Compile all results into verification report
18
+ 4. Update roadmap if exists (optional)
19
+ 5. Output summary with overall verdict
20
+
21
+ ## Output Artifacts
22
+
23
+ | Artifact | Condition |
24
+ | --------------------------------------------- | --------------------------- |
25
+ | `verification/implementation-verification.md` | Always |
26
+ | `verification/code-review-report.md` | If code_review_enabled |
27
+ | `verification/pragmatic-review.md` | If pragmatic_review_enabled |
28
+ | `verification/production-readiness-report.md` | If production_check_enabled |
29
+ | `verification/reality-check.md` | If reality_check_enabled |
30
+
31
+ ---
32
+
33
+ ## Invocation Context
34
+
35
+ **Check for orchestrator state file** at task path:
36
+
37
+ - **Orchestrator mode**: If `orchestrator-state.yml` exists, read verification options from it. Execute enabled reviews without re-prompting.
38
+ - **Standalone mode**: If no state file, prompt user for each optional review using question.
39
+
40
+ **Orchestrator options** (when present, are mandatory):
41
+
42
+ - `skip_test_suite` (when true, test-suite-runner is skipped — full test suite already passed during implementation phase)
43
+ - `code_review_enabled` / `code_review_scope`
44
+ - `pragmatic_review_enabled`
45
+ - `production_check_enabled`
46
+ - `reality_check_enabled`
47
+
48
+ ---
49
+
50
+ ## Phase 1: Initialize & Validate
51
+
52
+ 1. **Get task path** from user or orchestrator parameter
53
+ 2. **Validate prerequisites exist**:
54
+ - `implementation/implementation-plan.md` (required)
55
+ - `implementation/spec.md` (required)
56
+ - `implementation/work-log.md` (required)
57
+ 3. **Read docs/INDEX.md** to understand available standards
58
+ 4. **Determine invocation context** (orchestrator or standalone)
59
+ 5. **Create task items for verification tracking** using `TaskCreate` tool:
60
+ - Subject: "Completeness check", activeForm: "Checking implementation completeness"
61
+ - Subject: "Test suite", activeForm: "Running test suite" — only if NOT skip_test_suite. When skip_test_suite is true, create task pre-completed with `metadata: {skipped: true, reason: "Full test suite passed during implementation phase"}`
62
+ - Subject: "Code review", activeForm: "Running code review" — only if code_review_enabled
63
+ - Subject: "Pragmatic review", activeForm: "Running pragmatic review" — only if pragmatic_review_enabled
64
+ - Subject: "Production readiness", activeForm: "Checking production readiness" — only if production_check_enabled
65
+ - Subject: "Reality assessment", activeForm: "Running reality assessment" — only if reality_check_enabled
66
+ - Subject: "Compile report", activeForm: "Compiling verification report"
67
+ 6. **Set dependencies** using `TaskUpdate` with `addBlockedBy`: "Compile report" blocked by ALL verification tasks above
68
+
69
+ If prerequisites missing, report and stop.
70
+
71
+ ---
72
+
73
+ ## Phase 2: Delegate All Verifications
74
+
75
+ **ANTI-PATTERN — DO NOT DO ANY OF THIS:**
76
+
77
+ - ❌ "Let me run the tests..." — STOP. Delegate to test-suite-runner.
78
+ - ❌ "I'll check implementation-plan.md..." — STOP. Delegate to implementation-completeness-checker.
79
+ - ❌ "Let me read the standards..." — STOP. Delegate to implementation-completeness-checker.
80
+ - ❌ "I'll verify the work-log..." — STOP. Delegate to implementation-completeness-checker.
81
+ - ❌ Running any Bash command to execute tests — STOP. Delegate to test-suite-runner.
82
+ - ❌ "Let me review the code quality..." — STOP. Delegate to code-reviewer.
83
+ - ❌ "I'll check for over-engineering..." — STOP. Delegate to code-quality-pragmatist.
84
+ - ❌ "Let me verify production readiness..." — STOP. Delegate to production-readiness-checker.
85
+ - ❌ "I'll assess whether this solves the problem..." — STOP. Delegate to reality-assessor.
86
+ - ❌ Reading source code to find security/performance issues — STOP. Delegate to code-reviewer.
87
+
88
+ **Verifications run in two sequential steps to avoid parallel test conflicts.**
89
+
90
+ ### Step 1: Determine enabled optional reviews
91
+
92
+ 1. **Check invocation context** for each optional review:
93
+ - If orchestrator mode AND option is `true`: Include in verification (mandatory)
94
+ - If orchestrator mode AND option is `false`: Skip (mark task as completed with `metadata: {skipped: true}`)
95
+ - If orchestrator mode AND option is `null`: Warn and prompt user
96
+ - If standalone mode: Prompt user with question
97
+
98
+ ### Step 2: Set all tasks to in_progress
99
+
100
+ 2. Use `TaskUpdate` to set ALL enabled verification tasks to `status: "in_progress"`. For skipped optional reviews, use `TaskUpdate` with `status: "completed"` and `metadata: {"skipped": true}`.
101
+
102
+ ### Step 3a: Run test suite (sequential, if NOT skip_test_suite)
103
+
104
+ **Why sequential**: Test-suite-runner and reality-assessor both run tests. Running them in parallel causes conflicts. Test-suite-runner runs first and writes results to a file that reality-assessor reads.
105
+
106
+ Task tool call (if NOT skip_test_suite):
107
+
108
+ - subagent_type: `test-suite-runner`
109
+ - description: `Run full test suite`
110
+ - prompt: Include task_path, task_description, test_command (if known). The subagent runs ALL tests, analyzes results, and writes results to `verification/test-suite-results.md`.
111
+
112
+ **Wait for test-suite-runner to complete** before proceeding to Step 3b. Mark the test suite task as `completed` with results.
113
+
114
+ **When `skip_test_suite: true`**: Skip Step 3a entirely. Go straight to Step 3b. The full project test suite already passed during the implementation phase. The verification report will note tests were verified during implementation.
115
+
116
+ ### Step 3b: Run all other verifications (parallel)
117
+
118
+ **INVOKE NOW** — send ALL remaining enabled subagents in a SINGLE message (up to 5 parallel Task tool calls):
119
+
120
+ Task tool call (always):
121
+
122
+ - subagent_type: `implementation-completeness-checker`
123
+ - description: `Check implementation completeness`
124
+ - prompt: Include task_path. The subagent checks plan completion, standards compliance, and documentation completeness.
125
+
126
+ Task tool call (if code_review_enabled):
127
+
128
+ - subagent_type: `code-reviewer`
129
+ - description: `Code quality review`
130
+ - prompt: Include task_path, scope (from code_review_scope or "all"), report_path (`[task_path]/verification/code-review-report.md`)
131
+
132
+ Task tool call (if pragmatic_review_enabled):
133
+
134
+ - subagent_type: `code-quality-pragmatist`
135
+ - description: `Pragmatic code review`
136
+ - prompt: Include task_path, report_path (`[task_path]/verification/pragmatic-review.md`)
137
+
138
+ Task tool call (if production_check_enabled):
139
+
140
+ - subagent_type: `production-readiness-checker`
141
+ - description: `Production readiness check`
142
+ - prompt: Include task_path, target (production), report_path (`[task_path]/verification/production-readiness-report.md`)
143
+
144
+ Task tool call (if reality_check_enabled):
145
+
146
+ - subagent_type: `reality-assessor`
147
+ - description: `Reality assessment`
148
+ - prompt: Include task_path, report_path (`[task_path]/verification/reality-check.md`).
149
+ - **If test-suite-runner ran (Step 3a)**: Include `skip_test_execution: true` and path to `verification/test-suite-results.md`. Reality-assessor should read test results from that file instead of running tests.
150
+ - **If test-suite-runner was skipped**: Include `skip_test_execution: false`. Reality-assessor should run tests itself since no other agent did.
151
+
152
+ **SELF-CHECK**: Did you invoke test-suite-runner separately in Step 3a (or skip it), then invoke all remaining subagents in a single parallel message in Step 3b? Or did you launch everything at once? If the latter, STOP — test-suite-runner must complete before the parallel batch.
153
+
154
+ ### Step 4: Process all results
155
+
156
+ After ALL subagents return:
157
+
158
+ 1. Use `TaskUpdate` to set each verification task to `status: "completed"`
159
+ 2. Extract status, issues, and findings from each
160
+ 3. Aggregate issue counts
161
+ 4. Track any critical issues that would affect overall verdict
162
+
163
+ ### Impact on Overall Status
164
+
165
+ - Code review critical issues → overall status Failed
166
+ - Pragmatic review critical over-engineering → overall status Failed
167
+ - Production readiness deployment blockers → overall status Failed
168
+ - Reality assessment critical gaps → overall status Failed
169
+
170
+ ---
171
+
172
+ ## Phase 3: Compile Verification Report
173
+
174
+ Use `TaskUpdate` to set "Compile report" task to `status: "in_progress"`.
175
+
176
+ 1. **Compile all findings** from Phase 2
177
+ 2. **Determine overall status**:
178
+
179
+ | Status | Criteria |
180
+ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
181
+ | ✅ Passed | 100% implementation, 95%+ tests passing (or skipped — verified in implementation), standards compliant, docs complete, no critical issues from optional reviews |
182
+ | ⚠️ Passed with Issues | 90-99% implementation OR 90-94% tests OR standards gaps OR optional review warnings |
183
+ | ❌ Failed | <90% implementation OR <90% tests OR critical failures OR deployment blockers |
184
+
185
+ **When tests skipped** (`skip_test_suite: true`): Test pass rate is inherited from implementation phase (assumed passing since implementation completed successfully). Note this in the report.
186
+
187
+ 3. **Write verification report** to `verification/implementation-verification.md`
188
+ 4. Use `TaskUpdate` to set "Compile report" task to `status: "completed"`
189
+
190
+ Structure:
191
+ - Executive summary (2-3 sentences)
192
+ - Implementation plan verification (from completeness checker)
193
+ - Test suite results (from test runner)
194
+ - Standards compliance (from completeness checker)
195
+ - Documentation completeness (from completeness checker)
196
+ - Optional review results (if performed)
197
+ - Overall assessment with breakdown table
198
+ - Issues requiring attention
199
+ - Recommendations
200
+ - Verification checklist
201
+
202
+ ---
203
+
204
+ ## Phase 4: Update Roadmap (Optional)
205
+
206
+ 1. **Check for roadmap** at `.owflow/docs/project/roadmap.md`
207
+ 2. **If exists**, find matching items and mark complete
208
+ 3. **Document** what was updated or why no matches found
209
+
210
+ ---
211
+
212
+ ## Phase 5: Finalize & Output
213
+
214
+ Output summary to user:
215
+
216
+ ```
217
+ Verification Complete!
218
+
219
+ Task: [name]
220
+ Location: [path]
221
+
222
+ Overall Status: Passed | Passed with Issues | Failed
223
+
224
+ Implementation Plan: [M]/[N] steps ([%])
225
+ Test Suite: [P]/[N] tests ([%])
226
+ Standards Compliance: [status]
227
+ Documentation: [status]
228
+
229
+ [If optional reviews performed]
230
+ Code Review: [status]
231
+ Pragmatic Review: [status]
232
+ Production Readiness: [status]
233
+ Reality Check: [status]
234
+
235
+ Verification Report: verification/implementation-verification.md
236
+
237
+ [Status-specific guidance on next steps]
238
+ ```
239
+
240
+ ---
241
+
242
+ ## Structured Output for Orchestrator
243
+
244
+ When invoked by an orchestrator, return structured result alongside the report:
245
+
246
+ ```yaml
247
+ status: "passed" | "passed_with_issues" | "failed"
248
+ report_path: "verification/implementation-verification.md"
249
+
250
+ issues:
251
+ - source: "completeness" | "test_suite" | "code_review" | "pragmatic" | "production" | "reality"
252
+ severity: "critical" | "warning" | "info"
253
+ description: "[Brief description of the issue]"
254
+ location: "[File path or area affected]"
255
+ fixable: true | false
256
+ suggestion: "[How to fix, if obvious]"
257
+
258
+ issue_counts:
259
+ critical: 0
260
+ warning: 0
261
+ info: 0
262
+ ```
263
+
264
+ **Guidelines for `fixable` assessment**:
265
+
266
+ - `true`: Lint errors, formatting issues, missing imports, obvious typos, simple config fixes
267
+ - `false`: Architecture decisions, design trade-offs, test logic errors, unclear requirements
268
+
269
+ **The orchestrator decides** what to actually fix based on this data. Your job is to aggregate subagent results accurately.
270
+
271
+ ---
272
+
273
+ ## Guidelines
274
+
275
+ ### Delegation-First Verification
276
+
277
+ ✅ Delegate to subagents, compile results, write report, output summary
278
+ ❌ Run tests directly, review code directly, check standards directly, fix anything
279
+
280
+ ### Anti-Patterns to AVOID
281
+
282
+ - ❌ Running Bash commands to execute tests → Use Task tool with `test-suite-runner`
283
+ - ❌ Reading implementation-plan.md to check completion → Use Task tool with `implementation-completeness-checker`
284
+ - ❌ Reading INDEX.md to check standards compliance → Use Task tool with `implementation-completeness-checker`
285
+ - ❌ Reading source code for quality/security analysis → Use Task tool with `code-reviewer`
286
+ - ❌ Checking config/monitoring/resilience directly → Use Task tool with `production-readiness-checker`
287
+ - ❌ Performing ANY verification work inline → ALL verification is delegated to subagents
288
+
289
+ ### Clear Communication
290
+
291
+ - Use consistent status icons in reports
292
+ - Provide specific evidence from subagent results
293
+ - List specific issues, not vague concerns
294
+ - Make actionable recommendations
295
+
296
+ ---
297
+
298
+ ## Validation Checklist
299
+
300
+ Before finalizing verification:
301
+
302
+ - All required subagents invoked (completeness checker + test runner unless skip_test_suite)
303
+ - Optional reviews invoked per context settings
304
+ - All subagent results processed
305
+ - Verification report created
306
+ - Overall status determined from aggregated results
307
+ - No direct analysis performed (all delegated)
@@ -0,0 +1,380 @@
1
+ ---
2
+ name: migration
3
+ description: Orchestrates the complete migration workflow from current state analysis through implementation to compatibility verification. Handles technology migrations, platform changes, and architecture pattern transitions with adaptive risk assessment, incremental execution, and rollback planning. Use when migrating technologies, platforms, or architecture patterns.
4
+ user-invocable: true
5
+ ---
6
+
7
+ # Migration Orchestrator
8
+
9
+ Systematic migration workflow from current state analysis to verified migration with rollback capabilities.
10
+
11
+ ## Initialization
12
+
13
+ **BEFORE executing any phase, you MUST complete these steps:**
14
+
15
+ ### Step 1: Load Framework Patterns
16
+
17
+ **Read the framework reference file NOW using the Read tool:**
18
+
19
+ 1. `../orchestrator-framework/references/orchestrator-patterns.md` - Delegation rules, interactive mode, state schema, initialization, context passing, issue resolution
20
+
21
+ ### Step 2: Initialize Workflow
22
+
23
+ 1. **Create Task Items**: Use `TaskCreate` for all phases (see Phase Configuration), then set dependencies with `TaskUpdate addBlockedBy`
24
+ 2. **Create Task Directory**: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`
25
+ 3. **Initialize State**: Create `orchestrator-state.yml` with migration context
26
+ 4. **Discover project documentation**: Read `.owflow/docs/INDEX.md` (if exists), extract ALL file paths from the "Project Documentation" section — includes predefined docs AND any user-added project docs. Store as `project_context.project_doc_paths` in state.
27
+
28
+ **Output**:
29
+
30
+ ```
31
+ 🚀 Migration Orchestrator Started
32
+
33
+ Task: [migration description]
34
+ Directory: [task-path]
35
+
36
+ Starting Phase 1: Analyze current state...
37
+ ```
38
+
39
+ ---
40
+
41
+ ## When to Use
42
+
43
+ Use for:
44
+
45
+ - Migrating from one framework/library to another (e.g., Vue 2 → Vue 3, Express → Fastify)
46
+ - Changing database platforms (e.g., MySQL → PostgreSQL, MongoDB → DynamoDB)
47
+ - Refactoring architecture patterns (e.g., REST → GraphQL, Monolith → Microservices)
48
+ - Upgrading major versions with breaking changes
49
+
50
+ **DO NOT use for**: New features, bug fixes, pure refactoring without technology change.
51
+
52
+ ---
53
+
54
+ ## Core Principles
55
+
56
+ 1. **Analyze Before Migrating**: Understand current system before planning target state
57
+ 2. **Risk Assessment**: Classify migration type (code/data/architecture) and assess complexity
58
+ 3. **Incremental Execution**: Support phased migration with rollback points
59
+ 4. **Rollback Planning**: Document undo procedures for each migration phase
60
+ 5. **Dual-Run Support**: Enable running old and new systems in parallel during transition
61
+
62
+ ---
63
+
64
+ ## Migration Types
65
+
66
+ | Type | Keywords | Strategy | Risk Focus |
67
+ | ---------------- | ------------------------------------ | ------------------------ | --------------------------------- |
68
+ | **Code** | framework, library, upgrade | Incremental or phased | Breaking changes, API differences |
69
+ | **Data** | database, schema, data migration | Dual-run (zero downtime) | Data integrity, checksums |
70
+ | **Architecture** | REST→GraphQL, monolith→microservices | Dual-run or phased | Compatibility, rollback |
71
+
72
+ ---
73
+
74
+ ## Phase Configuration
75
+
76
+ | Phase | content | activeForm | Agent/Skill |
77
+ | ----- | ------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------- |
78
+ | 1 | "Analyze current state" | "Analyzing current state" | codebase-analyzer |
79
+ | 2 | "Plan target state and gaps" | "Planning target state and gaps" | gap-analyzer |
80
+ | 3 | "Gather requirements & create migration strategy" | "Gathering requirements & creating migration strategy" | Direct + specification-creator (subagent) |
81
+ | 4 | "Plan implementation" | "Planning implementation" | implementation-planner (subagent) |
82
+ | 5 | "Execute migration" | "Executing migration" | implementation-plan-executor |
83
+ | 6 | "Verify and test compatibility" | "Verifying and testing compatibility" | implementation-verifier |
84
+ | 7 | "Resolve verification issues" | "Resolving verification issues" | Direct (conditional) |
85
+ | 8 | "Generate documentation" | "Generating documentation" | user-docs-generator (optional) |
86
+
87
+ ---
88
+
89
+ ## Workflow Phases
90
+
91
+ ### Phase 1: Current State Analysis & Clarifications
92
+
93
+ **Purpose**: Comprehensive analysis of current system before migration, followed by scope/requirements clarification
94
+ **Execute**:
95
+
96
+ 1. Skill tool - `codebase-analyzer`
97
+ 2. Update state with analysis results
98
+ 3. Direct - use question for max 5 critical clarifying questions about migration scope, target system, and constraints
99
+ 4. Save clarifications to `analysis/clarifications.md`
100
+ **Output**: `analysis/current-state-analysis.md`, `analysis/clarifications.md`
101
+ **State**: Update task_context with current system info, `task_context.clarifications_resolved`
102
+
103
+ → **AUTO-CONTINUE** — Do NOT end turn, do NOT prompt user. Proceed immediately to Phase 2.
104
+
105
+ ---
106
+
107
+ ### Phase 2: Target State Planning & Gap Analysis
108
+
109
+ **Purpose**: Define target system and identify migration gaps
110
+ **Execute**: Task tool - `gap-analyzer` subagent
111
+ **Output**: `analysis/target-state-plan.md`
112
+ **State**: Update `migration_context.migration_type`, `target_system`, `risk_level`, `breaking_changes`
113
+
114
+ **Gap Analyzer Tasks**:
115
+
116
+ 1. Define target system from migration description
117
+ 2. Identify gaps (features to migrate, APIs to adapt, data to transform)
118
+ 3. Classify migration type (code/data/architecture)
119
+ 4. Recommend migration strategy (incremental/big-bang/dual-run/phased)
120
+ 5. External research via WebSearch for version upgrades
121
+
122
+ → Pause
123
+
124
+ question - Display executive summary before asking. Extract from gap analysis: current system overview, target system, migration type classified, number of gaps identified, recommended strategy, risk level. Format as brief overview then "Continue to migration strategy?"
125
+
126
+ ---
127
+
128
+ ### Phase 3: Migration Requirements & Strategy Specification
129
+
130
+ > **Phase gate**: Requires `question` confirmation from Phase 2 before executing.
131
+
132
+ **Purpose**: Gather migration requirements, then create detailed migration specification with rollback procedures
133
+ **Execute**:
134
+
135
+ **Part A — Migration Requirements Gathering (inline)**:
136
+
137
+ 1. Direct - use question for migration-specific requirements (3-5 questions):
138
+ - Migration scope and boundaries (what's in/out of migration)
139
+ - Rollback expectations and downtime tolerance
140
+ - Data migration specifics (if data migration type)
141
+ - Dual-run requirements (if applicable)
142
+ - Existing code/config to preserve
143
+ - Frame as confirmable assumptions: "I assume X, is that correct?"
144
+ 2. Save gathered requirements to `analysis/requirements.md`
145
+
146
+ **Part B — Specification Creation (subagent)**: 3. Task tool - `specification-creator` subagent
147
+
148
+ **Context to pass to subagent**: task_path, task_type (migration), task_description, requirements_path (analysis/requirements.md), project_context_paths (INDEX.md + project_doc_paths from state — all discovered project docs), migration_type, current_system, target_system, risk_level, breaking_changes, phase_summaries (current_state_analysis, gap_analysis)
149
+
150
+ **Output**: `analysis/requirements.md`, `implementation/spec.md`, `analysis/rollback-plan.md`, optionally `analysis/dual-run-plan.md`
151
+ **State**: Update `rollback_plan_created`, `dual_run_configured`
152
+
153
+ → Pause
154
+
155
+ question - Display executive summary before asking. Read `implementation/spec.md` and extract: migration strategy chosen, scope boundaries, rollback approach, breaking changes identified, key constraints. Format as brief overview then "Continue to implementation planning?"
156
+
157
+ ---
158
+
159
+ ### Phase 4: Implementation Planning
160
+
161
+ > **Phase gate**: Requires `question` confirmation from Phase 3 before executing.
162
+
163
+ **Purpose**: Break migration into task groups with rollback steps
164
+ **Execute**: Task tool - `implementation-planner` subagent
165
+ **Output**: `implementation/implementation-plan.md` with rollback procedures
166
+ **State**: Update task groups and dependencies
167
+
168
+ **Context to pass to subagent**: task_path, task_type (migration), migration_type, task_description, phase_summaries (current_state_analysis, gap_analysis, specification)
169
+
170
+ → Pause
171
+
172
+ question - Display executive summary before asking. Read `implementation/implementation-plan.md` and extract: number of task groups, total steps, rollback steps included, key dependencies, execution sequence. Format as brief overview then "Continue to execute migration?"
173
+
174
+ ---
175
+
176
+ ### Phase 5: Migration Execution
177
+
178
+ > **Phase gate**: Requires `question` confirmation from Phase 4 before executing.
179
+
180
+ **Purpose**: Execute migration steps with incremental verification
181
+
182
+ **ANTI-PATTERN — DO NOT DO THIS:**
183
+
184
+ - ❌ "Let me implement this directly..." — STOP. Delegate to implementation-plan-executor.
185
+ - ❌ "This migration is simple enough to code inline..." — STOP. Simplicity is NOT a reason to skip delegation.
186
+
187
+ **INVOKE NOW** — Skill tool call:
188
+
189
+ **Execute**: Skill tool - `implementation-plan-executor`
190
+ **Output**: Implemented migration changes, `implementation/work-log.md`
191
+ **State**: Update implementation progress, extract phase_summaries.implementation
192
+
193
+ 📋 **Standards Reminder**: Review `.owflow/docs/INDEX.md` before implementing.
194
+
195
+ **SELF-CHECK**: Did you just invoke the Skill tool with `implementation-plan-executor`? Or did you start writing migration code yourself? If the latter, STOP immediately and invoke the Skill tool instead.
196
+
197
+ **⚠️ POST-IMPLEMENTATION CONTINUATION** — After the skill completes and returns control:
198
+
199
+ 1. Read `orchestrator-state.yml` to confirm you are the orchestrator
200
+ 2. Update state: add Phase 5 to `completed_phases`
201
+ 3. Proceed to Phase 6
202
+
203
+ → Pause
204
+
205
+ question - Display executive summary before asking. Extract from `phase_summaries.implementation` and `implementation/work-log.md`: migration steps completed, files changed, test results, rollback readiness status. Format as brief overview then "Continue to verification?"
206
+
207
+ ---
208
+
209
+ ### Phase 6: Verification + Compatibility Testing
210
+
211
+ > **Phase gate**: Requires `question` confirmation from Phase 5 before executing.
212
+
213
+ **Purpose**: Verify migration success with compatibility and rollback testing
214
+ **Execute**: Skill tool - `implementation-verifier`
215
+ **Output**: `verification/implementation-verification.md`, `verification/compatibility-test-results.md`
216
+ **State**: Update verification results
217
+
218
+ **Migration-Specific Checks**:
219
+
220
+ - Verify old system still works (if dual-run)
221
+ - Test rollback procedures (non-destructive)
222
+ - Validate data integrity (for data migrations)
223
+ - Check performance benchmarks (before/after)
224
+
225
+ **⚠️ POST-VERIFICATION CONTINUATION** — After the skill completes and returns control:
226
+
227
+ 1. Read `orchestrator-state.yml` to confirm you are the orchestrator
228
+ 2. Update state: add Phase 6 to `completed_phases`
229
+ 3. Evaluate verdict: if PASS → Phase 8, if fixable issues → Phase 7, otherwise stop workflow
230
+
231
+ → Pause
232
+
233
+ question - Display executive summary before asking. Extract from verification results: overall verdict, issue counts by severity, compatibility test results, data integrity status, rollback test results. Format as detailed overview then "Continue to Phase [7 or 8]?"
234
+
235
+ ---
236
+
237
+ ### Phase 7: Migration Issue Resolution (Conditional)
238
+
239
+ > **Phase gate**: Requires `question` confirmation from Phase 6 before executing.
240
+
241
+ **Purpose**: Fix verification issues through direct editing and re-verification
242
+ **Execute**: Direct - apply fixes, re-verify
243
+ **Output**: Updated code, `verification_context.fixes_applied`
244
+ **State**: Update `reverify_count`, `decisions_made`
245
+
246
+ **Skip if**: verdict = PASS
247
+
248
+ **Process**:
249
+
250
+ 1. Display detailed issue breakdown grouped by category and severity, listing location, description, and fixability
251
+ 2. Present all critical + warning issues as a numbered list
252
+ 3. question — "Which issues should I fix?" with options: "Fix all fixable issues" / "Let me choose specific issues" / "Skip fixes, proceed as-is"
253
+ 4. Fix selected issues
254
+ 5. question — "Re-run verification to check fixes?" with options: "Yes, re-run verification" / "No, proceed to next phase"
255
+ 6. If re-run → re-invoke `implementation-verifier` → return to Step 1
256
+ 7. Max 3 iterations
257
+
258
+ **Data Safety Critical**: HALT on any data integrity issue - never auto-fix data problems. Always present data issues to user with rollback option.
259
+
260
+ **Exit Conditions**:
261
+
262
+ - ✅ No critical issues remain → Proceed to Phase 8
263
+ - ⚠️ Max iterations (3) reached → Ask user: proceed with warnings or rollback
264
+ - ❌ Data integrity issues → HALT immediately, recommend rollback
265
+
266
+ → Pause
267
+
268
+ question - Display executive summary: total issues found, issues fixed, issues remaining by severity. Then "Continue to documentation?"
269
+
270
+ ---
271
+
272
+ ### Phase 8: Documentation (Optional)
273
+
274
+ > **Phase gate**: Requires `question` confirmation from the preceding phase before executing.
275
+
276
+ **Purpose**: Create migration guide for end users
277
+ **Execute**: Task tool - `user-docs-generator` subagent
278
+ **Output**: `documentation/migration-guide.md`
279
+ **State**: Set documentation complete
280
+
281
+ **Skip if**: `options.docs_enabled = false`
282
+
283
+ **Documentation Covers**:
284
+
285
+ - Migration overview and goals
286
+ - Prerequisites and preparation steps
287
+ - Step-by-step migration procedure
288
+ - Rollback procedures
289
+ - Troubleshooting common issues
290
+
291
+ → End of workflow
292
+
293
+ ---
294
+
295
+ ## Domain Context (State Extensions)
296
+
297
+ Migration-specific fields in `orchestrator-state.yml`:
298
+
299
+ ```yaml
300
+ migration_context:
301
+ migration_type: "code" | "data" | "architecture" | "general"
302
+ current_system:
303
+ description: null
304
+ technologies: []
305
+ target_system:
306
+ description: null
307
+ technologies: []
308
+ migration_strategy:
309
+ approach: "incremental" | "big-bang" | "dual-run" | "phased"
310
+ phases: []
311
+ risk_level: null
312
+ breaking_changes: []
313
+ rollback_plan_created: false
314
+ dual_run_configured: false
315
+
316
+ external_research:
317
+ performed: false
318
+ category: null
319
+ breaking_changes: []
320
+ migration_guide_url: null
321
+
322
+ verification_context:
323
+ last_status: null
324
+ issues_found: null
325
+ fixes_applied: []
326
+ decisions_made: []
327
+ reverify_count: 0
328
+
329
+ options:
330
+ docs_enabled: false
331
+ ```
332
+
333
+ ---
334
+
335
+ ## Task Structure
336
+
337
+ ```
338
+ .owflow/tasks/migrations/YYYY-MM-DD-migration-name/
339
+ ├── orchestrator-state.yml
340
+ ├── analysis/
341
+ │ ├── current-state-analysis.md # Phase 1
342
+ │ ├── target-state-plan.md # Phase 2
343
+ │ ├── requirements.md # Phase 3
344
+ │ ├── rollback-plan.md # Phase 3
345
+ │ └── dual-run-plan.md # Phase 3 (if dual-run)
346
+ ├── implementation/
347
+ │ ├── spec.md # Phase 3
348
+ │ ├── implementation-plan.md # Phase 4
349
+ │ └── work-log.md # Phase 5
350
+ ├── verification/
351
+ │ ├── implementation-verification.md # Phase 6
352
+ │ └── compatibility-test-results.md # Phase 6
353
+ └── documentation/
354
+ └── migration-guide.md # Phase 8 (optional)
355
+ ```
356
+
357
+ ---
358
+
359
+ ## Auto-Recovery
360
+
361
+ | Phase | Max Attempts | Strategy |
362
+ | ----- | ------------ | --------------------------------------------------------------------------------- |
363
+ | 1 | 2 | Expand search patterns, prompt user for file paths |
364
+ | 2 | 2 | Re-prompt for target details |
365
+ | 3 | 2 | Re-gather requirements, re-invoke spec-creator subagent, regenerate rollback plan |
366
+ | 4 | 2 | Regenerate with migration constraints |
367
+ | 5 | 5 | Fix syntax errors, prompt user on repeated failure |
368
+ | 6 | 3 | Fix-then-reverify. **HALT on data integrity issues** |
369
+ | 8 | 1 | Generate text-only without screenshots |
370
+
371
+ ---
372
+
373
+ ## Command Integration
374
+
375
+ Invoked via:
376
+
377
+ - `/migration [description] [--type=TYPE]` (new)
378
+ - `/migration [task-path] [--from=PHASE]` (resume)
379
+
380
+ Task directory: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`