owflow 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,169 +1,169 @@
1
- ![Owflow logo](logo.png)
2
-
3
- # Owflow
4
-
5
- **Structured, standards-aware development workflows for OpenCode**
6
-
7
- Describe what you want to build, and the plugin handles the rest - from specification through implementation to verification - while enforcing your project's coding standards at every step.
8
-
9
- Started as a simple OpenCode fork of [Maister Claude Code plugin](https://github.com/SkillPanel/maister), Owflow aims to deliver production ready workflows using the full [Opencode](https://opencode.ai/) plugin support.
10
-
11
- ## What You Get
12
-
13
- - **Guided workflows** for features, bug fixes, enhancements, performance, migrations, research, and product design
14
- - **Auto-discovered standards** from your codebase - config files, source patterns, and documentation are analyzed and enforced throughout every workflow
15
- - **Test-driven implementation** with automated planning, incremental verification, and full test suite runs before completion
16
- - **Pause and resume** any workflow - state is preserved across sessions
17
- - **Production readiness checks** including code review, reality assessment, and pragmatic over-engineering detection
18
-
19
- ## Getting Started
20
-
21
- ### Prerequisites
22
-
23
- - [Opencode](https://opencode.ai/) CLI installed and configured
24
- - [Node.js](https://nodejs.org/) >= 25
25
-
26
- ### Installation
27
-
28
- #### Install the plugin
29
-
30
- ```bash
31
- npm install owflow
32
- ```
33
-
34
- #### Add owflow to the `plugin` array in your `opencode.json` ([global or project-level](https://opencode.ai/docs/plugins/#load-order)):
35
-
36
- ```json
37
- {
38
- "plugin": ["owflow"]
39
- }
40
- ```
41
-
42
- ### Initial project setup
43
-
44
- Initialize your project to auto-detect coding standards and generate project documentation:
45
-
46
- ```bash
47
- /flow-init
48
- ```
49
-
50
- This scans your codebase and creates `.owflow/` with standards, docs, and task folders. May take a few minutes on larger projects.
51
-
52
- If you have another project already using Owflow, you can reuse its standards as a starting point:
53
-
54
- ```bash
55
- /flow-init --standards-from=/path/to/other-project
56
- ```
57
-
58
- ### First Workflow
59
-
60
- ```bash
61
- /development Add user profile page with avatar upload
62
- ```
63
-
64
- Or just discuss your task with LLM model and then run:
65
-
66
- ```bash
67
- /development
68
- ```
69
-
70
- The plugin picks up context from your conversation - no arguments needed.
71
-
72
- ## How It Works
73
-
74
- 1. You describe a task - either as an argument or just in conversation
75
- 2. The plugin classifies it (feature, bug, enhancement, etc.) and proposes a workflow
76
- 3. You confirm, and it guides you through phases: **requirements → spec → plan → implement → verify**
77
- 4. At each phase, it asks for your input and decisions
78
- 5. You get tested, verified code with a detailed work log
79
-
80
- All artifacts are saved in `.owflow/tasks/` organized by type and date.
81
-
82
- ### Context-Aware Commands
83
-
84
- Every workflow command works without arguments. The plugin reads your current conversation to extract the task description and auto-detect the task type:
85
-
86
- ```
87
- You: "The login page throws a 500 error when the session expires"
88
- You: /development
89
- → Auto-detects: bug fix, extracts description from conversation
90
- ```
91
-
92
- ```
93
- You: /standards-update
94
- → Scans conversation for patterns like "we always use..." or "prefer X over Y"
95
- ```
96
-
97
- You can always be explicit when you prefer - arguments and flags simply override the auto-detection.
98
-
99
- ## Supported Workflows
100
-
101
- | Command | Use When |
102
- | ----------------- | ------------------------------------------- |
103
- | `/development` | Features, bug fixes, enhancements |
104
- | `/research` | Research with synthesis and solution design |
105
- | `/performance` | Optimizing speed or resource usage |
106
- | `/migration` | Changing technologies or patterns |
107
- | `/product-design` | Product and feature design |
108
-
109
- Task type (feature/bug/enhancement) is auto-detected from context. Override with `--type=feature|bug|enhancement` if needed. Or use `/work` as a single entry point that routes to the right workflow.
110
-
111
- ### Quick Commands
112
-
113
- For smaller tasks that don't need a full workflow:
114
-
115
- | Command | Use When |
116
- | --------------- | ----------------------------------------------------------- |
117
- | `/quick-plan` | You want a plan with standards awareness before coding |
118
- | `/quick-dev` | You know what to do - just implement with standards applied |
119
- | `/quick-bugfix` | Quick TDD-driven bug fix — write failing test, fix, verify |
120
-
121
- ## Standards-Aware Development
122
-
123
- This is the key differentiator. Owflow doesn't just run workflows - it learns your project's conventions and enforces them:
124
-
125
- - **`flow-init`** scans config files, source code, and documentation to auto-detect your coding standards
126
- - **Continuous checking** - standards are consulted before specification, during planning, and while coding (not just at the start)
127
- - **`/standards-discover`** refreshes standards from your evolving codebase
128
- - **`/standards-update`** lets you add or refine standards manually, or sync from another project with `--from=PATH`
129
-
130
- Standards live in `.owflow/docs/standards/` and are indexed in `.owflow/docs/INDEX.md`.
131
-
132
- **Important**: Do not use plan mode with workflows (see [Best Practices](#best-practices) below).
133
-
134
- ## Beta Channel
135
-
136
- Want to try experimental features before they hit stable? Install from the beta channel:
137
-
138
- TBD
139
-
140
- ## Best Practices
141
-
142
- **Don't use plan mode when starting a workflow.** Planning is a built-in part of every workflow — the orchestrator creates specs, plans, and other files as it goes. Claude Code's plan mode restricts file creation, which conflicts with this. Let the workflow handle planning on its own.
143
-
144
- **Start workflows in a fresh session.** This is especially useful when chaining workflows (e.g., research → development). Research and product-design artifacts already contain all the context needed, so a clean session avoids noise from prior conversation.
145
-
146
- **Chain workflows by passing a task folder.** If you've completed a research or product-design workflow and want to build on those results, pass the task folder directly:
147
-
148
- ```bash
149
- /development .owflow/tasks/research/2026-01-12-oauth-research
150
- ```
151
-
152
- You can also append additional instructions to narrow scope or guide the workflow:
153
-
154
- ```bash
155
- /development .owflow/tasks/product-design/2026-03-10-dashboard-redesign Implement only phase 1
156
- ```
157
-
158
- ## Known Issues
159
-
160
- **Orchestrator may stall after long phases.** After context compaction (which typically happens after lengthy phases like implementation), the main agent may stop progressing automatically. If you notice it's idle, just type something like "continue" or "proceed" — it will pick up where it left off. You can also re-invoke the workflow in resume mode to reload the orchestrator state:
161
-
162
- ```bash
163
- /development .owflow/tasks/development/2026-03-24-my-feature
164
- ```
165
-
166
- ## Learn More
167
-
168
- - [Workflow Details](docs/workflows.md) - phases, examples, and task structure for each workflow type
169
- - [Full Command Reference](docs/commands.md) - all workflow, review, utility, and quick commands
1
+ ![Owflow logo](logo.png)
2
+
3
+ # Owflow
4
+
5
+ **Structured, standards-aware development workflows for OpenCode**
6
+
7
+ Describe what you want to build, and the plugin handles the rest - from specification through implementation to verification - while enforcing your project's coding standards at every step.
8
+
9
+ Started as a simple OpenCode fork of [Maister Claude Code plugin](https://github.com/SkillPanel/maister), Owflow aims to deliver production ready workflows using the full [Opencode](https://opencode.ai/) plugin support.
10
+
11
+ ## What You Get
12
+
13
+ - **Guided workflows** for features, bug fixes, enhancements, performance, migrations, research, and product design
14
+ - **Auto-discovered standards** from your codebase - config files, source patterns, and documentation are analyzed and enforced throughout every workflow
15
+ - **Test-driven implementation** with automated planning, incremental verification, and full test suite runs before completion
16
+ - **Pause and resume** any workflow - state is preserved across sessions
17
+ - **Production readiness checks** including code review, reality assessment, and pragmatic over-engineering detection
18
+
19
+ ## Getting Started
20
+
21
+ ### Prerequisites
22
+
23
+ - [Opencode](https://opencode.ai/) CLI installed and configured
24
+ - [Node.js](https://nodejs.org/) >= 25
25
+
26
+ ### Installation
27
+
28
+ #### Install the plugin
29
+
30
+ ```bash
31
+ npm install owflow
32
+ ```
33
+
34
+ #### Add owflow to the `plugin` array in your `opencode.json` ([global or project-level](https://opencode.ai/docs/plugins/#load-order)):
35
+
36
+ ```json
37
+ {
38
+ "plugin": ["owflow"]
39
+ }
40
+ ```
41
+
42
+ ### Initial project setup
43
+
44
+ Initialize your project to auto-detect coding standards and generate project documentation:
45
+
46
+ ```bash
47
+ /flow-init
48
+ ```
49
+
50
+ This scans your codebase and creates `.owflow/` with standards, docs, and task folders. May take a few minutes on larger projects.
51
+
52
+ If you have another project already using Owflow, you can reuse its standards as a starting point:
53
+
54
+ ```bash
55
+ /flow-init --standards-from=/path/to/other-project
56
+ ```
57
+
58
+ ### First Workflow
59
+
60
+ ```bash
61
+ /development Add user profile page with avatar upload
62
+ ```
63
+
64
+ Or just discuss your task with Agent and then run:
65
+
66
+ ```bash
67
+ /development
68
+ ```
69
+
70
+ The plugin picks up context from your conversation - no arguments needed.
71
+
72
+ ## How It Works
73
+
74
+ 1. You describe a task - either as an argument or just in conversation
75
+ 2. The plugin classifies it (feature, bug, enhancement, etc.) and proposes a workflow
76
+ 3. You confirm, and it guides you through phases: **requirements → spec → plan → implement → verify**
77
+ 4. At each phase, it asks for your input and decisions
78
+ 5. You get tested, verified code with a detailed work log
79
+
80
+ All artifacts are saved in `.owflow/tasks/` organized by type and date.
81
+
82
+ ### Context-Aware Commands
83
+
84
+ Every workflow command works without arguments. The plugin reads your current conversation to extract the task description and auto-detect the task type:
85
+
86
+ ```
87
+ You: "The login page throws a 500 error when the session expires"
88
+ You: /development
89
+ → Auto-detects: bug fix, extracts description from conversation
90
+ ```
91
+
92
+ ```
93
+ You: /standards-update
94
+ → Scans conversation for patterns like "we always use..." or "prefer X over Y"
95
+ ```
96
+
97
+ You can always be explicit when you prefer - arguments and flags simply override the auto-detection.
98
+
99
+ ## Supported Workflows
100
+
101
+ | Command | Use When |
102
+ | ----------------- | ------------------------------------------- |
103
+ | `/development` | Features, bug fixes, enhancements |
104
+ | `/research` | Research with synthesis and solution design |
105
+ | `/performance` | Optimizing speed or resource usage |
106
+ | `/migration` | Changing technologies or patterns |
107
+ | `/product-design` | Product and feature design |
108
+
109
+ Task type (feature/bug/enhancement) is auto-detected from context. Override with `--type=feature|bug|enhancement` if needed. Or use `/work` as a single entry point that routes to the right workflow.
110
+
111
+ ### Quick Commands
112
+
113
+ For smaller tasks that don't need a full workflow:
114
+
115
+ | Command | Use When |
116
+ | --------------- | ----------------------------------------------------------- |
117
+ | `/quick-plan` | You want a plan with standards awareness before coding |
118
+ | `/quick-dev` | You know what to do - just implement with standards applied |
119
+ | `/quick-bugfix` | Quick TDD-driven bug fix — write failing test, fix, verify |
120
+
121
+ ## Standards-Aware Development
122
+
123
+ This is the key differentiator. Owflow doesn't just run workflows - it learns your project's conventions and enforces them:
124
+
125
+ - **`flow-init`** scans config files, source code, and documentation to auto-detect your coding standards
126
+ - **Continuous checking** - standards are consulted before specification, during planning, and while coding (not just at the start)
127
+ - **`/standards-discover`** refreshes standards from your evolving codebase
128
+ - **`/standards-update`** lets you add or refine standards manually, or sync from another project with `--from=PATH`
129
+
130
+ Standards live in `.owflow/docs/standards/` and are indexed in `.owflow/docs/INDEX.md`.
131
+
132
+ **Important**: Do not use plan mode with workflows (see [Best Practices](#best-practices) below).
133
+
134
+ ## Beta Channel
135
+
136
+ Want to try experimental features before they hit stable? Install from the beta channel:
137
+
138
+ TBD
139
+
140
+ ## Best Practices
141
+
142
+ **Don't use plan mode when starting a workflow.** Planning is a built-in part of every workflow — the orchestrator creates specs, plans, and other files as it goes. OpenCode's plan mode restricts file creation, which conflicts with this. Let the workflow handle planning on its own.
143
+
144
+ **Start workflows in a fresh session.** This is especially useful when chaining workflows (e.g., research → development). Research and product-design artifacts already contain all the context needed, so a clean session avoids noise from prior conversation.
145
+
146
+ **Chain workflows by passing a task folder.** If you've completed a research or product-design workflow and want to build on those results, pass the task folder directly:
147
+
148
+ ```bash
149
+ /development .owflow/tasks/research/2026-01-12-oauth-research
150
+ ```
151
+
152
+ You can also append additional instructions to narrow scope or guide the workflow:
153
+
154
+ ```bash
155
+ /development .owflow/tasks/product-design/2026-03-10-dashboard-redesign Implement only phase 1
156
+ ```
157
+
158
+ ## Known Issues
159
+
160
+ **Orchestrator may stall after long phases.** After context compaction (which typically happens after lengthy phases like implementation), the main agent may stop progressing automatically. If you notice it's idle, just type something like "continue" or "proceed" — it will pick up where it left off. You can also re-invoke the workflow in resume mode to reload the orchestrator state:
161
+
162
+ ```bash
163
+ /development .owflow/tasks/development/2026-03-24-my-feature
164
+ ```
165
+
166
+ ## Learn More
167
+
168
+ - [Workflow Details](docs/workflows.md) - phases, examples, and task structure for each workflow type
169
+ - [Full Command Reference](docs/commands.md) - all workflow, review, utility, and quick commands
@@ -299,7 +299,7 @@ Categorized by severity (Critical/Major/Minor/Cosmetic):
299
299
  Detect unavailable tools and provide setup instructions:
300
300
 
301
301
  - Install playwright-mcp
302
- - Configure MCP server in Claude Code
302
+ - Configure MCP server in OpenCode
303
303
  - Restart and retry
304
304
 
305
305
  ### Application Not Running
@@ -5,7 +5,7 @@ description: Enter planning mode with AI SDLC standards awareness
5
5
 
6
6
  # Planning Mode with Standards Awareness
7
7
 
8
- Enter Claude Code's planning mode for a task, with automatic discovery of project standards from `.owflow/docs/`.
8
+ Enter OpenCode's planning mode for a task, with automatic discovery of project standards from `.owflow/docs/`.
9
9
 
10
10
  ## Usage
11
11
 
@@ -37,7 +37,7 @@ Enter Claude Code's planning mode for a task, with automatic discovery of projec
37
37
 
38
38
  ### Step 2: Discover and Read Standards (BEFORE Plan Mode)
39
39
 
40
- **CRITICAL: This step MUST complete before calling EnterPlanMode.**
40
+ **CRITICAL: This step MUST complete before calling Plan Agent.**
41
41
 
42
42
  1. **Check if `.owflow/docs/INDEX.md` exists**
43
43
  - **If not exists**: Note that no standards are available, skip to Step 3
@@ -56,7 +56,7 @@ Enter Claude Code's planning mode for a task, with automatic discovery of projec
56
56
 
57
57
  ### Step 3: Enter Planning Mode
58
58
 
59
- **Use the `EnterPlanMode` tool to trigger Claude Code's builtin planning mode.**
59
+ **Use the `Plan agent` to trigger OpenCode's builtin planning mode.**
60
60
 
61
61
  **Standards context from Step 2 MUST actively inform all plan mode phases:**
62
62
 
@@ -70,11 +70,11 @@ The planning mode will:
70
70
  2. Launch Plan agents to design implementation approach (with standards constraints)
71
71
  3. Review and verify alignment with user intent
72
72
  4. Write final plan to plan file (with standards woven into steps)
73
- 5. Call ExitPlanMode for user approval (gated on mandatory standards sections)
73
+ 5. Ask for user approval (gated on mandatory standards sections)
74
74
 
75
- ### ExitPlanMode Gate: Mandatory Standards Sections
75
+ ### Approval question gate: Mandatory Standards Sections
76
76
 
77
- **BLOCKING: Do NOT call `ExitPlanMode` until the plan file contains these sections:**
77
+ **BLOCKING: Do NOT call ask user for approval until the plan file contains these sections:**
78
78
 
79
79
  1. **"## Applicable Standards"** — list each standard file that was read, with key guidelines extracted from each. If no standards exist, state: "No AI SDLC standards found. Consider running `/flow-init`."
80
80
 
@@ -85,7 +85,7 @@ The planning mode will:
85
85
  - [ ] New components use TypeScript strict mode (from `standards/frontend/components.md`)
86
86
  ```
87
87
 
88
- If these sections are missing from the plan file, add them before calling ExitPlanMode.
88
+ If these sections are missing from the plan file, add them before asking user for approval.
89
89
 
90
90
  ### Graceful Fallback
91
91
 
@@ -102,9 +102,9 @@ project documentation and coding standards for better consistency.
102
102
 
103
103
  1. **Parses** task description from user input
104
104
  2. **Discovers and READS** applicable standard files from `.owflow/docs/` (BEFORE plan mode)
105
- 3. **Enters** Claude Code's builtin planning mode via `EnterPlanMode` with standards already loaded
105
+ 3. **Enters** OpenCode's builtin planning mode via delegating to `Plan Agent` with standards already loaded
106
106
  4. **Produces** a plan file with implementation approach, applicable standards, and compliance checklist
107
- 5. **Gates** ExitPlanMode on mandatory standards sections in the plan file
107
+ 5. **Gates** Approval question on mandatory standards sections in the plan file
108
108
 
109
109
  ## Benefits Over Manual Planning
110
110
 
@@ -185,7 +185,7 @@ Use this to add new documentation to the project, either from plugin baseline or
185
185
  - Ask for the filename and purpose
186
186
  - Create a template file with appropriate frontmatter and structure
187
187
  4. Update INDEX.md to include the new documentation (see "Manage INDEX.md" operation)
188
- 5. If this is a technical standard and corresponds to a Claude Code Skill, ensure consistency
188
+ 5. If this is a technical standard and corresponds to a Agent Skill, ensure consistency
189
189
 
190
190
  **Result:** New documentation is added to the project and indexed in INDEX.md.
191
191
 
@@ -211,7 +211,7 @@ Use this to help the user update or modify existing project documentation.
211
211
  - Check if INDEX.md needs updating (if the purpose/description changed significantly)
212
212
  - If updating tech-stack.md or architecture.md, suggest reviewing AGENTS.md for consistency
213
213
  6. For technical standards:
214
- - If a corresponding Claude Code Skill exists, suggest reviewing it for consistency
214
+ - If a corresponding Agent Skill exists, suggest reviewing it for consistency
215
215
  - Standards should align with actual code patterns in the project
216
216
 
217
217
  **Result:** Documentation is updated to reflect current project state and team decisions.
@@ -273,7 +273,7 @@ Use this to ensure the project's AGENTS.md properly integrates with the document
273
273
  2. If it doesn't exist, ask the user if they want to create it
274
274
  3. Look for a documentation reference section in AGENTS.md
275
275
  4. If the section doesn't exist or is incomplete:
276
- - Read `references/claude-md-template.md` for the template
276
+ - Read `references/agents-md-template.md` for the template
277
277
  - Add the template section to AGENTS.md
278
278
  5. Ensure the documentation section is placed prominently in AGENTS.md (near the top)
279
279
  6. Verify that the INDEX.md path is correct and the file exists
@@ -307,7 +307,7 @@ Use this to check that documentation is consistent, up-to-date, and properly int
307
307
  - Check if they contain placeholder text vs. actual project information
308
308
  - Warn if critical documentation is missing or empty
309
309
  5. **Check standards consistency:**
310
- - If Claude Code Skills exist, check if corresponding standards documentation exists
310
+ - If Agent Skills exist, check if corresponding standards documentation exists
311
311
  - If standards exist without skills, suggest creating skills (if appropriate)
312
312
  - Report any inconsistencies
313
313
  6. **Generate validation report:**
@@ -330,42 +330,42 @@ Use this to check that documentation is consistent, up-to-date, and properly int
330
330
 
331
331
  ```
332
332
  User: "Set up documentation for this project"
333
- Claude: [Executes Initialize Documentation - creates structure, copies baseline docs, generates INDEX.md, updates AGENTS.md, gathers project info]
333
+ Agent: [Executes Initialize Documentation - creates structure, copies baseline docs, generates INDEX.md, updates AGENTS.md, gathers project info]
334
334
  ```
335
335
 
336
336
  **Update project vision:**
337
337
 
338
338
  ```
339
339
  User: "I want to update our project vision to include AI-first approach"
340
- Claude: [Executes Update Documentation - reads current vision.md, helps user edit it, updates INDEX.md if needed]
340
+ Agent: [Executes Update Documentation - reads current vision.md, helps user edit it, updates INDEX.md if needed]
341
341
  ```
342
342
 
343
343
  **Add custom documentation:**
344
344
 
345
345
  ```
346
346
  User: "Add documentation for our deployment process"
347
- Claude: [Executes Add Documentation File - creates custom project/deployment.md, updates INDEX.md]
347
+ Agent: [Executes Add Documentation File - creates custom project/deployment.md, updates INDEX.md]
348
348
  ```
349
349
 
350
350
  **Reference plugin baseline:**
351
351
 
352
352
  ```
353
353
  User: "Show me the plugin's baseline error handling standard"
354
- Claude: [Executes Use Plugin Documentation as Reference - shows plugin baseline, compares with project version, no changes unless user requests]
354
+ Agent: [Executes Use Plugin Documentation as Reference - shows plugin baseline, compares with project version, no changes unless user requests]
355
355
  ```
356
356
 
357
357
  **Validate documentation:**
358
358
 
359
359
  ```
360
360
  User: "Check if our documentation is complete and consistent"
361
- Claude: [Executes Validate Documentation Consistency - checks structure, INDEX.md, AGENTS.md integration, generates report]
361
+ Agent: [Executes Validate Documentation Consistency - checks structure, INDEX.md, AGENTS.md integration, generates report]
362
362
  ```
363
363
 
364
364
  **Manage INDEX.md:**
365
365
 
366
366
  ```
367
367
  User: "Rebuild the documentation index"
368
- Claude: [Executes Manage INDEX.md - scans .owflow/docs/, regenerates comprehensive INDEX.md]
368
+ Agent: [Executes Manage INDEX.md - scans .owflow/docs/, regenerates comprehensive INDEX.md]
369
369
  ```
370
370
 
371
371
  ---
@@ -1,6 +1,6 @@
1
1
  # Migration Strategies Reference
2
2
 
3
- > **Design Documentation**: This file serves as **design documentation** for developers and Claude implementing migration workflows. It provides conceptual patterns and decision frameworks for selecting and executing migration strategies.
3
+ > **Design Documentation**: This file serves as **design documentation** for developers and Agents implementing migration workflows. It provides conceptual patterns and decision frameworks for selecting and executing migration strategies.
4
4
 
5
5
  **Purpose:** Pattern guide for migration execution strategies (incremental, rollback, dual-run)
6
6
 
@@ -23,11 +23,11 @@ This reference provides decision criteria and implementation patterns for the th
23
23
 
24
24
  Migration strategies define **how** to execute the transition from current to target state. The migration orchestrator supports three core strategies, which can be combined:
25
25
 
26
- | Strategy | Purpose | Risk Level | Use When |
27
- |----------|---------|------------|----------|
28
- | **Incremental** | Migrate piece-by-piece with checkpoints | Low-Medium | Large migrations, complex changes |
29
- | **Rollback** | Plan undo procedures for each phase | Medium | Critical systems, data migrations |
30
- | **Dual-Run** | Run old and new systems in parallel | Medium-High | Zero-downtime requirements, data sync needed |
26
+ | Strategy | Purpose | Risk Level | Use When |
27
+ | --------------- | --------------------------------------- | ----------- | -------------------------------------------- |
28
+ | **Incremental** | Migrate piece-by-piece with checkpoints | Low-Medium | Large migrations, complex changes |
29
+ | **Rollback** | Plan undo procedures for each phase | Medium | Critical systems, data migrations |
30
+ | **Dual-Run** | Run old and new systems in parallel | Medium-High | Zero-downtime requirements, data sync needed |
31
31
 
32
32
  ### Key Principles
33
33
 
@@ -45,6 +45,7 @@ Migration strategies define **how** to execute the transition from current to ta
45
45
  **Definition**: Break migration into smaller phases, complete one phase fully before starting next
46
46
 
47
47
  **Pattern**:
48
+
48
49
  ```
49
50
  Current State → Phase 1 → Verify → Phase 2 → Verify → Phase 3 → Verify → Target State
50
51
  ↑ ↑ ↑
@@ -54,12 +55,14 @@ Current State → Phase 1 → Verify → Phase 2 → Verify → Phase 3 → Veri
54
55
  ### When to Use
55
56
 
56
57
  **Strong Indicators**:
58
+
57
59
  - Large migration scope (>50 files, >5,000 lines affected)
58
60
  - Multiple independent subsystems to migrate
59
61
  - Complex breaking changes requiring staged adaptation
60
62
  - Team needs to learn new technology during migration
61
63
 
62
64
  **Avoid If**:
65
+
63
66
  - Small, isolated change (<10 files)
64
67
  - Tight deadline requiring fast completion
65
68
  - No logical breakpoints in migration
@@ -67,12 +70,14 @@ Current State → Phase 1 → Verify → Phase 2 → Verify → Phase 3 → Veri
67
70
  ### Implementation Pattern
68
71
 
69
72
  **Phase Definition**:
73
+
70
74
  1. **Identify Natural Boundaries**: Modules, layers, features that can migrate independently
71
75
  2. **Define Dependencies**: Which phases must complete before others
72
76
  3. **Set Verification Criteria**: How to validate each phase succeeded
73
77
  4. **Plan Checkpoints**: Git tags, deployment points, rollback triggers
74
78
 
75
79
  **Example - Framework Migration (Vue 2 → Vue 3)**:
80
+
76
81
  ```
77
82
  Phase 1: Core dependencies (package.json, build config)
78
83
  ↓ Verify: App still builds and runs
@@ -87,8 +92,10 @@ Phase 5: Cleanup (remove compatibility shims)
87
92
  ```
88
93
 
89
94
  **Task Group Structure**:
95
+
90
96
  ```markdown
91
97
  ### Task Group 1: Phase 1 - Core Dependencies
98
+
92
99
  - [ ] 1.1 Write tests for compatibility layer
93
100
  - [ ] 1.2 Upgrade core packages
94
101
  - [ ] 1.3 Update build configuration
@@ -96,6 +103,7 @@ Phase 5: Cleanup (remove compatibility shims)
96
103
  - [ ] 1.5 Run Phase 1 checkpoint tests
97
104
 
98
105
  ### Task Group 2: Phase 2 - Shared Components
106
+
99
107
  [continues with next phase after Phase 1 verified]
100
108
  ```
101
109
 
@@ -121,6 +129,7 @@ Phase 5: Cleanup (remove compatibility shims)
121
129
  **Definition**: Document undo procedures for each migration phase before executing
122
130
 
123
131
  **Pattern**:
132
+
124
133
  ```
125
134
  Before Phase 1: Define rollback procedure
126
135
  Execute Phase 1
@@ -131,6 +140,7 @@ If success: Continue to Phase 2
131
140
  ### When to Use
132
141
 
133
142
  **Strong Indicators**:
143
+
134
144
  - Production systems (downtime is costly)
135
145
  - Data migrations (data loss risk)
136
146
  - Critical business functionality
@@ -138,6 +148,7 @@ If success: Continue to Phase 2
138
148
  - First-time migration (learning experience)
139
149
 
140
150
  **Always Use For**:
151
+
141
152
  - Data migrations (required)
142
153
  - Production deployments (required)
143
154
  - Architecture migrations affecting multiple systems
@@ -145,36 +156,42 @@ If success: Continue to Phase 2
145
156
  ### Implementation Pattern
146
157
 
147
158
  **Rollback Plan Structure** (`planning/rollback-plan.md`):
159
+
148
160
  ```markdown
149
161
  # Rollback Plan: [Migration Name]
150
162
 
151
163
  ## Rollback Overview
164
+
152
165
  - **Rollback Complexity**: Simple | Moderate | Complex
153
166
  - **Data Loss Risk**: None | Minimal | Moderate | High
154
167
  - **Rollback Time Estimate**: [minutes/hours]
155
168
 
156
169
  ## Phase 1: [Phase Name] Rollback
170
+
157
171
  **Trigger**: [What indicates rollback needed]
158
172
  **Procedure**:
173
+
159
174
  1. [Undo step 1]
160
175
  2. [Undo step 2]
161
- **Verification**: [How to verify rollback succeeded]
162
- **Data Recovery**: [How to restore data if modified]
176
+ **Verification**: [How to verify rollback succeeded]
177
+ **Data Recovery**: [How to restore data if modified]
163
178
 
164
179
  ## Phase 2: [Phase Name] Rollback
180
+
165
181
  [Same structure for each phase]
166
182
  ```
167
183
 
168
184
  **Rollback Categories**:
169
185
 
170
- | Category | Example | Procedure |
171
- |----------|---------|-----------|
172
- | **Code Rollback** | Framework upgrade | `git revert [commit]`, redeploy |
173
- | **Data Rollback** | Schema migration | Restore from backup, revert migrations |
174
- | **Config Rollback** | Environment changes | Restore old config files, restart |
175
- | **Infrastructure Rollback** | Platform migration | Switch DNS back, restore old infrastructure |
186
+ | Category | Example | Procedure |
187
+ | --------------------------- | ------------------- | ------------------------------------------- |
188
+ | **Code Rollback** | Framework upgrade | `git revert [commit]`, redeploy |
189
+ | **Data Rollback** | Schema migration | Restore from backup, revert migrations |
190
+ | **Config Rollback** | Environment changes | Restore old config files, restart |
191
+ | **Infrastructure Rollback** | Platform migration | Switch DNS back, restore old infrastructure |
176
192
 
177
193
  **Rollback Testing Strategy**:
194
+
178
195
  - **Non-Destructive Test**: Test rollback in non-prod first
179
196
  - **Documented Steps**: Exact commands/procedures
180
197
  - **Validation Criteria**: How to verify rollback succeeded
@@ -202,6 +219,7 @@ If success: Continue to Phase 2
202
219
  **Definition**: Run old and new systems in parallel, gradually shift traffic from old to new
203
220
 
204
221
  **Pattern**:
222
+
205
223
  ```
206
224
  Old System (100% traffic) → Dual-Run (Old + New in parallel) → New System (100% traffic)
207
225
  ↓
@@ -213,6 +231,7 @@ Old System (100% traffic) → Dual-Run (Old + New in parallel) → New System (1
213
231
  ### When to Use
214
232
 
215
233
  **Strong Indicators**:
234
+
216
235
  - Zero-downtime requirement (24/7 systems)
217
236
  - Data migration with live writes during migration
218
237
  - Need to compare old vs new behavior in production
@@ -220,6 +239,7 @@ Old System (100% traffic) → Dual-Run (Old + New in parallel) → New System (1
220
239
  - Regulatory requirement for parallel validation
221
240
 
222
241
  **Avoid If**:
242
+
223
243
  - Systems can't coexist (e.g., Vue 2 and Vue 3 in same app)
224
244
  - Data synchronization too complex
225
245
  - Cost of running both systems prohibitive
@@ -230,44 +250,52 @@ Old System (100% traffic) → Dual-Run (Old + New in parallel) → New System (1
230
250
  **Dual-Run Phases**:
231
251
 
232
252
  **Phase 1: Setup Dual Environment**
253
+
233
254
  - Deploy new system alongside old
234
255
  - Configure routing/load balancer for split traffic
235
256
  - Set up data synchronization mechanism
236
257
 
237
258
  **Phase 2: Shadow Mode** (new system receives traffic but doesn't affect users)
259
+
238
260
  - 100% traffic to old system
239
261
  - Duplicate writes to new system (shadow)
240
262
  - Compare old vs new results
241
263
  - Identify discrepancies, fix new system
242
264
 
243
265
  **Phase 3: Gradual Cutover**
266
+
244
267
  - 10% traffic → new system (monitor closely)
245
268
  - 50% traffic → new system (A/B test)
246
269
  - 100% traffic → new system (full cutover)
247
270
 
248
271
  **Phase 4: Old System Decommission**
272
+
249
273
  - Keep old system running for 7-30 days (rollback safety net)
250
274
  - After validation period, decommission old system
251
275
 
252
276
  **Dual-Run Plan Structure** (`planning/dual-run-plan.md`):
277
+
253
278
  ```markdown
254
279
  # Dual-Run Plan: [Migration Name]
255
280
 
256
281
  ## Synchronization Strategy
282
+
257
283
  **Sync Direction**: Old → New | Bidirectional | New → Old
258
284
  **Sync Mechanism**: [Database replication | Message queue | API calls]
259
285
  **Sync Frequency**: [Real-time | Batch every X minutes]
260
286
  **Conflict Resolution**: [Last-write-wins | Manual resolution | Application logic]
261
287
 
262
288
  ## Cutover Plan
263
- | Phase | Old Traffic % | New Traffic % | Duration | Success Criteria |
264
- |-------|---------------|---------------|----------|------------------|
265
- | Shadow | 100% | 0% (shadow) | 3-7 days | No errors in new system |
266
- | Pilot | 90% | 10% | 3-7 days | Error rate <0.1% in new |
267
- | Ramp | 50% | 50% | 3-7 days | Performance metrics equivalent |
268
- | Full | 0% | 100% | - | All users migrated |
289
+
290
+ | Phase | Old Traffic % | New Traffic % | Duration | Success Criteria |
291
+ | ------ | ------------- | ------------- | -------- | ------------------------------ |
292
+ | Shadow | 100% | 0% (shadow) | 3-7 days | No errors in new system |
293
+ | Pilot | 90% | 10% | 3-7 days | Error rate <0.1% in new |
294
+ | Ramp | 50% | 50% | 3-7 days | Performance metrics equivalent |
295
+ | Full | 0% | 100% | - | All users migrated |
269
296
 
270
297
  ## Monitoring
298
+
271
299
  - **Key Metrics**: [Response time, error rate, data consistency]
272
300
  - **Alerting**: [Thresholds that trigger rollback]
273
301
  - **Comparison Dashboards**: [Old vs new side-by-side]
@@ -275,12 +303,12 @@ Old System (100% traffic) → Dual-Run (Old + New in parallel) → New System (1
275
303
 
276
304
  **Data Synchronization Patterns**:
277
305
 
278
- | Pattern | Description | Use When |
279
- |---------|-------------|----------|
280
- | **Write-Through** | Writes go to both old and new | Gradual migration, data validation |
281
- | **Replication** | Database-level replication (one-way) | Read-heavy systems, database migrations |
282
- | **Event Streaming** | Publish changes to message queue, both consume | Event-driven architectures |
283
- | **Dual-Write + Reconciliation** | Write to both, periodic reconciliation job | Complex data models, conflict resolution needed |
306
+ | Pattern | Description | Use When |
307
+ | ------------------------------- | ---------------------------------------------- | ----------------------------------------------- |
308
+ | **Write-Through** | Writes go to both old and new | Gradual migration, data validation |
309
+ | **Replication** | Database-level replication (one-way) | Read-heavy systems, database migrations |
310
+ | **Event Streaming** | Publish changes to message queue, both consume | Event-driven architectures |
311
+ | **Dual-Write + Reconciliation** | Write to both, periodic reconciliation job | Complex data models, conflict resolution needed |
284
312
 
285
313
  ### Benefits
286
314
 
@@ -333,17 +361,20 @@ START: What's the migration scope?
333
361
  ### Common Combinations
334
362
 
335
363
  **Incremental + Rollback** (Most Common):
364
+
336
365
  - Break into phases (Incremental)
337
366
  - Document rollback for each phase (Rollback)
338
367
  - Use for: Most medium-large migrations
339
368
 
340
369
  **Incremental + Rollback + Dual-Run** (Maximum Safety):
370
+
341
371
  - Break into phases (Incremental)
342
372
  - Document rollback (Rollback)
343
373
  - Run old/new in parallel (Dual-Run)
344
374
  - Use for: Critical systems, data migrations, zero-downtime requirements
345
375
 
346
376
  **Example - Database Migration (MySQL → PostgreSQL)**:
377
+
347
378
  ```
348
379
  Strategy: Incremental + Rollback + Dual-Run
349
380
 
@@ -370,12 +401,12 @@ Phase 5: Decommission MySQL
370
401
 
371
402
  ### Strategy Complexity Matrix
372
403
 
373
- | Combination | Complexity | Duration Overhead | Risk Reduction |
374
- |------------|------------|-------------------|----------------|
375
- | Incremental only | Low | +20-40% | Medium |
376
- | Incremental + Rollback | Medium | +30-50% | High |
377
- | Incremental + Dual-Run | High | +50-80% | High |
378
- | Incremental + Rollback + Dual-Run | Very High | +80-120% | Very High |
404
+ | Combination | Complexity | Duration Overhead | Risk Reduction |
405
+ | --------------------------------- | ---------- | ----------------- | -------------- |
406
+ | Incremental only | Low | +20-40% | Medium |
407
+ | Incremental + Rollback | Medium | +30-50% | High |
408
+ | Incremental + Dual-Run | High | +50-80% | High |
409
+ | Incremental + Rollback + Dual-Run | Very High | +80-120% | Very High |
379
410
 
380
411
  **Guidance**: Choose simplest strategy that adequately mitigates your risks. Over-engineering increases complexity without proportional benefit.
381
412
 
@@ -384,6 +415,7 @@ Phase 5: Decommission MySQL
384
415
  ## Summary
385
416
 
386
417
  **Key Takeaways**:
418
+
387
419
  1. **Incremental** = Lower risk through phased execution
388
420
  2. **Rollback** = Safety net for critical systems
389
421
  3. **Dual-Run** = Zero downtime for live systems
@@ -391,6 +423,7 @@ Phase 5: Decommission MySQL
391
423
  5. **Document procedures** before executing migration
392
424
 
393
425
  **References in SKILL.md**:
426
+
394
427
  - Phase 2 (Specification): Select migration strategy
395
428
  - Phase 3 (Planning): Structure implementation plan by strategy
396
429
  - Phase 4 (Execution): Execute according to selected strategy
@@ -1,6 +1,6 @@
1
1
  # Migration Types Reference
2
2
 
3
- > **Design Documentation**: This file serves as **design documentation** for developers and Claude implementing migration workflows. It provides guidance for identifying migration types and adapting workflows accordingly.
3
+ > **Design Documentation**: This file serves as **design documentation** for developers and Agents implementing migration workflows. It provides guidance for identifying migration types and adapting workflows accordingly.
4
4
 
5
5
  **Purpose:** Pattern guide for the three migration types: Code, Data, and Architecture
6
6
 
@@ -23,16 +23,17 @@ This reference provides characteristics, detection patterns, and workflow adapta
23
23
 
24
24
  Migration types classify migrations based on **what** is being changed:
25
25
 
26
- | Type | Focus | Examples | Risk Profile |
27
- |------|-------|----------|--------------|
28
- | **Code** | Language, framework, library | Vue 2→3, Python 2→3, Express→Fastify | Medium |
29
- | **Data** | Database, storage, schema | MySQL→PostgreSQL, MongoDB→DynamoDB | High |
30
- | **Architecture** | Patterns, structure | REST→GraphQL, Monolith→Microservices | High |
31
- | **General** | Mixed or unclear | Complex refactoring with multiple aspects | Variable |
26
+ | Type | Focus | Examples | Risk Profile |
27
+ | ---------------- | ---------------------------- | ----------------------------------------- | ------------ |
28
+ | **Code** | Language, framework, library | Vue 2→3, Python 2→3, Express→Fastify | Medium |
29
+ | **Data** | Database, storage, schema | MySQL→PostgreSQL, MongoDB→DynamoDB | High |
30
+ | **Architecture** | Patterns, structure | REST→GraphQL, Monolith→Microservices | High |
31
+ | **General** | Mixed or unclear | Complex refactoring with multiple aspects | Variable |
32
32
 
33
33
  ### Why Type Matters
34
34
 
35
35
  Different types require different:
36
+
36
37
  - **Risk assessments**: Data migrations are highest risk (data loss potential)
37
38
  - **Verification approaches**: Data needs integrity checks, code needs functional tests
38
39
  - **Rollback strategies**: Data rollback more complex than code rollback
@@ -47,6 +48,7 @@ Different types require different:
47
48
  **What**: Changing programming language, framework, library, or major version with breaking changes
48
49
 
49
50
  **Characteristics**:
51
+
50
52
  - Source code modifications (syntax, APIs, patterns)
51
53
  - Dependency updates (package.json, requirements.txt, pom.xml)
52
54
  - No data transformation (data structures unchanged or minimal changes)
@@ -55,17 +57,20 @@ Different types require different:
55
57
  ### Examples
56
58
 
57
59
  **Framework Migrations**:
60
+
58
61
  - Vue 2 → Vue 3 (composition API, breaking changes)
59
62
  - Angular 8 → Angular 15 (modules to standalone components)
60
63
  - React Class Components → Hooks
61
64
  - Express 4 → Express 5
62
65
 
63
66
  **Language Migrations**:
67
+
64
68
  - Python 2 → Python 3 (print statements, unicode)
65
69
  - JavaScript → TypeScript (type annotations)
66
70
  - Java 8 → Java 17 (new syntax, APIs)
67
71
 
68
72
  **Library Migrations**:
73
+
69
74
  - Moment.js → Day.js (date handling library change)
70
75
  - Axios → Fetch API (HTTP client change)
71
76
  - Lodash → Native JavaScript (utility functions)
@@ -73,11 +78,13 @@ Different types require different:
73
78
  ### Detection Keywords
74
79
 
75
80
  **Primary Indicators**:
81
+
76
82
  - Framework/library names: React, Vue, Angular, Express, Flask, Django, Spring, Rails
77
83
  - Version terms: "upgrade", "migrate from X to Y", "move to version N"
78
84
  - Language names: Python, Java, JavaScript, TypeScript, Go, Rust
79
85
 
80
86
  **Example Descriptions**:
87
+
81
88
  - "Migrate from Vue 2 to Vue 3" → Code migration (framework)
82
89
  - "Upgrade Express to v5" → Code migration (major version)
83
90
  - "Convert JavaScript to TypeScript" → Code migration (language)
@@ -85,28 +92,34 @@ Different types require different:
85
92
  ### Workflow Adaptations
86
93
 
87
94
  **Phase 1 (Current State Analysis)**:
95
+
88
96
  - Focus: Locate all source files using old framework/library
89
97
  - Analyze: Dependency tree, API usage patterns, deprecated features used
90
98
 
91
99
  **Phase 2 (Target State Planning)**:
100
+
92
101
  - Focus: Breaking changes between versions, API equivalents
93
102
  - Output: Breaking changes list, API migration map
94
103
 
95
104
  **Phase 3 (Specification)**:
105
+
96
106
  - Include: Compatibility shim requirements (if needed)
97
107
  - Rollback: Simple (revert code via git)
98
108
 
99
109
  **Phase 5 (Execution)**:
110
+
100
111
  - Strategy: Incremental (by module/component)
101
112
  - Testing: Functional tests per module
102
113
 
103
114
  **Phase 6 (Verification)**:
115
+
104
116
  - Focus: Functional equivalence (behavior unchanged)
105
117
  - Tests: Full test suite, manual testing of critical flows
106
118
 
107
119
  ### Risk Profile
108
120
 
109
121
  **Medium Risk**:
122
+
110
123
  - **Risk**: Breaking changes causing bugs, build failures
111
124
  - **Mitigation**: Comprehensive test coverage, incremental migration
112
125
  - **Rollback**: Relatively easy (git revert)
@@ -120,6 +133,7 @@ Different types require different:
120
133
  **What**: Changing database platform, storage system, or schema structure
121
134
 
122
135
  **Characteristics**:
136
+
123
137
  - Data transformation (format, structure, relationships)
124
138
  - Schema changes (tables, columns, indexes, constraints)
125
139
  - Data integrity critical (no data loss tolerated)
@@ -128,17 +142,20 @@ Different types require different:
128
142
  ### Examples
129
143
 
130
144
  **Platform Migrations**:
145
+
131
146
  - MySQL → PostgreSQL (SQL database change)
132
147
  - MongoDB → DynamoDB (document to key-value)
133
148
  - Redis → Memcached (caching layer change)
134
149
  - On-premise DB → Cloud DB (AWS RDS, Azure SQL)
135
150
 
136
151
  **Schema Migrations**:
152
+
137
153
  - Normalize database (split tables, add relationships)
138
154
  - Denormalize for performance (merge tables)
139
155
  - Add partitioning/sharding
140
156
 
141
157
  **Storage Migrations**:
158
+
142
159
  - Local files → S3 (file storage migration)
143
160
  - S3 → GCS (cloud provider change)
144
161
  - SQL → NoSQL (data model change)
@@ -146,11 +163,13 @@ Different types require different:
146
163
  ### Detection Keywords
147
164
 
148
165
  **Primary Indicators**:
166
+
149
167
  - Database names: MySQL, PostgreSQL, MongoDB, Redis, DynamoDB, Cassandra, Oracle
150
168
  - Data terms: "schema change", "data migration", "database migration", "move data"
151
169
  - Storage terms: "S3", "blob storage", "file migration"
152
170
 
153
171
  **Example Descriptions**:
172
+
154
173
  - "Migrate database from MySQL to PostgreSQL" → Data migration (platform)
155
174
  - "Move from MongoDB to DynamoDB" → Data migration (NoSQL change)
156
175
  - "Migrate schema to normalized structure" → Data migration (schema)
@@ -158,23 +177,28 @@ Different types require different:
158
177
  ### Workflow Adaptations
159
178
 
160
179
  **Phase 1 (Current State Analysis)**:
180
+
161
181
  - Focus: Database schema, row counts, data volume, stored procedures
162
182
  - Analyze: Data relationships, foreign keys, indexes, constraints
163
183
 
164
184
  **Phase 2 (Target State Planning)**:
185
+
165
186
  - Focus: Data transformation requirements, data mapping (old → new schema)
166
187
  - Output: Data transformation specification, estimated migration time
167
188
 
168
189
  **Phase 3 (Specification)**:
190
+
169
191
  - Include: Data validation procedures, integrity checks, rollback procedures
170
192
  - Rollback: Complex (requires backup/restore strategies)
171
193
  - Dual-Run: Often required (zero-downtime)
172
194
 
173
195
  **Phase 5 (Execution)**:
196
+
174
197
  - Strategy: Incremental + Dual-Run (high confidence in strategy choice)
175
198
  - Testing: Data integrity checks after each batch
176
199
 
177
200
  **Phase 6 (Verification)**:
201
+
178
202
  - Focus: Data integrity (100% row count match, checksums, data validation)
179
203
  - Tests: Full test suite + data integrity tests + performance benchmarks
180
204
  - Critical: If data integrity fails, HALT (don't auto-fix, prompt user)
@@ -182,11 +206,13 @@ Different types require different:
182
206
  ### Risk Profile
183
207
 
184
208
  **High Risk**:
209
+
185
210
  - **Risk**: Data loss, data corruption, downtime
186
211
  - **Mitigation**: Backups before migration, dual-run, incremental batches, 100% data validation
187
212
  - **Rollback**: Complex (restore from backup, may lose data written during migration)
188
213
 
189
214
  **Special Requirements**:
215
+
190
216
  - **Backup**: Full backup before starting (non-negotiable)
191
217
  - **Data Validation**: 100% row count match, checksums, business rule validation
192
218
  - **Dual-Run**: Strongly recommended (old and new databases in parallel)
@@ -202,6 +228,7 @@ Different types require different:
202
228
  **What**: Changing fundamental system structure, communication patterns, or architectural style
203
229
 
204
230
  **Characteristics**:
231
+
205
232
  - System-wide changes (affects multiple components/services)
206
233
  - Changes how components interact (APIs, communication patterns)
207
234
  - May affect both code and data (comprehensive migration)
@@ -210,17 +237,20 @@ Different types require different:
210
237
  ### Examples
211
238
 
212
239
  **API Style Migrations**:
240
+
213
241
  - REST API → GraphQL (query language change)
214
242
  - SOAP → REST (API pattern modernization)
215
243
  - RPC → REST (communication pattern change)
216
244
 
217
245
  **Architecture Pattern Migrations**:
246
+
218
247
  - Monolith → Microservices (decomposition)
219
248
  - Microservices → Monolith (consolidation)
220
249
  - MVC → Component-Based (frontend architecture change)
221
250
  - Layered → Hexagonal (backend architecture change)
222
251
 
223
252
  **Infrastructure Migrations**:
253
+
224
254
  - On-Premise → Cloud (infrastructure change)
225
255
  - Single Server → Distributed (scalability)
226
256
  - Synchronous → Event-Driven (async patterns)
@@ -228,11 +258,13 @@ Different types require different:
228
258
  ### Detection Keywords
229
259
 
230
260
  **Primary Indicators**:
261
+
231
262
  - Pattern names: REST, GraphQL, gRPC, SOAP, RPC
232
263
  - Architecture styles: Monolith, Microservices, Serverless, Event-Driven, Hexagonal
233
264
  - Refactoring terms: "refactor to", "change architecture", "restructure"
234
265
 
235
266
  **Example Descriptions**:
267
+
236
268
  - "Refactor REST API to GraphQL" → Architecture migration (API style)
237
269
  - "Migrate monolith to microservices" → Architecture migration (decomposition)
238
270
  - "Change from MVC to component-based architecture" → Architecture migration (pattern)
@@ -240,34 +272,41 @@ Different types require different:
240
272
  ### Workflow Adaptations
241
273
 
242
274
  **Phase 1 (Current State Analysis)**:
275
+
243
276
  - Focus: System components, communication patterns, dependencies between components
244
277
  - Analyze: Coupling/cohesion, service boundaries, data flow
245
278
 
246
279
  **Phase 2 (Target State Planning)**:
280
+
247
281
  - Focus: New architecture structure, component boundaries, communication patterns
248
282
  - Output: Architecture diagram, component mapping (old → new)
249
283
 
250
284
  **Phase 3 (Specification)**:
285
+
251
286
  - Include: Strangler fig pattern (if applicable), component interaction diagrams
252
287
  - Rollback: Moderate to complex (depends on dual-run feasibility)
253
288
  - Dual-Run: Often required (old and new architectures in parallel)
254
289
 
255
290
  **Phase 5 (Execution)**:
291
+
256
292
  - Strategy: Incremental (by component/service) + Dual-Run (if possible)
257
293
  - Testing: Integration tests, end-to-end tests, performance tests
258
294
 
259
295
  **Phase 6 (Verification)**:
296
+
260
297
  - Focus: System-level behavior (end-to-end flows work), performance comparison
261
298
  - Tests: Full test suite + integration tests + E2E tests
262
299
 
263
300
  ### Risk Profile
264
301
 
265
302
  **High Risk**:
303
+
266
304
  - **Risk**: System-wide breakage, performance degradation, complex rollback
267
305
  - **Mitigation**: Strangler fig pattern, incremental component migration, dual-run
268
306
  - **Rollback**: Moderate to complex (depends on how well old/new coexist)
269
307
 
270
308
  **Special Patterns**:
309
+
271
310
  - **Strangler Fig**: Gradually replace old system with new (route traffic to new incrementally)
272
311
  - **Branch by Abstraction**: Create abstraction layer, switch implementations behind it
273
312
  - **Parallel Run**: Run old and new architectures in parallel, compare results
@@ -281,6 +320,7 @@ Different types require different:
281
320
  **What**: Migrations that don't fit cleanly into Code/Data/Architecture, or mix multiple types
282
321
 
283
322
  **Characteristics**:
323
+
284
324
  - Ambiguous description ("modernize", "refactor" without specifics)
285
325
  - Multiple aspects (code + data + architecture)
286
326
  - Catch-all for unclear migrations
@@ -294,11 +334,13 @@ Different types require different:
294
334
  ### Workflow Adaptations
295
335
 
296
336
  **Phase 1-2 (Analysis + Planning)**:
337
+
297
338
  - Spend extra time clarifying scope
298
339
  - Prompt user to specify what's changing (code, data, architecture, or all)
299
340
  - May reclassify after analysis
300
341
 
301
342
  **General Approach**:
343
+
302
344
  - Use conservative defaults (high risk, incremental + rollback + dual-run)
303
345
  - Prompt user more frequently for decisions
304
346
  - Extra verification steps
@@ -316,6 +358,7 @@ Migration type detection uses keyword matching with confidence scoring.
316
358
  **Input**: `"Migrate from Vue 2 to Vue 3"`
317
359
 
318
360
  **Steps**:
361
+
319
362
  1. **Extract Keywords**: `["migrate", "Vue", "2", "3"]`
320
363
  2. **Match Against Patterns**:
321
364
  - Code: `["Vue"]` → 1 match
@@ -331,6 +374,7 @@ Migration type detection uses keyword matching with confidence scoring.
331
374
  ### Keyword Categories
332
375
 
333
376
  **Code Migration Keywords**:
377
+
334
378
  ```
335
379
  Frameworks: React, Vue, Angular, Express, Flask, Django, Rails, Spring, Laravel
336
380
  Languages: Python, Java, JavaScript, TypeScript, Go, Rust, C++, C#, Ruby, PHP
@@ -338,12 +382,14 @@ Terms: "upgrade", "migrate from X to Y", "version", "framework migration"
338
382
  ```
339
383
 
340
384
  **Data Migration Keywords**:
385
+
341
386
  ```
342
387
  Databases: MySQL, PostgreSQL, MongoDB, Redis, DynamoDB, Cassandra, Oracle, SQL Server
343
388
  Terms: "database", "schema", "data migration", "move data", "storage", "S3", "blob"
344
389
  ```
345
390
 
346
391
  **Architecture Migration Keywords**:
392
+
347
393
  ```
348
394
  Patterns: REST, GraphQL, gRPC, SOAP, Monolith, Microservices, Serverless, Event-Driven
349
395
  Terms: "refactor to", "architecture", "pattern", "system design", "restructure"
@@ -352,24 +398,26 @@ Terms: "refactor to", "architecture", "pattern", "system design", "restructure"
352
398
  ### Ambiguity Handling
353
399
 
354
400
  **Multiple Matches** (e.g., "Migrate MySQL database to PostgreSQL and refactor to microservices"):
401
+
355
402
  - Scores: Code=0, Data=2 ("MySQL", "PostgreSQL"), Architecture=1 ("microservices")
356
403
  - Primary Type: Data (highest score)
357
404
  - Classification: Data + Architecture (mixed)
358
405
  - Prompt user: "Detected primary type: Data. Also includes architecture changes. Proceed as data migration? [Y/n/specify]"
359
406
 
360
407
  **No Clear Matches** (e.g., "Modernize application"):
408
+
361
409
  - Scores: Code=0, Data=0, Architecture=0
362
410
  - Classification: General
363
411
  - Prompt user: "Unable to detect migration type. Please specify: [Code/Data/Architecture/Mixed]"
364
412
 
365
413
  ### Confidence Levels
366
414
 
367
- | Score | Confidence | Action |
368
- |-------|------------|--------|
369
- | Single category with matches | 100% | Auto-detect, confirm in interactive |
370
- | Primary category (>50% of matches) | 70-90% | Auto-detect, prompt to confirm |
371
- | Tied categories | 50% | Prompt user to choose |
372
- | No matches | 0% | Classify as General, prompt user |
415
+ | Score | Confidence | Action |
416
+ | ---------------------------------- | ---------- | ----------------------------------- |
417
+ | Single category with matches | 100% | Auto-detect, confirm in interactive |
418
+ | Primary category (>50% of matches) | 70-90% | Auto-detect, prompt to confirm |
419
+ | Tied categories | 50% | Prompt user to choose |
420
+ | No matches | 0% | Classify as General, prompt user |
373
421
 
374
422
  ---
375
423
 
@@ -377,14 +425,14 @@ Terms: "refactor to", "architecture", "pattern", "system design", "restructure"
377
425
 
378
426
  External research is automatically triggered by the gap-analyzer during Phase 2 (Target State Planning). The level of research depends on migration type.
379
427
 
380
- | Migration Type | External Research | Query Focus | Priority Sources |
381
- |---------------|-------------------|-------------|------------------|
382
- | **Code** (Version Upgrade) | **Required** | Migration guides, breaking changes, API changes | Official docs, release notes, upgrade guides |
383
- | **Code** (Library Swap) | **Required** | Comparison guides, migration paths, compatibility | Official docs, community migration stories |
384
- | **Data** (Platform Change) | **Recommended** | Compatibility, data transformation, tooling | Official docs, DBA resources, cloud provider docs |
385
- | **Data** (Schema Change) | **Optional** | Best practices only | Internal docs preferred |
386
- | **Architecture** | **Recommended** | Pattern implementation, migration strategies | Architecture blogs, official docs |
387
- | **General** | **Optional** | Clarification research | N/A |
428
+ | Migration Type | External Research | Query Focus | Priority Sources |
429
+ | -------------------------- | ----------------- | ------------------------------------------------- | ------------------------------------------------- |
430
+ | **Code** (Version Upgrade) | **Required** | Migration guides, breaking changes, API changes | Official docs, release notes, upgrade guides |
431
+ | **Code** (Library Swap) | **Required** | Comparison guides, migration paths, compatibility | Official docs, community migration stories |
432
+ | **Data** (Platform Change) | **Recommended** | Compatibility, data transformation, tooling | Official docs, DBA resources, cloud provider docs |
433
+ | **Data** (Schema Change) | **Optional** | Best practices only | Internal docs preferred |
434
+ | **Architecture** | **Recommended** | Pattern implementation, migration strategies | Architecture blogs, official docs |
435
+ | **General** | **Optional** | Clarification research | N/A |
388
436
 
389
437
  ### When to Skip External Research
390
438
 
@@ -396,26 +444,29 @@ External research is automatically triggered by the gap-analyzer during Phase 2
396
444
 
397
445
  ### Research Depth by Complexity
398
446
 
399
- | Complexity | Research Depth | Queries | Focus |
400
- |------------|---------------|---------|-------|
401
- | Simple (<10 files) | Essential | 2-3 | Official migration guide only |
402
- | Moderate (10-30 files) | Essential | 2-3 | Migration guide + breaking changes |
403
- | Complex (>30 files) | Expanded | 4-6 | Guide + breaking changes + community experiences |
404
- | Data migration (any size) | Expanded | 4-6 | Guide + compatibility + data transformation |
447
+ | Complexity | Research Depth | Queries | Focus |
448
+ | ------------------------- | -------------- | ------- | ------------------------------------------------ |
449
+ | Simple (<10 files) | Essential | 2-3 | Official migration guide only |
450
+ | Moderate (10-30 files) | Essential | 2-3 | Migration guide + breaking changes |
451
+ | Complex (>30 files) | Expanded | 4-6 | Guide + breaking changes + community experiences |
452
+ | Data migration (any size) | Expanded | 4-6 | Guide + compatibility + data transformation |
405
453
 
406
454
  ### Example Research Queries
407
455
 
408
456
  **Code Migration (Vue 2 → Vue 3)**:
457
+
409
458
  - Primary: "Vue 2 to Vue 3 migration guide"
410
459
  - Secondary: "Vue 3 breaking changes 2024"
411
460
  - Expanded: "Vue 3 composition API migration examples"
412
461
 
413
462
  **Data Migration (MySQL → PostgreSQL)**:
463
+
414
464
  - Primary: "MySQL to PostgreSQL migration guide"
415
465
  - Secondary: "PostgreSQL migration tools 2024"
416
466
  - Expanded: "MySQL PostgreSQL syntax differences"
417
467
 
418
468
  **Architecture Migration (REST → GraphQL)**:
469
+
419
470
  - Primary: "REST to GraphQL migration guide"
420
471
  - Secondary: "GraphQL migration best practices"
421
472
  - Expanded: "REST GraphQL coexistence patterns"
@@ -425,12 +476,14 @@ External research is automatically triggered by the gap-analyzer during Phase 2
425
476
  ## Summary
426
477
 
427
478
  **Key Takeaways**:
479
+
428
480
  1. **Code**: Focus on functional equivalence, incremental migration, medium risk
429
481
  2. **Data**: Focus on data integrity, dual-run often required, high risk
430
482
  3. **Architecture**: Focus on system-level behavior, strangler fig pattern, high risk
431
483
  4. **General**: Conservative defaults, extra clarification with user
432
484
 
433
485
  **References in SKILL.md**:
486
+
434
487
  - Initialization (Step 2): Type detection algorithm
435
488
  - Phase 1 (Analysis): Type-specific analysis focus
436
489
  - Phase 2 (Target Planning): Type-specific gap analysis + external research
@@ -120,7 +120,7 @@ Use question:
120
120
 
121
121
  ### Step 4: Enter Planning Mode
122
122
 
123
- **Use the `EnterPlanMode` tool to present the fix plan for user approval.**
123
+ **Use the `Plan Agent` to present the fix plan for user approval.**
124
124
 
125
125
  Standards context from Step 2 and analysis from Step 3 MUST inform the plan.
126
126
 
@@ -151,9 +151,9 @@ If no standards exist: "No AI SDLC standards found. Consider running `/flow-init
151
151
  - [ ] [Guideline from standard file] (from `standards/[path]`)
152
152
  ```
153
153
 
154
- ### ExitPlanMode Gate: Mandatory Sections
154
+ ### User approval gate: Mandatory Sections
155
155
 
156
- **BLOCKING: Do NOT call `ExitPlanMode` until the plan file contains:**
156
+ **BLOCKING: Do NOT ask for user approval until the plan file contains:**
157
157
 
158
158
  1. **"## Bug Analysis"** — root cause hypothesis with evidence
159
159
  2. **"## Proposed Fix"** — what changes and why
@@ -161,7 +161,7 @@ If no standards exist: "No AI SDLC standards found. Consider running `/flow-init
161
161
  4. **"## Applicable Standards"** — standards read and key guidelines
162
162
  5. **"## Standards Compliance Checklist"** — checkboxes for applicable guidelines
163
163
 
164
- If any section is missing, add it before calling ExitPlanMode.
164
+ If any section is missing, add it before asking for user approval.
165
165
 
166
166
  ### Step 5: TDD Red Gate
167
167
 
@@ -12,7 +12,7 @@ Find and parse documentation files, extract explicitly stated standards, return
12
12
  2. **CONTRIBUTING.md** — PR requirements, commit conventions, testing requirements, code review standards
13
13
  3. **ARCHITECTURE.md** / `docs/architecture/` — Design patterns, architectural decisions
14
14
  4. **ADRs** (Architecture Decision Records) — `adr/`, `decisions/`, `docs/decisions/` directories
15
- 5. **AGENTS.md** / `.claude/AGENTS.md` — AI-specific coding instructions and project conventions
15
+ 5. **AGENTS.md** / `AGENTS.md` — AI-specific coding instructions and project conventions
16
16
  6. **Code of Conduct**, **STYLEGUIDE.md** — If present
17
17
 
18
18
  ## What to Extract
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owflow",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Spec-driven development AI workflow for OpenCode",
5
5
  "type": "module",
6
6
  "module": "index.ts",