---
title: Refactor
description: Refactor redesigns application architecture and delivery model to unlock strategic cloud-native value in resilience, agility, and long-term efficiency.
sidebar:
  label: Refactor
  order: 5
source_url: "https://framework.stackit.cloud/migration/design-and-mobilize/design/refactor/"
source_file: "docs/migration/design-and-mobilize/design/refactor.mdx"
---

## Understanding Refactor

Refactor redesigns parts of the application and delivery model for cloud-native operation.
It is the most change-intensive path and should be applied selectively to strategic workloads.

## When Refactor Is a Good Fit

- **Strategic differentiation** depends on faster product and feature delivery.
- **Current architecture limits resilience or scalability** beyond acceptable risk.
- **Legacy debt blocks innovation** and causes recurring operational instability.
- **Long-term value outweighs near-term migration effort** and governance complexity.

## Design Considerations in STACKIT Context

<CardGrid>
  <Card title="Architecture target state">
    Define decomposition boundaries, service interactions, and reliability patterns.
  </Card>
  <Card title="Engineering and delivery model">
    Align CI/CD, testing strategy, and release governance with the new architecture.
  </Card>
  <Card title="Data and integration refactoring">
    Plan schema transitions, interface versioning, and coexistence strategy.
  </Card>
  <Card title="Operational model">
    Define observability, SRE responsibilities, and incident response for the new runtime.
  </Card>
</CardGrid>

## Recommended Design Flow

<Steps>

1. Baseline technical debt and business constraints.
2. Define target architecture slices and migration increments.
3. Design transition states and compatibility contracts.
4. Validate reliability, security, and performance requirements.
5. Approve phased delivery roadmap with business checkpoints.

</Steps>

## Required Outputs

### Shared outputs across all migration paths

- Approved design decision record with scope, assumptions, and governance sign-off.
- Validation evidence package for security, compliance, and operational readiness.
- Strategy-specific migration runbook draft from the Design phase.
- Handover package for Migration Factory Setup and wave planning.

### Refactor-specific outputs

- Refactor decision record and value hypothesis.
- Target architecture with transition states.
- Delivery roadmap and engineering controls.
- Data/integration transition design.
- Runbook and operations readiness package.

## Diagram Step Reference

### Redesign application/infrastructure architecture

Define the redesigned architecture baseline and transition boundaries.
Describe domain decomposition, target runtime decisions, and interim coexistence states so
refactor increments can be delivered without destabilizing dependent systems.

- <LinkChip href="/migration/design-and-mobilize/design/cloud-design-patterns/">Cloud Design Patterns</LinkChip>
- <LinkChip href="/migration/design-and-mobilize/landing-zones/application-landing-zone/">Application Landing Zone</LinkChip>

### App code development

Define implementation scope and change packaging for the redesigned architecture.
Define increment boundaries, test strategy, and release criteria per slice so code changes remain
deployable within migration wave constraints.

- <LinkChip href="/migration/design-and-mobilize/migration-plan/overview/">Migration Plan</LinkChip>
- <LinkChip href="/migration/design-and-mobilize/migration-factory-setup/runbook-readiness/">Runbook Readiness</LinkChip>

### Full ALM/SDLC

Define delivery pipeline, quality gates, and release governance model.
Align branch strategy, automated checks, and approval gates with security and compliance evidence
requirements before production cutover.

- <LinkChip href="/migration/design-and-mobilize/migration-factory-setup/tooling-and-automation/">Tooling and Automation</LinkChip>
- <LinkChip href="/migration/design-and-mobilize/security-and-compliance/overview/">Security and Compliance</LinkChip>

### Integration

Define integration transition, compatibility handling, and final handover controls.
Specify API contract versioning, rollback behavior, and cross-team cutover communication to reduce
integration regression risk.

- <LinkChip href="/migration/design-and-mobilize/migration-factory-setup/collaboration-and-interfaces/">Collaboration and Interfaces</LinkChip>
- <LinkChip href="/migration/design-and-mobilize/migration-plan/overview/">Migration Plan</LinkChip>
