nw-legacy-refactoring-ddd

Featured

DDD-guided legacy refactoring patterns -- strangler fig, bubble context, ACL migration, 14 tactical/strategic/infrastructure patterns, and incremental monolith-to-microservices methodology

Code & Development 636 stars 68 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
93
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Legacy Refactoring with DDD Refactoring legacy systems using Domain-Driven Design as the strategic compass. DDD tells you WHERE and WHY to refactor; traditional techniques (progressive-refactoring, mikado-method) tell you HOW. Principle: "Start simple, grow big" -- incremental steps tested at each stage. ## Decision Framework: Before Refactoring Ask three questions before any DDD refactoring: 1. **Business value**: what business outcome does refactoring this area enable? 2. **Risk**: what breaks if we refactor vs. if we do not? 3. **Cost**: time, effort, disruption -- is it justified? ### When NOT to Refactor - System scheduled for replacement - Stable system with no new development - Cost exceeds benefit - Team lacks DDD experience with no learning budget - Domain is genuinely simple (CRUD-dominated) ### Cynefin-Refactoring Mapping | Cynefin Domain | Refactoring Approach | |---------------|---------------------| | Clear | Apply established patterns directly; standard refactoring catalogs | | Complicated | Analyze with experts, then apply patterns; multiple valid solutions | | Complex | Probe with safe-to-fail experiments; EventStorming to discover patterns | | Chaotic | Act first to stabilize, then refactor; emergency patches acceptable | | Confusion | Gather information before deciding; avoid premature refactoring | ## Migration Methodology (4 Phases) ### Phase 1: Understand and Stabilize 1. Run EventStorming to map current system (Big Picture) 2. Assess complexi...

Details

Author
nWave-ai
Repository
nWave-ai/nWave
Created
9 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

legacy-code-modernization

Systematic, language-independent framework for safely refactoring and modernizing legacy codebases. Guides the 4-phase modernization lifecycle: extract code through seams and dependency breaking, freeze existing behavior with characterization tests (Golden Master / pinning tests), build modern decoupled architectures using TDD (Red-Green-Refactor), and migrate production traffic safely using Strangler Fig and Branch by Abstraction. Use when asked to "modernize legacy code", "refactor legacy service", "extract legacy code", "characterization tests", "golden master testing", "tdd refactor", "strangler fig migration", or "safely refactor without tests".

1 Updated today
nainishshafi
Web & Frontend Featured

nw-domain-driven-design

Strategic and tactical DDD patterns, bounded context discovery, context mapping, aggregate design rules, and decision frameworks for when to apply DDD

636 Updated today
nWave-ai
Code & Development Listed

refactoring-strategy

Systematic refactoring methodology with safety guarantees for polyglot codebases. TRIGGER when: user asks to refactor code, restructure a module, split a monolith, do a large rename, extract a service, apply strangler fig, or plan a safe migration of existing code. Also when tech-debt-tracker findings need execution. DO NOT TRIGGER when: user is fixing a bug (use focused-fix), doing TDD on new code (use tdd), or finding tech debt without a plan to fix it (use tech-debt-tracker).

1 Updated 1 months ago
DROOdotFOO