owflow 0.1.1 → 0.1.2

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 (103) 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/skills/codebase-analyzer/SKILL.md +162 -0
  44. package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -0
  45. package/dist/skills/codebase-analyzer/references/combined.md +31 -0
  46. package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -0
  47. package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -0
  48. package/dist/skills/codebase-analyzer/references/migration-target.md +23 -0
  49. package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -0
  50. package/dist/skills/development/SKILL.md +669 -0
  51. package/dist/skills/docs-manager/SKILL.md +379 -0
  52. package/dist/skills/docs-manager/docs/INDEX.md +199 -0
  53. package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -0
  54. package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -0
  55. package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -0
  56. package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -0
  57. package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -0
  58. package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -0
  59. package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -0
  60. package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -0
  61. package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -0
  62. package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -0
  63. package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -0
  64. package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -0
  65. package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -0
  66. package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -0
  67. package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -0
  68. package/dist/skills/docs-manager/references/claude-md-template.md +29 -0
  69. package/dist/skills/docs-manager/references/index-md-template.md +73 -0
  70. package/dist/skills/flow-init/SKILL.md +198 -0
  71. package/dist/skills/flow-init/references/architecture-template.md +45 -0
  72. package/dist/skills/flow-init/references/roadmap-templates.md +93 -0
  73. package/dist/skills/flow-init/references/tech-stack-template.md +70 -0
  74. package/dist/skills/flow-init/references/vision-templates.md +75 -0
  75. package/dist/skills/implementation-plan-executor/SKILL.md +378 -0
  76. package/dist/skills/implementation-verifier/SKILL.md +307 -0
  77. package/dist/skills/migration/SKILL.md +380 -0
  78. package/dist/skills/migration/references/migration-strategies.md +397 -0
  79. package/dist/skills/migration/references/migration-types.md +437 -0
  80. package/dist/skills/orchestrator-framework/SKILL.md +65 -0
  81. package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +47 -0
  82. package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +329 -0
  83. package/dist/skills/performance/SKILL.md +418 -0
  84. package/dist/skills/performance/references/performance-optimization-guide.md +365 -0
  85. package/dist/skills/product-design/SKILL.md +843 -0
  86. package/dist/skills/product-design/references/characteristic-detection.md +92 -0
  87. package/dist/skills/product-design/references/interaction-patterns.md +206 -0
  88. package/dist/skills/product-design/references/visual-companion.md +190 -0
  89. package/dist/skills/product-design/server/index.ts +359 -0
  90. package/dist/skills/product-design/server/template.html +256 -0
  91. package/dist/skills/quick-bugfix/SKILL.md +241 -0
  92. package/dist/skills/research/SKILL.md +493 -0
  93. package/dist/skills/research/references/brainstorming-techniques.md +84 -0
  94. package/dist/skills/research/references/design-techniques.md +40 -0
  95. package/dist/skills/research/references/research-methodologies.md +710 -0
  96. package/dist/skills/standards-discover/SKILL.md +236 -0
  97. package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -0
  98. package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -0
  99. package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -0
  100. package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -0
  101. package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -0
  102. package/dist/skills/standards-update/SKILL.md +159 -0
  103. package/package.json +7 -6
@@ -0,0 +1,397 @@
1
+ # Migration Strategies Reference
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.
4
+
5
+ **Purpose:** Pattern guide for migration execution strategies (incremental, rollback, dual-run)
6
+
7
+ This reference provides decision criteria and implementation patterns for the three core migration strategies supported by the migration orchestrator.
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ 1. [Overview](#overview)
14
+ 2. [Incremental Migration](#incremental-migration)
15
+ 3. [Rollback Planning](#rollback-planning)
16
+ 4. [Dual-Run Strategy](#dual-run-strategy)
17
+ 5. [Strategy Selection Decision Tree](#strategy-selection-decision-tree)
18
+ 6. [Combined Strategies](#combined-strategies)
19
+
20
+ ---
21
+
22
+ ## Overview
23
+
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
+
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
+
32
+ ### Key Principles
33
+
34
+ 1. **Risk Mitigation**: Choose strategies that minimize risk for your context
35
+ 2. **Composability**: Strategies can be combined (e.g., incremental + rollback)
36
+ 3. **Checkpoint-Based**: All strategies emphasize verification points
37
+ 4. **Reversibility**: Plan how to undo changes before making them
38
+
39
+ ---
40
+
41
+ ## Incremental Migration
42
+
43
+ ### Concept
44
+
45
+ **Definition**: Break migration into smaller phases, complete one phase fully before starting next
46
+
47
+ **Pattern**:
48
+ ```
49
+ Current State → Phase 1 → Verify → Phase 2 → Verify → Phase 3 → Verify → Target State
50
+ ↑ ↑ ↑
51
+ Checkpoint Checkpoint Checkpoint
52
+ ```
53
+
54
+ ### When to Use
55
+
56
+ **Strong Indicators**:
57
+ - Large migration scope (>50 files, >5,000 lines affected)
58
+ - Multiple independent subsystems to migrate
59
+ - Complex breaking changes requiring staged adaptation
60
+ - Team needs to learn new technology during migration
61
+
62
+ **Avoid If**:
63
+ - Small, isolated change (<10 files)
64
+ - Tight deadline requiring fast completion
65
+ - No logical breakpoints in migration
66
+
67
+ ### Implementation Pattern
68
+
69
+ **Phase Definition**:
70
+ 1. **Identify Natural Boundaries**: Modules, layers, features that can migrate independently
71
+ 2. **Define Dependencies**: Which phases must complete before others
72
+ 3. **Set Verification Criteria**: How to validate each phase succeeded
73
+ 4. **Plan Checkpoints**: Git tags, deployment points, rollback triggers
74
+
75
+ **Example - Framework Migration (Vue 2 → Vue 3)**:
76
+ ```
77
+ Phase 1: Core dependencies (package.json, build config)
78
+ ↓ Verify: App still builds and runs
79
+ Phase 2: Shared components (buttons, forms, layouts)
80
+ ↓ Verify: Component tests pass
81
+ Phase 3: Feature modules (user management, dashboard)
82
+ ↓ Verify: Feature tests pass
83
+ Phase 4: Router and state management
84
+ ↓ Verify: Navigation and data flow work
85
+ Phase 5: Cleanup (remove compatibility shims)
86
+ ↓ Verify: Full test suite passes
87
+ ```
88
+
89
+ **Task Group Structure**:
90
+ ```markdown
91
+ ### Task Group 1: Phase 1 - Core Dependencies
92
+ - [ ] 1.1 Write tests for compatibility layer
93
+ - [ ] 1.2 Upgrade core packages
94
+ - [ ] 1.3 Update build configuration
95
+ - [ ] 1.4 Verify app builds and runs
96
+ - [ ] 1.5 Run Phase 1 checkpoint tests
97
+
98
+ ### Task Group 2: Phase 2 - Shared Components
99
+ [continues with next phase after Phase 1 verified]
100
+ ```
101
+
102
+ ### Benefits
103
+
104
+ - **Lower Risk**: Problems isolated to current phase
105
+ - **Easy Rollback**: Revert to previous phase checkpoint
106
+ - **Learning Curve**: Team learns as they progress
107
+ - **Progress Visibility**: Clear milestones
108
+
109
+ ### Challenges
110
+
111
+ - **Longer Duration**: More phases = more time
112
+ - **Compatibility Layers**: May need temporary bridges between old/new
113
+ - **Coordination**: Larger teams need phase synchronization
114
+
115
+ ---
116
+
117
+ ## Rollback Planning
118
+
119
+ ### Concept
120
+
121
+ **Definition**: Document undo procedures for each migration phase before executing
122
+
123
+ **Pattern**:
124
+ ```
125
+ Before Phase 1: Define rollback procedure
126
+ Execute Phase 1
127
+ If failure: Execute rollback procedure → Back to known good state
128
+ If success: Continue to Phase 2
129
+ ```
130
+
131
+ ### When to Use
132
+
133
+ **Strong Indicators**:
134
+ - Production systems (downtime is costly)
135
+ - Data migrations (data loss risk)
136
+ - Critical business functionality
137
+ - Compliance/regulatory requirements
138
+ - First-time migration (learning experience)
139
+
140
+ **Always Use For**:
141
+ - Data migrations (required)
142
+ - Production deployments (required)
143
+ - Architecture migrations affecting multiple systems
144
+
145
+ ### Implementation Pattern
146
+
147
+ **Rollback Plan Structure** (`planning/rollback-plan.md`):
148
+ ```markdown
149
+ # Rollback Plan: [Migration Name]
150
+
151
+ ## Rollback Overview
152
+ - **Rollback Complexity**: Simple | Moderate | Complex
153
+ - **Data Loss Risk**: None | Minimal | Moderate | High
154
+ - **Rollback Time Estimate**: [minutes/hours]
155
+
156
+ ## Phase 1: [Phase Name] Rollback
157
+ **Trigger**: [What indicates rollback needed]
158
+ **Procedure**:
159
+ 1. [Undo step 1]
160
+ 2. [Undo step 2]
161
+ **Verification**: [How to verify rollback succeeded]
162
+ **Data Recovery**: [How to restore data if modified]
163
+
164
+ ## Phase 2: [Phase Name] Rollback
165
+ [Same structure for each phase]
166
+ ```
167
+
168
+ **Rollback Categories**:
169
+
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 |
176
+
177
+ **Rollback Testing Strategy**:
178
+ - **Non-Destructive Test**: Test rollback in non-prod first
179
+ - **Documented Steps**: Exact commands/procedures
180
+ - **Validation Criteria**: How to verify rollback succeeded
181
+ - **Time Estimate**: How long rollback takes (critical for production)
182
+
183
+ ### Benefits
184
+
185
+ - **Confidence**: Knowing you can undo increases willingness to proceed
186
+ - **Recovery Speed**: Pre-planned procedures faster than improvised
187
+ - **Risk Management**: Downside risk clearly understood
188
+ - **Audit Trail**: Documented for compliance/retrospectives
189
+
190
+ ### Challenges
191
+
192
+ - **Planning Overhead**: Requires upfront effort
193
+ - **Testing Rollback**: Hard to test without actually migrating
194
+ - **Data Rollback Complexity**: Can't always undo data changes cleanly
195
+
196
+ ---
197
+
198
+ ## Dual-Run Strategy
199
+
200
+ ### Concept
201
+
202
+ **Definition**: Run old and new systems in parallel, gradually shift traffic from old to new
203
+
204
+ **Pattern**:
205
+ ```
206
+ Old System (100% traffic) → Dual-Run (Old + New in parallel) → New System (100% traffic)
207
+ ↓
208
+ Synchronize data/state
209
+ Verify consistency
210
+ Gradual cutover (10% → 50% → 100%)
211
+ ```
212
+
213
+ ### When to Use
214
+
215
+ **Strong Indicators**:
216
+ - Zero-downtime requirement (24/7 systems)
217
+ - Data migration with live writes during migration
218
+ - Need to compare old vs new behavior in production
219
+ - Large user base (gradual rollout safer)
220
+ - Regulatory requirement for parallel validation
221
+
222
+ **Avoid If**:
223
+ - Systems can't coexist (e.g., Vue 2 and Vue 3 in same app)
224
+ - Data synchronization too complex
225
+ - Cost of running both systems prohibitive
226
+ - Migration scope too small to justify overhead
227
+
228
+ ### Implementation Pattern
229
+
230
+ **Dual-Run Phases**:
231
+
232
+ **Phase 1: Setup Dual Environment**
233
+ - Deploy new system alongside old
234
+ - Configure routing/load balancer for split traffic
235
+ - Set up data synchronization mechanism
236
+
237
+ **Phase 2: Shadow Mode** (new system receives traffic but doesn't affect users)
238
+ - 100% traffic to old system
239
+ - Duplicate writes to new system (shadow)
240
+ - Compare old vs new results
241
+ - Identify discrepancies, fix new system
242
+
243
+ **Phase 3: Gradual Cutover**
244
+ - 10% traffic → new system (monitor closely)
245
+ - 50% traffic → new system (A/B test)
246
+ - 100% traffic → new system (full cutover)
247
+
248
+ **Phase 4: Old System Decommission**
249
+ - Keep old system running for 7-30 days (rollback safety net)
250
+ - After validation period, decommission old system
251
+
252
+ **Dual-Run Plan Structure** (`planning/dual-run-plan.md`):
253
+ ```markdown
254
+ # Dual-Run Plan: [Migration Name]
255
+
256
+ ## Synchronization Strategy
257
+ **Sync Direction**: Old → New | Bidirectional | New → Old
258
+ **Sync Mechanism**: [Database replication | Message queue | API calls]
259
+ **Sync Frequency**: [Real-time | Batch every X minutes]
260
+ **Conflict Resolution**: [Last-write-wins | Manual resolution | Application logic]
261
+
262
+ ## 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 |
269
+
270
+ ## Monitoring
271
+ - **Key Metrics**: [Response time, error rate, data consistency]
272
+ - **Alerting**: [Thresholds that trigger rollback]
273
+ - **Comparison Dashboards**: [Old vs new side-by-side]
274
+ ```
275
+
276
+ **Data Synchronization Patterns**:
277
+
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 |
284
+
285
+ ### Benefits
286
+
287
+ - **Zero Downtime**: Users never experience outage
288
+ - **Gradual Validation**: Catch issues with small % of traffic first
289
+ - **Easy Rollback**: Just shift traffic back to old system
290
+ - **Real-World Testing**: Test new system with actual production load
291
+
292
+ ### Challenges
293
+
294
+ - **Complexity**: Running two systems is operationally complex
295
+ - **Cost**: Double infrastructure during migration period
296
+ - **Data Consistency**: Synchronization bugs can cause data issues
297
+ - **Monitoring Overhead**: Need to watch both systems simultaneously
298
+
299
+ ---
300
+
301
+ ## Strategy Selection Decision Tree
302
+
303
+ Use this decision tree to select appropriate strategies:
304
+
305
+ ```
306
+ START: What's the migration scope?
307
+ │
308
+ ├─ Small (<10 files, <1 day effort)
309
+ │ └─ Strategy: Big-Bang (single phase, direct migration)
310
+ │
311
+ ├─ Medium (10-50 files, 2-5 days effort)
312
+ │ └─ Is system critical?
313
+ │ ├─ Yes → Incremental + Rollback
314
+ │ └─ No → Incremental only
315
+ │
316
+ └─ Large (>50 files, >5 days effort)
317
+ └─ Can system tolerate downtime?
318
+ ├─ Yes → Incremental + Rollback
319
+ └─ No → Incremental + Rollback + Dual-Run
320
+ ```
321
+
322
+ **Special Cases**:
323
+
324
+ - **Data Migration**: Always use Rollback + Dual-Run (if possible)
325
+ - **First-Time Team Migration**: Use Incremental (learning curve)
326
+ - **Architecture Migration**: Consider Dual-Run (old/new systems coexist)
327
+ - **Breaking Changes**: Use Incremental (adapt gradually)
328
+
329
+ ---
330
+
331
+ ## Combined Strategies
332
+
333
+ ### Common Combinations
334
+
335
+ **Incremental + Rollback** (Most Common):
336
+ - Break into phases (Incremental)
337
+ - Document rollback for each phase (Rollback)
338
+ - Use for: Most medium-large migrations
339
+
340
+ **Incremental + Rollback + Dual-Run** (Maximum Safety):
341
+ - Break into phases (Incremental)
342
+ - Document rollback (Rollback)
343
+ - Run old/new in parallel (Dual-Run)
344
+ - Use for: Critical systems, data migrations, zero-downtime requirements
345
+
346
+ **Example - Database Migration (MySQL → PostgreSQL)**:
347
+ ```
348
+ Strategy: Incremental + Rollback + Dual-Run
349
+
350
+ Phase 1: Setup PostgreSQL + Replication
351
+ Rollback: Drop PostgreSQL instance, stop replication
352
+ Dual-Run: MySQL (primary), PostgreSQL (replica)
353
+
354
+ Phase 2: Dual-Write Mode
355
+ Rollback: Stop writes to PostgreSQL, keep MySQL only
356
+ Dual-Run: Write to both, read from MySQL
357
+
358
+ Phase 3: Shadow Read Mode
359
+ Rollback: Revert read queries to MySQL only
360
+ Dual-Run: Write to both, read from PostgreSQL (shadow)
361
+
362
+ Phase 4: Cutover
363
+ Rollback: Switch connection strings back to MySQL
364
+ Dual-Run: Write to both, read from PostgreSQL (primary)
365
+
366
+ Phase 5: Decommission MySQL
367
+ Rollback: Re-activate MySQL, switch back
368
+ Dual-Run: PostgreSQL only (MySQL kept for 30 days)
369
+ ```
370
+
371
+ ### Strategy Complexity Matrix
372
+
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 |
379
+
380
+ **Guidance**: Choose simplest strategy that adequately mitigates your risks. Over-engineering increases complexity without proportional benefit.
381
+
382
+ ---
383
+
384
+ ## Summary
385
+
386
+ **Key Takeaways**:
387
+ 1. **Incremental** = Lower risk through phased execution
388
+ 2. **Rollback** = Safety net for critical systems
389
+ 3. **Dual-Run** = Zero downtime for live systems
390
+ 4. **Combine strategies** based on risk, scope, and requirements
391
+ 5. **Document procedures** before executing migration
392
+
393
+ **References in SKILL.md**:
394
+ - Phase 2 (Specification): Select migration strategy
395
+ - Phase 3 (Planning): Structure implementation plan by strategy
396
+ - Phase 4 (Execution): Execute according to selected strategy
397
+ - Phase 5 (Verification): Test rollback procedures (non-destructive)