← Zurück zu Open Source Due Diligence Team

Skill · Version 1.0.0

Schrittweise Architekturmigration

Ersetzt Architektur in vollständigen prüfbaren Schritten mit klarer Verantwortung während alter und neuer Parallelbetrieb.

incremental-architecture-migration

Teammitglieder mit diesem Skill

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze ihn zur Modernisierung eines Altsystems ohne störende vollständige Neuentwicklung.

Wobei hilft er dir?

  • Findet eine Grenze für den Austausch eines vollständigen Funktionspfads.
  • Definiert maßgebliche Datenverantwortung während parallelen Betriebs.
  • Prüft gemeinsame Verträge und bestimmt Bedingungen zur Adapterentfernung.

Das könntest du fragen

Ersetze den alten Preisservice ohne Migration unbeteiligter Bestellfunktionen. Führe einen vereinbarten Preisfall durch den Ersatz und vergleiche ihn mit dem Altpfad. Dokumentiere die Schreibverantwortung während des Parallelbetriebs.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

Incremental Architecture Migration

Large structural changes — replacing a legacy persistence layer, extracting a bounded context, migrating a state-management pattern or replacing a core subsystem — fail when attempted as a single long-lived "big-bang" branch. Migrate incrementally on the main line so the system stays shippable after every step.

1. Core Migration Patterns

Choose the migration topology that matches where the seam sits:

  • Branch by Abstraction:
    1. Introduce an abstraction interface in front of the legacy subsystem and route existing callers through it.
    2. Implement the legacy adapter behind the interface and verify zero regressions.
    3. Build the new implementation behind the same interface, tested against the shared contract suite.
    4. Switch callers or configuration from the legacy implementation to the new one incrementally.
    5. Remove the legacy implementation and, if no longer needed, simplify the abstraction.
  • Strangler Fig (Edge / Routing Seam):
    • Intercept requests, commands, routes or events at the perimeter.
    • Route one vertical slice (a single endpoint, command type or feature flow) to the modernized module while all remaining slices continue through the legacy path.
    • Expand migrated slices until the legacy path has zero traffic and can be retired.
  • Anti-Corruption Layer (ACL):
    • Prevent legacy data shapes, naming quirks and mutability assumptions from leaking into the modernized module.
    • Translate between legacy models and clean domain models inside a dedicated boundary adapter so the new code stays clean from day one.

2. Coexistence & Data Synchronization

During an incremental transition, old and new modules often coexist in production:

  • Single source of truth: designate clearly whether the old store or the new store is authoritative at each stage.
  • Dual-read / Shadow verification: where high confidence is required, run the new read/calculation path alongside the legacy path, return the legacy result to callers, and compare discrepancies in structured logs or tests before flipping authority.
  • Safe cutover: make the switch between legacy and new paths controllable at a single enabling point (configuration, dependency injection binding or feature flag) so rollback is immediate if an unexpected production edge case surfaces.

3. Preventing Half-Migrated Limbo

The biggest risk of incremental migration is stopping halfway and leaving two competing architectures permanently in the codebase:

  • Define explicit stage gates: for every migration phase, state what is introduced, which callers move, what temporary adapter exists, and the exact condition that triggers adapter removal.
  • Run contract tests against both implementations: write a shared behavioral test suite against the abstraction interface so both the legacy adapter and the modernized implementation are verified against identical expectations.
  • Finish a vertical slice end-to-end: migrate one complete capability (and delete its legacy branch) before opening migrations across five unrelated areas simultaneously.
  • Coordinate structural boundaries: align any cross-module architectural shift with the architect and relevant technology specialists before widening the migration scope.

Enthaltene Dateien 1

  • SKILL.md